mirror of
https://github.com/spalencsar/bearwave.git
synced 2026-07-06 22:24:17 +02:00
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:
30
tests/qrc_resources_test.cpp
Normal file
30
tests/qrc_resources_test.cpp
Normal 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"
|
||||
Reference in New Issue
Block a user