diff options
author | Alessandro Portale <alessandro.portale@qt.io> | 2017-12-18 21:18:38 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2017-12-19 09:16:28 +0000 |
commit | f8b10bf5b02c774c4e5854547323115490c729ae (patch) | |
tree | 095de9946885032415c565bea46b8d658bc32275 | |
parent | a5ceca3a8da147e054ca65ada92987635841f215 (diff) | |
download | qt-creator-f8b10bf5b02c774c4e5854547323115490c729ae.tar.gz |
QmlProfiler/timeline: Avoid modulo with negative divisor
All of a sudden, using modulo with a negative divisor in qml/js crashes
with the latest Qt dev (upcoming 5.11).
Change-Id: Iabd7fbaf7367ff630065d6863e03c10710bf0cd4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
-rw-r--r-- | src/libs/timeline/qml/TimeDisplay.qml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/timeline/qml/TimeDisplay.qml b/src/libs/timeline/qml/TimeDisplay.qml index d7dad63c40..4351c8260e 100644 --- a/src/libs/timeline/qml/TimeDisplay.qml +++ b/src/libs/timeline/qml/TimeDisplay.qml @@ -63,7 +63,7 @@ Item { id: row property int firstBlock: timeDisplay.offsetX / timeDisplay.pixelsPerBlock - property int offset: repeater.model - (firstBlock % repeater.model); + property int offset: repeater.model > 0 ? repeater.model - (firstBlock % repeater.model) : 0; Repeater { id: repeater |