diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-02-25 01:46:18 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-02-25 01:47:38 +0100 |
commit | 0839c641506c4624f392917c5c7ab278aa5a06ba (patch) | |
tree | e3454e1571908648f693c8671c28309382690d08 | |
parent | Merge pull request #1389 from Nheko-Reborn/deletions (diff) | |
download | nheko-0839c641506c4624f392917c5c7ab278aa5a06ba.tar.xz |
Disable qml diskcache by default
Since this causes crashes on some qml module updates. Fixes #1383 Fixes #1132
-rw-r--r-- | man/nheko.1.adoc | 6 | ||||
-rw-r--r-- | src/main.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
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: `<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 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) |