mirror of
https://github.com/spalencsar/bearwave.git
synced 2026-07-06 14:24:14 +02:00
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.
30 lines
775 B
C++
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" |