summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_static_resources/test_init_resources_static_plugin/pluginmain.cpp
blob: da2ed67973623699934af7f6fb856858d5a1b95f (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
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only

#include <QtCore/qfile.h>
#include <QtCore/qdebug.h>

QT_BEGIN_NAMESPACE

class TestStaticPlugin : public QObject
{
    Q_OBJECT
    Q_PLUGIN_METADATA(IID "TestStaticPlugin" URI "qt.teststaticplugin")
public:
    TestStaticPlugin() = default;
    Q_INVOKABLE bool checkResources()
    {
        return QFile::exists(":/teststaticplugin1/testfile1.txt")
                && QFile::exists(":/teststaticplugin2/testfile2.txt");
    }
};

QT_END_NAMESPACE

#include "pluginmain.moc"