aboutsummaryrefslogtreecommitdiff
path: root/libcontextsubscriber/sandbox/messaging-to-self/mythread.h
blob: 4170ccf82fce600cf4c7dbac8e04131c580f663a (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
#ifndef MYTHREAD_H
#define MYTHREAD_H

#include <QThread>
#include <QDebug>
#include "myobject.h"

class MyThread : public QThread
{
    Q_OBJECT

private:
    MyObject *obj;

public:
    MyThread(MyObject *obj) : obj(obj)
        {
        }

protected:
    void run()
        {
            qDebug() << QThread::currentThread();
            obj->queueOnce("five");
            obj->queueOnce("six");
            obj->queueOnce("five");
            obj->queueOnce("five");
            obj->queueOnce("six");
            obj->queueOnce("seven");
        }
};
#endif