Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.9.1
-
None
-
Windows 7 and 10 with MSVC2015
Description
1 - Create a QML singleton,
2 - Compile with a working code and run the app :
Singleton.qml :
pragma Singleton import QtQuick 2.7 QtObject { id : themePalette property color textColor : "red" }
main.qml : import QtQuick 2.7 import QtQuick.Controls 2.0 import QtQuick.Layouts 1.0 import QtGraphicalEffects 1.0 import QtQml.Models 2.1 import UIComponents 1.0 ApplicationWindow { visible: true width: 800 height: 900 title: qsTr("EOS Designer") Rectangle { color : UIPalette.textColor anchors.fill : parent } }
3 - Make a change on singleton :
Singleton.qml :
pragma Singleton import QtQuick 2.7 QtObject { id : themePalette property color anotherproperty : "blue" property color textColor : "red" }
4 - Rerun the App, rectangle now appears in blue !
Clearly a caching bug as qputenv("QML_DISABLE_DISK_CACHE", "1") in main.cpp solves this.
Tested with QtCreator and visual Studio with msvc2015.
We lost a lot of time with this, thanks for fixing.
A test project is linked as attachement.
Attachments
Issue Links
- resulted in
-
QTBUG-66976 Disk caching broken for modules with multiple QML singletons
- Closed
For Gerrit Dashboard: QTBUG-62243 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
205260,3 | Fix qml cache invalidation when changing dependent C++ registered QML singletons | 5.9 | qt/qtdeclarative | Status: MERGED | +2 | 0 |