Disable qml diskcache by default

Since this causes crashes on some qml module updates.

Fixes #1383
Fixes #1132
This commit is contained in:
Nicolas Werner 2023-02-25 01:46:18 +01:00
parent 952afc8e59
commit 0839c64150
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 12 additions and 0 deletions

View file

@ -157,6 +157,12 @@ main(int argc, char *argv[])
QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
// Disable the qml disk cache by default to prevent crashes on updates. See
// https://github.com/Nheko-Reborn/nheko/issues/1383
if (qgetenv("NHEKO_ALLOW_QML_DISK_CACHE").size() == 0) {
qputenv("QML_DISABLE_DISK_CACHE", "1");
}
// this needs to be after setting the application name. Or how would we find our settings
// file then?
#if !defined(Q_OS_MACOS)