From f2ce3d026874b2ae28f9fcc426e07c0ad9c5f6a3 Mon Sep 17 00:00:00 2001 From: Gabriel Calero Date: Wed, 21 Feb 2018 20:10:03 -0300 Subject: [PATCH] Fix focus hack. Add QML debug info --- interface/resources/qml/desktop/+android/FocusHack.qml | 2 ++ interface/resources/qml/windows/Frame.qml | 2 +- libraries/ui/src/OffscreenUi.cpp | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/interface/resources/qml/desktop/+android/FocusHack.qml b/interface/resources/qml/desktop/+android/FocusHack.qml index db703bab52..38253fdec1 100644 --- a/interface/resources/qml/desktop/+android/FocusHack.qml +++ b/interface/resources/qml/desktop/+android/FocusHack.qml @@ -21,4 +21,6 @@ FocusScope { onActiveFocusChanged: root.destroy() } + function start() { + } } diff --git a/interface/resources/qml/windows/Frame.qml b/interface/resources/qml/windows/Frame.qml index c3b8399e01..52ca53b818 100644 --- a/interface/resources/qml/windows/Frame.qml +++ b/interface/resources/qml/windows/Frame.qml @@ -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 } diff --git a/libraries/ui/src/OffscreenUi.cpp b/libraries/ui/src/OffscreenUi.cpp index 221f5013bf..287978bbd3 100644 --- a/libraries/ui/src/OffscreenUi.cpp +++ b/libraries/ui/src/OffscreenUi.cpp @@ -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) {