[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebase/workspace/plasma/dataengines/weather
From: Aaron J. Seigo <aseigo () kde ! org>
Date: 2007-11-07 6:12:12
Message-ID: 1194415932.565679.31381.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 733715 by aseigo:
make sure async requests will work
M +5 -8 ions/ion.cpp
M +0 -1 ions/ion_envcan.cpp
M +7 -2 weatherengine.cpp
--- trunk/KDE/kdebase/workspace/plasma/dataengines/weather/ions/ion.cpp #733714:733715
@@ -67,10 +67,11 @@
bool IonInterface::sourceRequested(const QString &source)
{
kDebug() << "sourceRequested()";
- setData(source, Plasma::DataEngine::Data());
-
+
if (d->initialized) {
this->updateSource(source);
+ } else {
+ setData(source, Plasma::DataEngine::Data());
}
return true;
@@ -80,14 +81,10 @@
{
kDebug() << "updateSource()";
if (d->initialized) {
- if(this->updateIonSource(source)) {
- return true;
- } else {
- return false;
- }
+ return this->updateIonSource(source);
}
- return false;
+ return false;
}
void IonInterface::setInitialized(const bool initialized)
--- trunk/KDE/kdebase/workspace/plasma/dataengines/weather/ions/ion_envcan.cpp #733714:733715
@@ -106,7 +106,6 @@
// Get a specific Ion's data
bool EnvCanadaIon::updateIonSource(const QString& source)
{
-
kDebug() << "updateIonSource() SOURCE: " << source;
QString result = this->validate(source);
--- trunk/KDE/kdebase/workspace/plasma/dataengines/weather/weatherengine.cpp #733714:733715
@@ -162,6 +162,7 @@
void WeatherEngine::dataUpdated(const QString& source, Plasma::DataEngine::Data data)
{
+ kDebug() << "data updated" << source;
setData(source, data);
}
@@ -199,8 +200,12 @@
}
ion->connectSource(source, this);
- kDebug() << "sourceRequested()";
- //setData(source, this);
+ kDebug() << "sourceRequested()" << source;
+ if (!containerForSource(source)) {
+ // it is an async reply, we need to set up the data anyways
+ kDebug() << "no item?";
+ setData(source, Data());
+ }
return true;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic