mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-18 16:05:21 +01:00
qml: Disable disk cache entirely
This is a compromised change. Essentially, I'm working around a poorly-understood failure mode in Qt5, where the disk cache can occasionally fail to invalidate, resulting in stale compiled units being used. This will increase application start times in favour of correctness.
This commit is contained in:
parent
c412f43fe4
commit
aaadbdb283
1 changed files with 10 additions and 0 deletions
10
src/main.cpp
10
src/main.cpp
|
@ -140,6 +140,16 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
|
|
||||||
|
/** QtQuick on QT5 exhibits spurious disk cache failures that cannot be
|
||||||
|
* resolved by a user in a trivial manner (they have to delete the cache manually).
|
||||||
|
*
|
||||||
|
* This flag can potentially noticeably increase the start time of the application, however
|
||||||
|
* between this and a hard-to-detect spurious failure affecting Linux, macOS and Windows,
|
||||||
|
* this trade is the one most likely to result in a good experience for the widest group
|
||||||
|
* of users.
|
||||||
|
*/
|
||||||
|
qputenv("QML_DISABLE_DISK_CACHE", "true");
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
// prefer ANGLE (DirectX) over desktop OpenGL
|
// prefer ANGLE (DirectX) over desktop OpenGL
|
||||||
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
|
QCoreApplication::setAttribute(Qt::AA_UseOpenGLES);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue