From fb0e8833fde306eebc31b78722d8f0178b817eb7 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Mon, 11 Jan 2016 14:57:56 +0100 Subject: Check for __style existence before accessing it Since __style is loaded by a Loader, very early in initialization, it may still be null. so check for its existence before accessing it. When it will be fully loaded the property binding will cause a reevaluation with the proper values. This fixes __wheelScrollLines never being loaded from the style. Change-Id: I5967265a4d31e1be2c972daa79b9389fecc25933 Reviewed-by: J-P Nurmi --- src/controls/ScrollView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/controls/ScrollView.qml') diff --git a/src/controls/ScrollView.qml b/src/controls/ScrollView.qml index a6eaed82..d2e61c81 100644 --- a/src/controls/ScrollView.qml +++ b/src/controls/ScrollView.qml @@ -286,7 +286,7 @@ FocusScope { // comes originally from QTextEdit, which sets 20px steps by default, as well as // QQuickWheelArea. // TODO: centralize somewhere, QPlatformTheme? - scrollSpeed: 20 * (__style.__wheelScrollLines || 1) + scrollSpeed: 20 * (__style && __style.__wheelScrollLines || 1) Connections { target: flickableItem -- cgit v1.2.1