summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-08-19 10:14:02 (GMT)
committerJanne Anttila <janne.anttila@digia.com>2009-08-19 10:14:02 (GMT)
commit35dcea3f7813c7aa5bdb6e85f6fa827fac741cb7 (patch)
treee9eac2b6fb2ffa25503113b9a3c36333d7ca361a /src/gui/kernel/qapplication_s60.cpp
parenta6a2daf14c3ab6d2ab6cb68e4a3a7809df33ea66 (diff)
downloadQt-35dcea3f7813c7aa5bdb6e85f6fa827fac741cb7.zip
Qt-35dcea3f7813c7aa5bdb6e85f6fa827fac741cb7.tar.gz
Qt-35dcea3f7813c7aa5bdb6e85f6fa827fac741cb7.tar.bz2
Enabled contextmenu event for Symbian.
In Symbian the context menu event is triggered after long press event is detected. This is equivalent to right mouse click on desktop environments.
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 44ac380..00e16af 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -347,7 +347,13 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons
QApplicationPrivate::mouse_buttons = QApplicationPrivate::mouse_buttons | Qt::RightButton;
QMouseEvent mEvent(QEvent::MouseButtonPress, alienWidget->mapFrom(qwidget, widgetPos), globalPos,
Qt::RightButton, QApplicationPrivate::mouse_buttons, Qt::NoModifier);
- sendMouseEvent(alienWidget, &mEvent);
+
+ bool res = sendMouseEvent(alienWidget, &mEvent);
+
+#if !defined(QT_NO_CONTEXTMENU)
+ QContextMenuEvent e2(QContextMenuEvent::Mouse, widgetPos, globalPos, mEvent.modifiers());
+#endif
+
m_previousEventLongTap = true;
}
@@ -444,9 +450,9 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent)
}
}
-void QSymbianControl::sendMouseEvent(QWidget *widget, QMouseEvent *mEvent)
+bool QSymbianControl::sendMouseEvent(QWidget *widget, QMouseEvent *mEvent)
{
- qt_sendSpontaneousEvent(widget, mEvent);
+ return qt_sendSpontaneousEvent(widget, mEvent);
}
TKeyResponse QSymbianControl::OfferKeyEventL(const TKeyEvent& keyEvent, TEventCode type)