Commit 5017cdca authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Continue to implement agent

parent f7c4c111
Pipeline #52685 canceled with stage
......@@ -2,3 +2,70 @@
# SPDX-License-Identifier: BSD-3-Clause
add_definitions(-DTRANSLATION_DOMAIN=\"akonadi_mailmerge_agent\")
if(BUILD_TESTING)
add_subdirectory(tests)
add_subdirectory(autotests)
endif()
set(mailmerge_common_SRCS)
ecm_qt_declare_logging_category(mailmerge_common_SRCS HEADER mailmergeagent_debug.h IDENTIFIER MAILMERGEAGENT_LOG CATEGORY_NAME org.kde.pim.mailmergeagent
DESCRIPTION "kmail (mailmergeagent)"
OLD_CATEGORY_NAMES log_mailmergeagent
EXPORT KMAIL
)
set(libmailmergeagent_SRCS
${mailmerge_common_SRCS}
)
set(mailmergeagent_SRCS
mailmergeagent.cpp
)
#qt5_add_dbus_adaptor(sendlateragent_SRCS org.freedesktop.Akonadi.SendLaterAgent.xml sendlateragent.h SendLaterAgent)
#ki18n_wrap_ui(libsendlateragent_SRCS ui/sendlaterconfigurewidget.ui)
#kconfig_add_kcfg_files(libsendlateragent_SRCS sendlateragentsettings.kcfgc)
add_library(mailmergeagent STATIC ${libmailmergeagent_SRCS})
#if (COMPILE_WITH_UNITY_CMAKE_SUPPORT)
# set_target_properties(sendlateragent PROPERTIES UNITY_BUILD ON)
#endif()
target_link_libraries(mailmergeagent
KF5::AkonadiCore
KF5::AkonadiMime
KF5::MailTransportAkonadi
KF5::Mime
KF5::MessageComposer
KF5::MessageCore
KF5::PimCommon
KF5::DBusAddons
KF5::WindowSystem
KF5::XmlGui
KF5::Notifications
KF5::I18n
)
add_executable(akonadi_mailmerge_agent ${mailmergeagent_SRCS})
target_link_libraries(akonadi_mailmerge_agent
mailmergeagent
KF5::AkonadiAgentBase
)
if( APPLE )
set_target_properties(akonadi_mailmerge_agent PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${kmail_SOURCE_DIR}/agents/Info.plist.template)
set_target_properties(akonadi_mailmerge_agent PROPERTIES MACOSX_BUNDLE_BUNDLE_NAME "KDE Akonadi Mail Merge")
endif ()
install(TARGETS akonadi_mailmerge_agent ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
install(FILES mailmergeagent.desktop DESTINATION "${KDE_INSTALL_DATAROOTDIR}/akonadi/agents")
#install(FILES akonadi_sendlater_agent.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFY5RCDIR} )
#kcoreaddons_add_plugin(sendlateragentconfig
# JSON sendlateragentconfig.json
# SOURCES ${sendlateragentconfig_SRCS}
# INSTALL_NAMESPACE akonadi/config
#)
......@@ -187,6 +187,7 @@ void MailMergeAgent::itemsMoved(const Akonadi::Item::List &items,
QString MailMergeAgent::printDebugInfo() const
{
// return mManager->printDebugInfo();
return {};
}
AKONADI_AGENT_MAIN(MailMergeAgent)
......@@ -21,6 +21,7 @@ public:
void setEnableAgent(bool b);
Q_REQUIRED_RESULT bool enabledAgent() const;
void removeItem(qint64 item);
Q_SIGNALS:
void needUpdateConfigDialogBox();
......@@ -29,6 +30,7 @@ public Q_SLOTS:
void configure(WId windowId) override;
protected:
void addItem(qint64 timestamp, bool recurrence, int recurrenceValue, int recurrenceUnit, Akonadi::Item::Id id, const QString &subject, const QString &to);
void itemsRemoved(const Akonadi::Item::List &item) override;
void itemsMoved(const Akonadi::Item::List &items, const Akonadi::Collection &sourceCollection, const Akonadi::Collection &destinationCollection) override;
void doSetOnline(bool online) override;
......
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