aboutsummaryrefslogtreecommitdiff
path: root/sandbox/multithreading-tests/old-property-in-thread/main.cpp
blob: c21c9d7fbf50c80403dd026481b61f7f786339ee (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
#include <contextproperty.h>

#include "thread.h"

#include <QCoreApplication>
#include <QDebug>

int main(int argc, char** argv)
{
    QCoreApplication app(argc, argv);

    qDebug() << "Main thread is" << QThread::currentThread();

    ContextProperty* cp = new ContextProperty("test.int");
    delete cp;
    // Creating a ContextProperty will result in creating a PropertyHandle,
    // and the PropertyHandle is not deleted ever.

    // Start a thread which will create the same ContextProperty.
    Thread thread;
    thread.start();

    return app.exec();
}