From eaba9b3d69692b6ae75ebae7b3696b1389a4a8dc Mon Sep 17 00:00:00 2001
From: Thomas Hartmann <Thomas.Hartmann@nokia.com>
Date: Thu, 25 Mar 2010 16:52:26 +0100
Subject: [PATCH] QmlDesigner.propertyEditor: dummyPropertyEditorValue to avoid
 warnings

---
 .../qmldesigner/components/propertyeditor/propertyeditor.cpp | 5 ++++-
 .../qmldesigner/components/propertyeditor/propertyeditor.h   | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
index 3d27ac07a20..dff878486c2 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.cpp
@@ -80,11 +80,14 @@ const int collapseButtonOffset = 114;
 namespace QmlDesigner {
 
 PropertyEditor::NodeType::NodeType(PropertyEditor *propertyEditor) :
-        m_view(new QDeclarativeView), m_propertyEditorTransaction(new PropertyEditorTransaction(propertyEditor))
+        m_view(new QDeclarativeView), m_propertyEditorTransaction(new PropertyEditorTransaction(propertyEditor)), m_dummyPropertyEditorValue(new PropertyEditorValue())
 {
     Q_ASSERT(QFileInfo(":/images/button_normal.png").exists());
 
     m_view->setResizeMode(QDeclarativeView::SizeRootObjectToView);
+    QDeclarativeContext *ctxt = m_view->rootContext();
+    m_dummyPropertyEditorValue->setValue("#000000");
+    ctxt->setContextProperty("dummyBackendValue", m_dummyPropertyEditorValue.data());
 
     connect(&m_backendValuesPropertyMap, SIGNAL(valueChanged(const QString&)), propertyEditor, SLOT(changeValue(const QString&)));
 }
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.h b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.h
index d8d48eb44c7..b0b8c8781e0 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.h
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditor.h
@@ -43,6 +43,8 @@ class QShortcut;
 class QStackedWidget;
 QT_END_NAMESPACE
 
+class PropertyEditorValue;
+
 namespace QmlDesigner {
 
 class PropertyEditorTransaction;
@@ -66,6 +68,7 @@ class PropertyEditor: public QmlModelView
         Internal::QmlAnchorBindingProxy m_backendAnchorBinding;
         QDeclarativePropertyMap m_backendValuesPropertyMap;
         QScopedPointer<PropertyEditorTransaction> m_propertyEditorTransaction;
+        QScopedPointer<PropertyEditorValue> m_dummyPropertyEditorValue;
     };
 
 public:
-- 
GitLab