summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <montel@kde.org>2016-11-15 12:19:25 (GMT)
committerMontel Laurent <montel@kde.org>2016-11-15 12:19:25 (GMT)
commit201a577cac7557f386cdc08201e59960dacf5cc9 (patch)
tree1590f55fef9be9eefd28f267d8ee5fb14c3d3844
parent7d158746a86db91aa436ad1b802f3df9cdb68b3a (diff)
Add test apps for the future
-rw-r--r--webengineviewer/src/checkphishingurl/tests/CMakeLists.txt10
-rw-r--r--webengineviewer/src/checkphishingurl/tests/createphishingurldatabasegui.cpp57
-rw-r--r--webengineviewer/src/checkphishingurl/tests/createphishingurldatabasegui.h36
3 files changed, 103 insertions, 0 deletions
diff --git a/webengineviewer/src/checkphishingurl/tests/CMakeLists.txt b/webengineviewer/src/checkphishingurl/tests/CMakeLists.txt
index 65dfc85..22963ba 100644
--- a/webengineviewer/src/checkphishingurl/tests/CMakeLists.txt
+++ b/webengineviewer/src/checkphishingurl/tests/CMakeLists.txt
@@ -13,3 +13,13 @@ target_link_libraries(checkphishingurlgui
Qt5::WebEngineWidgets
KF5::I18n
)
+
+set(createphishingurldatabasegui_SRCS createphishingurldatabasegui.cpp)
+add_executable(createphishingurldatabasegui ${createphishingurldatabasegui_SRCS})
+target_link_libraries(createphishingurldatabasegui
+ KF5::KIOCore
+ KF5::WebEngineViewer
+ Qt5::WebEngine
+ Qt5::WebEngineWidgets
+ KF5::I18n
+ )
diff --git a/webengineviewer/src/checkphishingurl/tests/createphishingurldatabasegui.cpp b/webengineviewer/src/checkphishingurl/tests/createphishingurldatabasegui.cpp
new file mode 100644
index 0000000..3ba629e
--- /dev/null
+++ b/webengineviewer/src/checkphishingurl/tests/createphishingurldatabasegui.cpp
@@ -0,0 +1,57 @@
+/*
+ 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 "createphishingurldatabasegui.h"
+
+#include <QApplication>
+#include <QStandardPaths>
+#include <QLineEdit>
+#include <QPushButton>
+#include <QTextEdit>
+#include <QLabel>
+#include <QVBoxLayout>
+
+CreatePhisingUrlDataBaseGuioi::CreatePhisingUrlDataBaseGuioi(QWidget *parent)
+ : QWidget(parent)
+{
+ QVBoxLayout *layout = new QVBoxLayout(this);
+
+ mResult = new QTextEdit(this);
+ mResult->setReadOnly(true);
+ mResult->setAcceptRichText(false);
+ layout->addWidget(mResult);
+
+}
+
+CreatePhisingUrlDataBaseGuioi::~CreatePhisingUrlDataBaseGuioi()
+{
+
+}
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+ QStandardPaths::setTestModeEnabled(true);
+ CreatePhisingUrlDataBaseGuioi *w = new CreatePhisingUrlDataBaseGuioi;
+
+ w->show();
+ app.exec();
+ delete w;
+ return 0;
+}
diff --git a/webengineviewer/src/checkphishingurl/tests/createphishingurldatabasegui.h b/webengineviewer/src/checkphishingurl/tests/createphishingurldatabasegui.h
new file mode 100644
index 0000000..39b7a82
--- /dev/null
+++ b/webengineviewer/src/checkphishingurl/tests/createphishingurldatabasegui.h
@@ -0,0 +1,36 @@
+/*
+ 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 CREATEPHISHINGURLDATABASEGUI_H
+#define CREATEPHISHINGURLDATABASEGUI_H
+
+#include <QWidget>
+class QLineEdit;
+class QTextEdit;
+class CreatePhisingUrlDataBaseGuioi : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit CreatePhisingUrlDataBaseGuioi(QWidget *parent = Q_NULLPTR);
+ ~CreatePhisingUrlDataBaseGuioi();
+private:
+ QTextEdit *mResult;
+};
+
+#endif // CREATEPHISHINGURLDATABASEGUI_H