summaryrefslogtreecommitdiff
path: root/testnotification
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-03-28 19:20:19 +0100
committerJavier S. Pedro <maemo@javispedro.com>2013-03-28 19:20:19 +0100
commit867793a4626124e385ae5464c259f7ddf378305f (patch)
tree05aea73b37b1142571c09c1310ad93484467a678 /testnotification
parent76f6eb13bea858594886a6aa68d1a26d925a8fca (diff)
downloadsowatch-867793a4626124e385ae5464c259f7ddf378305f.tar.gz
sowatch-867793a4626124e385ae5464c259f7ddf378305f.zip
disable some debug stuff
Diffstat (limited to 'testnotification')
-rw-r--r--testnotification/testnotification.cpp2
-rw-r--r--testnotification/testnotificationprovider.cpp20
2 files changed, 11 insertions, 11 deletions
diff --git a/testnotification/testnotification.cpp b/testnotification/testnotification.cpp
index d541287..c07111f 100644
--- a/testnotification/testnotification.cpp
+++ b/testnotification/testnotification.cpp
@@ -8,7 +8,7 @@ TestNotification::TestNotification(Type type, const QString &title, const QStrin
_time(QDateTime::currentDateTime()),
_title(title), _body(body)
{
- const int high = 30000, low = 10000;
+ const int high = 5000, low = 1000;
int rand = qrand() % ((high + 1) - low) + low;
QTimer::singleShot(rand, this, SIGNAL(dismissed()));
}
diff --git a/testnotification/testnotificationprovider.cpp b/testnotification/testnotificationprovider.cpp
index 230237f..687780b 100644
--- a/testnotification/testnotificationprovider.cpp
+++ b/testnotification/testnotificationprovider.cpp
@@ -9,17 +9,17 @@ TestNotificationProvider::TestNotificationProvider(QObject *parent) :
NotificationProvider(parent),
_timer(new QTimer(this))
{
- QTimer::singleShot(1000, this, SLOT(generateInitialNotification()));
- QTimer::singleShot(1200, this, SLOT(generateNotification()));
- QTimer::singleShot(1400, this, SLOT(generateNotification()));
- QTimer::singleShot(1600, this, SLOT(generateNotification()));
- QTimer::singleShot(1800, this, SLOT(generateNotification()));
- QTimer::singleShot(2000, this, SLOT(generateNotification()));
- QTimer::singleShot(2200, this, SLOT(generateNotification()));
- QTimer::singleShot(2400, this, SLOT(generateInitialNotification()));
+ const int initial_delay = 2000;
+ const int burst_num = 0;
+ const int burst_delay = 500;
+ const int extra_delay = 100 * 1000;
+ QTimer::singleShot(initial_delay, this, SLOT(generateInitialNotification()));
+ for (int i = 0; i < burst_num; i++) {
+ QTimer::singleShot(initial_delay + burst_delay * (i+1), this, SLOT(generateNotification()));
+ }
connect(_timer, SIGNAL(timeout()), SLOT(generateNotification()));
- _timer->setInterval(60000);
- //_timer->start();
+ _timer->setInterval(extra_delay);
+ _timer->start();
}
TestNotificationProvider::~TestNotificationProvider()