Files
bearwave/tests/qrc_resources_test.cpp
Sebastian Palencsar a72543090b fix(qrc): correct QML resource paths for AUR and release builds
The QML refactor in 1.0.4 used prefix /qml with file paths like
qml/Main.qml, embedding resources at qrc:/qml/qml/Main.qml while
main.cpp loads qrc:/qml/Main.qml. Use prefix / so paths match.

Also derive the displayed app version from CMake PROJECT_VERSION and
add a qrc_resources_test to prevent this regression in CI.
2026-06-22 16:13:21 +02:00

30 lines
775 B
C++

// Copyright (c) 2026 Sebastian Palencsar
// SPDX-License-Identifier: GPL-3.0-or-later
#include <QFile>
#include <QtTest>
class QrcResourcesTest : public QObject
{
Q_OBJECT
private slots:
void mainQmlIsEmbedded();
void qmlModulesAreEmbedded();
};
void QrcResourcesTest::mainQmlIsEmbedded()
{
QVERIFY2(QFile::exists(QStringLiteral(":/qml/Main.qml")),
"Main UI shell must be available at qrc:/qml/Main.qml");
}
void QrcResourcesTest::qmlModulesAreEmbedded()
{
QVERIFY(QFile::exists(QStringLiteral(":/qml/theme/qmldir")));
QVERIFY(QFile::exists(QStringLiteral(":/qml/components/qmldir")));
QVERIFY(QFile::exists(QStringLiteral(":/assets/app/bearwave.png")));
}
QTEST_APPLESS_MAIN(QrcResourcesTest)
#include "qrc_resources_test.moc"