diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-03-28 19:20:19 +0100 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-03-28 19:20:19 +0100 |
commit | 867793a4626124e385ae5464c259f7ddf378305f (patch) | |
tree | 05aea73b37b1142571c09c1310ad93484467a678 | |
parent | 76f6eb13bea858594886a6aa68d1a26d925a8fca (diff) | |
download | sowatch-867793a4626124e385ae5464c259f7ddf378305f.tar.gz sowatch-867793a4626124e385ae5464c259f7ddf378305f.zip |
disable some debug stuff
-rw-r--r-- | metawatch/metawatch.cpp | 2 | ||||
-rw-r--r-- | testnotification/testnotification.cpp | 2 | ||||
-rw-r--r-- | testnotification/testnotificationprovider.cpp | 20 |
3 files changed, 12 insertions, 12 deletions
diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp index ca6eaa6..510db2c 100644 --- a/metawatch/metawatch.cpp +++ b/metawatch/metawatch.cpp @@ -7,7 +7,7 @@ using namespace sowatch; QTM_USE_NAMESPACE #define SINGLE_LINE_UPDATE 0 -#define PROTOCOL_DEBUG 1 +#define PROTOCOL_DEBUG 0 const char MetaWatch::btnToWatch[8] = { 0, 1, 2, 3, 5, 6, -1, -1 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() |