diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-08 14:39:17 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2016-11-08 17:58:49 +0000 |
commit | 08b780205a91aef12141cc0650a6197794f09e00 (patch) | |
tree | 32b72ec5ccb9fd077c09f71b3a04ce36d48395be /src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp | |
parent | 062512a246279b632a93db544445a447d8cf2633 (diff) | |
download | qt-creator-08b780205a91aef12141cc0650a6197794f09e00.tar.gz |
Theme: Use QVariantMap for theme properties
QML can directly mirror this into a JavaScript object, so there is no
need to manually copy the values into a different container. Also,
QQmlPropertyMap is very expensive as it will listen to changes to any
value in the map. We never use this. It would be entirely enough to
update the whole map at once if we ever want to update the theme at
runtime.
Change-Id: Ie2b549e9af51d620801808c87d6f659cc7a06c04
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Diffstat (limited to 'src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp')
-rw-r--r-- | src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp index 3d4884d9bd..ff299af870 100644 --- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp +++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp @@ -103,8 +103,7 @@ PropertyEditorQmlBackend::PropertyEditorQmlBackend(PropertyEditorView *propertyE m_contextObject->setModel(propertyEditor->model()); m_contextObject->insertInQmlContext(context()); - Theming::insertTheme(&m_themeProperties); - context()->setContextProperty(QLatin1String("creatorTheme"), &m_themeProperties); + context()->setContextProperty(QLatin1String("creatorTheme"), Theming::theme()); QObject::connect(&m_backendValuesPropertyMap, &DesignerPropertyMap::valueChanged, propertyEditor, &PropertyEditorView::changeValue); } |