[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [messagelib] webengineviewer/src: Remove unused class
From:       Montel Laurent <montel () kde ! org>
Date:       2016-12-09 19:30:50
Message-ID: E1cFQsc-0006l6-HD () code ! kde ! org
[Download RAW message or body]

Git commit 20387c05b3f6cdc87003180ac779f2d91799fa9b by Montel Laurent.
Committed on 09/12/2016 at 17:29.
Pushed by mlaurent into branch 'master'.

Remove unused class

M  +0    -2    webengineviewer/src/CMakeLists.txt
M  +0    -7    webengineviewer/src/checkphishingurl/autotests/CMakeLists.txt
D  +0    -35   webengineviewer/src/checkphishingurl/autotests/checkphishingurlfromlocaldatabasejobtest.cpp
 D  +0    -33   webengineviewer/src/checkphishingurl/autotests/checkphishingurlfromlocaldatabasejobtest.h
 D  +0    -85   webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp
 D  +0    -58   webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.h


https://commits.kde.org/messagelib/20387c05b3f6cdc87003180ac779f2d91799fa9b

diff --git a/webengineviewer/src/CMakeLists.txt b/webengineviewer/src/CMakeLists.txt
index 5bb4c1ca..3c6311fe 100644
--- a/webengineviewer/src/CMakeLists.txt
+++ b/webengineviewer/src/CMakeLists.txt
@@ -34,7 +34,6 @@ set(libwebengineviewer_checkphishingurl_SRCS
    checkphishingurl/checkphishingurljob.cpp
    checkphishingurl/checkphishingurlcache.cpp
    checkphishingurl/createphishingurldatabasejob.cpp
-   checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp
    checkphishingurl/localdatabasemanager.cpp
    checkphishingurl/checkphishingurlutil.cpp
    checkphishingurl/searchfullhashjob.cpp
@@ -158,7 +157,6 @@ ecm_generate_headers(WebEngineViewer_Camelcasewebengine_checkurl_HEADERS
  CheckPhishingUrlJob
     CheckPhishingUrlCache
     CreatePhishingUrlDataBaseJob
-    CheckPhishingUrlFromLocalDataBaseJob
     LocalDataBaseManager
     SearchFullHashJob
     UpdateDataBaseInfo
diff --git a/webengineviewer/src/checkphishingurl/autotests/CMakeLists.txt \
b/webengineviewer/src/checkphishingurl/autotests/CMakeLists.txt index \
                af8d5812..04914f1f 100644
--- a/webengineviewer/src/checkphishingurl/autotests/CMakeLists.txt
+++ b/webengineviewer/src/checkphishingurl/autotests/CMakeLists.txt
@@ -8,13 +8,6 @@ ecm_add_test(checkphishingurljobtest.cpp  ../checkphishingurljob.cpp \
../updateda  LINK_LIBRARIES Qt5::Test Qt5::WebKitWidgets KF5::WebEngineViewer
     )
 
-ecm_add_test(checkphishingurlfromlocaldatabasejobtest.cpp  \
../checkphishingurlutil.cpp ../updatedatabaseinfo.cpp \
../checkphishingurlfromlocaldatabasejob.cpp \
                ${testwebengineviewer_webengine_common_SRCS}
-    TEST_NAME checkphishingurlfromlocaldatabasetest
-    NAME_PREFIX "webengineview-checkphishingurlfromlocaldatabasejob-"
-    LINK_LIBRARIES Qt5::Test Qt5::WebKitWidgets KF5::WebEngineViewer
-    )
-
-
 ecm_add_test(createphishingurldatabasejobtest.cpp ../checkphishingurlutil.cpp \
../updatedatabaseinfo.cpp ../createphishingurldatabasejob.cpp \
${testwebengineviewer_webengine_common_SRCS}  TEST_NAME \
createphishingurldatabasejobtest  NAME_PREFIX \
                "webengineview-createphishingurldatabasejob-"
diff --git a/webengineviewer/src/checkphishingurl/autotests/checkphishingurlfromlocaldatabasejobtest.cpp \
b/webengineviewer/src/checkphishingurl/autotests/checkphishingurlfromlocaldatabasejobtest.cpp
 deleted file mode 100644
index 09545bf9..00000000
--- a/webengineviewer/src/checkphishingurl/autotests/checkphishingurlfromlocaldatabasejobtest.cpp
                
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-   Copyright (C) 2016 Laurent Montel <montel@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#include "checkphishingurlfromlocaldatabasejobtest.h"
-#include "../checkphishingurlfromlocaldatabasejob.h"
-#include <QTest>
-
-CheckPhishingUrlFromLocalDataBaseJobTest::CheckPhishingUrlFromLocalDataBaseJobTest(QObject \
                *parent)
-    : QObject(parent)
-{
-
-}
-
-CheckPhishingUrlFromLocalDataBaseJobTest::~CheckPhishingUrlFromLocalDataBaseJobTest()
                
-{
-
-}
-
-QTEST_MAIN(CheckPhishingUrlFromLocalDataBaseJobTest)
diff --git a/webengineviewer/src/checkphishingurl/autotests/checkphishingurlfromlocaldatabasejobtest.h \
b/webengineviewer/src/checkphishingurl/autotests/checkphishingurlfromlocaldatabasejobtest.h
 deleted file mode 100644
index cf89ec5c..00000000
--- a/webengineviewer/src/checkphishingurl/autotests/checkphishingurlfromlocaldatabasejobtest.h
                
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-   Copyright (C) 2016 Laurent Montel <montel@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#ifndef CHECKPHISHINGURLFROMLOCALDATABASEJOB_H
-#define CHECKPHISHINGURLFROMLOCALDATABASEJOB_H
-
-#include <QObject>
-
-class CheckPhishingUrlFromLocalDataBaseJobTest : public QObject
-{
-    Q_OBJECT
-public:
-    explicit CheckPhishingUrlFromLocalDataBaseJobTest(QObject *parent = Q_NULLPTR);
-    ~CheckPhishingUrlFromLocalDataBaseJobTest();
-};
-
-#endif // CHECKPHISHINGURLFROMLOCALDATABASEJOB_H
diff --git a/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp \
b/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp \
deleted file mode 100644 index 89848357..00000000
--- a/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-   Copyright (C) 2016 Laurent Montel <montel@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#include "checkphishingurlfromlocaldatabasejob.h"
-#include <qcryptographichash.h>
-#include "localdatabasemanager.h"
-
-using namespace WebEngineViewer;
-
-class WebEngineViewer::CheckPhishingUrlFromLocalDataBaseJobPrivate
-{
-public:
-    CheckPhishingUrlFromLocalDataBaseJobPrivate()
-    {
-
-    }
-    QUrl mUrl;
-};
-
-CheckPhishingUrlFromLocalDataBaseJob::CheckPhishingUrlFromLocalDataBaseJob(QObject \
                *parent)
-    : QObject(parent),
-      d(new CheckPhishingUrlFromLocalDataBaseJobPrivate)
-{
-
-}
-
-CheckPhishingUrlFromLocalDataBaseJob::~CheckPhishingUrlFromLocalDataBaseJob()
-{
-    delete d;
-}
-
-void CheckPhishingUrlFromLocalDataBaseJob::setCheckPhisingUrl(const QUrl &url)
-{
-    d->mUrl = url;
-}
-
-void CheckPhishingUrlFromLocalDataBaseJob::start()
-{
-    if (d->mUrl.isValid()) {
-        Q_EMIT finished(d->mUrl, InvalidUrl);
-        deleteLater();
-    } else {
-        connect(LocalDataBaseManager::self(), \
&LocalDataBaseManager::checkUrlFinished, this, \
                &CheckPhishingUrlFromLocalDataBaseJob::slotCheckUrlFinished);
-        LocalDataBaseManager::self()->checkUrl(d->mUrl);
-    }
-}
-
-void CheckPhishingUrlFromLocalDataBaseJob::slotCheckUrlFinished(const QUrl &url, \
                WebEngineViewer::LocalDataBaseManager::UrlStatus status)
-{
-    CheckPhishingUrlFromLocalDataBaseJob::UrlStatus \
                currentStatus(CheckPhishingUrlFromLocalDataBaseJob::Unknown);
-    switch (status) {
-    case  WebEngineViewer::LocalDataBaseManager::Unknown:
-        break;
-    case  WebEngineViewer::LocalDataBaseManager::UrlOk:
-        currentStatus = CheckPhishingUrlFromLocalDataBaseJob::Ok;
-        break;
-    case  WebEngineViewer::LocalDataBaseManager::Malware:
-        currentStatus = CheckPhishingUrlFromLocalDataBaseJob::MalWare;
-        break;
-    }
-
-    Q_EMIT finished(url, currentStatus);
-    deleteLater();
-}
-
-bool CheckPhishingUrlFromLocalDataBaseJob::canStart() const
-{
-    return d->mUrl.isValid();
-}
diff --git a/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.h \
b/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.h deleted \
file mode 100644 index d645b1b7..00000000
--- a/webengineviewer/src/checkphishingurl/checkphishingurlfromlocaldatabasejob.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-   Copyright (C) 2016 Laurent Montel <montel@kde.org>
-
-   This library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public
-   License as published by the Free Software Foundation; either
-   version 2 of the License, or (at your option) any later version.
-
-   This library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public License
-   along with this library; see the file COPYING.LIB.  If not, write to
-   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-   Boston, MA 02110-1301, USA.
-*/
-
-#ifndef CHECKPHISHINGURLFROMLOCALDATABASE_H
-#define CHECKPHISHINGURLFROMLOCALDATABASE_H
-
-#include <QObject>
-#include "webengineviewer_export.h"
-#include <WebEngineViewer/LocalDataBaseManager>
-#include <QUrl>
-namespace WebEngineViewer
-{
-class CheckPhishingUrlFromLocalDataBaseJobPrivate;
-class WEBENGINEVIEWER_EXPORT CheckPhishingUrlFromLocalDataBaseJob : public QObject
-{
-    Q_OBJECT
-public:
-    enum UrlStatus {
-        Ok = 0,
-        MalWare,
-        BrokenNetwork,
-        InvalidUrl,
-        Unknown
-    };
-
-    explicit CheckPhishingUrlFromLocalDataBaseJob(QObject *parent = Q_NULLPTR);
-    ~CheckPhishingUrlFromLocalDataBaseJob();
-    void setCheckPhisingUrl(const QUrl &url);
-
-    void start();
-    bool canStart() const;
-
-Q_SIGNALS:
-    void finished(const QUrl &url, \
                WebEngineViewer::CheckPhishingUrlFromLocalDataBaseJob::UrlStatus \
                status);
-private Q_SLOTS:
-    void slotCheckUrlFinished(const QUrl &url, \
                WebEngineViewer::LocalDataBaseManager::UrlStatus status);
-
-private:
-    CheckPhishingUrlFromLocalDataBaseJobPrivate *const d;
-};
-}
-#endif // CHECKPHISHINGURLFROMLOCALDATABASE_H


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic