summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-12-15 13:47:43 +0100
committerMontel Laurent <[email protected]>2017-12-15 13:47:43 +0100
commit67c253a6a98622b0a98f363f7d7255b18a04ebaf (patch)
treee52c22b8ce518d933dc5af11b7b11340dbd28984
parent9fafbe5d068921a5a2c55f9f2842eddd2b61a96f (diff)
Start to create autotest
-rw-r--r--messageviewer/src/CMakeLists.txt1
-rw-r--r--messageviewer/src/widgets/autotests/CMakeLists.txt0
-rw-r--r--messageviewer/src/widgets/autotests/mailtrackingwarningwidgettest.cpp29
-rw-r--r--messageviewer/src/widgets/autotests/mailtrackingwarningwidgettest.h34
-rw-r--r--messageviewer/src/widgets/mailtrackingwarningwidget.h6
5 files changed, 69 insertions, 1 deletions
diff --git a/messageviewer/src/CMakeLists.txt b/messageviewer/src/CMakeLists.txt
index c522f86..c9503c2 100644
--- a/messageviewer/src/CMakeLists.txt
+++ b/messageviewer/src/CMakeLists.txt
@@ -40,6 +40,7 @@ if(BUILD_TESTING)
add_subdirectory(viewer/webengine/tests)
add_subdirectory(messagepartthemes/default/autotests)
add_subdirectory(viewer/webengine/autotests)
+ add_subdirectory(widgets/autotests/)
endif()
add_subdirectory(pics)
add_subdirectory(kconf_update)
diff --git a/messageviewer/src/widgets/autotests/CMakeLists.txt b/messageviewer/src/widgets/autotests/CMakeLists.txt
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/messageviewer/src/widgets/autotests/CMakeLists.txt
diff --git a/messageviewer/src/widgets/autotests/mailtrackingwarningwidgettest.cpp b/messageviewer/src/widgets/autotests/mailtrackingwarningwidgettest.cpp
new file mode 100644
index 0000000..b13e88e
--- /dev/null
+++ b/messageviewer/src/widgets/autotests/mailtrackingwarningwidgettest.cpp
@@ -0,0 +1,29 @@
+/*
+ Copyright (C) 2017 Laurent Montel <[email protected]>
+
+ 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 "mailtrackingwarningwidgettest.h"
+#include <QTest>
+
+QTEST_MAIN(MailTrackingWarningWidgetTest)
+
+MailTrackingWarningWidgetTest::MailTrackingWarningWidgetTest(QObject *parent)
+ : QObject(parent)
+{
+
+}
diff --git a/messageviewer/src/widgets/autotests/mailtrackingwarningwidgettest.h b/messageviewer/src/widgets/autotests/mailtrackingwarningwidgettest.h
new file mode 100644
index 0000000..f7f21bf
--- /dev/null
+++ b/messageviewer/src/widgets/autotests/mailtrackingwarningwidgettest.h
@@ -0,0 +1,34 @@
+/*
+ Copyright (C) 2017 Laurent Montel <[email protected]>
+
+ 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 MAILTRACKINGWARNINGWIDGETTEST_H
+#define MAILTRACKINGWARNINGWIDGETTEST_H
+
+#include <QObject>
+
+class MailTrackingWarningWidgetTest : public QObject
+{
+ Q_OBJECT
+public:
+ explicit MailTrackingWarningWidgetTest(QObject *parent = nullptr);
+ ~MailTrackingWarningWidgetTest() = default;
+
+};
+
+#endif // MAILTRACKINGWARNINGWIDGETTEST_H
diff --git a/messageviewer/src/widgets/mailtrackingwarningwidget.h b/messageviewer/src/widgets/mailtrackingwarningwidget.h
index 191af64..9d0d566 100644
--- a/messageviewer/src/widgets/mailtrackingwarningwidget.h
+++ b/messageviewer/src/widgets/mailtrackingwarningwidget.h
@@ -21,7 +21,11 @@
#ifndef MAILTRACKINGWARNINGWIDGET_H
#define MAILTRACKINGWARNINGWIDGET_H
+
#include <KMessageWidget>
+
+#include "messageviewer_private_export.h"
+
#include <QMap>
#include <QPointer>
@@ -29,7 +33,7 @@
namespace MessageViewer {
class MailTrackingDetailsDialog;
-class MailTrackingWarningWidget : public KMessageWidget
+class MESSAGEVIEWER_TESTS_EXPORT MailTrackingWarningWidget : public KMessageWidget
{
Q_OBJECT
public: