Ubuntu Pastebin

Paste from Albert Astals Cid at Wed, 16 Dec 2015 09:15:19 +0000

Download as text
 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
#include <QtTest/QtTest>
#include <QtQuick/QQuickView>

class tst_DragHandle: public QObject
{
    Q_OBJECT
public:
    tst_DragHandle() {}
private Q_SLOTS:
    void initTestCase(); // will be called before the first test function is executed
};


void tst_DragHandle::initTestCase()
{
    qDebug() << "A";

    QQuickView *view = new QQuickView();
    view->setSource(QUrl::fromLocalFile(TEST_DIR"/tst_DragHandle.qml"));
    view->show();
    delete view;

    qDebug() << "B";

    view = new QQuickView();
    view->setSource(QUrl::fromLocalFile(TEST_DIR"/tst_DragHandle.qml"));
    view->show();
    delete view;
}

QTEST_MAIN(tst_DragHandle)

#include "tst_DragHandle.moc"
Download as text