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.
This commit is contained in:
Sebastian Palencsar
2026-06-22 16:13:21 +02:00
parent 72b4c35669
commit a72543090b
6 changed files with 47 additions and 4 deletions

View File

@@ -0,0 +1,30 @@
// 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"