From b9036999f2440e550eebb89c3350d1757e25d815 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 12 Feb 2013 11:51:05 +0100 Subject: [PATCH] get rid of Applet::shouldConserveResources() --- plasma/applet.cpp | 9 --------- plasma/applet.h | 8 -------- scriptengines/qml/plasmoid/appletinterface.cpp | 5 ----- scriptengines/qml/plasmoid/appletinterface.h | 2 -- 4 files changed, 24 deletions(-) diff --git a/plasma/applet.cpp b/plasma/applet.cpp index 282621528..69429d99c 100644 --- a/plasma/applet.cpp +++ b/plasma/applet.cpp @@ -428,15 +428,6 @@ KPluginInfo Applet::pluginInfo() const return d->appletDescription; } -bool Applet::shouldConserveResources() const -{ -#if !PLASMA_NO_SOLID - return Solid::PowerManagement::appShouldConserveResources(); -#else - return true; -#endif -} - QString Applet::category(const KPluginInfo &applet) { return applet.property("X-KDE-PluginInfo-Category").toString(); diff --git a/plasma/applet.h b/plasma/applet.h index 27fae6d98..61920761e 100644 --- a/plasma/applet.h +++ b/plasma/applet.h @@ -358,14 +358,6 @@ class PLASMA_EXPORT Applet : public QObject **/ QString icon() const; - /** - * Whether the applet should conserve resources. If true, try to avoid doing stuff which - * is computationally heavy. Try to conserve power and resources. - * - * @return true if it should conserve resources, false if it does not. - */ - bool shouldConserveResources() const; - //ACTIONS diff --git a/scriptengines/qml/plasmoid/appletinterface.cpp b/scriptengines/qml/plasmoid/appletinterface.cpp index c6fd2a15f..5fcd21159 100644 --- a/scriptengines/qml/plasmoid/appletinterface.cpp +++ b/scriptengines/qml/plasmoid/appletinterface.cpp @@ -80,11 +80,6 @@ QString AppletInterface::currentActivity() const return applet()->containment()->activity(); } -bool AppletInterface::shouldConserveResources() const -{ - return applet()->shouldConserveResources(); -} - void AppletInterface::setFailedToLaunch(bool failed, const QString &reason) { m_appletScriptEngine->setFailedToLaunch(failed, reason); diff --git a/scriptengines/qml/plasmoid/appletinterface.h b/scriptengines/qml/plasmoid/appletinterface.h index 8deb55090..aade93f5a 100644 --- a/scriptengines/qml/plasmoid/appletinterface.h +++ b/scriptengines/qml/plasmoid/appletinterface.h @@ -62,7 +62,6 @@ class AppletInterface : public QQuickItem Q_PROPERTY(FormFactor formFactor READ formFactor NOTIFY formFactorChanged) Q_PROPERTY(Location location READ location NOTIFY locationChanged) Q_PROPERTY(QString currentActivity READ currentActivity NOTIFY contextChanged) - Q_PROPERTY(bool shouldConserveResources READ shouldConserveResources) Q_PROPERTY(QString activeConfig WRITE setActiveConfig READ activeConfig) Q_PROPERTY(bool busy WRITE setBusy READ isBusy) Q_PROPERTY(BackgroundHints backgroundHints WRITE setBackgroundHints READ backgroundHints NOTIFY backgroundHintsChanged) @@ -207,7 +206,6 @@ enum IntervalAlignment { Location location() const; QString currentActivity() const; - bool shouldConserveResources() const; Q_INVOKABLE void setFailedToLaunch(bool failed, const QString &reason = QString());