diff options
author | axis <qt-info@nokia.com> | 2009-11-20 07:56:40 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-11-20 07:56:40 (GMT) |
commit | d9fa92933ff6ff1afad342f7f94e37f810cf8176 (patch) | |
tree | 77e2c90877ea528d71755e7322c025c8284636a7 /src | |
parent | a8c8c2274d2d0a708786adbb357013955f99c0af (diff) | |
parent | c7d7fae74f3b8df9e5b07493a36db31f2c499699 (diff) | |
download | Qt-d9fa92933ff6ff1afad342f7f94e37f810cf8176.zip Qt-d9fa92933ff6ff1afad342f7f94e37f810cf8176.tar.gz Qt-d9fa92933ff6ff1afad342f7f94e37f810cf8176.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.6-staging2
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/image/qpixmap_s60.cpp | 5 | ||||
-rw-r--r-- | src/gui/image/qpixmap_s60_p.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/qabstractslider.cpp | 45 | ||||
-rw-r--r-- | src/gui/widgets/qabstractslider_p.h | 33 | ||||
-rw-r--r-- | src/s60installs/bwins/QtCoreu.def | 11 | ||||
-rw-r--r-- | src/s60installs/bwins/QtGuiu.def | 3 | ||||
-rw-r--r-- | src/s60installs/bwins/QtWebKitu.def | 9 | ||||
-rw-r--r-- | src/s60installs/eabi/QtCoreu.def | 14 | ||||
-rw-r--r-- | src/s60installs/eabi/QtGuiu.def | 2 | ||||
-rw-r--r-- | src/s60installs/eabi/QtWebKitu.def | 9 |
11 files changed, 122 insertions, 13 deletions
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp index 17baa50..dc33ade 100644 --- a/src/gui/image/qpixmap_s60.cpp +++ b/src/gui/image/qpixmap_s60.cpp @@ -977,4 +977,9 @@ void QS60PixmapData::fromNativeType(void* pixmap, NativeType nativeType) } } +QPixmapData *QS60PixmapData::createCompatiblePixmapData() const +{ + return new QS60PixmapData(pixelType()); +} + QT_END_NAMESPACE diff --git a/src/gui/image/qpixmap_s60_p.h b/src/gui/image/qpixmap_s60_p.h index b1b5824..8631ebd 100644 --- a/src/gui/image/qpixmap_s60_p.h +++ b/src/gui/image/qpixmap_s60_p.h @@ -87,6 +87,8 @@ public: QS60PixmapData(PixelType type); ~QS60PixmapData(); + QPixmapData *createCompatiblePixmapData() const; + void resize(int width, int height); void fromImage(const QImage &image, Qt::ImageConversionFlags flags); void copy(const QPixmapData *data, const QRect &rect); diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index c7f0c00..85b6d00 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -712,7 +712,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers); QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode, mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods), - false, 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers); + (keyEvent.iRepeats != 0), 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers); // WId wid = reinterpret_cast<RWindowGroup *>(keyEvent.Handle())->Child(); // if (!wid) // Could happen if window isn't shown yet. diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index e0db9c2..988a7e7 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -219,6 +219,10 @@ QAbstractSliderPrivate::QAbstractSliderPrivate() blocktracking(false), pressed(false), invertedAppearance(false), invertedControls(false), orientation(Qt::Horizontal), repeatAction(QAbstractSlider::SliderNoAction) +#ifdef QT_KEYPAD_NAVIGATION + , isAutoRepeating(false) + , repeatMultiplier(1) +#endif { } @@ -371,6 +375,9 @@ int QAbstractSlider::maximum() const abstract sliders provides and typically corresponds to the user pressing an arrow key. + If the property is modified during an auto repeating key event, behavior + is undefined. + \sa pageStep */ @@ -598,10 +605,10 @@ void QAbstractSlider::triggerAction(SliderAction action) d->blocktracking = true; switch (action) { case SliderSingleStepAdd: - setSliderPosition(d->overflowSafeAdd(d->singleStep)); + setSliderPosition(d->overflowSafeAdd(d->effectiveSingleStep())); break; case SliderSingleStepSub: - setSliderPosition(d->overflowSafeAdd(-d->singleStep)); + setSliderPosition(d->overflowSafeAdd(-d->effectiveSingleStep())); break; case SliderPageStepAdd: setSliderPosition(d->overflowSafeAdd(d->pageStep)); @@ -702,7 +709,7 @@ void QAbstractSlider::wheelEvent(QWheelEvent * e) // Calculate how many lines to scroll. Depending on what delta is (and // offset), we might end up with a fraction (e.g. scroll 1.3 lines). We can // only scroll whole lines, so we keep the reminder until next event. - qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * d->singleStep; + qreal stepsToScrollF = offset * QApplication::wheelScrollLines() * d->effectiveSingleStep(); // Check if wheel changed direction since last event: if (d->offset_accumulated != 0 && (offset / d->offset_accumulated) < 0) d->offset_accumulated = 0; @@ -773,6 +780,38 @@ void QAbstractSlider::keyPressEvent(QKeyEvent *ev) { Q_D(QAbstractSlider); SliderAction action = SliderNoAction; +#ifdef QT_KEYPAD_NAVIGATION + if (ev->isAutoRepeat()) { + if (d->firstRepeat.isNull()) + d->firstRepeat = QTime::currentTime(); + 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()); + + /** + * The time it takes to currently navigate the whole slider. + */ + const qreal currentTimeElapse = (qreal(maximum()) / singleStep()) * repeatMSecs; + + /** + * This is an arbitrarily determined constant in msecs that + * specifies how long time it should take to navigate from the + * start to the end(excluding starting key auto repeat). + */ + const int SliderRepeatElapse = 2500; + + d->repeatMultiplier = currentTimeElapse / SliderRepeatElapse; + } + + } + else if (!d->firstRepeat.isNull()) { + d->firstRepeat = QTime(); + d->repeatMultiplier = 1; + } + +#endif + switch (ev->key()) { #ifdef QT_KEYPAD_NAVIGATION case Qt::Key_Select: diff --git a/src/gui/widgets/qabstractslider_p.h b/src/gui/widgets/qabstractslider_p.h index 9324d44..6591981 100644 --- a/src/gui/widgets/qabstractslider_p.h +++ b/src/gui/widgets/qabstractslider_p.h @@ -68,7 +68,13 @@ public: void setSteps(int single, int page); - int minimum, maximum, singleStep, pageStep, value, position, pressValue; + int minimum, maximum, pageStep, value, position, pressValue; + + /** + * Call effectiveSingleStep() when changing the slider value. + */ + int singleStep; + float offset_accumulated; uint tracking : 1; uint blocktracking :1; @@ -83,8 +89,33 @@ public: #ifdef QT_KEYPAD_NAVIGATION int origValue; + + /** + */ + bool isAutoRepeating; + + /** + * When we're auto repeating, we multiply singleStep with this value to + * get our effective step. + */ + qreal repeatMultiplier; + + /** + * The time of when the first auto repeating key press event occurs. + */ + QTime firstRepeat; + #endif + inline int effectiveSingleStep() const + { + return singleStep +#ifdef QT_KEYPAD_NAVIGATION + * repeatMultiplier +#endif + ; + } + inline int bound(int val) const { return qMax(minimum, qMin(maximum, val)); } inline int overflowSafeAdd(int add) const { diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index 1218b75..49c4361 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -4387,4 +4387,15 @@ EXPORTS ?QBasicAtomicPointer_isFetchAndAddNative@@YA_NXZ @ 4386 NONAME ; bool QBasicAtomicPointer_isFetchAndAddNative(void) ?QBasicAtomicPointer_isFetchAndStoreNative@@YA_NXZ @ 4387 NONAME ; bool QBasicAtomicPointer_isFetchAndStoreNative(void) ?QBasicAtomicPointer_isTestAndSetNative@@YA_NXZ @ 4388 NONAME ; bool QBasicAtomicPointer_isTestAndSetNative(void) + ??0SignalEvent@QStateMachine@@QAE@PAVQObject@@HABV?$QList@VQVariant@@@@@Z @ 4389 NONAME ; QStateMachine::SignalEvent::SignalEvent(class QObject *, int, class QList<class QVariant> const &) + ??0WrappedEvent@QStateMachine@@QAE@PAVQObject@@PAVQEvent@@@Z @ 4390 NONAME ; QStateMachine::WrappedEvent::WrappedEvent(class QObject *, class QEvent *) + ??1SignalEvent@QStateMachine@@UAE@XZ @ 4391 NONAME ; QStateMachine::SignalEvent::~SignalEvent(void) + ??1WrappedEvent@QStateMachine@@UAE@XZ @ 4392 NONAME ; QStateMachine::WrappedEvent::~WrappedEvent(void) + ??_ESignalEvent@QStateMachine@@UAE@I@Z @ 4393 NONAME ; QStateMachine::SignalEvent::~SignalEvent(unsigned int) + ??_EWrappedEvent@QStateMachine@@UAE@I@Z @ 4394 NONAME ; QStateMachine::WrappedEvent::~WrappedEvent(unsigned int) + ?arguments@SignalEvent@QStateMachine@@QBE?AV?$QList@VQVariant@@@@XZ @ 4395 NONAME ; class QList<class QVariant> QStateMachine::SignalEvent::arguments(void) const + ?event@WrappedEvent@QStateMachine@@QBEPAVQEvent@@XZ @ 4396 NONAME ; class QEvent * QStateMachine::WrappedEvent::event(void) const + ?object@WrappedEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4397 NONAME ; class QObject * QStateMachine::WrappedEvent::object(void) const + ?sender@SignalEvent@QStateMachine@@QBEPAVQObject@@XZ @ 4398 NONAME ; class QObject * QStateMachine::SignalEvent::sender(void) const + ?signalIndex@SignalEvent@QStateMachine@@QBEHXZ @ 4399 NONAME ; int QStateMachine::SignalEvent::signalIndex(void) const diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 8a43f21..166b6fe 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -12514,4 +12514,7 @@ EXPORTS ?app_compile_version@QApplicationPrivate@@2HA @ 12513 NONAME ; int QApplicationPrivate::app_compile_version ?spacerItemFactoryMethod@QLayoutPrivate@@2P6APAVQSpacerItem@@PBVQLayout@@HHW4Policy@QSizePolicy@@1@ZA @ 12514 NONAME ; class QSpacerItem * (*QLayoutPrivate::spacerItemFactoryMethod)(class QLayout const *, int, int, enum QSizePolicy::Policy, enum QSizePolicy::Policy) ?allWidgets@QWidgetPrivate@@2PAV?$QSet@PAVQWidget@@@@A @ 12515 NONAME ; class QSet<class QWidget *> * QWidgetPrivate::allWidgets + ?effectiveFocusWidget@QWidgetPrivate@@QAEPAVQWidget@@XZ @ 12516 NONAME ; class QWidget * QWidgetPrivate::effectiveFocusWidget(void) + ?ignoreUnusedNavigationEvents@QTextControl@@QBE_NXZ @ 12517 NONAME ; bool QTextControl::ignoreUnusedNavigationEvents(void) const + ?setIgnoreUnusedNavigationEvents@QTextControl@@QAEX_N@Z @ 12518 NONAME ; void QTextControl::setIgnoreUnusedNavigationEvents(bool) diff --git a/src/s60installs/bwins/QtWebKitu.def b/src/s60installs/bwins/QtWebKitu.def index c14abe2..e5631f8 100644 --- a/src/s60installs/bwins/QtWebKitu.def +++ b/src/s60installs/bwins/QtWebKitu.def @@ -361,8 +361,8 @@ EXPORTS ?previousSibling@QWebElement@@QBE?AV1@XZ @ 360 NONAME ; class QWebElement QWebElement::previousSibling(void) const ?print@QWebView@@QBEXPAVQPrinter@@@Z @ 361 NONAME ; void QWebView::print(class QPrinter *) const ?printRequested@QWebPage@@IAEXPAVQWebFrame@@@Z @ 362 NONAME ; void QWebPage::printRequested(class QWebFrame *) - ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ; float QWebSettings::printingMaximumShrinkFactor(void) const - ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ; float QWebSettings::printingMinimumShrinkFactor(void) const + ?printingMaximumShrinkFactor@QWebSettings@@QBEMXZ @ 363 NONAME ABSENT ; float QWebSettings::printingMaximumShrinkFactor(void) const + ?printingMinimumShrinkFactor@QWebSettings@@QBEMXZ @ 364 NONAME ABSENT ; float QWebSettings::printingMinimumShrinkFactor(void) const ?provisionalLoad@QWebFrame@@IAEXXZ @ 365 NONAME ; void QWebFrame::provisionalLoad(void) ?qWebKitMajorVersion@@YAHXZ @ 366 NONAME ; int qWebKitMajorVersion(void) ?qWebKitMinorVersion@@YAHXZ @ 367 NONAME ; int qWebKitMinorVersion(void) @@ -488,8 +488,8 @@ EXPORTS ?setPluginFactory@QWebPage@@QAEXPAVQWebPluginFactory@@@Z @ 487 NONAME ; void QWebPage::setPluginFactory(class QWebPluginFactory *) ?setPreferredContentsSize@QWebPage@@QBEXABVQSize@@@Z @ 488 NONAME ; void QWebPage::setPreferredContentsSize(class QSize const &) const ?setPreferredPluginForMimeType@QWebPluginDatabase@@QAEXABVQString@@ABVQWebPluginInfo@@@Z @ 489 NONAME ; void QWebPluginDatabase::setPreferredPluginForMimeType(class QString const &, class QWebPluginInfo const &) - ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ; void QWebSettings::setPrintingMaximumShrinkFactor(float) - ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ; void QWebSettings::setPrintingMinimumShrinkFactor(float) + ?setPrintingMaximumShrinkFactor@QWebSettings@@QAEXM@Z @ 490 NONAME ABSENT ; void QWebSettings::setPrintingMaximumShrinkFactor(float) + ?setPrintingMinimumShrinkFactor@QWebSettings@@QAEXM@Z @ 491 NONAME ABSENT ; void QWebSettings::setPrintingMinimumShrinkFactor(float) ?setRenderHint@QWebView@@QAEXW4RenderHint@QPainter@@_N@Z @ 492 NONAME ; void QWebView::setRenderHint(enum QPainter::RenderHint, bool) ?setRenderHints@QWebView@@QAEXV?$QFlags@W4RenderHint@QPainter@@@@@Z @ 493 NONAME ; void QWebView::setRenderHints(class QFlags<enum QPainter::RenderHint>) ?setScrollBarPolicy@QWebFrame@@QAEXW4Orientation@Qt@@W4ScrollBarPolicy@3@@Z @ 494 NONAME ; void QWebFrame::setScrollBarPolicy(enum Qt::Orientation, enum Qt::ScrollBarPolicy) @@ -619,4 +619,5 @@ EXPORTS ?staticMetaObject@QGraphicsWebView@@2UQMetaObject@@B @ 618 NONAME ; struct QMetaObject const QGraphicsWebView::staticMetaObject ?staticMetaObject@QWebPage@@2UQMetaObject@@B @ 619 NONAME ; struct QMetaObject const QWebPage::staticMetaObject ?staticMetaObject@QWebView@@2UQMetaObject@@B @ 620 NONAME ; struct QMetaObject const QWebView::staticMetaObject + ?attributeNames@QWebElement@@QBE?AVQStringList@@ABVQString@@@Z @ 621 NONAME ; class QStringList QWebElement::attributeNames(class QString const &) const diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def index 99be68e..6a4cdbd 100644 --- a/src/s60installs/eabi/QtCoreu.def +++ b/src/s60installs/eabi/QtCoreu.def @@ -3619,4 +3619,18 @@ EXPORTS _ZN15QBasicAtomicInt19isFetchAndAddNativeEv @ 3618 NONAME _ZN15QBasicAtomicInt21isFetchAndStoreNativeEv @ 3619 NONAME _ZN15QBasicAtomicInt25isReferenceCountingNativeEv @ 3620 NONAME + _ZN13QStateMachine11SignalEventC1EP7QObjectiRK5QListI8QVariantE @ 3621 NONAME + _ZN13QStateMachine11SignalEventC2EP7QObjectiRK5QListI8QVariantE @ 3622 NONAME + _ZN13QStateMachine11SignalEventD0Ev @ 3623 NONAME + _ZN13QStateMachine11SignalEventD1Ev @ 3624 NONAME + _ZN13QStateMachine11SignalEventD2Ev @ 3625 NONAME + _ZN13QStateMachine12WrappedEventC1EP7QObjectP6QEvent @ 3626 NONAME + _ZN13QStateMachine12WrappedEventC2EP7QObjectP6QEvent @ 3627 NONAME + _ZN13QStateMachine12WrappedEventD0Ev @ 3628 NONAME + _ZN13QStateMachine12WrappedEventD1Ev @ 3629 NONAME + _ZN13QStateMachine12WrappedEventD2Ev @ 3630 NONAME + _ZTIN13QStateMachine11SignalEventE @ 3631 NONAME + _ZTIN13QStateMachine12WrappedEventE @ 3632 NONAME + _ZTVN13QStateMachine11SignalEventE @ 3633 NONAME + _ZTVN13QStateMachine12WrappedEventE @ 3634 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index 43e291c..6c45a6e 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -11735,4 +11735,6 @@ EXPORTS _Zls6QDebugP15QGraphicsObject @ 11734 NONAME _Zls6QDebugRK12QStyleOption @ 11735 NONAME _Zls6QDebugRKN12QStyleOption10OptionTypeE @ 11736 NONAME + _ZN12QTextControl31setIgnoreUnusedNavigationEventsEb @ 11737 NONAME + _ZNK12QTextControl28ignoreUnusedNavigationEventsEv @ 11738 NONAME diff --git a/src/s60installs/eabi/QtWebKitu.def b/src/s60installs/eabi/QtWebKitu.def index 88343c1..4aad884 100644 --- a/src/s60installs/eabi/QtWebKitu.def +++ b/src/s60installs/eabi/QtWebKitu.def @@ -654,8 +654,8 @@ EXPORTS _Z34qt_drt_resetOriginAccessWhiteListsv @ 653 NONAME _ZN11QWebElement17removeAllChildrenEv @ 654 NONAME _ZN11QWebElement6renderEP8QPainter @ 655 NONAME - _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME - _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME + _ZN12QWebSettings30setPrintingMaximumShrinkFactorEf @ 656 NONAME ABSENT + _ZN12QWebSettings30setPrintingMinimumShrinkFactorEf @ 657 NONAME ABSENT _ZN16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 658 NONAME _ZN16QGraphicsWebView11linkClickedERK4QUrl @ 659 NONAME _ZN16QGraphicsWebView12loadFinishedEb @ 660 NONAME @@ -674,8 +674,8 @@ EXPORTS _ZN21QWebElementCollectionD2Ev @ 673 NONAME _ZN21QWebElementCollectionaSERKS_ @ 674 NONAME _ZN9QWebFrame6renderEP8QPainterNS_11RenderLayerERK7QRegion @ 675 NONAME - _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME - _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME + _ZNK12QWebSettings27printingMaximumShrinkFactorEv @ 676 NONAME ABSENT + _ZNK12QWebSettings27printingMinimumShrinkFactorEv @ 677 NONAME ABSENT _ZNK16QGraphicsWebView10isModifiedEv @ 678 NONAME _ZNK16QGraphicsWebView10pageActionEN8QWebPage9WebActionE @ 679 NONAME _ZNK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 680 NONAME @@ -689,4 +689,5 @@ EXPORTS _ZThn16_NK16QGraphicsWebView8sizeHintEN2Qt8SizeHintERK6QSizeF @ 688 NONAME _ZThn8_N16QGraphicsWebView10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 689 NONAME _ZThn8_NK16QGraphicsWebView16inputMethodQueryEN2Qt16InputMethodQueryE @ 690 NONAME + _ZNK11QWebElement14attributeNamesERK7QString @ 691 NONAME |