From 79256d993136de090e37ed7dbf110068da23144a Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 4 Mar 2013 15:21:26 +0100 Subject: [PATCH] remove AbstractDialogManager --- src/plasma/CMakeLists.txt | 2 - src/plasma/abstractdialogmanager.cpp | 56 ---------------- src/plasma/abstractdialogmanager.h | 67 ------------------- src/plasma/corona.cpp | 11 --- src/plasma/corona.h | 15 ----- .../includes/Plasma/AbstractDialogManager | 1 - src/plasma/private/corona_p.h | 1 - 7 files changed, 153 deletions(-) delete mode 100644 src/plasma/abstractdialogmanager.cpp delete mode 100644 src/plasma/abstractdialogmanager.h delete mode 100644 src/plasma/includes/Plasma/AbstractDialogManager diff --git a/src/plasma/CMakeLists.txt b/src/plasma/CMakeLists.txt index baa5ece5a..a80fac0c0 100644 --- a/src/plasma/CMakeLists.txt +++ b/src/plasma/CMakeLists.txt @@ -68,7 +68,6 @@ add_definitions(-DKDE_DEFAULT_DEBUG_AREA=1209) set(plasma_LIB_SRCS abstractrunner.cpp - abstractdialogmanager.cpp configloader.cpp containmentactions.cpp datacontainer.cpp @@ -159,7 +158,6 @@ install(TARGETS plasma EXPORT kdelibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_AR generate_export_header(plasma) set(plasma_LIB_INCLUDES - abstractdialogmanager.h abstractrunner.h applet.h configloader.h diff --git a/src/plasma/abstractdialogmanager.cpp b/src/plasma/abstractdialogmanager.cpp deleted file mode 100644 index e40e2bf80..000000000 --- a/src/plasma/abstractdialogmanager.cpp +++ /dev/null @@ -1,56 +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/src/plasma/abstractdialogmanager.h b/src/plasma/abstractdialogmanager.h deleted file mode 100644 index 56de3466b..000000000 --- a/src/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/src/plasma/corona.cpp b/src/plasma/corona.cpp index 96f0ef04c..70ae74520 100644 --- a/src/plasma/corona.cpp +++ b/src/plasma/corona.cpp @@ -39,7 +39,6 @@ #include #include -#include "abstractdialogmanager.h" #include "containment.h" #include "pluginloader.h" #include "private/applet_p.h" @@ -394,16 +393,6 @@ QHash Corona::defaultContainmentActionsPlugins(ContainmentType 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/src/plasma/corona.h b/src/plasma/corona.h index 7208fb69a..5a1578c8b 100644 --- a/src/plasma/corona.h +++ b/src/plasma/corona.h @@ -35,7 +35,6 @@ namespace Plasma class CoronaPrivate; class ContainmentActionsPluginsConfig; -class AbstractDialogManager; /** * @class Corona plasma/Corona.h @@ -194,20 +193,6 @@ public: */ QHash defaultContainmentActionsPlugins(ContainmentType containmentType) const; - /** - * @param the AbstractDialogManager implementation - * - * @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/src/plasma/includes/Plasma/AbstractDialogManager b/src/plasma/includes/Plasma/AbstractDialogManager deleted file mode 100644 index 84a74867a..000000000 --- a/src/plasma/includes/Plasma/AbstractDialogManager +++ /dev/null @@ -1 +0,0 @@ -#include "../../plasma/abstractdialogmanager.h" diff --git a/src/plasma/private/corona_p.h b/src/plasma/private/corona_p.h index 3c39fb782..db4b19c91 100644 --- a/src/plasma/private/corona_p.h +++ b/src/plasma/private/corona_p.h @@ -66,7 +66,6 @@ public: KActionCollection actions; QMap > containmentActionsDefaults; QWeakPointer shortcutsDlg; - QWeakPointer dialogManager; QHash toolBoxPlugins; QList > actionCollections; };