aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickcanvasitem/tst_qquickcanvasitem.cpp
blob: 0215191d7813ce7a131d70ee4759db8223e4de04 (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 WITH Qt-GPL-exception-1.0
#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"