Commit 6416f382 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Reactivate autotest

parent 11dde50f
Pipeline #51516 passed with stage
in 54 minutes and 22 seconds
......@@ -23,17 +23,7 @@ set_target_properties(mailmerge
PROPERTIES OUTPUT_NAME mailmerge VERSION ${KDEPIMADDONS_LIB_VERSION} SOVERSION ${KDEPIMADDONS_LIB_SOVERSION}
)
#kcoreaddons_add_plugin(kmail_logactivitiesplugin JSON kmail_logactivitiesplugin.json SOURCES
# ${kmail_logactivitiesplugin_SRCS} INSTALL_NAMESPACE kmail/mainview)
#target_link_libraries(kmail_logactivitiesplugin
# KF5::PimCommon KF5::PimCommonAkonadi KF5::XmlGui KF5::Libkdepim KF5::I18n
#)
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
# set_target_properties(kmail_logactivitiesplugin PROPERTIES UNITY_BUILD ON)
#endif()
if(BUILD_TESTING)
#add_subdirectory(autotests)
#add_subdirectory(tests)
add_subdirectory(autotests)
add_subdirectory(tests)
endif()
# convenience macro to add qtest unit tests
macro(add_kmail_unittest _source _additionalsource)
macro(add_kmail_mailmergeunittest _source )
set(_test ${_source} ${_additionalsource})
get_filename_component(_name ${_source} NAME_WE)
add_executable( ${_name} ${_test} )
......@@ -11,11 +11,12 @@ macro(add_kmail_unittest _source _additionalsource)
KF5::KIOCore
KF5::KIOWidgets
KF5::I18n
mailmerge
)
endmacro ()
add_kmail_unittest( mailmergewidgettest.cpp "../widgets/csvwidget.cpp;../widgets/addressbookwidget.cpp;../widgets/mailmergewidget.cpp;../widgets/attachmentlistwidget.cpp;../widgets/selectattachmentdialog.cpp")
add_kmail_unittest(addressbookwidgettest.cpp "../widgets/csvwidget.cpp")
add_kmail_unittest(csvwidgettest.cpp "../widgets/csvwidget.cpp")
add_kmail_unittest(mailmergedialogtest.cpp "../mailmergedialog.cpp;../widgets/attachmentlistwidget.cpp;../widgets/selectattachmentdialog.cpp;../widgets/mailmergewidget.cpp;../widgets/csvwidget.cpp;../widgets/addressbookwidget.cpp;../widgets/selectattachmentdialog.cpp" "KF5::PimCommon")
add_kmail_unittest(mailmergejobtest.cpp "../job/mailmergejob.cpp" "")
add_kmail_mailmergeunittest( mailmergewidgettest.cpp)
add_kmail_mailmergeunittest(addressbookwidgettest.cpp)
add_kmail_mailmergeunittest(csvwidgettest.cpp)
add_kmail_mailmergeunittest(mailmergedialogtest.cpp)
add_kmail_mailmergeunittest(mailmergejobtest.cpp)
......@@ -15,6 +15,7 @@
using namespace MailMerge;
MailMergeDialog::MailMergeDialog(QWidget *parent)
: QDialog(parent)
, mMailMergeWidget(new MailMergeWidget(this))
{
setWindowTitle(i18nc("@title:window", "Mail Merge"));
QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
......@@ -22,7 +23,6 @@ MailMergeDialog::MailMergeDialog(QWidget *parent)
setLayout(mainLayout);
QPushButton *okButton = buttonBox->button(QDialogButtonBox::Ok);
mMailMergeWidget = new MailMergeWidget(this);
mMailMergeWidget->setObjectName(QStringLiteral("mailmergewidget"));
mainLayout->addWidget(mMailMergeWidget);
......
......@@ -6,11 +6,12 @@
#ifndef MAILMERGEDIALOG_H
#define MAILMERGEDIALOG_H
#include "mailmerge_export.h"
#include <QDialog>
namespace MailMerge
{
class MailMergeWidget;
class MailMergeDialog : public QDialog
class MAILMERGE_EXPORT MailMergeDialog : public QDialog
{
Q_OBJECT
public:
......@@ -18,7 +19,7 @@ public:
~MailMergeDialog() override;
private:
MailMergeWidget *mMailMergeWidget = nullptr;
MailMergeWidget *const mMailMergeWidget;
};
}
......
set(mailmergewidget_gui_SRCS mailmergewidgettest_gui.cpp ../widgets/mailmergewidget.cpp ../widgets/attachmentlistwidget.cpp ../widgets/csvwidget.cpp ../widgets/addressbookwidget.cpp ../widgets/selectattachmentdialog.cpp)
set(mailmergewidget_gui_SRCS mailmergewidgettest_gui.cpp)
add_executable(mailmergewidget_gui ${mailmergewidget_gui_SRCS})
target_link_libraries(mailmergewidget_gui
KF5::KIOCore
KF5::KIOWidgets
KF5::PimCommon
KF5::I18n
mailmerge
)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment