From d3448c01d6209e0fd938ed3caf1d2e800cef35b8 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 18 Feb 2013 18:59:47 +0100 Subject: [PATCH] remove Containment::destroy() --- src/plasma/containment.cpp | 27 --------------------------- src/plasma/containment.h | 16 ---------------- src/plasma/corona.cpp | 2 +- 3 files changed, 1 insertion(+), 44 deletions(-) diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp index 46a848d0c..4d95c7076 100644 --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -716,38 +716,11 @@ QString Containment::activity() const return d->activityId; } -void Containment::destroy() -{ - destroy(true); -} - void Containment::showConfigurationInterface() { Applet::showConfigurationInterface(); } -void Containment::destroy(bool confirm) -{ - if (immutability() != Mutable || Applet::d->transient) { - return; - } - - if (isContainment() && confirm) { - //FIXME: should not be blocking - const QString title = i18nc("@title:window %1 is the name of the containment", "Remove %1", Containment::title()); - KGuiItem remove = KStandardGuiItem::remove(); - remove.setText(title); - //FIXME: make the view accessible? - if (KMessageBox::warningContinueCancel(0/*view()*/, - i18nc("%1 is the name of the containment", "Do you really want to remove this %1?", Containment::title()), - title, remove) != KMessageBox::Continue) { - return; - } - } - - Applet::destroy(); -} - KConfigGroup Containment::containmentActionsConfig() { KConfigGroup cfg; diff --git a/src/plasma/containment.h b/src/plasma/containment.h index 512675e34..dec67b1f3 100644 --- a/src/plasma/containment.h +++ b/src/plasma/containment.h @@ -399,22 +399,6 @@ Q_SIGNALS: */ void setFormFactor(Plasma::FormFactor formFactor); - /** - * Destroys this containment and all its applets (after a confirmation dialog); - * it will be removed nicely and deleted. - * Its configuration will also be deleted. - */ - void destroy(); - - /** - * Destroys this containment and all its applets (after a confirmation dialog); - * it will be removed nicely and deleted. - * Its configuration will also be deleted. - * - * @param confirm whether or not confirmation from the user should be requested - */ - void destroy(bool confirm); - /** * @reimp * @sa Applet::showConfigurationInterface() diff --git a/src/plasma/corona.cpp b/src/plasma/corona.cpp index cb6d9738d..fd046ae28 100644 --- a/src/plasma/corona.cpp +++ b/src/plasma/corona.cpp @@ -138,7 +138,7 @@ void Corona::exportLayout(KConfigGroup &config, QList containments a->d->immutability = Mutable; } - c->destroy(false); + c->destroy(); } //restore immutability