Commit 1c52f670 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix compile with UNITY cmake support

parent 34405388
Pipeline #44261 passed with stage
in 34 minutes and 6 seconds
......@@ -25,9 +25,9 @@ ecm_qt_declare_logging_category(libarchivemailagent_SRCS HEADER archivemailagent
ki18n_wrap_ui(libarchivemailagent_SRCS ui/archivemailwidget.ui )
add_library(archivemailagent STATIC ${libarchivemailagent_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(archivemailagent PROPERTIES UNITY_BUILD ON)
endif()
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
# set_target_properties(archivemailagent PROPERTIES UNITY_BUILD ON)
#endif()
target_link_libraries(archivemailagent
KF5::MailCommon
KF5::I18n
......@@ -89,9 +89,9 @@ target_link_libraries(archivemailagentconfig
KF5::XmlGui
KF5::I18n
)
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(archivemailagentconfig PROPERTIES UNITY_BUILD ON)
endif()
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
# set_target_properties(archivemailagentconfig PROPERTIES UNITY_BUILD ON)
#endif()
install(FILES settings/archivemailagentsettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
......@@ -33,9 +33,9 @@ qt5_add_dbus_interface(followupreminderagent_SRCS org.freedesktop.DBus.Propertie
add_library(followupreminderagent STATIC ${followupreminderagent_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(followupreminderagent PROPERTIES UNITY_BUILD ON)
endif()
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
# set_target_properties(followupreminderagent PROPERTIES UNITY_BUILD ON)
#endif()
target_link_libraries(followupreminderagent
KF5::AkonadiCore
......
......@@ -21,9 +21,9 @@ ecm_qt_declare_logging_category(akonadi_mailfilter_agent_SRCS HEADER mailfiltera
add_executable(akonadi_mailfilter_agent ${akonadi_mailfilter_agent_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadi_mailfilter_agent PROPERTIES UNITY_BUILD ON)
endif()
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
# set_target_properties(akonadi_mailfilter_agent PROPERTIES UNITY_BUILD ON)
#endif()
if( APPLE )
set_target_properties(akonadi_mailfilter_agent PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${kmail_SOURCE_DIR}/agents/Info.plist.template)
......
......@@ -37,9 +37,9 @@ qt5_add_dbus_adaptor(sendlateragent_SRCS org.freedesktop.Akonadi.SendLaterAgent.
ki18n_wrap_ui(libsendlateragent_SRCS ui/sendlaterconfigurewidget.ui)
kconfig_add_kcfg_files(libsendlateragent_SRCS sendlateragentsettings.kcfgc)
add_library(sendlateragent STATIC ${libsendlateragent_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(sendlateragent PROPERTIES UNITY_BUILD ON)
endif()
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
# set_target_properties(sendlateragent PROPERTIES UNITY_BUILD ON)
#endif()
target_link_libraries(sendlateragent
KF5::AkonadiCore
......
......@@ -25,9 +25,9 @@ kconfig_add_kcfg_files(unifiedmailbox_agent_SRCS
qt5_add_dbus_adaptor(unifiedmailbox_agent_SRCS org.freedesktop.Akonadi.UnifiedMailboxAgent.xml unifiedmailboxagent.h UnifiedMailboxAgent)
add_executable(akonadi_unifiedmailbox_agent ${unifiedmailbox_agent_SRCS})
if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
set_target_properties(akonadi_unifiedmailbox_agent PROPERTIES UNITY_BUILD ON)
endif()
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
# set_target_properties(akonadi_unifiedmailbox_agent PROPERTIES UNITY_BUILD ON)
#endif()
target_link_libraries(akonadi_unifiedmailbox_agent
KF5::AkonadiAgentBase
KF5::AkonadiMime
......
......@@ -21,7 +21,7 @@ int main(int argc, char **argv)
QStandardPaths::setTestModeEnabled(true);
KSieveUi::SieveImapInstanceInterfaceManager::self()->setSieveImapInstanceInterface(new KMailSieveImapInstanceInterface);
KMSieveImapPasswordProvider provider(0);
KMSieveImapPasswordProvider provider(nullptr);
auto *dlg = new KSieveUi::SieveDebugDialog(&provider);
dlg->exec();
delete dlg;
......
......@@ -20,7 +20,7 @@
using namespace MailCommon;
using namespace KMail;
KMime::Types::Mailbox::List Util::mailingListsFromMessage(const Akonadi::Item &item)
KMime::Types::Mailbox::List KMail::Util::mailingListsFromMessage(const Akonadi::Item &item)
{
KMime::Types::Mailbox::List addresses;
// determine the mailing list posting address
......@@ -37,7 +37,7 @@ KMime::Types::Mailbox::List Util::mailingListsFromMessage(const Akonadi::Item &i
return addresses;
}
Akonadi::Item::Id Util::putRepliesInSameFolder(const Akonadi::Item &item)
Akonadi::Item::Id KMail::Util::putRepliesInSameFolder(const Akonadi::Item &item)
{
Akonadi::Collection parentCollection = item.parentCollection();
if (parentCollection.isValid()) {
......@@ -49,7 +49,7 @@ Akonadi::Item::Id Util::putRepliesInSameFolder(const Akonadi::Item &item)
return -1;
}
bool Util::handleClickedURL(const QUrl &url, const QSharedPointer<MailCommon::FolderSettings> &folder, const Akonadi::Collection &collection)
bool KMail::Util::handleClickedURL(const QUrl &url, const QSharedPointer<MailCommon::FolderSettings> &folder, const Akonadi::Collection &collection)
{
if (url.scheme() == QLatin1String("mailto")) {
auto *job = new HandleClickedUrlJob;
......@@ -64,7 +64,7 @@ bool Util::handleClickedURL(const QUrl &url, const QSharedPointer<MailCommon::Fo
}
}
bool Util::mailingListsHandleURL(const QList<QUrl> &lst, const QSharedPointer<MailCommon::FolderSettings> &folder, const Akonadi::Collection &collection)
bool KMail::Util::mailingListsHandleURL(const QList<QUrl> &lst, const QSharedPointer<MailCommon::FolderSettings> &folder, const Akonadi::Collection &collection)
{
const QString handler = (folder->mailingList().handler() == MailingList::KMail)
? QStringLiteral("mailto") : QStringLiteral("https");
......@@ -89,53 +89,53 @@ bool Util::mailingListsHandleURL(const QList<QUrl> &lst, const QSharedPointer<Ma
}
}
bool Util::mailingListPost(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
bool KMail::Util::mailingListPost(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
{
if (fd) {
return Util::mailingListsHandleURL(fd->mailingList().postUrls(), fd, col);
return KMail::Util::mailingListsHandleURL(fd->mailingList().postUrls(), fd, col);
}
return false;
}
bool Util::mailingListSubscribe(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
bool KMail::Util::mailingListSubscribe(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
{
if (fd) {
return Util::mailingListsHandleURL(fd->mailingList().subscribeUrls(), fd, col);
return KMail::Util::mailingListsHandleURL(fd->mailingList().subscribeUrls(), fd, col);
}
return false;
}
bool Util::mailingListUnsubscribe(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
bool KMail::Util::mailingListUnsubscribe(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
{
if (fd) {
return Util::mailingListsHandleURL(fd->mailingList().unsubscribeUrls(), fd, col);
return KMail::Util::mailingListsHandleURL(fd->mailingList().unsubscribeUrls(), fd, col);
}
return false;
}
bool Util::mailingListArchives(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
bool KMail::Util::mailingListArchives(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
{
if (fd) {
return Util::mailingListsHandleURL(fd->mailingList().archiveUrls(), fd, col);
return KMail::Util::mailingListsHandleURL(fd->mailingList().archiveUrls(), fd, col);
}
return false;
}
bool Util::mailingListHelp(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
bool KMail::Util::mailingListHelp(const QSharedPointer<MailCommon::FolderSettings> &fd, const Akonadi::Collection &col)
{
if (fd) {
return Util::mailingListsHandleURL(fd->mailingList().helpUrls(), fd, col);
return KMail::Util::mailingListsHandleURL(fd->mailingList().helpUrls(), fd, col);
}
return false;
}
void Util::lastEncryptAndSignState(bool &lastEncrypt, bool &lastSign, const KMime::Message::Ptr &msg)
void KMail::Util::lastEncryptAndSignState(bool &lastEncrypt, bool &lastSign, const KMime::Message::Ptr &msg)
{
lastSign = KMime::isSigned(msg.data());
lastEncrypt = KMime::isEncrypted(msg.data());
}
void Util::addQActionHelpText(QAction *action, const QString &text)
void KMail::Util::addQActionHelpText(QAction *action, const QString &text)
{
action->setStatusTip(text);
action->setToolTip(text);
......@@ -144,7 +144,7 @@ void Util::addQActionHelpText(QAction *action, const QString &text)
}
}
void Util::setActionTrashOrDelete(QAction *action, bool isInTrashFolder)
void KMail::Util::setActionTrashOrDelete(QAction *action, bool isInTrashFolder)
{
if (action) {
action->setText(isInTrashFolder ? i18nc("@action Hard delete, bypassing trash", "&Delete") : i18n("&Move to Trash"));
......
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