Commit 162745e7 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Adapt to new api

parent 37560384
......@@ -61,7 +61,7 @@ find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Widgets Test UiTools)
find_package(Qt5X11Extras NO_MODULE)
set(MAILCOMMON_LIB_VERSION_LIB "5.3.42")
set(KDEPIM_APPS_LIB_VERSION_LIB "5.3.40")
set(PIMCOMMON_LIB_VERSION_LIB "5.3.41")
set(PIMCOMMON_LIB_VERSION_LIB "5.3.47")
set(LIBKDEPIM_LIB_VERSION_LIB "5.3.42")
set(LIBINCIDENCEEDITOR_LIB_VERSION_LIB "5.3.41")
set(CALENDARSUPPORT_LIB_VERSION_LIB "5.3.41")
......
......@@ -47,7 +47,7 @@
#include <QLabel>
#include <QStatusBar>
KOrganizer::KOrganizer() : KParts::MainWindow(), KOrg::MainWindow(), mPluginInterface(Q_NULLPTR)
KOrganizer::KOrganizer() : KParts::MainWindow(), KOrg::MainWindow()
{
// Set this to be the group leader for all subdialogs - this means
// modal subdialogs will only affect this dialog, not the other windows
......@@ -82,7 +82,8 @@ void KOrganizer::init(bool document)
mActionManager->init();
mActionManager->loadParts();
mPluginInterface = new KOrganizerPluginInterface(actionCollection(), this);
KOrganizerPluginInterface::self()->setActionCollection(actionCollection());
KOrganizerPluginInterface::self()->initializePlugins();
initActions();
readSettings();
......
......@@ -135,7 +135,6 @@ private:
KOrg::Part::List mParts; // List of parts loaded
ActionManager *mActionManager;
KOrganizerPluginInterface *mPluginInterface;
};
#endif
......@@ -20,15 +20,36 @@
#include "korganizerplugininterface.h"
#include <KActionCollection>
KOrganizerPluginInterface::KOrganizerPluginInterface(KActionCollection *ac, QObject *parent)
: PimCommon::PluginInterface(ac, parent)
class KOrganizerPluginInterfacePrivate
{
public:
KOrganizerPluginInterfacePrivate()
: korganizerPluginInterface(new KOrganizerPluginInterface)
{
}
~KOrganizerPluginInterfacePrivate()
{
delete korganizerPluginInterface;
}
KOrganizerPluginInterface *korganizerPluginInterface;
};
Q_GLOBAL_STATIC(KOrganizerPluginInterfacePrivate, sInstance)
KOrganizerPluginInterface::KOrganizerPluginInterface(QObject *parent)
: PimCommon::PluginInterface(parent)
{
setPluginName(QStringLiteral("korganizer"));
setServiceTypeName(QStringLiteral("KOrganizer/MainViewPlugin"));
initializePlugins();
}
KOrganizerPluginInterface::~KOrganizerPluginInterface()
{
}
KOrganizerPluginInterface *KOrganizerPluginInterface::self()
{
return sInstance->korganizerPluginInterface;
}
......@@ -27,8 +27,9 @@ class KOrganizerPluginInterface : public PimCommon::PluginInterface
{
Q_OBJECT
public:
explicit KOrganizerPluginInterface(KActionCollection *ac, QObject *parent = Q_NULLPTR);
explicit KOrganizerPluginInterface(QObject *parent = Q_NULLPTR);
~KOrganizerPluginInterface();
static KOrganizerPluginInterface *self();
};
#endif // KORGANIZERPLUGININTERFACE_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