summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-20 07:57:19 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-20 07:57:19 (GMT)
commit76afabac6c8ff1682d27ffad0b99d41436450cb7 (patch)
treefc8d08d3c4daa2bdbd5e197c7e719cc9220ce931
parentebe771fa2d32f433823a87f612c27dec137b0de4 (diff)
Don't use QTimer as discussed with David
-rw-r--r--webengineviewer/src/checkphishingurl/localdatabasemanager.cpp12
-rw-r--r--webengineviewer/src/checkphishingurl/localdatabasemanager.h2
2 files changed, 0 insertions, 14 deletions
diff --git a/webengineviewer/src/checkphishingurl/localdatabasemanager.cpp b/webengineviewer/src/checkphishingurl/localdatabasemanager.cpp
index d44da43..8ec17a3 100644
--- a/webengineviewer/src/checkphishingurl/localdatabasemanager.cpp
+++ b/webengineviewer/src/checkphishingurl/localdatabasemanager.cpp
@@ -51,7 +51,6 @@ inline QString sqlFileName() {
LocalDataBaseManager::LocalDataBaseManager(QObject *parent)
: QObject(parent),
- mRegularCheckDataBaseTimer(Q_NULLPTR),
mDataBaseOk(false),
mDownloadProgress(false)
{
@@ -131,13 +130,6 @@ void LocalDataBaseManager::initialize()
qCWarning(WEBENGINEVIEWER_LOG) << "Database already initialized.";
}
if (mDataBaseOk) {
- if (!mRegularCheckDataBaseTimer) {
- mRegularCheckDataBaseTimer = new QTimer(this);
- mRegularCheckDataBaseTimer->setSingleShot(true);
- mRegularCheckDataBaseTimer->setInterval(60*1000*60*5); //Each 5 hours //Perhaps improve it.
- connect(mRegularCheckDataBaseTimer, &QTimer::timeout, this, &LocalDataBaseManager::slotCheckDataBase);
- mRegularCheckDataBaseTimer->start();
- }
}
}
@@ -193,10 +185,6 @@ void LocalDataBaseManager::slotDownloadDataBaseFinished(const WebEngineViewer::U
}
checkDataBase();
mDownloadProgress = false;
- //We finish to download restart timer if necessary
- if (mRegularCheckDataBaseTimer && !mRegularCheckDataBaseTimer->isActive()) {
- mRegularCheckDataBaseTimer->start();
- }
}
void LocalDataBaseManager::checkDataBase()
diff --git a/webengineviewer/src/checkphishingurl/localdatabasemanager.h b/webengineviewer/src/checkphishingurl/localdatabasemanager.h
index bec3f3c..56b9943 100644
--- a/webengineviewer/src/checkphishingurl/localdatabasemanager.h
+++ b/webengineviewer/src/checkphishingurl/localdatabasemanager.h
@@ -25,7 +25,6 @@
#include <QSqlDatabase>
#include <QUrl>
#include "createphishingurldatabasejob.h"
-class QTimer;
namespace WebEngineViewer
{
class WEBENGINEVIEWER_EXPORT LocalDataBaseManager : public QObject
@@ -77,7 +76,6 @@ private:
QSqlDatabase mDataBase;
QString mNewClientState;
- QTimer *mRegularCheckDataBaseTimer;
bool mDataBaseOk;
bool mDownloadProgress;
};