Merge pull request #14227 from ElderOrb/FB19396

FB19396 - QML warning qrc:///qml/hifi/tablet/WindowRoot.qml:132: Type…
This commit is contained in:
Jeff Clinton 2018-11-07 13:36:41 -08:00 committed by GitHub
commit e507e91bfd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -129,8 +129,21 @@ Windows.ScrollingWindow {
height: pane.scrollHeight
width: pane.contentWidth
anchors.left: parent.left
anchors.top: parent.top
// this might be looking not clear from the first look
// but loader.parent is not tabletRoot and it can be null!
// unfortunately we can't use conditional bindings here due to https://bugreports.qt.io/browse/QTBUG-22005
onParentChanged: {
if (parent) {
anchors.left = Qt.binding(function() { return parent.left })
anchors.top = Qt.binding(function() { return parent.top })
} else {
anchors.left = undefined
anchors.top = undefined
}
}
signal loaded;
onWidthChanged: {