diff --git a/man/nheko.1.adoc b/man/nheko.1.adoc index ef8f2728..690ed568 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: `text` +== 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 44d0dd64..90e1cb4c 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)