qt6windows7/tests/auto/cmake/test_add_resources_binary_generated/main.cpp
2023-10-29 23:33:08 +01:00

21 lines
599 B
C++

// 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;
}