Fix focus hack. Add QML debug info

This commit is contained in:
Gabriel Calero 2018-02-21 20:10:03 -03:00
parent 6411d1b35b
commit f2ce3d0268
3 changed files with 5 additions and 1 deletions

View file

@ -21,4 +21,6 @@ FocusScope {
onActiveFocusChanged: root.destroy()
}
function start() {
}
}

View file

@ -43,7 +43,7 @@ Item {
Text {
id: debugZ
visible: DebugQML
text: window ? "Z: " + window.z : ""
text: (window ? "Z: " + window.z : "") + DebugQMLFile
y: window ? window.height + 4 : 0
}

View file

@ -658,8 +658,10 @@ void OffscreenUi::createDesktop(const QUrl& url) {
#ifdef DEBUG
getSurfaceContext()->setContextProperty("DebugQML", QVariant(true));
getSurfaceContext()->setContextProperty("DebugQMLFile", QVariant(url.toString()));
#else
getSurfaceContext()->setContextProperty("DebugQML", QVariant(false));
getSurfaceContext()->setContextProperty("DebugQMLFile", QVariant(""));
#endif
load(url, [=](QQmlContext* context, QObject* newObject) {