aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickcanvasitem/tst_qquickcanvasitem.cpp
blob: 7e65b2a9d459ec13724a8dea8aea09e9b9f668e3 (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
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtQuickTest/quicktest.h>
#include <QtQml/qqmlengine.h>
#include <QtQml/qqmlcontext.h>

class Setup : public QObject
{
    Q_OBJECT

public:
    Setup() {}

public slots:
    void qmlEngineAvailable(QQmlEngine *engine)
    {
        engine->rootContext()->setContextProperty("hasImageFormats", QVariant(
#ifdef HAS_IMAGE_FORMATS
            true
#else
            false
#endif
            ));
        engine->rootContext()->setContextProperty("applicationDirPath",
                                                  QCoreApplication::applicationDirPath());
    }
};

QUICK_TEST_MAIN_WITH_SETUP(qquickcanvasitem, Setup)

#include "tst_qquickcanvasitem.moc"