Commit a5e662a6 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Use export symbol for testing only

parent b3e84c2f
......@@ -6,41 +6,45 @@ include_directories(
)
########### dbus test ###############
set( kmail_displaymenu_source displaymessageformatactionmenutest.cpp ../widgets/displaymessageformatactionmenu.cpp )
set( kmail_displaymenu_source displaymessageformatactionmenutest.cpp)
add_executable( displaymessageformatactionmenutest ${kmail_displaymenu_source} )
add_test(NAME displaymessageformatactionmenutest COMMAND displaymessageformatactionmenutest )
ecm_mark_as_test(kmail-displaymessageformatactionmenutest)
target_link_libraries( displaymessageformatactionmenutest Qt5::Test KF5::MessageViewer KF5::I18n)
target_link_libraries( displaymessageformatactionmenutest Qt5::Test KF5::MessageViewer KF5::I18n kmailprivate)
set( kmail_identityaddvcarddialog_source identityaddvcarddialogtest.cpp ../identity/identityaddvcarddialog.cpp )
#####
set( kmail_identityaddvcarddialog_source identityaddvcarddialogtest.cpp )
add_executable( identityaddvcarddialogtest ${kmail_identityaddvcarddialog_source})
ecm_mark_as_test(kmail-identityaddvcarddialogtest)
target_link_libraries( identityaddvcarddialogtest Qt5::Test Qt5::Widgets KF5::Completion KF5::KIOWidgets KF5::I18n)
target_link_libraries( identityaddvcarddialogtest Qt5::Test Qt5::Widgets KF5::Completion KF5::KIOWidgets KF5::I18n kmailprivate)
set( kmail_createfollowupreminderonexistingmessagejobtest_source createfollowupreminderonexistingmessagejobtest.cpp ../job/createfollowupreminderonexistingmessagejob.cpp ../kmail_debug.cpp)
#####
set( kmail_createfollowupreminderonexistingmessagejobtest_source createfollowupreminderonexistingmessagejobtest.cpp)
add_executable( createfollowupreminderonexistingmessagejobtest ${kmail_createfollowupreminderonexistingmessagejobtest_source})
ecm_mark_as_test(kmail_createfollowupreminderonexistingmessagejobtest)
target_link_libraries( createfollowupreminderonexistingmessagejobtest Qt5::Test Qt5::Widgets KF5::AkonadiCore KF5::CalendarCore KF5::Mime KF5::MessageComposer)
target_link_libraries( createfollowupreminderonexistingmessagejobtest Qt5::Test Qt5::Widgets KF5::AkonadiCore KF5::CalendarCore KF5::Mime KF5::MessageComposer kmailprivate)
#####
set( kmail_cryptostateindicatorwidgettest_source cryptostateindicatorwidgettest.cpp ../editor/widgets/cryptostateindicatorwidget.cpp)
set( kmail_cryptostateindicatorwidgettest_source cryptostateindicatorwidgettest.cpp)
add_executable( cryptostateindicatorwidgettest ${kmail_cryptostateindicatorwidgettest_source})
add_test(NAME cryptostateindicatorwidgettest COMMAND cryptostateindicatorwidgettest)
ecm_mark_as_test(cryptostateindicatorwidgettest)
target_link_libraries( cryptostateindicatorwidgettest Qt5::Test KF5::MessageCore Qt5::Widgets KF5::ConfigWidgets KF5::I18n)
target_link_libraries( cryptostateindicatorwidgettest Qt5::Test KF5::MessageCore Qt5::Widgets KF5::ConfigWidgets KF5::I18n kmailprivate)
#####
set( kmail_kactionmenutransporttest_source kactionmenutransporttest.cpp ../widgets/kactionmenutransport.cpp)
set( kmail_kactionmenutransporttest_source kactionmenutransporttest.cpp)
add_executable( kactionmenutransporttest ${kmail_kactionmenutransporttest_source})
add_test(NAME kactionmenutransporttest COMMAND kactionmenutransporttest)
ecm_mark_as_test(kactionmenutransporttest)
target_link_libraries( kactionmenutransporttest Qt5::Test KF5::MailTransportAkonadi KF5::WidgetsAddons KF5::I18n KF5::ConfigGui)
target_link_libraries( kactionmenutransporttest Qt5::Test KF5::MailTransportAkonadi KF5::WidgetsAddons KF5::I18n KF5::ConfigGui kmailprivate)
if (KDEPIM_RUN_AKONADI_TEST)
set(KDEPIMLIBS_RUN_ISOLATED_TESTS TRUE)
set(KDEPIMLIBS_RUN_SQLITE_ISOLATED_TESTS TRUE)
add_akonadi_isolated_test_advanced( tagselectdialogtest.cpp "../tag/tagselectdialog.cpp;../kmail_debug.cpp" "kmailprivate;KF5::MailCommon;KF5::Libkdepim;KF5::ItemViews;KF5::TemplateParser;KF5::XmlGui;KF5::Completion;KF5::I18n")
add_akonadi_isolated_test_advanced( tagselectdialogtest.cpp "" "kmailprivate;KF5::MailCommon;KF5::Libkdepim;KF5::ItemViews;KF5::TemplateParser;KF5::XmlGui;KF5::Completion;KF5::I18n")
add_akonadi_isolated_test_advanced(kmcommandstest.cpp "../kmcommands.cpp;../util.cpp;../secondarywindow.cpp;../undostack.cpp;../kmail_debug.cpp;../job/handleclickedurljob.cpp;../job/createreplymessagejob.cpp;../job/createforwardmessagejob.cpp"
add_akonadi_isolated_test_advanced(kmcommandstest.cpp "../kmcommands.cpp;../util.cpp;../secondarywindow.cpp;../undostack.cpp;../kmail_debug.cpp;../job/handleclickedurljob.cpp;"
"Qt5::Test;Qt5::Widgets;KF5::AkonadiCore;KF5::Bookmarks;KF5::ConfigWidgets;KF5::Contacts;KF5::I18n;KF5::IdentityManagement;KF5::KIOCore;KF5::KIOFileWidgets;KF5::MessageCore;KF5::MessageComposer;KF5::MessageList;KF5::MessageViewer;KF5::MailCommon;KF5::MailTransportAkonadi;KF5::Libkdepim;KF5::TemplateParser;kmailprivate")
endif()
......@@ -21,9 +21,10 @@
#define CRYPTOSTATEINDICATORWIDGET_H
#include <QWidget>
#include "kmail_private_export.h"
class QLabel;
class CryptoStateIndicatorWidget : public QWidget
class KMAILTESTS_TESTS_EXPORT CryptoStateIndicatorWidget : public QWidget
{
Q_OBJECT
public:
......
......@@ -17,13 +17,14 @@
#ifndef IDENTITYADDVCARDDIALOG_H
#define IDENTITYADDVCARDDIALOG_H
#include "kmail_private_export.h"
#include <QDialog>
#include <QUrl>
class QButtonGroup;
class QComboBox;
class KUrlRequester;
class IdentityAddVcardDialog : public QDialog
class KMAILTESTS_TESTS_EXPORT IdentityAddVcardDialog : public QDialog
{
Q_OBJECT
public:
......
......@@ -20,12 +20,13 @@
#ifndef CREATEFOLLOWUPREMINDERONEXISTINGMESSAGEJOB_H
#define CREATEFOLLOWUPREMINDERONEXISTINGMESSAGEJOB_H
#include "kmail_private_export.h"
#include <QObject>
#include <AkonadiCore/Collection>
#include <QDate>
#include <AkonadiCore/Item>
class CreateFollowupReminderOnExistingMessageJob : public QObject
class KMAILTESTS_TESTS_EXPORT CreateFollowupReminderOnExistingMessageJob : public QObject
{
Q_OBJECT
public:
......
......@@ -20,13 +20,14 @@
#ifndef CREATEFORWARDMESSAGEJOB_H
#define CREATEFORWARDMESSAGEJOB_H
#include "kmail_private_export.h"
#include <QObject>
#include <QUrl>
#include <KMime/Message>
#include <AkonadiCore/Item>
#include <MessageComposer/MessageFactoryNG>
struct CreateForwardMessageJobSettings
struct KMAILTESTS_TESTS_EXPORT CreateForwardMessageJobSettings
{
QUrl mUrl;
Akonadi::Item mItem;
......@@ -36,7 +37,7 @@ struct CreateForwardMessageJobSettings
uint mIdentity = 0;
};
class CreateForwardMessageJob : public QObject
class KMAILTESTS_TESTS_EXPORT CreateForwardMessageJob : public QObject
{
Q_OBJECT
public:
......
......@@ -21,12 +21,13 @@
#define CREATEREPLYMESSAGEJOB_H
#include <QObject>
#include "kmail_private_export.h"
#include <AkonadiCore/Item>
#include <KMime/Message>
#include <MessageComposer/MessageFactoryNG>
#include <QUrl>
struct CreateReplyMessageJobSettings
struct KMAILTESTS_TESTS_EXPORT CreateReplyMessageJobSettings
{
CreateReplyMessageJobSettings()
{
......@@ -39,9 +40,10 @@ struct CreateReplyMessageJobSettings
KMime::Message::Ptr mMsg;
MessageComposer::ReplyStrategy m_replyStrategy = MessageComposer::ReplySmart;
bool mNoQuote = false;
bool mReplyAsHtml = false;
};
class CreateReplyMessageJob : public QObject
class KMAILTESTS_TESTS_EXPORT CreateReplyMessageJob : public QObject
{
Q_OBJECT
public:
......
......@@ -20,6 +20,7 @@
#ifndef TAGSELECTDIALOG_H
#define TAGSELECTDIALOG_H
#include "kmail_private_export.h"
#include <QDialog>
#include <QVector>
#include <AkonadiCore/Item>
......@@ -28,7 +29,7 @@
class QListWidget;
class KActionCollection;
class TagSelectDialog : public QDialog
class KMAILTESTS_TESTS_EXPORT TagSelectDialog : public QDialog
{
Q_OBJECT
public:
......
......@@ -20,10 +20,11 @@
#ifndef DisplayMessageFormatActionMenu_H
#define DisplayMessageFormatActionMenu_H
#include "kmail_private_export.h"
#include <KActionMenu>
#include <MessageViewer/Viewer>
class DisplayMessageFormatActionMenu : public KActionMenu
class KMAILTESTS_TESTS_EXPORT DisplayMessageFormatActionMenu : public KActionMenu
{
Q_OBJECT
public:
......
......@@ -21,11 +21,12 @@
#define KACTIONMENUTRANSPORT_H
#include <KActionMenu>
#include "kmail_private_export.h"
namespace MailTransport {
class Transport;
}
class KActionMenuTransport : public KActionMenu
class KMAILTESTS_TESTS_EXPORT KActionMenuTransport : public KActionMenu
{
Q_OBJECT
public:
......
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