aboutsummaryrefslogtreecommitdiff
path: root/sandbox/messaging-to-self/queuedinvoker.cpp
diff options
context:
space:
mode:
authorGergely Risko <gergely+context@risko.hu>2009-11-26 16:26:32 +0200
committerGergely Risko <gergely+context@risko.hu>2009-11-26 16:26:32 +0200
commit30e4432f2da420a019a5d36e5a6add6f58829ec8 (patch)
tree156076154b875d9aff0eb2e597ba4bb0398be6d6 /sandbox/messaging-to-self/queuedinvoker.cpp
parent54c2a0a7a5846248b4eed99b9ca774d9dcda65f0 (diff)
Prepare for distributionerrge_0.5.1.99
Diffstat (limited to 'sandbox/messaging-to-self/queuedinvoker.cpp')
-rw-r--r--sandbox/messaging-to-self/queuedinvoker.cpp35
1 files changed, 0 insertions, 35 deletions
diff --git a/sandbox/messaging-to-self/queuedinvoker.cpp b/sandbox/messaging-to-self/queuedinvoker.cpp
deleted file mode 100644
index 85dbb7d1..00000000
--- a/sandbox/messaging-to-self/queuedinvoker.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "queuedinvoker.h"
-
-#include <QMetaObject>
-#include <QThread>
-#include <QDebug>
-#include <QMutexLocker>
-
-QueuedInvoker::QueuedInvoker()
-{
- connect(this, SIGNAL(queuedCall(const char *)),
- this, SLOT(onQueuedCall(const char *)),
- Qt::QueuedConnection);
-}
-
-void QueuedInvoker::onQueuedCall(const char *method)
-{
- QMutexLocker locker(&callQueueLock);
- callQueue.remove(method);
- qDebug() << "Hope that i'm in the main loop" << QThread::currentThread();
- locker.unlock();
- if (!QMetaObject::invokeMethod(this, method, Qt::DirectConnection)) {
- qFatal(" *****************\n"
- "Erroneous usage of queueOnce(%s)\n"
- " *****************\n", method);
- }
-}
-
-void QueuedInvoker::queueOnce(const char *method)
-{
- QMutexLocker locker(&callQueueLock);
- if (!callQueue.contains(method)) {
- emit queuedCall(method);
- callQueue.insert(method);
- }
-}