diff --git a/includes/CMakeLists.txt b/includes/CMakeLists.txt index c2b9ae2c..97696fd9 100644 --- a/includes/CMakeLists.txt +++ b/includes/CMakeLists.txt @@ -538,7 +538,6 @@ install( install( FILES - Plasma/AbstractDialogManager Plasma/AbstractRunner Plasma/AbstractToolBox Plasma/Animation diff --git a/includes/Plasma/AbstractDialogManager b/includes/Plasma/AbstractDialogManager deleted file mode 100644 index 84a74867..00000000 --- a/includes/Plasma/AbstractDialogManager +++ /dev/null @@ -1 +0,0 @@ -#include "../../plasma/abstractdialogmanager.h" diff --git a/plasma/CMakeLists.txt b/plasma/CMakeLists.txt index 78a54a2e..3b8c58f1 100644 --- a/plasma/CMakeLists.txt +++ b/plasma/CMakeLists.txt @@ -81,7 +81,6 @@ set(plasma_LIB_SRCS delegate.cpp dialog.cpp dialogshadows.cpp - abstractdialogmanager.cpp extenders/extender.cpp extenders/extendergroup.cpp extenders/extenderitem.cpp @@ -195,7 +194,6 @@ install( packagemetadata.h packagestructure.h package.h - abstractdialogmanager.h abstractrunner.h abstracttoolbox.h animations/animation.h diff --git a/plasma/abstractdialogmanager.cpp b/plasma/abstractdialogmanager.cpp deleted file mode 100644 index b2ecd830..00000000 --- a/plasma/abstractdialogmanager.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2010 Marco Martin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include "abstractdialogmanager.h" - -#include "corona.h" - -namespace Plasma -{ - -class AbstractDialogManagerPrivate -{ -public: - AbstractDialogManagerPrivate() - { - } - -}; - -AbstractDialogManager::AbstractDialogManager(Corona *parent) - : QObject(parent), - d(new AbstractDialogManagerPrivate) -{ -} - -AbstractDialogManager::~AbstractDialogManager() -{ - delete d; -} - -void AbstractDialogManager::showDialog(QWidget *widget, Plasma::Applet *applet) -{ - Q_UNUSED(applet) - widget->show(); -} - -} - -#include "moc_abstractdialogmanager.cpp" diff --git a/plasma/abstractdialogmanager.h b/plasma/abstractdialogmanager.h deleted file mode 100644 index 56de3466..00000000 --- a/plasma/abstractdialogmanager.h +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (C) 2010 Marco Martin - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details - * - * You should have received a copy of the GNU Library General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef PLASMA_DIALOGMANAGER_H -#define PLASMA_DIALOGMANAGER_H - -#include - -#include - - -namespace Plasma -{ - class Applet; - class Corona; - - class AbstractDialogManagerPrivate; - -/** - * @class AbstractDialogManager plasma/dialogmanager.h - * - * @short The AbstractDialogManager class shows the dialogs shown by applets and the rest of the shell. - * a AbstractDialogManager can manage aspects like positioning, sizing and widget style - * of dialogs sich as the applet configuration dialog. - * @since 4.5 - */ -class PLASMA_EXPORT AbstractDialogManager : public QObject -{ - Q_OBJECT - -public: - explicit AbstractDialogManager(Plasma::Corona *parent=0); - ~AbstractDialogManager(); - -public Q_SLOTS: - /** - * This fake virtual slot shows a dialog belonging to an applet. - * There is no guarantee how the implementation will show it - * @param widget the dialog widget - * @param applet the applet that owns the dialog - */ - void showDialog(QWidget *widget, Plasma::Applet *applet); - -private: - - AbstractDialogManagerPrivate * const d; -}; - -} - -#endif diff --git a/plasma/applet.cpp b/plasma/applet.cpp index 02d8a1d2..b1928eac 100644 --- a/plasma/applet.cpp +++ b/plasma/applet.cpp @@ -99,7 +99,6 @@ #include "tooltipmanager.h" #include "wallpaper.h" #include "paintutils.h" -#include "abstractdialogmanager.h" #include "pluginloader.h" #include "private/applethandle_p.h" @@ -1938,13 +1937,7 @@ void Applet::showConfigurationInterface() void Applet::showConfigurationInterface(QWidget *widget) { - if (!containment() || !containment()->corona() || - !containment()->corona()->dialogManager()) { - widget->show(); - return; - } - - QMetaObject::invokeMethod(containment()->corona()->dialogManager(), "showDialog", Q_ARG(QWidget *, widget), Q_ARG(Plasma::Applet *, this)); + widget->show(); } QString AppletPrivate::configDialogId() const diff --git a/plasma/corona.cpp b/plasma/corona.cpp index 1b1b25cb..672e2143 100644 --- a/plasma/corona.cpp +++ b/plasma/corona.cpp @@ -51,7 +51,6 @@ #include "private/applet_p.h" #include "private/containment_p.h" #include "tooltipmanager.h" -#include "abstractdialogmanager.h" using namespace Plasma; @@ -756,16 +755,6 @@ ContainmentActionsPluginsConfig Corona::containmentActionsDefaults(Containment:: return d->containmentActionsDefaults.value(containmentType); } -void Corona::setDialogManager(AbstractDialogManager *dialogManager) -{ - d->dialogManager = dialogManager; -} - -AbstractDialogManager *Corona::dialogManager() -{ - return d->dialogManager.data(); -} - CoronaPrivate::CoronaPrivate(Corona *corona) : q(corona), immutability(Mutable), diff --git a/plasma/corona.h b/plasma/corona.h index 0aca8317..0f7536cd 100644 --- a/plasma/corona.h +++ b/plasma/corona.h @@ -38,7 +38,6 @@ namespace Plasma class CoronaPrivate; class ContainmentActionsPluginsConfig; -class AbstractDialogManager; /** * @class Corona plasma/corona.h @@ -273,20 +272,6 @@ public: */ ContainmentActionsPluginsConfig containmentActionsDefaults(Containment::Type containmentType); - /** - * @param the AbstractDialogManager implementaion - * - * @since 4.5 - */ - void setDialogManager(AbstractDialogManager *manager); - - /** - * @return the AbstractDialogManager that will show dialogs used by applets, like configuration dialogs - * - * @since 4.5 - */ - AbstractDialogManager *dialogManager(); - /** * Returns the name of the preferred plugin to be used as containment toolboxes. * CustomContainments and CustomPanelContainments can still override it as their liking. It's also not guaranteed that the plugin will actually exist. diff --git a/plasma/private/corona_p.h b/plasma/private/corona_p.h index 5749c28b..bc57462f 100644 --- a/plasma/private/corona_p.h +++ b/plasma/private/corona_p.h @@ -62,7 +62,6 @@ public: KActionCollection actions; QMap containmentActionsDefaults; QWeakPointer shortcutsDlg; - QWeakPointer dialogManager; QHash toolBoxPlugins; QList > actionCollections; };