diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-02-18 19:00:36 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-17 10:54:17 (GMT) |
commit | 0f771c62f5253a969f5a8a81bfd9254b9bd58b8f (patch) | |
tree | 1f5dcfcfc84fd74f7017710478dadacc18de822c /src/gui/widgets/qabstractslider.cpp | |
parent | ec5b7ea367389234697a98d7243243ec689be724 (diff) | |
download | Qt-0f771c62f5253a969f5a8a81bfd9254b9bd58b8f.zip Qt-0f771c62f5253a969f5a8a81bfd9254b9bd58b8f.tar.gz Qt-0f771c62f5253a969f5a8a81bfd9254b9bd58b8f.tar.bz2 |
Port QtGui uses of QTime as a stopwatch to QTimestamp
Diffstat (limited to 'src/gui/widgets/qabstractslider.cpp')
-rw-r--r-- | src/gui/widgets/qabstractslider.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index 522d472..8f53116 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -764,12 +764,12 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev) SliderAction action = SliderNoAction; #ifdef QT_KEYPAD_NAVIGATION if (ev->isAutoRepeat()) { - if (d->firstRepeat.isNull()) - d->firstRepeat = QTime::currentTime(); + if (!d->firstRepeat.isValid()) + d->firstRepeat.start(); else if (1 == d->repeatMultiplier) { // This is the interval in milli seconds which one key repetition // takes. - const int repeatMSecs = d->firstRepeat.msecsTo(QTime::currentTime()); + const int repeatMSecs = d->firstRepeat.elapsed(); /** * The time it takes to currently navigate the whole slider. @@ -787,8 +787,8 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev) } } - else if (!d->firstRepeat.isNull()) { - d->firstRepeat = QTime(); + else if (!d->firstRepeat.isValid()) { + d->firstRepeat.invalidate() d->repeatMultiplier = 1; } |