diff options
author | Jason Barron <jbarron@trolltech.com> | 2009-09-23 17:08:16 (GMT) |
---|---|---|
committer | Jason Barron <jbarron@trolltech.com> | 2009-09-23 17:14:47 (GMT) |
commit | 0f462990247d71e598346a8f96faf6d04cd4515e (patch) | |
tree | c3abce88f5a2534fe5a1ae4a1aa7e2672dc63a3d /src/gui | |
parent | 454bedce14728e4f0575aadea6c454717c95d3fe (diff) | |
download | Qt-0f462990247d71e598346a8f96faf6d04cd4515e.zip Qt-0f462990247d71e598346a8f96faf6d04cd4515e.tar.gz Qt-0f462990247d71e598346a8f96faf6d04cd4515e.tar.bz2 |
Compile fix for platforms prior to Symbian^3.
The advanced pointer events are only available on Symbian^3 and higher
so we need to make sure these are protected by an #ifdef. We might have
to re-factor this later into a plugin in order to get this running on
older versions.
Reviewed-by: axis
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 6 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 1c198f9..27e8602 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -368,6 +368,7 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons m_previousEventLongTap = true; } +#ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER void QSymbianControl::translateAdvancedPointerEvent(const TAdvancedPointerEvent *event) { QApplicationPrivate *d = QApplicationPrivate::instance(); @@ -427,9 +428,11 @@ void QSymbianControl::translateAdvancedPointerEvent(const TAdvancedPointerEvent QTouchEvent::TouchScreen, d->appAllTouchPoints); } +#endif void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) { +#ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER if (pEvent.IsAdvancedPointerEvent()) { const TAdvancedPointerEvent *advancedPointerEvent = pEvent.AdvancedPointerEvent(); translateAdvancedPointerEvent(advancedPointerEvent); @@ -438,6 +441,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent) return; } } +#endif m_longTapDetector->PointerEventL(pEvent); QT_TRYCATCH_LEAVING(HandlePointerEvent(pEvent)); @@ -1551,8 +1555,10 @@ TUint QApplicationPrivate::resolveS60ScanCode(TInt scanCode, TUint keysym) void QApplicationPrivate::initializeMultitouch_sys() { +#ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER if (HAL::Get(HALData::EPointer3DMaxPressure, maxTouchPressure) != KErrNone) maxTouchPressure = KMaxTInt; +#endif } void QApplicationPrivate::cleanupMultitouch_sys() diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index 3a2dd2b..0d48634 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -169,7 +169,9 @@ private: TKeyResponse sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent); bool sendMouseEvent(QWidget *widget, QMouseEvent *mEvent); void HandleLongTapEventL( const TPoint& aPenEventLocation, const TPoint& aPenEventScreenLocation ); +#ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER void translateAdvancedPointerEvent(const TAdvancedPointerEvent *event); +#endif private: QWidget *qwidget; diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 2e6139b..6b5e9b7 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -805,11 +805,13 @@ void QWidgetPrivate::setMask_sys(const QRegion& /* region */) void QWidgetPrivate::registerTouchWindow() { +#ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER Q_Q(QWidget); if (q->testAttribute(Qt::WA_WState_Created) && q->windowType() != Qt::Desktop) { RWindow *rwindow = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow()); rwindow->EnableAdvancedPointers(); } +#endif } int QWidget::metric(PaintDeviceMetric m) const |