summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-05-19 00:52:27 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-05-19 00:52:27 (GMT)
commitdf8d432997b834187fee5143936e7d5957f27096 (patch)
tree8176d3cad51604b2d8c516d799bb93f9c221741c /src/gui/kernel/qapplication_s60.cpp
parent6d6b7b318a842ef5037065554f30ebfb4ae34d74 (diff)
parent61a211e45dd01751acb0adcbb3ae5496aa4bf3b9 (diff)
downloadQt-df8d432997b834187fee5143936e7d5957f27096.zip
Qt-df8d432997b834187fee5143936e7d5957f27096.tar.gz
Qt-df8d432997b834187fee5143936e7d5957f27096.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Set edit focus to proper control in flightinfo demo Update symbian def files for 4.7 Do not autopatch <app>_installer.pkg when self-signing Fix pkg_prerules handling for installer packages Fix weatherinfo and flightinfo to only request WLAN connection once Fix 'chapter5_plugins.dll.sym contains initialized writable data' Fix generation of stub sis files Fix SRCDIR and DEPLOYMENT usage in declarative benchmarks Shadow building on Symbian fixes: part 3 - unchanged source tree Shadow building on Symbian fixes: part 2 - populate bin dir correctly Shadow building on Symbian fixes: part 1 - files to right place Re-enable suppression of --export_all_vtbl for static libraries Omit building declarative/painting benchmark if no OpenGL configured Fix requires keyword handling in qmake in Symbian Support device aliases in EPOCDEVICE Update Symbian DEF files for WINSCW and EABI Fix spurious mouse click when dismissing a native menu Add 'runonphone' target for symbian / makefile Double-click support for virtual cursor in Symbian
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index f4c7304..ea5c14c 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -364,6 +364,7 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop)
SetFocusing(true);
m_longTapDetector = QLongTapTimer::NewL(this);
+ m_doubleClickTimer.invalidate();
DrawableWindow()->SetPointerGrab(ETrue);
}
@@ -642,10 +643,13 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
QPoint pos = QCursor::pos();
TPointerEvent fakeEvent;
+ fakeEvent.iType = (TPointerEvent::TType)(-1);
+ fakeEvent.iModifiers = keyEvent.iModifiers;
TInt x = pos.x();
TInt y = pos.y();
if (type == EEventKeyUp) {
- if (keyCode == Qt::Key_Select)
+ if (keyCode == Qt::Key_Select &&
+ (S60->virtualMousePressedKeys & QS60Data::Select))
fakeEvent.iType = TPointerEvent::EButton1Up;
S60->virtualMouseAccel = 1;
S60->virtualMouseLastKey = 0;
@@ -668,6 +672,8 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
}
}
else if (type == EEventKey) {
+ if (keyCode != Qt::Key_Select)
+ m_doubleClickTimer.invalidate();
switch (keyCode) {
case Qt::Key_Left:
S60->virtualMousePressedKeys |= QS60Data::Left;
@@ -694,12 +700,18 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
// example for drag'n'drop), Symbian starts producing spurious up and
// down messages for some keys. Therefore, make sure we have a clean slate
// of pressed keys before starting a new button press.
- if (S60->virtualMousePressedKeys != 0) {
- S60->virtualMousePressedKeys |= QS60Data::Select;
+ if (S60->virtualMousePressedKeys & QS60Data::Select) {
return EKeyWasConsumed;
} else {
S60->virtualMousePressedKeys |= QS60Data::Select;
fakeEvent.iType = TPointerEvent::EButton1Down;
+ if (m_doubleClickTimer.isValid()
+ && !m_doubleClickTimer.hasExpired(QApplication::doubleClickInterval())) {
+ fakeEvent.iModifiers |= EModifierDoubleClick;
+ m_doubleClickTimer.invalidate();
+ } else {
+ m_doubleClickTimer.start();
+ }
}
break;
}
@@ -715,10 +727,10 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
y = S60->screenHeightInPixels - 1;
TPoint epos(x, y);
TPoint cpos = epos - PositionRelativeToScreen();
- fakeEvent.iModifiers = keyEvent.iModifiers;
fakeEvent.iPosition = cpos;
fakeEvent.iParentPosition = epos;
- HandlePointerEvent(fakeEvent);
+ if(fakeEvent.iType != -1)
+ HandlePointerEvent(fakeEvent);
return EKeyWasConsumed;
}
else {