From bf2619a79a7ca6efa7d993062f0f9c774a1a5ad8 Mon Sep 17 00:00:00 2001 From: Giorgos Tsiapaliokas Date: Tue, 3 Sep 2013 13:17:40 +0300 Subject: [PATCH] move shellpluginloader back to shell Conflicts: src/plasmaview/CMakeLists.txt src/shell/shellpluginloader.cpp --- src/plasmaview/CMakeLists.txt | 1 - src/shell/CMakeLists.txt | 1 + .../shellpluginloader.cpp | 35 +++++-------------- src/{plasmaview => shell}/shellpluginloader.h | 30 +--------------- 4 files changed, 11 insertions(+), 56 deletions(-) rename src/{plasmaview => shell}/shellpluginloader.cpp (69%) rename src/{plasmaview => shell}/shellpluginloader.h (52%) diff --git a/src/plasmaview/CMakeLists.txt b/src/plasmaview/CMakeLists.txt index a9546b812..3ecc6ebce 100644 --- a/src/plasmaview/CMakeLists.txt +++ b/src/plasmaview/CMakeLists.txt @@ -41,7 +41,6 @@ set(plasmaview_LIB_INCLUDES ${CMAKE_CURRENT_BINARY_DIR}/plasmaview_export.h view.h configview.h - shellpluginloader.h ) install(FILES ${plasmaview_LIB_INCLUDES} diff --git a/src/shell/CMakeLists.txt b/src/shell/CMakeLists.txt index 0187dded0..e33d05698 100644 --- a/src/shell/CMakeLists.txt +++ b/src/shell/CMakeLists.txt @@ -61,6 +61,7 @@ add_executable(plasma-shell panelview.cpp lookandfeelpackage.cpp panelconfigview.cpp + shellpluginloader.cpp ${scripting_SRC} ${widgetexplorer_SRC} ) diff --git a/src/plasmaview/shellpluginloader.cpp b/src/shell/shellpluginloader.cpp similarity index 69% rename from src/plasmaview/shellpluginloader.cpp rename to src/shell/shellpluginloader.cpp index c2f9e17ee..f5114d44a 100644 --- a/src/plasmaview/shellpluginloader.cpp +++ b/src/shell/shellpluginloader.cpp @@ -21,19 +21,16 @@ #include "shellpackage_p.h" -class ShellPluginLoaderPrivate -{ -public: - ShellPluginLoaderPrivate(); - ~ShellPluginLoaderPrivate(); - Plasma::Package internalLoadPackage(const QString &packageFormat, const QString &specialization); -}; - -ShellPluginLoaderPrivate::ShellPluginLoaderPrivate() +ShellPluginLoader::ShellPluginLoader() + : Plasma::PluginLoader() { } -Plasma::Package ShellPluginLoaderPrivate::internalLoadPackage(const QString &packageFormat, const QString &specialization) +ShellPluginLoader::~ShellPluginLoader() +{ +} + +Plasma::Package ShellPluginLoader::internalLoadPackage(const QString &packageFormat, const QString &specialization) { Q_UNUSED(specialization) @@ -45,22 +42,8 @@ Plasma::Package ShellPluginLoaderPrivate::internalLoadPackage(const QString &pac } } - - - -/////////////////////ShellPluginLoader -ShellPluginLoader::ShellPluginLoader() - : Plasma::PluginLoader(), - d(new ShellPluginLoaderPrivate()) +void ShellPluginLoader::init() { -} - -ShellPluginLoader::~ShellPluginLoader() -{ -} - -Plasma::Package ShellPluginLoader::internalLoadPackage(const QString &packageFormat, const QString &specialization) -{ - return d->internalLoadPackage(packageFormat, specialization); + Plasma::PluginLoader::setPluginLoader(new ShellPluginLoader); } diff --git a/src/plasmaview/shellpluginloader.h b/src/shell/shellpluginloader.h similarity index 52% rename from src/plasmaview/shellpluginloader.h rename to src/shell/shellpluginloader.h index 6af8d9775..720b401be 100644 --- a/src/plasmaview/shellpluginloader.h +++ b/src/shell/shellpluginloader.h @@ -21,33 +21,8 @@ #define SHELLPLUGINLOADER_H #include -#include -/** - * @class ShellPluginLoader plasmaview/shellpluginloader.h - * - * This class loads the shell package. Normally you won't need this class, unless if you - * want to use the PlasmaView::View and Plasma::Corona directly. - * - * This class must be instantiated before the Corona and the View - * example: - * - * - * // example 1, it works - * Plasma::PluginLoader::setPluginLoader(new ShellPluginLoader); - * Plasma::Corona *corona = new Plasma::Corona(); - * View *view = new View(corona); - * - * // exmaple 2, it doesn't work - * Plasma::corona *corona = new plasma::corona(); - * View *view = new view(corona); - * Plasma::PluginLoader::setPluginLoader(new shellpluginloader); - * - */ - -class ShellPluginLoaderPrivate; - -class PLASMAVIEW_EXPORT ShellPluginLoader : public Plasma::PluginLoader +class ShellPluginLoader : public Plasma::PluginLoader { public: ShellPluginLoader(); @@ -55,9 +30,6 @@ public: protected: Plasma::Package internalLoadPackage(const QString &packageFormat, const QString &specialization); -private: - ShellPluginLoaderPrivate *const d; - }; #endif