diff options
Diffstat (limited to 'sandbox/multithreading-tests/wait-for-subscription-thread/thread.h')
-rw-r--r-- | sandbox/multithreading-tests/wait-for-subscription-thread/thread.h | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/sandbox/multithreading-tests/wait-for-subscription-thread/thread.h b/sandbox/multithreading-tests/wait-for-subscription-thread/thread.h deleted file mode 100644 index 7766fe68..00000000 --- a/sandbox/multithreading-tests/wait-for-subscription-thread/thread.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef THREAD_H -#define THREAD_H - -#include <contextproperty.h> - -#include <QThread> -#include <QDebug> - -class Listener : public QObject -{ - Q_OBJECT - -public: - Listener() - { - cp = new ContextProperty("test.int"); - connect(cp, SIGNAL(valueChanged()), this, SLOT(onValueChanged())); - cp->waitForSubscription(); - qDebug() << "Waiting is done"; - } - - ContextProperty* cp; - -public slots: - void onValueChanged() - { - qDebug() << "Listener::valueChanged(), and current thread is" << QThread::currentThread(); - qDebug() << "The value is:" << cp->value(); -// exit(1); - } -}; - -class Thread : public QThread -{ - Q_OBJECT - -protected: - void run() - { - qDebug() << "SUB THREAD:" << QThread::currentThread(); - Listener listener; - exec(); - } - -}; - -#endif |