Commit 6b364ed3 authored by Laurent Montel's avatar Laurent Montel 😁

Set default identitymanager for plugins

parent 0eded126
......@@ -137,7 +137,7 @@ else()
set(LIBMAILIMPORTER_VERSION_LIB "5.2.90")
set(MAILCOMMON_LIB_VERSION_LIB "5.2.90")
set(KDEPIM_APPS_LIB_VERSION_LIB "5.2.90")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.93")
set(LIBKLEO_LIB_VERSION_LIB "5.2.90")
set(LIBGRANTLEETHEME_LIB_VERSION_LIB "5.2.90")
set(PIMCOMMON_LIB_VERSION_LIB "5.2.90")
......
......@@ -55,7 +55,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${accountwizard_SOURCE_DIR})
option(KDEPIM_ENTERPRISE_BUILD "Enable features specific to the enterprise branch, which are normally disabled. Also, it disables many components not needed for Kontact such as the Kolab client." FALSE)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Xml DBus Test)
set(MAILCOMMON_LIB_VERSION_LIB "5.2.90")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.93")
set(PIMCOMMON_LIB_VERSION_LIB "5.2.90")
set(LIBKDEPIM_LIB_VERSION_LIB "5.2.90")
......
......@@ -51,7 +51,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${akonadiconsole_SOURCE_DIR})
set(QT_REQUIRED_VERSION "5.6.0")
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets DBus Sql)
set(LIBMAILIMPORTER_VERSION_LIB "5.2.90")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.93")
set(LIBKLEO_LIB_VERSION_LIB "5.2.90")
set(LIBKDEPIM_LIB_VERSION_LIB "5.2.90")
set(KCALENDARCORE_LIB_VERSION "5.2.90")
......
......@@ -45,7 +45,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${akregator_SOURCE_DIR})
set(LIBGRANTLEETHEME_LIB_VERSION_LIB "5.2.90")
set(LIBKDEPIM_LIB_VERSION_LIB "5.2.90")
set(LIBKLEO_LIB_VERSION_LIB "5.2.90")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.93")
set(PIMCOMMON_LIB_VERSION_LIB "5.2.90")
set(SYNDICATION_LIB_VERSION "5.2.90")
......
......@@ -47,7 +47,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${blogilo_SOURCE_DIR})
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test Sql WebEngine WebEngineWidgets)
set(PIMCOMMON_LIB_VERSION_LIB "5.2.90")
set(LIBKDEPIM_LIB_VERSION_LIB "5.2.90")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.93")
# Find KF5 package
find_package(KF5DBusAddons ${KF5_VERSION} CONFIG REQUIRED)
find_package(KF5DocTools ${KF5_VERSION} REQUIRED)
......
......@@ -36,7 +36,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${grantleeditor_SOURCE_DIR})
set(KDEPIM_VERSION_NUMBER "5.2.90")
set(KDEPIM_VERSION "${KDEPIM_VERSION_NUMBER}${KDEPIM_DEV_VERSION}")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.93")
set(AKONADI_MIMELIB_VERSION "5.2.90")
set(KPIMTEXTEDIT_LIB_VERSION "5.2.90")
set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
......
......@@ -48,7 +48,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${importwizard_SOURCE_DIR})
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Gui)
set(LIBMAILIMPORTER_VERSION_LIB "5.2.90")
set(MAILCOMMON_LIB_VERSION_LIB "5.2.90")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.93")
set(PIMCOMMON_LIB_VERSION_LIB "5.2.90")
set(LIBKDEPIM_LIB_VERSION_LIB "5.2.90")
set(IDENTITYMANAGEMENT_LIB_VERSION "5.2.90")
......
......@@ -64,7 +64,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${kmail_SOURCE_DIR})
set(LIBGRAVATAR_VERSION_LIB "5.2.90")
set(MAILCOMMON_LIB_VERSION_LIB "5.2.90")
set(KDEPIM_APPS_LIB_VERSION_LIB "5.2.90")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.93")
set(LIBKLEO_LIB_VERSION_LIB "5.2.90")
set(PIMCOMMON_LIB_VERSION_LIB "5.2.90")
set(LIBKDEPIM_LIB_VERSION_LIB "5.2.90")
......
......@@ -252,6 +252,7 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg, bool lastSignState
mPluginEditorManagerInterface = new KMailPluginEditorManagerInterface(this);
mPluginEditorCheckBeforeSendManagerInterface = new KMailPluginEditorCheckBeforeSendManagerInterface(this);
mPluginEditorCheckBeforeSendManagerInterface->setIdentityManagement(kmkernel->identityManager());
connect(mComposerBase, &MessageComposer::ComposerViewBase::disableHtml, this, &KMComposerWin::disableHtml);
connect(mComposerBase, &MessageComposer::ComposerViewBase::enableHtml, this, &KMComposerWin::enableHtml);
......
......@@ -25,7 +25,8 @@
KMailPluginEditorCheckBeforeSendManagerInterface::KMailPluginEditorCheckBeforeSendManagerInterface(QObject *parent)
: QObject(parent),
mParentWidget(Q_NULLPTR)
mParentWidget(Q_NULLPTR),
mIdentityManagement(Q_NULLPTR)
{
}
......@@ -45,6 +46,11 @@ void KMailPluginEditorCheckBeforeSendManagerInterface::setParentWidget(QWidget *
mParentWidget = parentWidget;
}
void KMailPluginEditorCheckBeforeSendManagerInterface::setIdentityManagement(KIdentityManagement::IdentityManager *identityManagement)
{
mIdentityManagement = identityManagement;
}
void KMailPluginEditorCheckBeforeSendManagerInterface::initializePlugins()
{
if (!mListPluginInterface.isEmpty()) {
......@@ -55,6 +61,7 @@ void KMailPluginEditorCheckBeforeSendManagerInterface::initializePlugins()
Q_FOREACH (MessageComposer::PluginEditorCheckBeforeSend *plugin, lstPlugin) {
MessageComposer::PluginEditorCheckBeforeSendInterface *interface = plugin->createInterface(this);
interface->setParentWidget(mParentWidget);
interface->setIdentityManagement(mIdentityManagement);
mListPluginInterface.append(interface);
}
}
......
......@@ -22,6 +22,11 @@
#include <QObject>
namespace KIdentityManagement
{
class IdentityManager;
}
namespace MessageComposer
{
class PluginEditorCheckBeforeSendInterface;
......@@ -37,6 +42,7 @@ public:
QWidget *parentWidget() const;
void setParentWidget(QWidget *parentWidget);
void setIdentityManagement(KIdentityManagement::IdentityManager *identityManagement);
//TODO add Identity
//TODO add Emails
......@@ -47,6 +53,7 @@ public:
private:
QList<MessageComposer::PluginEditorCheckBeforeSendInterface *> mListPluginInterface;
QWidget *mParentWidget;
KIdentityManagement::IdentityManager *mIdentityManagement;
};
#endif // KMAILPLUGINEDITORCHECKBEFORESENDMANAGERINTERFACE_H
......@@ -41,7 +41,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${sieveeditor_SOURCE_DIR})
set(KDEPIM_LIB_VERSION "${KDEPIM_VERSION_NUMBER}")
set(KDEPIM_LIB_SOVERSION "5")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.91")
set(MESSAGELIB_LIB_VERSION_LIB "5.2.93")
set(PIMCOMMON_LIB_VERSION_LIB "5.2.90")
set(LIBKSIEVE_LIB_VERSION_LIB "5.2.90")
......
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