diff --git a/man/nheko.1.adoc b/man/nheko.1.adoc index ef8f27284cc3ea2089de15954f5aa88ccd37a105..690ed568724dd62c436adb3cd2065c8130b229a7 100644 --- a/man/nheko.1.adoc +++ b/man/nheko.1.adoc @@ -272,6 +272,12 @@ Hide text and set an optional spoiler warning. Note that Nheko does not display the spoiler warning currently. HTML output: `<span data-mx-spoiler="spoiler">text</span>` +== ENVIRONMENT + +*NHEKO_ALLOW_QML_DISK_CACHE*:: +Nheko by default disables the qml disk cache to prevent crashes. This allows +you to reenable it at your own risk. + == FILES *Configuration file*:: diff --git a/src/main.cpp b/src/main.cpp index 44d0dd64029485e58e652b707238bae4cd481ffb..90e1cb4c4abe97b616b9c6fb1f56cc30f1f88da3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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)