mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Add the url of each qml as on-screen debug info
This commit is contained in:
parent
3f762c7900
commit
109fa1d832
2 changed files with 8 additions and 2 deletions
|
@ -16,10 +16,11 @@ import "../js/Utils.js" as Utils
|
|||
|
||||
Item {
|
||||
id: frame
|
||||
objectName: "Frame"
|
||||
HifiConstants { id: hifi }
|
||||
|
||||
default property var decoration
|
||||
|
||||
property string qmlFile: "N/A"
|
||||
property bool gradientsSupported: desktop.gradientsSupported
|
||||
|
||||
readonly property int frameMarginLeft: frame.decoration ? frame.decoration.frameMarginLeft : 0
|
||||
|
@ -44,7 +45,7 @@ Item {
|
|||
id: debugZ
|
||||
visible: DebugQML
|
||||
color: "red"
|
||||
text: (window ? "Z: " + window.z : "")
|
||||
text: (window ? "Z: " + window.z : "") + " " + qmlFile
|
||||
y: window ? window.height + 4 : 0
|
||||
}
|
||||
|
||||
|
|
|
@ -342,6 +342,11 @@ void OffscreenSurface::finishQmlLoad(QQmlComponent* qmlComponent,
|
|||
// Make sure we make items focusable (critical for
|
||||
// supporting keyboard shortcuts)
|
||||
newItem->setFlag(QQuickItem::ItemIsFocusScope, true);
|
||||
#ifdef DEBUG
|
||||
for (auto frame : newObject->findChildren<QQuickItem *>("Frame")) {
|
||||
frame->setProperty("qmlFile", qmlComponent->url());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool rootCreated = getRootItem() != nullptr;
|
||||
|
|
Loading…
Reference in a new issue