[network/kio-extras] /: [kcms/netpref] Drop timeout settings
Nicolas Fella
null at kde.org
Sat Jan 18 19:59:34 GMT 2025
Git commit 656240fe5e21254de538f4baf24c087e47bcf023 by Nicolas Fella.
Committed on 18/01/2025 at 15:31.
Pushed by nicolasfella into branch 'master'.
[kcms/netpref] Drop timeout settings
Nothing reads those any more, so showing them is unnecessary and misleading
M +1 -54 doc/kcontrol6/netpref/index.docbook
M +0 -28 kcms/ksaveioconfig.cpp
M +0 -9 kcms/ksaveioconfig.h
M +2 -2 kcms/netpref/kcm_netpref.json
M +0 -20 kcms/netpref/kioslave.kcfg
M +0 -60 kcms/netpref/netpref.cpp
M +0 -6 kcms/netpref/netpref.h
https://invent.kde.org/network/kio-extras/-/commit/656240fe5e21254de538f4baf24c087e47bcf023
diff --git a/doc/kcontrol6/netpref/index.docbook b/doc/kcontrol6/netpref/index.docbook
index 383dd8fa5..5b2c0dd82 100644
--- a/doc/kcontrol6/netpref/index.docbook
+++ b/doc/kcontrol6/netpref/index.docbook
@@ -22,67 +22,14 @@
<keyword>kdebase</keyword>
<keyword>kcontrol</keyword>
<keyword>network</keyword>
-<keyword>timeouts</keyword>
</keywordset>
</articleinfo>
-<sect1 id="timeouts">
+<sect1>
<title>Connection Preferences</title>
-<para>Here you can set timeout values. You might want to tweak them
-if your connection is very slow, but the default settings are
-appropriate for most users.</para>
-
-<para>Here <guilabel>Timeout Values</guilabel> are the length of time
-an application should wait for an answer from a network operation.</para>
-
-<para>You can configure the following timeouts:</para>
-
-<variablelist>
-<varlistentry>
-<term><guilabel>Socket read:</guilabel></term>
-<listitem>
-<para> Some applications use <firstterm>sockets</firstterm> to
-communicate. You can think of a socket as a water tap; while it is
-open, water (or in our case, data) comes out, without any interaction.
-If something stops this flow of data, the application will wait for
-more to come. This could be a very long time, but you can configure a
-maximum time for an application to wait with this option.</para>
-<para>This setting will only apply to &kde; applications, of course.</para>
-</listitem>
-</varlistentry>
-
-<varlistentry>
-<term><guilabel>Proxy connect:</guilabel></term>
-<listitem>
-<para>
-Sets how long to wait for a connection to a proxy server, if one is configured.
-</para>
-</listitem>
-</varlistentry>
-
-<varlistentry>
-<term><guilabel>Server connect:</guilabel></term>
-<listitem>
-<para>
-Sets how long to wait for a connection to a remote server.
-</para>
-</listitem>
-</varlistentry>
-
-<varlistentry>
-<term><guilabel>Server response:</guilabel></term>
-<listitem>
-<para>
-Sets how long to wait for a reply from a remote server.
-</para>
-</listitem>
-</varlistentry>
-
-</variablelist>
-
<para>You can configure <guilabel>FTP Options</guilabel> here. At
present there is just two options:</para>
<variablelist>
diff --git a/kcms/ksaveioconfig.cpp b/kcms/ksaveioconfig.cpp
index 4ac1a413e..33b6acb61 100644
--- a/kcms/ksaveioconfig.cpp
+++ b/kcms/ksaveioconfig.cpp
@@ -66,34 +66,6 @@ void KSaveIOConfig::setProxyDisplayUrlFlags(int flags)
cfg.sync();
}
-void KSaveIOConfig::setReadTimeout(int _timeout)
-{
- KConfigGroup cfg(config(), QString());
- cfg.writeEntry("ReadTimeout", qMax(MIN_TIMEOUT_VALUE, _timeout));
- cfg.sync();
-}
-
-void KSaveIOConfig::setConnectTimeout(int _timeout)
-{
- KConfigGroup cfg(config(), QString());
- cfg.writeEntry("ConnectTimeout", qMax(MIN_TIMEOUT_VALUE, _timeout));
- cfg.sync();
-}
-
-void KSaveIOConfig::setProxyConnectTimeout(int _timeout)
-{
- KConfigGroup cfg(config(), QString());
- cfg.writeEntry("ProxyConnectTimeout", qMax(MIN_TIMEOUT_VALUE, _timeout));
- cfg.sync();
-}
-
-void KSaveIOConfig::setResponseTimeout(int _timeout)
-{
- KConfigGroup cfg(config(), QString());
- cfg.writeEntry("ResponseTimeout", qMax(MIN_TIMEOUT_VALUE, _timeout));
- cfg.sync();
-}
-
void KSaveIOConfig::setMarkPartial(bool _mode)
{
KConfigGroup cfg(config(), QString());
diff --git a/kcms/ksaveioconfig.h b/kcms/ksaveioconfig.h
index 532712fb0..d3d4931c1 100644
--- a/kcms/ksaveioconfig.h
+++ b/kcms/ksaveioconfig.h
@@ -33,15 +33,6 @@ enum ProxyType {
int proxyDisplayUrlFlags();
void setProxyDisplayUrlFlags(int);
-/** Timeout Settings */
-void setReadTimeout(int);
-
-void setConnectTimeout(int);
-
-void setProxyConnectTimeout(int);
-
-void setResponseTimeout(int);
-
/** Proxy Settings */
void setUseReverseProxy(bool);
diff --git a/kcms/netpref/kcm_netpref.json b/kcms/netpref/kcm_netpref.json
index de46628bd..4b4b35dfb 100644
--- a/kcms/netpref/kcm_netpref.json
+++ b/kcms/netpref/kcm_netpref.json
@@ -1,7 +1,7 @@
{
"KPlugin": {
"BugReportUrl": "https://bugs.kde.org/enter_bug.cgi?product=systemsettings&component=kcm_netpref",
- "Description": "Configure generic network preferences, like timeout values",
+ "Description": "Configure generic network preferences",
"Description[ar]": "يضبط تفضيلات الشبكة العامة مثل قيم المهلات الإتصالات",
"Description[be]": "Наладжванне агульных параметраў сеткі, накшталт тэрмінаў чакання",
"Description[bg]": "Настройване на общите мрежови параметри",
@@ -88,7 +88,7 @@
"Name[zh_TW]": "連線偏好設定"
},
"X-DocPath": "kcontrol6/netpref/index.html",
- "X-KDE-Keywords": "timeout,iopref,netpref,network preferences,ftp",
+ "X-KDE-Keywords": "iopref,netpref,network preferences,ftp",
"X-KDE-Keywords[ar]": "وقت المهلة,iopref,netpref,تفضيلات الشبكة,ftp",
"X-KDE-Keywords[be]": "тэрмін чакання,iopref,netpref,налады сеткі,ftp",
"X-KDE-Keywords[bg]": "таймаут, iopref, netpref, мрежови предпочитания, ftp",
diff --git a/kcms/netpref/kioslave.kcfg b/kcms/netpref/kioslave.kcfg
index b017d4a6d..87f965db9 100644
--- a/kcms/netpref/kioslave.kcfg
+++ b/kcms/netpref/kioslave.kcfg
@@ -8,26 +8,6 @@
<entry name="PersistentProxyConnection" type="Bool">
<default>false</default>
</entry>
- <entry name="ProxyConnectTimeout" type="UInt" >
- <default>10</default>
- <min>2</min>
- <max>3600</max>
- </entry>
- <entry name="ConnectTimeout" type="UInt" >
- <default>20</default>
- <min>2</min>
- <max>3600</max>
- </entry>
- <entry name="ReadTimeout" type="UInt" >
- <default>15</default>
- <min>2</min>
- <max>3600</max>
- </entry>
- <entry name="ResponseTimeout" type="UInt" >
- <default>600</default>
- <min>2</min>
- <max>3600</max>
- </entry>
</group>
<group name="Global Options">
<entry name="MarkPartial" type="Bool">
diff --git a/kcms/netpref/netpref.cpp b/kcms/netpref/netpref.cpp
index 167eb84ed..00f89a561 100644
--- a/kcms/netpref/netpref.cpp
+++ b/kcms/netpref/netpref.cpp
@@ -19,52 +19,12 @@
// Local
#include "../ksaveioconfig.h"
-static constexpr int s_maxTimeoutValue = 3600;
-
K_PLUGIN_CLASS_WITH_JSON(KIOPreferences, "kcm_netpref.json")
KIOPreferences::KIOPreferences(QObject *parent, const KPluginMetaData &data)
: KCModule(parent, data)
{
QVBoxLayout *mainLayout = new QVBoxLayout(widget());
- gb_Timeout = new QGroupBox(i18n("Timeout Values"), widget());
- gb_Timeout->setWhatsThis(
- i18np("Here you can set timeout values. "
- "You might want to tweak them if your "
- "connection is very slow. The maximum "
- "allowed value is 1 second.",
- "Here you can set timeout values. "
- "You might want to tweak them if your "
- "connection is very slow. The maximum "
- "allowed value is %1 seconds.",
- s_maxTimeoutValue));
- gb_Timeout->setFlat(true);
- mainLayout->addWidget(gb_Timeout);
-
- QFormLayout *timeoutLayout = new QFormLayout(gb_Timeout);
- timeoutLayout->setFormAlignment(Qt::AlignHCenter);
- sb_socketRead = new KPluralHandlingSpinBox(widget());
- sb_socketRead->setSuffix(ki18np(" second", " seconds"));
- connect(sb_socketRead, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged);
- timeoutLayout->addRow(i18n("Soc&ket read:"), sb_socketRead);
-
- sb_proxyConnect = new KPluralHandlingSpinBox(widget());
- sb_proxyConnect->setValue(0);
- sb_proxyConnect->setSuffix(ki18np(" second", " seconds"));
- connect(sb_proxyConnect, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged);
- timeoutLayout->addRow(i18n("Pro&xy connect:"), sb_proxyConnect);
-
- sb_serverConnect = new KPluralHandlingSpinBox(widget());
- sb_serverConnect->setValue(0);
- sb_serverConnect->setSuffix(ki18np(" second", " seconds"));
- connect(sb_serverConnect, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged);
- timeoutLayout->addRow(i18n("Server co&nnect:"), sb_serverConnect);
-
- sb_serverResponse = new KPluralHandlingSpinBox(widget());
- sb_serverResponse->setValue(0);
- sb_serverResponse->setSuffix(ki18np(" second", " seconds"));
- connect(sb_serverResponse, qOverload<int>(&QSpinBox::valueChanged), this, &KIOPreferences::configChanged);
- timeoutLayout->addRow(i18n("&Server response:"), sb_serverResponse);
QGroupBox *gb_Global = new QGroupBox(i18n("Global Options"), widget());
gb_Global->setFlat(true);
@@ -132,16 +92,6 @@ void KIOPreferences::load()
{
KProtocolManager proto;
- sb_socketRead->setRange(MIN_TIMEOUT_VALUE, s_maxTimeoutValue);
- sb_serverResponse->setRange(MIN_TIMEOUT_VALUE, s_maxTimeoutValue);
- sb_serverConnect->setRange(MIN_TIMEOUT_VALUE, s_maxTimeoutValue);
- sb_proxyConnect->setRange(MIN_TIMEOUT_VALUE, s_maxTimeoutValue);
-
- sb_socketRead->setValue(proto.readTimeout());
- sb_serverResponse->setValue(proto.responseTimeout());
- sb_serverConnect->setValue(proto.connectTimeout());
- sb_proxyConnect->setValue(proto.proxyConnectTimeout());
-
cb_globalMarkPartial->setChecked(proto.markPartial());
sb_globalMinimumKeepSize->setRange(0, 1024 * 1024 * 1024 /* 1 GiB */);
sb_globalMinimumKeepSize->setValue(proto.minimumKeepSize());
@@ -154,11 +104,6 @@ void KIOPreferences::load()
void KIOPreferences::save()
{
- KSaveIOConfig::setReadTimeout(sb_socketRead->value());
- KSaveIOConfig::setResponseTimeout(sb_serverResponse->value());
- KSaveIOConfig::setConnectTimeout(sb_serverConnect->value());
- KSaveIOConfig::setProxyConnectTimeout(sb_proxyConnect->value());
-
KSaveIOConfig::setMarkPartial(cb_globalMarkPartial->isChecked());
KSaveIOConfig::setMinimumKeepSize(sb_globalMinimumKeepSize->value());
@@ -174,11 +119,6 @@ void KIOPreferences::save()
void KIOPreferences::defaults()
{
- sb_socketRead->setValue(DEFAULT_READ_TIMEOUT);
- sb_serverResponse->setValue(DEFAULT_RESPONSE_TIMEOUT);
- sb_serverConnect->setValue(DEFAULT_CONNECT_TIMEOUT);
- sb_proxyConnect->setValue(DEFAULT_PROXY_CONNECT_TIMEOUT);
-
cb_globalMarkPartial->setChecked(true);
cb_ftpEnablePasv->setChecked(true);
diff --git a/kcms/netpref/netpref.h b/kcms/netpref/netpref.h
index d0196e450..b479942e3 100644
--- a/kcms/netpref/netpref.h
+++ b/kcms/netpref/netpref.h
@@ -28,16 +28,10 @@ protected Q_SLOTS:
private:
QGroupBox *gb_Ftp;
- QGroupBox *gb_Timeout;
QCheckBox *cb_globalMarkPartial;
KPluralHandlingSpinBox *sb_globalMinimumKeepSize;
QCheckBox *cb_ftpEnablePasv;
QCheckBox *cb_ftpMarkPartial;
-
- KPluralHandlingSpinBox *sb_socketRead;
- KPluralHandlingSpinBox *sb_proxyConnect;
- KPluralHandlingSpinBox *sb_serverConnect;
- KPluralHandlingSpinBox *sb_serverResponse;
};
#endif // NETPREF_H
More information about the kde-doc-english
mailing list