[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/dataengines/weather
From: Shawn Starr <shawn.starr () rogers ! com>
Date: 2009-09-04 1:31:38
Message-ID: 1252027898.468963.24097.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1019606 by spstarr:
Forgive me for sinning, use a Q_PROPERTY to get aronud the problem of not being able \
to update the WeatherEngine until we have a nicer solution. This does work however. a \
FIXME
M +22 -0 weatherengine.cpp
M +5 -0 weatherengine.h
--- trunk/KDE/kdebase/workspace/plasma/dataengines/weather/weatherengine.cpp \
#1019605:1019606 @@ -99,6 +99,28 @@
return ion;
}
+/* FIXME: Q_PROPERTY functions to update the list of available plugins */
+
+void WeatherEngine::setUpdate(bool update)
+{
+ Q_UNUSED(update)
+
+ removeSource("ions");
+
+ // Get the list of available plugins but don't load them
+ foreach(const KPluginInfo &info, \
Plasma::DataEngineManager::listEngineInfo("weatherengine")) { + \
setData("ions", info.pluginName(), + \
QString("%1|%2").arg(info.property("Name").toString()).arg(info.pluginName())); + \
kDebug() << "FOUND PLUGINS: " << info.property("Name").toString(); + }
+}
+
+/* This method is unused */
+bool WeatherEngine::update() const
+{
+ return true;
+}
+
/**
* Unload an Ion plugin given a Ion plugin name.
*/
--- trunk/KDE/kdebase/workspace/plasma/dataengines/weather/weatherengine.h \
#1019605:1019606 @@ -39,6 +39,7 @@
class WeatherEngine : public Plasma::DataEngine
{
Q_OBJECT
+ Q_PROPERTY(bool update READ update WRITE setUpdate)
public:
/** Constructor
@@ -50,6 +51,10 @@
// Destructor
~WeatherEngine();
+ // FIXME: Right now use a Q_PROPERTY to force the engine to update plugins \
installed with KNS, this isn't pretty at all :/ + void setUpdate(bool update);
+ bool update(void) const;
+
// initialization
void init();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic