summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner/components/propertyeditor
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2014-05-12 15:46:32 +0200
committerThomas Hartmann <Thomas.Hartmann@digia.com>2014-05-14 09:36:21 +0200
commitbce112e64501e9c345553bffc7a02e6bbd221c90 (patch)
tree54d55b20a97f7d2e359208d483a8ee0b26d49526 /src/plugins/qmldesigner/components/propertyeditor
parent7c76854b756dc61ffb67ad1ec3c776367dc5fd8b (diff)
downloadqt-creator-bce112e64501e9c345553bffc7a02e6bbd221c90.tar.gz
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: Marco Bubke <marco.bubke@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Diffstat (limited to 'src/plugins/qmldesigner/components/propertyeditor')
-rw-r--r--src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
index b0334d5326..13eba67e89 100644
--- a/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
+++ b/src/plugins/qmldesigner/components/propertyeditor/propertyeditorqmlbackend.cpp
@@ -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());