blob: 906232ca19ae8c5346fdfd87cfc29736b2fd5659 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include <QFile>
#include <QResource>
int main(int, char **)
{
if (!QResource::registerResource(RESOURCE1_FULL_PATH)
|| !QFile::exists(":/resource1.txt")
|| !QResource::registerResource(RESOURCE2_FULL_PATH)
|| !QFile::exists(":/resource2.txt")) {
return -1;
}
// Avoid leaks
QResource::unregisterResource(RESOURCE1_FULL_PATH);
QResource::unregisterResource(RESOURCE2_FULL_PATH);
return 0;
}
|