Commit b2842659 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Port to QmlObjectSharedEngine in all remaining places

OSD, Applet Alternatives, and Interactive Console were still creating their own QML engine

Differential Revision: https://phabricator.kde.org/D10773
parent 49848e4e
......@@ -26,7 +26,7 @@
#include <QUrl>
#include <Plasma/Package>
#include <KDeclarative/QmlObject>
#include <KDeclarative/QmlObjectSharedEngine>
#include <klocalizedstring.h>
Osd::Osd(KSharedConfig::Ptr config, ShellCorona *corona)
......@@ -167,7 +167,7 @@ bool Osd::init()
}
if (!m_osdObject) {
m_osdObject = new KDeclarative::QmlObject(this);
m_osdObject = new KDeclarative::QmlObjectSharedEngine(this);
}
m_osdObject->setSource(m_osdUrl);
......
......@@ -26,7 +26,7 @@
#include <KSharedConfig>
namespace KDeclarative {
class QmlObject;
class QmlObjectSharedEngine;
}
namespace Plasma {
}
......@@ -70,7 +70,7 @@ private:
void showOsd();
QUrl m_osdUrl;
KDeclarative::QmlObject *m_osdObject = nullptr;
KDeclarative::QmlObjectSharedEngine *m_osdObject = nullptr;
QTimer *m_osdTimer = nullptr;
int m_timeout = 0;
......
......@@ -47,7 +47,7 @@
#include <KAuthorized>
#include <KWindowSystem>
#include <kdeclarative/kdeclarative.h>
#include <kdeclarative/qmlobject.h>
#include <kdeclarative/qmlobjectsharedengine.h>
#include <KMessageBox>
#include <kdirwatch.h>
......@@ -815,7 +815,7 @@ void ShellCorona::showAlternativesForApplet(Plasma::Applet *applet)
return;
}
KDeclarative::QmlObject *qmlObj = new KDeclarative::QmlObject(this);
auto *qmlObj = new KDeclarative::QmlObjectSharedEngine(this);
qmlObj->setInitializationDelayed(true);
qmlObj->setSource(alternativesQML);
......@@ -1414,7 +1414,7 @@ void ShellCorona::loadInteractiveConsole()
return;
}
m_interactiveConsole = new KDeclarative::QmlObject(this);
m_interactiveConsole = new KDeclarative::QmlObjectSharedEngine(this);
m_interactiveConsole->setInitializationDelayed(true);
m_interactiveConsole->setSource(consoleQML);
......
......@@ -45,7 +45,7 @@ namespace KActivities
namespace KDeclarative
{
class QmlObject;
class QmlObjectSharedEngine;
} // namespace KDeclarative
namespace KScreen {
......@@ -241,7 +241,7 @@ private:
QMenu *m_addPanelsMenu;
KPackage::Package m_lookAndFeelPackage;
QSet<QScreen*> m_redundantOutputs;
KDeclarative::QmlObject *m_interactiveConsole;
KDeclarative::QmlObjectSharedEngine *m_interactiveConsole;
QTimer m_waitingPanelsTimer;
QTimer m_appConfigSyncTimer;
......
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