diff --git a/src/declarativeimports/core/corebindingsplugin.cpp b/src/declarativeimports/core/corebindingsplugin.cpp index b541875a2..acc7cb76f 100644 --- a/src/declarativeimports/core/corebindingsplugin.cpp +++ b/src/declarativeimports/core/corebindingsplugin.cpp @@ -60,7 +60,7 @@ void CoreBindingsPlugin::initializeEngine(QQmlEngine *engine, const char *uri) context->setContextProperty("theme", theme); if (!engine->rootContext()->contextObject()) { - KDeclarative kdeclarative; + KDeclarative::KDeclarative kdeclarative; kdeclarative.setDeclarativeEngine(engine); kdeclarative.setupBindings(); } diff --git a/src/declarativeimports/core/tooltipdialog.cpp b/src/declarativeimports/core/tooltipdialog.cpp index 5598c75ec..5489ea6ee 100644 --- a/src/declarativeimports/core/tooltipdialog.cpp +++ b/src/declarativeimports/core/tooltipdialog.cpp @@ -63,7 +63,7 @@ ToolTipDialog::~ToolTipDialog() QQuickItem *ToolTipDialog::loadDefaultItem() { if (!m_qmlObject) { - m_qmlObject = new QmlObject(this); + m_qmlObject = new KDeclarative::QmlObject(this); } if (!m_qmlObject->rootObject()) { diff --git a/src/declarativeimports/core/tooltipdialog.h b/src/declarativeimports/core/tooltipdialog.h index 5e7960263..6749c775a 100644 --- a/src/declarativeimports/core/tooltipdialog.h +++ b/src/declarativeimports/core/tooltipdialog.h @@ -29,9 +29,13 @@ class QQuickItem; class QGraphicsWidget; -class QmlObject; class QPropertyAnimation; +namespace KDeclarative +{ + class QmlObject; +} + /** * QML wrapper for kdelibs Plasma::ToolTipDialog * @@ -69,7 +73,7 @@ private Q_SLOTS: void valueChanged(const QVariant &value); private: - QmlObject *m_qmlObject; + KDeclarative::QmlObject *m_qmlObject; QTimer *m_showTimer; QPropertyAnimation *m_animation; int m_hideTimeout; diff --git a/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp b/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp index de2629265..b54f8644b 100644 --- a/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp +++ b/src/declarativeimports/plasmacomponents/plasmacomponentsplugin.cpp @@ -94,8 +94,8 @@ void PlasmaComponentsPlugin::registerTypes(const char *uri) Q_ASSERT(uri == QLatin1String("org.kde.plasma.components")); //platform specific c++ components - const QString target = KDeclarative::componentsTarget(); - if (target == KDeclarative::defaultComponentsTarget()) { + const QString target = KDeclarative::KDeclarative::componentsTarget(); + if (target == KDeclarative::KDeclarative::defaultComponentsTarget()) { qmlRegisterType(uri, 2, 0, "Menu"); qmlRegisterType(uri, 2, 0, "MenuItem"); } else { diff --git a/src/plasma/private/packages.cpp b/src/plasma/private/packages.cpp index 53172afe0..dc44fc198 100644 --- a/src/plasma/private/packages.cpp +++ b/src/plasma/private/packages.cpp @@ -67,7 +67,7 @@ void GenericPackage::initPackage(Package *package) { ChangeableMainScriptPackage::initPackage(package); - QStringList platform = KDeclarative::runtimePlatform(); + QStringList platform = KDeclarative::KDeclarative::runtimePlatform(); if (!platform.isEmpty()) { QMutableStringListIterator it(platform); while (it.hasNext()) { diff --git a/src/plasmaquick/configview.cpp b/src/plasmaquick/configview.cpp index e0888d27d..cf9c1df19 100644 --- a/src/plasmaquick/configview.cpp +++ b/src/plasmaquick/configview.cpp @@ -64,7 +64,7 @@ void ConfigViewPrivate::init() { applet->setUserConfiguring(true); - KDeclarative kdeclarative; + KDeclarative::KDeclarative kdeclarative; kdeclarative.setDeclarativeEngine(q->engine()); kdeclarative.setupBindings(); qmlRegisterType("org.kde.plasma.configuration", 2, 0, "ConfigModel"); diff --git a/src/plasmaquick/packageurlinterceptor.cpp b/src/plasmaquick/packageurlinterceptor.cpp index ee590ead1..04d4065d0 100644 --- a/src/plasmaquick/packageurlinterceptor.cpp +++ b/src/plasmaquick/packageurlinterceptor.cpp @@ -117,7 +117,7 @@ QUrl PackageUrlInterceptor::intercept(const QUrl &path, QQmlAbstractUrlIntercept //qDebug() << "Found allowed, access granted" << path; //check if there is a platform specific file that overrides this allowed - foreach (const QString &platform, KDeclarative::runtimePlatform()) { + foreach (const QString &platform, KDeclarative::KDeclarative::runtimePlatform()) { //qDebug() << "Trying" << platform; //search for a platformqml/ path sibling of this allowed path diff --git a/src/scriptengines/qml/plasmoid/appletinterface.cpp b/src/scriptengines/qml/plasmoid/appletinterface.cpp index 881918c84..eac58b51c 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/src/scriptengines/qml/plasmoid/appletinterface.cpp @@ -86,7 +86,7 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, QQuickItem *pa this, &ContainmentInterface::screenChanged); } - m_qmlObject = new QmlObject(this); + m_qmlObject = new KDeclarative::QmlObject(this); m_qmlObject->setInitializationDelayed(true); m_collapseTimer = new QTimer(this); @@ -104,7 +104,7 @@ void AppletInterface::init() return; } - m_configuration = new ConfigPropertyMap(applet()->configScheme(), this); + m_configuration = new KDeclarative::ConfigPropertyMap(applet()->configScheme(), this); //use our own custom network access manager that will access Plasma packages and to manage security (i.e. deny access to remote stuff when the proper extension isn't enabled QQmlEngine *engine = m_qmlObject->engine(); @@ -837,7 +837,7 @@ void AppletInterface::itemChange(ItemChange change, const ItemChangeData &value) QQuickItem::itemChange(change, value); } -QmlObject *AppletInterface::qmlObject() +KDeclarative::QmlObject *AppletInterface::qmlObject() { return m_qmlObject; } diff --git a/src/scriptengines/qml/plasmoid/appletinterface.h b/src/scriptengines/qml/plasmoid/appletinterface.h index 7942c004a..7714689fa 100644 --- a/src/scriptengines/qml/plasmoid/appletinterface.h +++ b/src/scriptengines/qml/plasmoid/appletinterface.h @@ -36,10 +36,12 @@ class QmlAppletScript; class QSignalMapper; class QSizeF; -class ConfigPropertyMap; class ConfigView; -class QmlObject; +namespace KDeclarative { + class ConfigPropertyMap; + class QmlObject; +} namespace Plasma { @@ -172,7 +174,7 @@ public: ~AppletInterface(); //API not intended for the QML part - QmlObject *qmlObject(); + KDeclarative::QmlObject *qmlObject(); QList contextualActions() const; @@ -346,10 +348,10 @@ private: QMap m_configs; - ConfigPropertyMap *m_configuration; + KDeclarative::ConfigPropertyMap *m_configuration; //UI-specific members ------------------ - QmlObject *m_qmlObject; + KDeclarative::QmlObject *m_qmlObject; QWeakPointer m_compactUiObject; QTimer *m_collapseTimer; diff --git a/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp b/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp index 13085cd79..9876e8c7c 100644 --- a/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp +++ b/src/scriptengines/qml/plasmoid/declarativeappletscript.cpp @@ -55,7 +55,7 @@ DeclarativeAppletScript::DeclarativeAppletScript(QObject *parent, const QVariant m_interface(0) { qmlRegisterType(); - qmlRegisterType(); + qmlRegisterType(); Q_UNUSED(args); } diff --git a/src/scriptengines/qml/plasmoid/declarativeappletscript.h b/src/scriptengines/qml/plasmoid/declarativeappletscript.h index ea197eaab..1649e5dd8 100644 --- a/src/scriptengines/qml/plasmoid/declarativeappletscript.h +++ b/src/scriptengines/qml/plasmoid/declarativeappletscript.h @@ -28,8 +28,6 @@ class AppletInterface; -class QmlObject; - class DeclarativeAppletScript : public Plasma::AppletScript { Q_OBJECT diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp index 472596cdc..1d5f80d9d 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.cpp @@ -74,7 +74,7 @@ Plasma::Package WallpaperInterface::package() const return m_pkg; } -ConfigPropertyMap *WallpaperInterface::configuration() const +KDeclarative::ConfigPropertyMap *WallpaperInterface::configuration() const { return m_configuration; } @@ -108,7 +108,7 @@ void WallpaperInterface::syncWallpaperPackage() m_wallpaperPlugin = m_containmentInterface->containment()->wallpaper(); if (!m_qmlObject) { - m_qmlObject = new QmlObject(this); + m_qmlObject = new KDeclarative::QmlObject(this); m_qmlObject->setInitializationDelayed(true); } @@ -121,7 +121,7 @@ void WallpaperInterface::syncWallpaperPackage() m_configLoader = 0; m_configuration = 0; if (configScheme()) { - m_configuration = new ConfigPropertyMap(configScheme(), this); + m_configuration = new KDeclarative::ConfigPropertyMap(configScheme(), this); } diff --git a/src/scriptengines/qml/plasmoid/wallpaperinterface.h b/src/scriptengines/qml/plasmoid/wallpaperinterface.h index 8ff437fb0..8750dc03f 100644 --- a/src/scriptengines/qml/plasmoid/wallpaperinterface.h +++ b/src/scriptengines/qml/plasmoid/wallpaperinterface.h @@ -31,16 +31,20 @@ namespace Plasma { class KActionCollection; class ContainmentInterface; -class ConfigPropertyMap; -class QmlObject; class QSignalMapper; +namespace KDeclarative { + class ConfigPropertyMap; + class QmlObject; +} + + class WallpaperInterface : public QQuickItem { Q_OBJECT //Q_PROPERTY(QString plugin READ plugin WRITE setPlugin NOTIFY pluginChanged) - Q_PROPERTY(ConfigPropertyMap *configuration READ configuration NOTIFY configurationChanged) + Q_PROPERTY(KDeclarative::ConfigPropertyMap *configuration READ configuration NOTIFY configurationChanged) public: WallpaperInterface(ContainmentInterface *parent = 0); @@ -57,7 +61,7 @@ public: Plasma::Package package() const; - ConfigPropertyMap *configuration() const; + KDeclarative::ConfigPropertyMap *configuration() const; Plasma::ConfigLoader *configScheme(); @@ -85,9 +89,9 @@ private Q_SLOTS: private: QString m_wallpaperPlugin; ContainmentInterface *m_containmentInterface; - QmlObject *m_qmlObject; + KDeclarative::QmlObject *m_qmlObject; Plasma::Package m_pkg; - ConfigPropertyMap *m_configuration; + KDeclarative::ConfigPropertyMap *m_configuration; Plasma::ConfigLoader *m_configLoader; KActionCollection *m_actions; QSignalMapper *m_actionSignals; diff --git a/src/shell/containmentconfigview.cpp b/src/shell/containmentconfigview.cpp index c7e228e2e..287afcaf6 100644 --- a/src/shell/containmentconfigview.cpp +++ b/src/shell/containmentconfigview.cpp @@ -124,7 +124,7 @@ ConfigModel *ContainmentConfigView::wallpaperConfigModel() return m_wallpaperConfigModel; } -ConfigPropertyMap *ContainmentConfigView::wallpaperConfiguration() const +KDeclarative::ConfigPropertyMap *ContainmentConfigView::wallpaperConfiguration() const { return m_currentWallpaperConfig; } @@ -154,7 +154,7 @@ void ContainmentConfigView::setCurrentWallpaper(const QString &wallpaper) QFile file(pkg.filePath("config", "main.xml")); KConfigGroup cfg = m_containment->config(); cfg = KConfigGroup(&cfg, "Wallpaper"); - m_currentWallpaperConfig = m_ownWallpaperConfig = new ConfigPropertyMap(new Plasma::ConfigLoader(&cfg, &file), this); + m_currentWallpaperConfig = m_ownWallpaperConfig = new KDeclarative::ConfigPropertyMap(new Plasma::ConfigLoader(&cfg, &file), this); } m_currentWallpaper = wallpaper; @@ -179,7 +179,7 @@ void ContainmentConfigView::syncWallpaperObjects() engine()->rootContext()->setContextProperty("wallpaper", wallpaperGraphicsObject); //FIXME: why m_wallpaperGraphicsObject->property("configuration").value() doesn't work? - m_currentWallpaperConfig = static_cast(wallpaperGraphicsObject->property("configuration").value()); + m_currentWallpaperConfig = static_cast(wallpaperGraphicsObject->property("configuration").value()); } #include "private/moc_containmentconfigview.cpp" diff --git a/src/shell/containmentconfigview.h b/src/shell/containmentconfigview.h index 2f343e6d4..f20323303 100644 --- a/src/shell/containmentconfigview.h +++ b/src/shell/containmentconfigview.h @@ -29,9 +29,12 @@ namespace Plasma { } class QAbstractItemModel; -class ConfigPropertyMap; class CurrentContainmentActionsModel; +namespace KDeclarative { + class ConfigPropertyMap; +} + //TODO: out of the library? class ContainmentConfigView : public ConfigView { @@ -39,7 +42,7 @@ class ContainmentConfigView : public ConfigView Q_PROPERTY(ConfigModel *containmentActionConfigModel READ containmentActionConfigModel CONSTANT) Q_PROPERTY(QAbstractItemModel *currentContainmentActionsModel READ currentContainmentActionsModel CONSTANT) Q_PROPERTY(ConfigModel *wallpaperConfigModel READ wallpaperConfigModel CONSTANT) - Q_PROPERTY(ConfigPropertyMap *wallpaperConfiguration READ wallpaperConfiguration NOTIFY wallpaperConfigurationChanged) + Q_PROPERTY(KDeclarative::ConfigPropertyMap *wallpaperConfiguration READ wallpaperConfiguration NOTIFY wallpaperConfigurationChanged) Q_PROPERTY(QString currentWallpaper READ currentWallpaper WRITE setCurrentWallpaper NOTIFY currentWallpaperChanged) public: @@ -53,7 +56,7 @@ public: ConfigModel *wallpaperConfigModel(); QString currentWallpaper() const; void setCurrentWallpaper(const QString &wallpaper); - ConfigPropertyMap *wallpaperConfiguration() const; + KDeclarative::ConfigPropertyMap *wallpaperConfiguration() const; Q_INVOKABLE void applyWallpaper(); @@ -70,8 +73,8 @@ private: ConfigModel *m_containmentActionConfigModel; CurrentContainmentActionsModel *m_currentContainmentActionsModel; QString m_currentWallpaper; - ConfigPropertyMap *m_currentWallpaperConfig; - ConfigPropertyMap *m_ownWallpaperConfig; + KDeclarative::ConfigPropertyMap *m_currentWallpaperConfig; + KDeclarative::ConfigPropertyMap *m_ownWallpaperConfig; }; #endif // multiple inclusion guard diff --git a/src/shell/packages.cpp b/src/shell/packages.cpp index cdeb8e604..3f1bcbfb7 100644 --- a/src/shell/packages.cpp +++ b/src/shell/packages.cpp @@ -81,7 +81,7 @@ void QmlWallpaperPackage::initPackage(Plasma::Package *package) //package->setRequired("mainscript", true); - QStringList platform = KDeclarative::runtimePlatform(); + QStringList platform = KDeclarative::KDeclarative::runtimePlatform(); if (!platform.isEmpty()) { QMutableStringListIterator it(platform); while (it.hasNext()) {