Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 31abf92f authored by Laurent Montel's avatar Laurent Montel 😁

Adapt to new api

parent c38babf6
......@@ -67,7 +67,7 @@ find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Network Test Widget
set(LIBGRAVATAR_VERSION_LIB "5.7.40")
set(MAILCOMMON_LIB_VERSION_LIB "5.7.41")
set(KDEPIM_APPS_LIB_VERSION_LIB "5.7.40")
set(MESSAGELIB_LIB_VERSION_LIB "5.7.81")
set(MESSAGELIB_LIB_VERSION_LIB "5.7.82")
set(LIBKLEO_LIB_VERSION_LIB "5.7.40")
set(PIMCOMMON_LIB_VERSION_LIB "5.7.42")
set(LIBKDEPIM_LIB_VERSION_LIB "5.7.40")
......
......@@ -117,6 +117,7 @@
#include <MessageComposer/MessageHelper>
#include <MessageComposer/PluginEditorCheckBeforeSendParams>
#include <MessageComposer/PluginEditorInterface>
#include <MessageComposer/PluginActionType>
#include <MessageComposer/RichTextComposerSignatures>
#include <MessageComposer/SignatureController>
#include <MessageComposer/TextPart>
......@@ -1345,12 +1346,12 @@ void KMComposerWin::slotToggleMenubar(bool dontShowWarning)
void KMComposerWin::initializePluginActions()
{
if (guiFactory()) {
QHashIterator<MessageComposer::ActionType::Type, QList<QAction *> > localActionsType(mPluginEditorManagerInterface->actionsType());
QHashIterator<MessageComposer::PluginActionType::Type, QList<QAction *> > localActionsType(mPluginEditorManagerInterface->actionsType());
while (localActionsType.hasNext()) {
localActionsType.next();
QList<QAction *> lst = localActionsType.value();
if (!lst.isEmpty()) {
const QString actionlistname = QStringLiteral("kmaileditor") + MessageComposer::PluginEditorInterface::actionXmlExtension(localActionsType.key());
const QString actionlistname = QStringLiteral("kmaileditor") + MessageComposer::PluginActionType::actionXmlExtension(localActionsType.key());
Q_FOREACH (KXMLGUIClient *client, guiFactory()->clients()) {
client->unplugActionList(actionlistname);
client->plugActionList(actionlistname, lst);
......@@ -3245,7 +3246,7 @@ QList<KToggleAction *> KMComposerWin::customToolsList() const
QList<QAction *> KMComposerWin::pluginToolsActionListForPopupMenu() const
{
return mPluginEditorManagerInterface->actionsType(MessageComposer::ActionType::PopupMenu);
return mPluginEditorManagerInterface->actionsType(MessageComposer::PluginActionType::PopupMenu);
}
void KMComposerWin::slotRecipientEditorLineAdded(KPIM::MultiplyingLine *line_)
......
......@@ -93,17 +93,17 @@ void KMailPluginEditorManagerInterface::setActionCollection(KActionCollection *a
mActionCollection = actionCollection;
}
QList<QAction *> KMailPluginEditorManagerInterface::actionsType(MessageComposer::ActionType::Type type)
QList<QAction *> KMailPluginEditorManagerInterface::actionsType(MessageComposer::PluginActionType::Type type)
{
return mActionHash.value(type);
}
QHash<MessageComposer::ActionType::Type, QList<QAction *> > KMailPluginEditorManagerInterface::actionsType()
QHash<MessageComposer::PluginActionType::Type, QList<QAction *> > KMailPluginEditorManagerInterface::actionsType()
{
if (mActionHash.isEmpty()) {
for (MessageComposer::PluginEditorInterface *interface : qAsConst(mListPluginInterface)) {
const MessageComposer::ActionType actionType = interface->actionType();
MessageComposer::ActionType::Type type = actionType.type();
const MessageComposer::PluginActionType actionType = interface->actionType();
MessageComposer::PluginActionType::Type type = actionType.type();
const bool needSelectedText = interface->needSelectedText();
if (needSelectedText) {
//Disable by default as we don't have selection by default.
......@@ -120,7 +120,7 @@ QHash<MessageComposer::ActionType::Type, QList<QAction *> > KMailPluginEditorMan
mActionHash.insert(type, QList<QAction *>() << actionType.action());
}
if (interface->plugin()->hasPopupMenuSupport()) {
type = MessageComposer::ActionType::PopupMenu;
type = MessageComposer::PluginActionType::PopupMenu;
QList<QAction *> lst = mActionHash.value(type);
if (!lst.isEmpty()) {
QAction *act = new QAction(this);
......@@ -132,7 +132,7 @@ QHash<MessageComposer::ActionType::Type, QList<QAction *> > KMailPluginEditorMan
}
}
if (interface->plugin()->hasToolBarSupport()) {
type = MessageComposer::ActionType::ToolBar;
type = MessageComposer::PluginActionType::ToolBar;
QList<QAction *> lst = mActionHash.value(type);
if (!lst.isEmpty()) {
QAction *act = new QAction(this);
......
......@@ -48,8 +48,8 @@ public:
KActionCollection *actionCollection() const;
void setActionCollection(KActionCollection *actionCollection);
QHash<MessageComposer::ActionType::Type, QList<QAction *> > actionsType();
QList<QAction *> actionsType(MessageComposer::ActionType::Type type);
QHash<MessageComposer::PluginActionType::Type, QList<QAction *> > actionsType();
QList<QAction *> actionsType(MessageComposer::PluginActionType::Type type);
Q_SIGNALS:
void textSelectionChanged(bool hasSelection);
......@@ -62,7 +62,7 @@ private:
QWidget *mParentWidget = nullptr;
KActionCollection *mActionCollection = nullptr;
QList<MessageComposer::PluginEditorInterface *> mListPluginInterface;
QHash<MessageComposer::ActionType::Type, QList<QAction *> > mActionHash;
QHash<MessageComposer::PluginActionType::Type, QList<QAction *> > mActionHash;
};
#endif // KMAILPLUGINEDITORMANAGERINTERFACE_H
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