Fix a couple of QML errors

This commit is contained in:
David Rowe 2016-10-13 18:16:21 +13:00
parent a75925d1e3
commit 2343e02454
2 changed files with 4 additions and 2 deletions

View file

@ -133,7 +133,6 @@ Window {
// Optional non-scrolling footer. // Optional non-scrolling footer.
id: footerPane id: footerPane
// @@@@@@@ TODO: Are these aliases actually needed?
property alias keyboardOverride: window.keyboardOverride property alias keyboardOverride: window.keyboardOverride
property alias keyboardRaised: window.keyboardRaised property alias keyboardRaised: window.keyboardRaised
property alias punctuationMode: window.punctuationMode property alias punctuationMode: window.punctuationMode
@ -212,6 +211,8 @@ Window {
} }
Component.onCompleted: { Component.onCompleted: {
keyboardEnabled = HMD.active; if (typeof HMD !== "undefined") {
keyboardEnabled = HMD.active;
}
} }
} }

View file

@ -309,6 +309,7 @@ void OffscreenQmlSurface::create(QOpenGLContext* shareContext) {
} }
// FIXME // FIXME
_glData = ::getGLContextData(); // Initialize JSON structure so that it can be filled in later and then used in QML.
_qmlEngine->rootContext()->setContextProperty("GL", _glData); _qmlEngine->rootContext()->setContextProperty("GL", _glData);
_qmlEngine->rootContext()->setContextProperty("offscreenWindow", QVariant::fromValue(getWindow())); _qmlEngine->rootContext()->setContextProperty("offscreenWindow", QVariant::fromValue(getWindow()));
_qmlComponent = new QQmlComponent(_qmlEngine); _qmlComponent = new QQmlComponent(_qmlEngine);