// startup procedure.
connect(&_checkConnectionTimer, SIGNAL(timeout()), this, SLOT(slotCheckConnection()));
- _checkConnectionTimer.setInterval(ConnectionValidator::defaultCallingIntervalMsec()); // check for connection every 32 seconds.
+ _checkConnectionTimer.setInterval(ConnectionValidator::DefaultCallingIntervalMsec); // check for connection every 32 seconds.
_checkConnectionTimer.start();
// Also check immediately
QTimer::singleShot( 0, this, SLOT( slotCheckConnection() ));
// Make sure the timeout for this job is less than how often we get called
// This makes sure we get tried often enough without "ConnectionValidator already running"
-static qint64 timeoutToUseMsec = qMax(qint64(1000), ConnectionValidator::defaultCallingIntervalMsec() - 5*1000);
+static qint64 timeoutToUseMsec = qMax(1000, ConnectionValidator::DefaultCallingIntervalMsec - 5*1000);
ConnectionValidator::ConnectionValidator(AccountPtr account, QObject *parent)
: QObject(parent),
static QString statusString( Status );
// How often should the Application ask this object to check for the connection?
- static qint64 defaultCallingIntervalMsec() { return 32 * 1000;}
+ enum { DefaultCallingIntervalMsec = 32 * 1000 };
public slots:
/// Checks the server and the authentication.