From 676553303c6344f7e85d2eeff461bf1f16fca8a4 Mon Sep 17 00:00:00 2001 From: Montel Laurent Date: Fri, 21 Mar 2014 10:10:23 +0100 Subject: [PATCH] Add mailmerge test gui app --- mailmerge/tests/CMakeLists.txt | 11 ++++++ mailmerge/tests/mailmergewidgettest_gui.cpp | 38 +++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 mailmerge/tests/mailmergewidgettest_gui.cpp diff --git a/mailmerge/tests/CMakeLists.txt b/mailmerge/tests/CMakeLists.txt index cf55eacd8..a8548220a 100644 --- a/mailmerge/tests/CMakeLists.txt +++ b/mailmerge/tests/CMakeLists.txt @@ -17,3 +17,14 @@ endmacro () add_kmail_unittest( mailmergewidgettest.cpp ) + +set(mailmergewidget_gui_SRCS mailmergewidgettest_gui.cpp ../mailmergewidget.cpp ../attachmentlistwidget.cpp) +kde4_add_executable(mailmergewidget_gui TEST ${mailmergewidget_gui_SRCS}) +target_link_libraries(mailmergewidget_gui + ${QT_QTCORE_LIBRARY} + ${QT_QTGUI_LIBRARY} + ${KDE4_KDEUI_LIBS} + ${KDE4_KIO_LIBS} + pimcommon +) + diff --git a/mailmerge/tests/mailmergewidgettest_gui.cpp b/mailmerge/tests/mailmergewidgettest_gui.cpp new file mode 100644 index 000000000..4a8e260a6 --- /dev/null +++ b/mailmerge/tests/mailmergewidgettest_gui.cpp @@ -0,0 +1,38 @@ +/* + Copyright (c) 2014 Montel Laurent + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License, version 2, as + published by the Free Software Foundation. + + This program 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 + General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + +#include "kmail/mailmerge/mailmergewidget.h" + +#include +#include +#include +#include + +int main (int argc, char **argv) +{ + KCmdLineArgs::init(argc, argv, "mailmergewidget_gui", 0, ki18n("MailMergeWidgetTest_Gui"), + "1.0", ki18n("Test for mailmerge widget")); + + KApplication app; + + MailMergeWidget *w = new MailMergeWidget(); + w->resize(800, 600); + w->show(); + app.exec(); + delete w; + return 0; +}