Commit 2cff77ec authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Create a mailtransportakonadi

parent 8530205c
cmake_minimum_required(VERSION 3.0)
set(PIM_VERSION "5.4.43")
set(PIM_VERSION "5.4.46")
project(MailTransport VERSION ${PIM_VERSION})
......
......@@ -12,7 +12,7 @@ macro(add_akonadi_isolated_test _source _path)
Qt5::Test
KF5::AkonadiCore
KF5::AkonadiMime
KF5::MailTransport
KF5::MailTransportAkonadi
KF5::Mime
KF5::I18n
KF5::ConfigGui
......
......@@ -23,11 +23,11 @@
#include <qtest_akonadi.h>
#include <addressattribute.h>
#include <akonadi/dispatchmodeattribute.h>
#include <akonadi/errorattribute.h>
#include <akonadi/sentactionattribute.h>
#include <akonadi/sentbehaviourattribute.h>
#include <akonadi/transportattribute.h>
#include <kmailtransportakonadi/dispatchmodeattribute.h>
#include <kmailtransportakonadi/errorattribute.h>
#include <kmailtransportakonadi/sentactionattribute.h>
#include <kmailtransportakonadi/sentbehaviourattribute.h>
#include <kmailtransportakonadi/transportattribute.h>
using namespace Akonadi;
using namespace MailTransport;
......
......@@ -38,12 +38,12 @@
#include <kmime/kmime_message.h>
#include <akonadi/dispatchmodeattribute.h>
#include <akonadi/errorattribute.h>
#include <akonadi/messagequeuejob.h>
#include <akonadi/sentbehaviourattribute.h>
#include <kmailtransportakonadi/dispatchmodeattribute.h>
#include <kmailtransportakonadi/errorattribute.h>
#include <kmailtransportakonadi/messagequeuejob.h>
#include <kmailtransportakonadi/sentbehaviourattribute.h>
#include <transport.h>
#include <akonadi/transportattribute.h>
#include <kmailtransportakonadi/transportattribute.h>
#include <transportmanager.h>
#include <qsignalspy.h>
......
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
set(mailtransport_lib_srcs
transport.cpp
transportmanager.cpp
transporttype.cpp
filteractionjob.cpp
transportjob.cpp
smtpjob.cpp
precommandjob.cpp
socket.cpp
servertest.cpp
)
set(mailtransport_akonadi_srcs
akonadi/dispatcherinterface.cpp
akonadi/attributeregistrar.cpp
akonadi/dispatchmodeattribute.cpp
akonadi/errorattribute.cpp
akonadi/transportattribute.cpp
akonadi/sentactionattribute.cpp
akonadi/sentbehaviourattribute.cpp
akonadi/messagequeuejob.cpp
akonadi/outboxactions.cpp
)
set(mailtransport_widgets_srcs
widgets/transportconfigwidget.cpp
widgets/addtransportdialog.cpp
widgets/transportcombobox.cpp
widgets/transportlistview.cpp
widgets/transportmanagementwidget.cpp
widgets/transportconfigdialog.cpp
widgets/smtpconfigwidget.cpp
)
ecm_qt_declare_logging_category(mailtransport_lib_srcs HEADER mailtransport_debug.h IDENTIFIER MAILTRANSPORT_LOG CATEGORY_NAME org.kde.pim.mailtransport)
ki18n_wrap_ui(mailtransport_lib_srcs
ui/addtransportdialog.ui
ui/transportmanagementwidget.ui
ui/smtpsettings.ui
)
kconfig_add_kcfg_files(mailtransport_lib_srcs transportbase.kcfgc)
add_library(KF5MailTransport ${mailtransport_lib_srcs}
${mailtransport_widgets_srcs}
${mailtransport_akonadi_srcs}
)
generate_export_header(KF5MailTransport BASE_NAME mailtransport)
add_library(KF5::MailTransport ALIAS KF5MailTransport)
target_include_directories(KF5MailTransport INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport;${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport/mailtransport>")
target_include_directories(KF5MailTransport PUBLIC "$<BUILD_INTERFACE:${MailTransport_SOURCE_DIR}/src;${MailTransport_BINARY_DIR}/src>")
target_link_libraries(KF5MailTransport
PUBLIC
KF5::Wallet
KF5::AkonadiCore
KF5::Mime
KF5::AkonadiMime
PRIVATE
KF5::I18n
KF5::KIOCore
KF5::ConfigGui
KF5::WidgetsAddons
KF5::CoreAddons
KF5::Wallet
KF5::ConfigWidgets
Qt5::DBus
Qt5::Network
KF5::Completion
)
set_target_properties(KF5MailTransport PROPERTIES
VERSION ${MAILTRANSPORT_VERSION_STRING}
SOVERSION ${MAILTRANSPORT_SOVERSION}
EXPORT_NAME MailTransport
)
install(TARGETS KF5MailTransport EXPORT KF5MailTransportTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES mailtransport.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
add_subdirectory(kmailtransport)
add_subdirectory(kmailtransportakonadi)
add_subdirectory(kcm)
ecm_generate_headers(MailTransport_CamelCase_HEADERS
HEADER_NAMES
PrecommandJob
ServerTest
SmtpJob
Transport
TransportJob
TransportManager
TransportType
PREFIX MailTransport
REQUIRED_HEADERS MailTransport_HEADERS
)
ecm_generate_headers(MailTransport_widgets_CamelCase_HEADERS
HEADER_NAMES
TransportComboBox
TransportManagementWidget
PREFIX MailTransport
REQUIRED_HEADERS MailTransport_widgets_HEADERS
RELATIVE widgets
)
ecm_generate_headers(MailTransport_akonadi_CamelCase_HEADERS
HEADER_NAMES
DispatcherInterface
MessageQueueJob
TransportAttribute
SentBehaviourAttribute
DispatchModeAttribute
ErrorAttribute
SentActionAttribute
PREFIX MailTransport
REQUIRED_HEADERS MailTransport_akonadi_HEADERS
RELATIVE akonadi
)
install(FILES
${MailTransport_CamelCase_HEADERS}
${MailTransport_widgets_CamelCase_HEADERS}
${MailTransport_akonadi_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport/MailTransport/ COMPONENT Devel )
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransport_export.h
${MailTransport_HEADERS}
${MailTransport_widgets_HEADERS}
${MailTransport_akonadi_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/transportbase.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport/mailtransport COMPONENT Devel
)
ecm_generate_pri_file(BASE_NAME KMailTransport LIB_NAME KF5MailTransport DEPS "Wallet AkonadiCore Mime AkonadiMime" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport/)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
add_definitions("-DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_TO_ASCII")
set(mailtransport_lib_srcs
transport.cpp
transportmanager.cpp
transporttype.cpp
transportjob.cpp
smtpjob.cpp
precommandjob.cpp
socket.cpp
servertest.cpp
)
set(mailtransport_widgets_srcs
widgets/transportconfigwidget.cpp
widgets/addtransportdialog.cpp
widgets/transportcombobox.cpp
widgets/transportlistview.cpp
widgets/transportmanagementwidget.cpp
widgets/transportconfigdialog.cpp
widgets/smtpconfigwidget.cpp
)
ecm_qt_declare_logging_category(mailtransport_lib_srcs HEADER mailtransport_debug.h IDENTIFIER MAILTRANSPORT_LOG CATEGORY_NAME org.kde.pim.mailtransport)
ki18n_wrap_ui(mailtransport_lib_srcs
ui/addtransportdialog.ui
ui/transportmanagementwidget.ui
ui/smtpsettings.ui
)
kconfig_add_kcfg_files(mailtransport_lib_srcs transportbase.kcfgc)
add_library(KF5MailTransport ${mailtransport_lib_srcs}
${mailtransport_widgets_srcs}
${mailtransport_kmailtransportakonadi_srcs}
)
generate_export_header(KF5MailTransport BASE_NAME mailtransport)
add_library(KF5::MailTransport ALIAS KF5MailTransport)
target_include_directories(KF5MailTransport INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport;${KDE_INSTALL_INCLUDEDIR_KF5}/mailtransport>")
target_include_directories(KF5MailTransport PUBLIC "$<BUILD_INTERFACE:${MailTransport_SOURCE_DIR}/src;${MailTransport_BINARY_DIR}/src>")
target_link_libraries(KF5MailTransport
PUBLIC
KF5::Wallet
PRIVATE
KF5::I18n
KF5::KIOCore
KF5::ConfigGui
KF5::WidgetsAddons
KF5::CoreAddons
KF5::Wallet
KF5::ConfigWidgets
Qt5::DBus
Qt5::Network
KF5::Completion
)
set_target_properties(KF5MailTransport PROPERTIES
VERSION ${MAILTRANSPORT_VERSION_STRING}
SOVERSION ${MAILTRANSPORT_SOVERSION}
EXPORT_NAME MailTransport
)
install(TARGETS KF5MailTransport EXPORT KF5MailTransportTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
install(FILES mailtransport.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR})
ecm_generate_headers(MailTransport_CamelCase_HEADERS
HEADER_NAMES
PrecommandJob
ServerTest
SmtpJob
Transport
TransportJob
TransportManager
TransportType
PREFIX MailTransport
REQUIRED_HEADERS MailTransport_HEADERS
)
ecm_generate_headers(MailTransport_widgets_CamelCase_HEADERS
HEADER_NAMES
TransportComboBox
TransportManagementWidget
PREFIX MailTransport
REQUIRED_HEADERS MailTransport_widgets_HEADERS
RELATIVE widgets
)
install(FILES
${MailTransport_CamelCase_HEADERS}
${MailTransport_widgets_CamelCase_HEADERS}
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport/ COMPONENT Devel )
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/mailtransport_export.h
${MailTransport_HEADERS}
${MailTransport_widgets_HEADERS}
${CMAKE_CURRENT_BINARY_DIR}/transportbase.h
DESTINATION ${KDE_INSTALL_INCLUDEDIR_KF5}/mailtransport COMPONENT Devel
)
ecm_generate_pri_file(BASE_NAME KMailTransport LIB_NAME KF5MailTransport DEPS "Wallet" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KDE_INSTALL_INCLUDEDIR_KF5}/MailTransport/)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
......@@ -32,9 +32,6 @@
#include <KStringHandler>
#include <KWallet/KWallet>
#include <agentinstance.h>
#include <agentmanager.h>
using namespace MailTransport;
using namespace KWallet;
......@@ -161,7 +158,6 @@ void Transport::usrRead()
// Set TransportType.
{
using namespace Akonadi;
d->transportType = TransportType();
d->transportType.d->mType = type();
qCDebug(MAILTRANSPORT_LOG) << "type" << type();
......
Supports Markdown
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