summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-18 07:16:28 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-18 07:16:28 (GMT)
commitff3935b32abc606e87625807fd0b5630ce725a3a (patch)
treedfa78a563a53de1e6160fbc01712c63609abb50f
parente7d0883ed18a89b1f67b290d4d40ce3690e08390 (diff)
Test if we need to clear database
-rw-r--r--webengineviewer/src/checkphishingurl/localdatabasemanager.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/webengineviewer/src/checkphishingurl/localdatabasemanager.cpp b/webengineviewer/src/checkphishingurl/localdatabasemanager.cpp
index 78933ff..7388616 100644
--- a/webengineviewer/src/checkphishingurl/localdatabasemanager.cpp
+++ b/webengineviewer/src/checkphishingurl/localdatabasemanager.cpp
@@ -174,8 +174,13 @@ void LocalDataBaseManager::slotDownloadDataBaseFinished(const WebEngineViewer::U
(mNewClientState == infoDataBase.newClientState)) {
qDebug() << "No update necessary ";
} else {
- //Clear database ?
//qDebug() << "infoDataBase" << infoDataBase.additionList.count();
+ if (infoDataBase.responseType == WebEngineViewer::UpdateDataBaseInfo::FullUpdate) {
+ //TODO Clear database ?
+ } else if (infoDataBase.responseType == WebEngineViewer::UpdateDataBaseInfo::Unknown) {
+ // ?????
+ return;
+ }
Q_FOREACH(const Addition &add, infoDataBase.additionList) {
//qDebug() << " add.size" << add.prefixSize;
//qDebug() << " add.hash" << QByteArray::fromBase64(add.hashString).size();