Commit eaba9b3d authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyEditor: dummyPropertyEditorValue to avoid warnings

parent 794de624
...@@ -80,11 +80,14 @@ const int collapseButtonOffset = 114; ...@@ -80,11 +80,14 @@ const int collapseButtonOffset = 114;
namespace QmlDesigner { namespace QmlDesigner {
PropertyEditor::NodeType::NodeType(PropertyEditor *propertyEditor) : 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()); Q_ASSERT(QFileInfo(":/images/button_normal.png").exists());
m_view->setResizeMode(QDeclarativeView::SizeRootObjectToView); 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&))); connect(&m_backendValuesPropertyMap, SIGNAL(valueChanged(const QString&)), propertyEditor, SLOT(changeValue(const QString&)));
} }
......
...@@ -43,6 +43,8 @@ class QShortcut; ...@@ -43,6 +43,8 @@ class QShortcut;
class QStackedWidget; class QStackedWidget;
QT_END_NAMESPACE QT_END_NAMESPACE
class PropertyEditorValue;
namespace QmlDesigner { namespace QmlDesigner {
class PropertyEditorTransaction; class PropertyEditorTransaction;
...@@ -66,6 +68,7 @@ class PropertyEditor: public QmlModelView ...@@ -66,6 +68,7 @@ class PropertyEditor: public QmlModelView
Internal::QmlAnchorBindingProxy m_backendAnchorBinding; Internal::QmlAnchorBindingProxy m_backendAnchorBinding;
QDeclarativePropertyMap m_backendValuesPropertyMap; QDeclarativePropertyMap m_backendValuesPropertyMap;
QScopedPointer<PropertyEditorTransaction> m_propertyEditorTransaction; QScopedPointer<PropertyEditorTransaction> m_propertyEditorTransaction;
QScopedPointer<PropertyEditorValue> m_dummyPropertyEditorValue;
}; };
public: public:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment