diff options
Diffstat (limited to 'src/plugins/bearer/generic')
-rw-r--r-- | src/plugins/bearer/generic/qgenericengine.cpp | 14 | ||||
-rw-r--r-- | src/plugins/bearer/generic/qgenericengine.h | 3 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/plugins/bearer/generic/qgenericengine.cpp b/src/plugins/bearer/generic/qgenericengine.cpp index e6c871d..a9e78b2 100644 --- a/src/plugins/bearer/generic/qgenericengine.cpp +++ b/src/plugins/bearer/generic/qgenericengine.cpp @@ -142,9 +142,6 @@ static QString qGetInterfaceType(const QString &interface) QGenericEngine::QGenericEngine(QObject *parent) : QBearerEngineImpl(parent) { - connect(&pollTimer, SIGNAL(timeout()), this, SLOT(doRequestUpdate())); - pollTimer.setInterval(10000); - doRequestUpdate(); } QGenericEngine::~QGenericEngine() @@ -179,8 +176,7 @@ void QGenericEngine::requestUpdate() { QMutexLocker locker(&mutex); - pollTimer.stop(); - QTimer::singleShot(0, this, SLOT(doRequestUpdate())); + doRequestUpdate(); } void QGenericEngine::doRequestUpdate() @@ -282,8 +278,6 @@ void QGenericEngine::doRequestUpdate() emit configurationRemoved(ptr); } - pollTimer.start(); - emit updateCompleted(); } @@ -328,5 +322,11 @@ QNetworkConfigurationPrivatePointer QGenericEngine::defaultConfiguration() return QNetworkConfigurationPrivatePointer(); } + +bool QGenericEngine::requiresPolling() const +{ + return true; +} + QT_END_NAMESPACE diff --git a/src/plugins/bearer/generic/qgenericengine.h b/src/plugins/bearer/generic/qgenericengine.h index cd9a976..a1b9167 100644 --- a/src/plugins/bearer/generic/qgenericengine.h +++ b/src/plugins/bearer/generic/qgenericengine.h @@ -78,12 +78,13 @@ public: QNetworkConfigurationPrivatePointer defaultConfiguration(); + bool requiresPolling() const; + private Q_SLOTS: void doRequestUpdate(); private: QMap<QString, QString> configurationInterface; - QTimer pollTimer; }; QT_END_NAMESPACE |