Code review comment for lp:~tpeeters/ubuntu-ui-toolkit/qt56fixes2sections

Revision history for this message
Cris Dywan (kalikiana) wrote :

--- src/imports/Components/1.2/MainView12.qml 2015-06-10 14:17:25 +0000
+++ src/imports/Components/1.2/MainView12.qml 2016-09-25 13:04:30 +0000
@@ -93,17 +93,17 @@

             // 'window' is defined by QML between startup and showing on the screen.
             // There is no signal for when it becomes available and re-declaring it is not safe.
- property bool windowActive: typeof window != 'undefined'
+ property bool windowActive: window !== null

--- src/imports/Components/1.2/OrientationHelper.qml 2016-05-25 12:48:10 +0000
+++ src/imports/Components/1.2/OrientationHelper.qml 2016-09-25 13:04:30 +0000
@@ -129,20 +129,22 @@
           http://qt-project.org/doc/qt-5.1/qtqml/qml-qtqml2-qt.html
           http://qt-project.org/doc/qt-5.1/qtquick/qmlmodule-qtquick-window2-qtquick-window-2.html
          */
- property bool windowActive: typeof window != 'undefined'
+ property bool windowActive: typeof window != 'undefined' && window !== null

--- src/imports/Components/1.3/OrientationHelper.qml 2016-05-25 12:48:10 +0000
+++ src/imports/Components/1.3/OrientationHelper.qml 2016-09-25 13:04:30 +0000
@@ -129,20 +129,22 @@
           http://qt-project.org/doc/qt-5.1/qtqml/qml-qtqml2-qt.html
           http://qt-project.org/doc/qt-5.1/qtquick/qmlmodule-qtquick-window2-qtquick-window-2.html
          */
- property bool windowActive: typeof window != 'undefined'
+ property bool windowActive: typeof window != 'undefined' && window !== null

Why are those above definitions different? I'm guessing by accident?

Otherwise looking good, love the test clean-up.

review: Needs Information

« Back to merge proposal