File tree 4 files changed +5
-4
lines changed
4 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ Enhancement: Consider a remote poll interval coming with the server capabilities
3
3
This way, admins can configure the remote sync poll interval of clients through
4
4
the capabilities settings of the server. Note that the setting in the server
5
5
capabilities needs to be done in milliseconds. Default is 30 seconds.
6
+
6
7
https://github.com/owncloud/client/issues/5947
7
8
https://github.com/owncloud/client/issues/8780
8
9
https://github.com/owncloud/client/pull/8777
Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ class OWNCLOUDSYNC_EXPORT Capabilities
77
77
bool shareResharing () const ;
78
78
/* * Remote Poll interval.
79
79
*
80
- * returns the requested poll interval to be used by the client in milliseconds .
81
- * If it returns -1 the client default remains unchanged .
80
+ * returns the requested poll interval in seconds to be used by the client.
81
+ * @ returns 0 if no capability is set .
82
82
*/
83
83
std::chrono::seconds remotePollInterval () const ;
84
84
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ const QString moveToTrashC() { return QStringLiteral("moveToTrash"); }
93
93
}
94
94
95
95
QString ConfigFile::_confDir = QString();
96
+ const std::chrono::seconds DefaultRemotePollInterval { 30 }; // default remote poll time in milliseconds
96
97
97
98
static chrono::milliseconds millisecondsValue (const QSettings &setting, const QString &key,
98
99
chrono::milliseconds defaultValue)
@@ -427,8 +428,8 @@ chrono::milliseconds ConfigFile::remotePollInterval(std::chrono::seconds default
427
428
}
428
429
auto remoteInterval = millisecondsValue (settings, remotePollIntervalC (), defaultPollInterval);
429
430
if (remoteInterval < chrono::seconds (5 )) {
430
- qCWarning (lcConfigFile) << " Remote Interval is less than 5 seconds, reverting to" << DefaultRemotePollInterval.count ();
431
431
remoteInterval = defaultPollInterval;
432
+ qCWarning (lcConfigFile) << " Remote Interval is less than 5 seconds, reverting to" << remoteInterval.count ();
432
433
}
433
434
return remoteInterval;
434
435
}
Original file line number Diff line number Diff line change @@ -199,7 +199,6 @@ class OWNCLOUDSYNC_EXPORT ConfigFile
199
199
200
200
private:
201
201
typedef QSharedPointer<AbstractCredentials> SharedCreds;
202
- const std::chrono::seconds DefaultRemotePollInterval { 30 }; // default remote poll time in milliseconds
203
202
204
203
static QString _oCVersion;
205
204
static QString _confDir;
You can’t perform that action at this time.
0 commit comments