Support debug mode for QML UI in debug builds

This commit is contained in:
Brad Davis 2016-01-20 08:37:10 -08:00
parent ae6cba85e8
commit 3e7f29a0aa

View file

@ -238,7 +238,12 @@ void OffscreenUi::createDesktop(const QUrl& url) {
qDebug() << "Desktop already created";
return;
}
#ifdef DEBUG
getRootContext()->setContextProperty("DebugQML", QVariant(true));
#else
getRootContext()->setContextProperty("DebugQML", QVariant(false));
#endif
_desktop = dynamic_cast<QQuickItem*>(load(url));
Q_ASSERT(_desktop);
getRootContext()->setContextProperty("desktop", _desktop);