mirror of
https://github.com/spalencsar/bearwave.git
synced 2026-07-06 22:24:17 +02:00
fix: About version label and disable stale QML disk cache (1.0.5 pkgrel 7)
Replace QString.arg() with string concatenation in AboutDialog. Disable QML disk cache so flatpak updates do not keep old compiled QML after qrc changes. Move setApplicationVersion after QApplication construction.
This commit is contained in:
@@ -22,13 +22,13 @@
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QApplication::setApplicationName(QStringLiteral("BearWave"));
|
||||
QApplication::setDesktopFileName(QStringLiteral("de.nerdbear.bearwave"));
|
||||
QApplication::setOrganizationName(QStringLiteral("BearWave"));
|
||||
QApplication::setApplicationVersion(QStringLiteral(BEARWAVE_VERSION));
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QDBusConnection sessionBus = QDBusConnection::sessionBus();
|
||||
if (sessionBus.isConnected() && sessionBus.interface() && sessionBus.interface()->isServiceRegistered(QStringLiteral("org.mpris.MediaPlayer2.bearwave"))) {
|
||||
QDBusMessage call = QDBusMessage::createMethodCall(
|
||||
@@ -49,6 +49,9 @@ int main(int argc, char *argv[])
|
||||
app.installTranslator(&appTranslator);
|
||||
}
|
||||
|
||||
// QML disk cache can retain stale bytecode across app updates (same qrc paths).
|
||||
qputenv("QML_DISABLE_DISK_CACHE", "1");
|
||||
|
||||
QQmlApplicationEngine engine;
|
||||
engine.addImportPath(QStringLiteral("qrc:/qml"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user