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

QmlDesigner.PropertyEditor: Using envirmoment variable to debug qml



If someone is customizing parts of the property editor then it is
useful to see any warnings from their QML components.
Debugging QML components should not require to rebuild Qt Creator.

The debug enum was not used anywhere else.

Change-Id: I623234312238906d4c4c90e87a5f2bc488f6fc57
Reviewed-by: default avatarMarco Bubke <marco.bubke@digia.com>
Reviewed-by: default avatarTim Jenssen <tim.jenssen@digia.com>
parent 7c76854b
......@@ -47,10 +47,6 @@
#include <QFileInfo>
enum {
debug = false
};
static QmlJS::SimpleReaderNode::Ptr s_templateConfiguration = QmlJS::SimpleReaderNode::Ptr();
static inline QString propertyTemplatesPath()
......@@ -97,7 +93,9 @@ PropertyEditorQmlBackend::PropertyEditorQmlBackend(PropertyEditorView *propertyE
{
Q_ASSERT(QFileInfo(":/images/button_normal.png").exists());
m_view->engine()->setOutputWarningsToStandardError(debug);
m_view->engine()->setOutputWarningsToStandardError(
!qgetenv("QTCREATOR_QTQUICKDESIGNER_PROPERTYEDITOR_SHOW_WARNINGS").isEmpty());
m_view->engine()->addImportPath(propertyEditorResourcesPath());
m_dummyPropertyEditorValue->setValue("#000000");
context()->setContextProperty("dummyBackendValue", m_dummyPropertyEditorValue.data());
......
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