summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qapplication_s60.cpp
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-09-29 10:56:05 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-09-29 10:56:05 (GMT)
commit17c17adbd706d32723ecedeb207c7e467f9fa8eb (patch)
tree22d6d314dc7320d0b728578a734d636a1d74d9ae /src/gui/kernel/qapplication_s60.cpp
parent1ff83d2b44fe07d1bc6b243fad270dfa7d860dc7 (diff)
parentdcd185e58face87105f484e98ecb195af0790a22 (diff)
downloadQt-17c17adbd706d32723ecedeb207c7e467f9fa8eb.zip
Qt-17c17adbd706d32723ecedeb207c7e467f9fa8eb.tar.gz
Qt-17c17adbd706d32723ecedeb207c7e467f9fa8eb.tar.bz2
Merge commit 'qt/4.6' into mmfphonon
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r--src/gui/kernel/qapplication_s60.cpp35
1 files changed, 23 insertions, 12 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 2996bf3..71d0cd1 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -493,7 +493,7 @@ void QSymbianControl::HandlePointerEvent(const TPointerEvent& pEvent)
alienWidget = qwidget;
S60->mousePressTarget = alienWidget;
}
-
+
alienWidget = S60->mousePressTarget;
if (alienWidget != S60->lastPointerEventTarget)
@@ -613,7 +613,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
if (keyCode >= Qt::Key_Left && keyCode <= Qt::Key_Down || keyCode == Qt::Key_Select) {
/*Explanation about virtualMouseAccel:
Tapping an arrow key allows precise pixel positioning
- Holding an arrow key down, acceleration is applied to allow cursor
+ Holding an arrow key down, acceleration is applied to allow cursor
to be quickly moved to another part of the screen by key repeats.
*/
if (S60->virtualMouseLastKey == keyCode) {
@@ -681,7 +681,7 @@ TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCod
}
}
#endif
-
+
Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers);
QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode,
mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods),
@@ -1008,13 +1008,13 @@ void qt_init(QApplicationPrivate * /* priv */, int)
S60->hasTouchscreen = true;
S60->virtualMouseRequired = false;
}
-
+
if (touch) {
QApplicationPrivate::navigationMode = Qt::NavigationModeNone;
} else {
QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional;
}
-
+
#ifndef QT_NO_CURSOR
//Check if window server pointer cursors are supported or not
#ifndef Q_SYMBIAN_FIXED_POINTER_CURSORS
@@ -1078,7 +1078,7 @@ void qt_cleanup()
// it dies.
delete QApplicationPrivate::inputContext;
QApplicationPrivate::inputContext = 0;
-
+
//Change mouse pointer back
S60->wsSession().SetPointerCursorMode(EPointerCursorNone);
@@ -1320,6 +1320,7 @@ void QApplication::beep()
/*!
\warning This function is only available on Symbian.
+ \since 4.6
This function processes an individual Symbian window server
\a event. It returns 1 if the event was handled, 0 if
@@ -1398,7 +1399,8 @@ int QApplication::s60ProcessEvent(TWsEvent *event)
} else if ((visChangedEvent->iFlags & TWsVisibilityChangedEvent::EPartiallyVisible)
&& !w->d_func()->maybeBackingStore()) {
w->d_func()->topData()->backingStore = new QWidgetBackingStore(w);
- w->update();
+ w->d_func()->invalidateBuffer(w->rect());
+ w->repaint();
}
return 1;
}
@@ -1441,6 +1443,7 @@ int QApplication::s60ProcessEvent(TWsEvent *event)
/*!
\warning This virtual function is only available on Symbian.
+ \since 4.6
If you create an application that inherits QApplication and reimplement
this function, you get direct access to events that the are received
@@ -1458,6 +1461,7 @@ bool QApplication::s60EventFilter(TWsEvent * /* aEvent */)
/*!
\warning This function is only available on Symbian.
+ \since 4.6
Handles \a{command}s which are typically handled by
CAknAppUi::HandleCommandL(). Qts Ui integration into Symbian is
@@ -1469,11 +1473,17 @@ bool QApplication::s60EventFilter(TWsEvent * /* aEvent */)
void QApplication::symbianHandleCommand(int command)
{
switch (command) {
- case EEikCmdExit:
#ifdef Q_WS_S60
- case EAknSoftkeyExit:
+ case EAknSoftkeyExit: {
+ QCloseEvent ev;
+ QApplication::sendSpontaneousEvent(this, &ev);
+ if (ev.isAccepted())
+ quit();
+ break;
+ }
#endif
- exit();
+ case EEikCmdExit:
+ quit();
break;
default:
bool handled = QSoftKeyManager::handleCommand(command);
@@ -1489,6 +1499,7 @@ void QApplication::symbianHandleCommand(int command)
/*!
\warning This function is only available on Symbian.
+ \since 4.6
Handles the resource change specified by \a type.
@@ -1614,7 +1625,7 @@ void QApplicationPrivate::setNavigationMode(Qt::NavigationMode mode)
const bool isCursorOn = (mode == Qt::NavigationModeCursorAuto
&& !S60->hasTouchscreen)
|| mode == Qt::NavigationModeCursorForceVisible;
-
+
if (!wasCursorOn && isCursorOn) {
//Show the cursor, when changing from another mode to cursor mode
qt_symbian_set_cursor_visible(true);
@@ -1644,7 +1655,7 @@ void QApplication::restoreOverrideCursor()
if (qApp->d_func()->cursor_list.isEmpty())
return;
qApp->d_func()->cursor_list.removeFirst();
-
+
if (!qApp->d_func()->cursor_list.isEmpty()) {
qt_symbian_setGlobalCursor(qApp->d_func()->cursor_list.first());
}