aboutsummaryrefslogtreecommitdiff
path: root/libcontextsubscriber
diff options
context:
space:
mode:
authorGergely Risko <gergely+context@risko.hu>2009-09-16 11:56:04 +0300
committerGergely Risko <gergely+context@risko.hu>2009-09-16 11:56:04 +0300
commit1c3c8b563759d2ef2761124651e2a7979c619a25 (patch)
tree20eb7a534ccbc438e34a26b0dd2768b6e0114c54 /libcontextsubscriber
parent6e05fcef9d902caa54d048fb7355fff9086b3277 (diff)
libcontextsubscriber/customer-tests/testplugins: use invokeMethod instead of timer
Diffstat (limited to 'libcontextsubscriber')
-rw-r--r--libcontextsubscriber/customer-tests/testplugins/timeplugin.cpp12
-rw-r--r--libcontextsubscriber/customer-tests/testplugins/timeplugin.h1
2 files changed, 1 insertions, 12 deletions
diff --git a/libcontextsubscriber/customer-tests/testplugins/timeplugin.cpp b/libcontextsubscriber/customer-tests/testplugins/timeplugin.cpp
index 39b61016..6e3c4df0 100644
--- a/libcontextsubscriber/customer-tests/testplugins/timeplugin.cpp
+++ b/libcontextsubscriber/customer-tests/testplugins/timeplugin.cpp
@@ -42,11 +42,7 @@ TimePlugin::TimePlugin()
prefix = TIME_PLUGIN_PREFIX;
timer.setInterval(2000);
sconnect(&timer, SIGNAL(timeout()), this, SLOT(onTimeout()));
- QTimer *t = new QTimer(this);
- sconnect(t, SIGNAL(timeout()), this, SLOT(emitReady()), Qt::QueuedConnection);
- t->setSingleShot(true);
- t->setInterval(0);
- t->start();
+ QMetaObject::invokeMethod(this, "ready", Qt::QueuedConnection);
}
void TimePlugin::subscribe(QSet<QString> keys)
@@ -63,12 +59,6 @@ void TimePlugin::unsubscribe(QSet<QString> keys)
timer.stop();
}
-void TimePlugin::emitReady()
-{
- contextDebug();
- emit ready();
-}
-
void TimePlugin::onTimeout()
{
contextDebug() << "Timeout";
diff --git a/libcontextsubscriber/customer-tests/testplugins/timeplugin.h b/libcontextsubscriber/customer-tests/testplugins/timeplugin.h
index 78f1ccc2..3a51fb5a 100644
--- a/libcontextsubscriber/customer-tests/testplugins/timeplugin.h
+++ b/libcontextsubscriber/customer-tests/testplugins/timeplugin.h
@@ -48,7 +48,6 @@ public:
virtual void unsubscribe(QSet<QString> keys);
private slots:
- void emitReady();
void onTimeout();
private: