summaryrefslogtreecommitdiff
path: root/src/controls/ScrollView.qml
diff options
context:
space:
mode:
authorMarco Martin <mart@kde.org>2016-01-11 14:57:56 +0100
committerMarco Martin <mart@kde.org>2016-01-12 16:34:22 +0000
commitfb0e8833fde306eebc31b78722d8f0178b817eb7 (patch)
tree5a0a6c1d4ef3f2392d3615beb0d93fd862455bd7 /src/controls/ScrollView.qml
parent73bf08d2cdabb8499acf9c63b942f8df8ac0c7c1 (diff)
downloadqtquickcontrols-fb0e8833fde306eebc31b78722d8f0178b817eb7.tar.gz
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 <jpnurmi@theqtcompany.com>
Diffstat (limited to 'src/controls/ScrollView.qml')
-rw-r--r--src/controls/ScrollView.qml2
1 files changed, 1 insertions, 1 deletions
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