plasma: remove unused AbstractDialogManager class

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-12-09 00:06:27 +02:00
parent 7ba06852a7
commit 97372a82ef
9 changed files with 1 additions and 161 deletions

View file

@ -538,7 +538,6 @@ install(
install(
FILES
Plasma/AbstractDialogManager
Plasma/AbstractRunner
Plasma/AbstractToolBox
Plasma/Animation

View file

@ -1 +0,0 @@
#include "../../plasma/abstractdialogmanager.h"

View file

@ -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

View file

@ -1,55 +0,0 @@
/*
* Copyright (C) 2010 Marco Martin <notmart@gmail.com>
*
* 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"

View file

@ -1,67 +0,0 @@
/*
* Copyright (C) 2010 Marco Martin <notmart@gmail.com>
*
* 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 <QtCore/QObject>
#include <plasma/plasma_export.h>
namespace Plasma
{
class Applet;
class Corona;
class AbstractDialogManagerPrivate;
/**
* @class AbstractDialogManager plasma/dialogmanager.h <Plasma/AbstractDialogManager>
*
* @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

View file

@ -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

View file

@ -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),

View file

@ -38,7 +38,6 @@ namespace Plasma
class CoronaPrivate;
class ContainmentActionsPluginsConfig;
class AbstractDialogManager;
/**
* @class Corona plasma/corona.h <Plasma/Corona>
@ -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.

View file

@ -62,7 +62,6 @@ public:
KActionCollection actions;
QMap<Containment::Type, ContainmentActionsPluginsConfig> containmentActionsDefaults;
QWeakPointer<KShortcutsDialog> shortcutsDlg;
QWeakPointer<AbstractDialogManager> dialogManager;
QHash<Containment::Type, QString> toolBoxPlugins;
QList<QWeakPointer<KActionCollection> > actionCollections;
};