Changeset 846 for trunk/src/gui/widgets/qabstractslider.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/widgets/qabstractslider.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 220 220 , isAutoRepeating(false) 221 221 , repeatMultiplier(1) 222 #endif 223 { 222 { 223 firstRepeat.invalidate(); 224 #else 225 { 226 #endif 227 224 228 } 225 229 … … 713 717 714 718 offset_accumulated += stepsToScrollF; 719 #ifndef Q_WS_MAC 720 // Don't scroll more than one page in any case: 715 721 stepsToScroll = qBound(-pageStep, int(offset_accumulated), pageStep); 722 #else 723 // Native UI-elements on Mac can scroll hundreds of lines at a time as 724 // a result of acceleration. So keep the same behaviour in Qt, and 725 // don't restrict stepsToScroll to certain maximum (pageStep): 726 stepsToScroll = int(offset_accumulated); 727 #endif 716 728 offset_accumulated -= int(offset_accumulated); 717 729 if (stepsToScroll == 0) … … 757 769 #ifdef QT_KEYPAD_NAVIGATION 758 770 if (ev->isAutoRepeat()) { 759 if ( d->firstRepeat.isNull())760 d->firstRepeat = QTime::currentTime();771 if (!d->firstRepeat.isValid()) 772 d->firstRepeat.start(); 761 773 else if (1 == d->repeatMultiplier) { 762 774 // This is the interval in milli seconds which one key repetition 763 775 // takes. 764 const int repeatMSecs = d->firstRepeat. msecsTo(QTime::currentTime());776 const int repeatMSecs = d->firstRepeat.elapsed(); 765 777 766 778 /** … … 780 792 781 793 } 782 else if ( !d->firstRepeat.isNull()) {783 d->firstRepeat = QTime();794 else if (d->firstRepeat.isValid()) { 795 d->firstRepeat.invalidate(); 784 796 d->repeatMultiplier = 1; 785 797 }
Note:
See TracChangeset
for help on using the changeset viewer.