aboutsummaryrefslogtreecommitdiff
path: root/sandbox/multithreading-tests/using-backend-from-thread/thread.h
blob: cd77a2982b3231e614bbdbdd619a529684f8e2da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef THREAD_H
#define THREAD_H

#include <contextproperty.h>
#include <contextpropertyinfo.h>

#include <QThread>
#include <QDebug>

class Listener : public QObject
{
    Q_OBJECT

public:
    Listener()
        {
            cp = new ContextProperty("test.int");
            qDebug() << "Provider is: " << cp->info()->providerDBusName();
        }

    ContextProperty* cp;
};

class Thread : public QThread
{
    Q_OBJECT

protected:
    void run()
        {
            qDebug() << "Thread::run(), and current thread is" << QThread::currentThread();
            Listener listener;

            qDebug() << "Returning from run";
        }

};

#endif