[Marble-commits] KDE/kdeedu/marble/src/lib
Marco Martin
notmart at gmail.com
Fri Nov 20 16:16:48 CET 2009
SVN commit 1052020 by mart:
conditional compile of Qt 4.6 specific code
M +2 -0 MarbleWidget.cpp
M +6 -3 MarbleWidgetInputHandler.cpp
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidget.cpp #1052019:1052020
@@ -162,7 +162,9 @@
m_widget->setMinimumSize( 200, 300 );
m_widget->setFocusPolicy( Qt::WheelFocus );
m_widget->setFocus( Qt::OtherFocusReason );
+#if QT_VERSION >= 0x40600
m_widget->setAttribute( Qt::WA_AcceptTouchEvents );
+#endif
// Initialize the map and forward some signals.
m_map->setSize( m_widget->width(), m_widget->height() );
--- trunk/KDE/kdeedu/marble/src/lib/MarbleWidgetInputHandler.cpp #1052019:1052020
@@ -554,9 +554,11 @@
m_widget->zoomViewBy( (int)(wheelevt->delta() / 3) );
m_mouseWheelTimer->start( 400 );
return true;
- } else if ( e->type() == QEvent::TouchBegin ||
- e->type() == QEvent::TouchUpdate ||
- e->type() == QEvent::TouchEnd) {
+ }
+#if QT_VERSION >= 0x40600
+ else if ( e->type() == QEvent::TouchBegin ||
+ e->type() == QEvent::TouchUpdate ||
+ e->type() == QEvent::TouchEnd) {
QList<QTouchEvent::TouchPoint> touchPoints = static_cast<QTouchEvent *>( e )->touchPoints();
if (touchPoints.count() == 2) {
@@ -579,6 +581,7 @@
m_mouseWheelTimer->start( 400 );
}
}
+#endif
else
return false;
}
More information about the Marble-commits
mailing list