summaryrefslogtreecommitdiff
path: root/harmaccuweather/harmaccuprovider.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-10-16 20:58:29 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-10-16 20:58:29 +0200
commit2c8f42cc6ad1c67c5ee0110393c7ee756d14044e (patch)
treee5f2d5d12c95533f17ef95909b1713a70e5559ef /harmaccuweather/harmaccuprovider.cpp
parent4da9bced6a27b92d49b9fc9392946510b8519d82 (diff)
downloadsowatch-2c8f42cc6ad1c67c5ee0110393c7ee756d14044e.tar.gz
sowatch-2c8f42cc6ad1c67c5ee0110393c7ee756d14044e.zip
Now monitoring AccuWeather's config file
Diffstat (limited to 'harmaccuweather/harmaccuprovider.cpp')
-rw-r--r--harmaccuweather/harmaccuprovider.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/harmaccuweather/harmaccuprovider.cpp b/harmaccuweather/harmaccuprovider.cpp
index af4a8d0..0eedf04 100644
--- a/harmaccuweather/harmaccuprovider.cpp
+++ b/harmaccuweather/harmaccuprovider.cpp
@@ -5,11 +5,10 @@
using namespace sowatch;
-HarmAccuProvider::HarmAccuProvider(int updateTime, QObject *parent) :
- NotificationProvider(parent),
- _updateTime(updateTime)
+HarmAccuProvider::HarmAccuProvider(QObject *parent) :
+ NotificationProvider(parent)
{
- // Give some time to send the notification
+ // Give some time to send the first notification
QTimer::singleShot(2000, this, SLOT(generateNotification()));
}
@@ -22,8 +21,10 @@ void HarmAccuProvider::generateNotification()
{
QSettings* s = HarmAccuWeather::getAccuweatherData();
if (s->contains("LastUpdate")) {
- qDebug() << "generate harmaccuweather notification";
- emit incomingNotification(new HarmAccuWeather(_updateTime, this));
+ qDebug() << "generating harmaccuweather notification";
+ emit incomingNotification(new HarmAccuWeather(this));
+ } else {
+ qWarning() << "Accuweather config file does not seem to exist";
}
delete s;
}