mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Remove legacy configuration options.
They were not used anyway.
This commit is contained in:
parent
8b0cfab2b2
commit
5e3f2cf25a
@ -50,18 +50,9 @@ These are config settings that may be changed:
|
||||
+===========================+===========+==============+===========+=====================================================+
|
||||
| ``remotePollinterval`` | integer | milliseconds | ``30000`` | Poll time for the remote repository |
|
||||
+---------------------------+-----------+--------------+-----------+-----------------------------------------------------+
|
||||
| ``localPollinterval`` | integer | milliseconds | ``10000`` | Poll time for local repository |
|
||||
+---------------------------+-----------+--------------+-----------+-----------------------------------------------------+
|
||||
| ``PollTimerExceedFactor`` | integer | n/a | ``10`` | Poll Timer Exceed Factor |
|
||||
+---------------------------+-----------+--------------+-----------+-----------------------------------------------------+
|
||||
| ``maxLogLines`` | integer | lines | ``20000`` | Maximum count of log lines shown in the log window |
|
||||
+---------------------------+-----------+--------------+-----------+-----------------------------------------------------+
|
||||
|
||||
* ``remotePollinterval`` is for systems which have notify for local file system changes (Linux only currently)
|
||||
this is the frequency it polls for remote changes. The following two values are ignored.
|
||||
* ``remotePollinterval`` The frequency used for polling for remote changes on
|
||||
the ownCloud Server.
|
||||
|
||||
* ``localPollinterval`` is for systems which poll the local file system (currently Win and Mac) this is the
|
||||
frequency they poll locally. The ``remotePollInterval`` is ignored on these systems.
|
||||
|
||||
* ``PollTimerExceedFactor`` sets the exceed factor is the factor after which a remote poll is done. That means the effective
|
||||
frequency for remote poll is ``localPollInterval * pollTimerExceedFactor``.
|
||||
|
||||
@ -23,8 +23,6 @@
|
||||
#include <QtGui>
|
||||
|
||||
#define DEFAULT_REMOTE_POLL_INTERVAL 30000 // default remote poll time in milliseconds
|
||||
#define DEFAULT_LOCAL_POLL_INTERVAL 10000 // default local poll time in milliseconds
|
||||
#define DEFAULT_POLL_TIMER_EXEED 10
|
||||
|
||||
#define CA_CERTS_KEY QLatin1String("CaCertificates")
|
||||
|
||||
@ -309,54 +307,13 @@ int MirallConfigFile::remotePollInterval( const QString& connection ) const
|
||||
settings.beginGroup( con );
|
||||
|
||||
int remoteInterval = settings.value( QLatin1String("remotePollInterval"), DEFAULT_REMOTE_POLL_INTERVAL ).toInt();
|
||||
int localInterval = settings.value(QLatin1String("localPollInterval"), DEFAULT_LOCAL_POLL_INTERVAL ).toInt();
|
||||
if( remoteInterval < 2*localInterval ) {
|
||||
qDebug() << "WARN: remote poll Interval should at least be twice as local poll interval!";
|
||||
}
|
||||
if( remoteInterval < 5000 || remoteInterval < localInterval ) {
|
||||
qDebug() << "Remote Interval is smaller than local Interval";
|
||||
if( remoteInterval < 5000) {
|
||||
qDebug() << "Remote Interval is less than 5 seconds, reverting to" << DEFAULT_REMOTE_POLL_INTERVAL;
|
||||
remoteInterval = DEFAULT_REMOTE_POLL_INTERVAL;
|
||||
}
|
||||
return remoteInterval;
|
||||
}
|
||||
|
||||
int MirallConfigFile::localPollInterval( const QString& connection ) const
|
||||
{
|
||||
QString con( connection );
|
||||
if( connection.isEmpty() ) con = defaultConnection();
|
||||
|
||||
QSettings settings( configFile(), QSettings::IniFormat );
|
||||
settings.setIniCodec( "UTF-8" );
|
||||
settings.beginGroup( con );
|
||||
|
||||
int remoteInterval = settings.value( QLatin1String("remotePollInterval"), DEFAULT_REMOTE_POLL_INTERVAL ).toInt();
|
||||
int localInterval = settings.value(QLatin1String("localPollInterval"), DEFAULT_LOCAL_POLL_INTERVAL ).toInt();
|
||||
if( remoteInterval < 2*localInterval ) {
|
||||
qDebug() << "WARN: remote poll Interval should at least be twice as local poll interval!";
|
||||
}
|
||||
if( localInterval < 2500 || remoteInterval < localInterval ) {
|
||||
qDebug() << "Remote Interval is smaller than local Interval";
|
||||
localInterval = DEFAULT_LOCAL_POLL_INTERVAL;
|
||||
}
|
||||
return localInterval;
|
||||
}
|
||||
|
||||
int MirallConfigFile::pollTimerExceedFactor( const QString& connection ) const
|
||||
{
|
||||
QString con( connection );
|
||||
if( connection.isEmpty() ) con = defaultConnection();
|
||||
|
||||
QSettings settings( configFile(), QSettings::IniFormat );
|
||||
settings.setIniCodec( "UTF-8" );
|
||||
settings.beginGroup( con );
|
||||
|
||||
int pte = settings.value( QLatin1String("pollTimerExeedFactor"), DEFAULT_POLL_TIMER_EXEED).toInt();
|
||||
|
||||
if( pte < 1 ) pte = DEFAULT_POLL_TIMER_EXEED;
|
||||
|
||||
return pte;
|
||||
}
|
||||
|
||||
bool MirallConfigFile::passwordStorageAllowed( const QString& connection )
|
||||
{
|
||||
QString con( connection );
|
||||
|
||||
@ -73,10 +73,8 @@ public:
|
||||
|
||||
bool ownCloudSkipUpdateCheck( const QString& connection = QString() ) const;
|
||||
|
||||
/* Poll intervals in milliseconds */
|
||||
int localPollInterval ( const QString& connection = QString() ) const;
|
||||
/* Server poll interval in milliseconds */
|
||||
int remotePollInterval( const QString& connection = QString() ) const;
|
||||
int pollTimerExceedFactor( const QString& connection = QString() ) const;
|
||||
|
||||
// Custom Config: accept the custom config to become the main one.
|
||||
void acceptCustomConfig();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user