diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-30 14:11:03 (GMT) |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-30 14:11:03 (GMT) |
commit | 1ba3cac3c7296320ca914f262f124ae7f2dea841 (patch) | |
tree | 40e9c04835dcfe8adccb4cedfda5e568f3c92677 /src/gui/kernel | |
parent | 708978d1c18cf938a4e0c29a5a90be5de4e82140 (diff) | |
parent | 51582e3d1251766a3ed941530d966e1a591cbed6 (diff) | |
download | Qt-1ba3cac3c7296320ca914f262f124ae7f2dea841.zip Qt-1ba3cac3c7296320ca914f262f124ae7f2dea841.tar.gz Qt-1ba3cac3c7296320ca914f262f124ae7f2dea841.tar.bz2 |
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts:
qmake/generators/win32/msbuild_objectmodel.cpp
qmake/generators/win32/msvc_vcxproj.cpp
tests/auto/qnetworkreply/tst_qnetworkreply.cpp
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_mac.mm | 6 | ||||
-rw-r--r-- | src/gui/kernel/qgesturemanager.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qt_s60_p.h | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 2 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 9 |
6 files changed, 24 insertions, 5 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 5c1f29e..843c973 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1344,6 +1344,11 @@ void QSymbianControl::setFocusSafely(bool focus) } } +bool QSymbianControl::isControlActive() +{ + return IsActivated() ? true : false; +} + /*! \typedef QApplication::QS60MainApplicationFactory \since 4.6 diff --git a/src/gui/kernel/qeventdispatcher_mac.mm b/src/gui/kernel/qeventdispatcher_mac.mm index 89f01d8..515c6d3 100644 --- a/src/gui/kernel/qeventdispatcher_mac.mm +++ b/src/gui/kernel/qeventdispatcher_mac.mm @@ -830,6 +830,7 @@ NSModalSession QEventDispatcherMacPrivate::currentModalSession() [window setLevel:levelBeforeEnterModal]; } currentModalSessionCached = info.session; + cleanupModalSessionsNeeded = false; } return currentModalSessionCached; } @@ -881,6 +882,10 @@ void QEventDispatcherMacPrivate::cleanupModalSessions() for (int i=stackSize-1; i>=0; --i) { QCocoaModalSessionInfo &info = cocoaModalSessionStack[i]; if (info.widget) { + // This session has a widget, and is therefore not marked + // as stopped. So just make it current. There might still be other + // stopped sessions on the stack, but those will be stopped on + // a later "cleanup" call. currentModalSessionCached = info.session; break; } @@ -926,6 +931,7 @@ void QEventDispatcherMacPrivate::endModalSession(QWidget *widget) if (i == stackSize-1) { // The top sessions ended. Interrupt the event dispatcher // to start spinning the correct session immidiatly: + currentModalSessionCached = 0; cleanupModalSessionsNeeded = true; QEventDispatcherMac::instance()->interrupt(); } diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index e768a21..cb4061e 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -595,8 +595,9 @@ void QGestureManager::deliverEvents(const QSet<QGesture *> &gestures, if (gesture->hasHotSpot()) { // guess the target widget using the hotspot of the gesture QPoint pt = gesture->hotSpot().toPoint(); - if (QWidget *w = qApp->topLevelAt(pt)) { - target = w->childAt(w->mapFromGlobal(pt)); + if (QWidget *topLevel = qApp->topLevelAt(pt)) { + QWidget *child = topLevel->childAt(topLevel->mapFromGlobal(pt)); + target = child ? child : topLevel; } } else { // or use the context of the gesture diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h index ad6a99a..eb1aa18 100644 --- a/src/gui/kernel/qt_s60_p.h +++ b/src/gui/kernel/qt_s60_p.h @@ -211,6 +211,8 @@ public: void setFocusSafely(bool focus); + bool isControlActive(); + #ifdef Q_WS_S60 void FadeBehindPopup(bool fade){ popupFader.FadeBehindPopup( this, this, fade); } void HandleStatusPaneSizeChange(); diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 0baecce..9e50d88 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -4853,6 +4853,8 @@ void QWidgetPrivate::resolveLayoutDirection() has been called for the parent do not inherit the parent's layout direction. + This method no longer affects text layout direction since Qt 4.7. + \sa QApplication::layoutDirection */ void QWidget::setLayoutDirection(Qt::LayoutDirection direction) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 222d707..dfb0ca8 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -368,7 +368,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de // Symbian windows are always created in an inactive state // We perform this assignment for the case where the window is being re-created - // as aa result of a call to setParent_sys, on either this widget or one of its + // as a result of a call to setParent_sys, on either this widget or one of its // ancestors. extra->activated = 0; @@ -414,7 +414,7 @@ void QWidgetPrivate::create_sys(WId window, bool /* initializeWindow */, bool de // Symbian windows are always created in an inactive state // We perform this assignment for the case where the window is being re-created - // as aa result of a call to setParent_sys, on either this widget or one of its + // as a result of a call to setParent_sys, on either this widget or one of its // ancestors. extra->activated = 0; @@ -958,7 +958,10 @@ void QWidgetPrivate::registerTouchWindow() Q_Q(QWidget); if (q->testAttribute(Qt::WA_WState_Created) && q->windowType() != Qt::Desktop) { RWindow *rwindow = static_cast<RWindow *>(q->effectiveWinId()->DrawableWindow()); - rwindow->EnableAdvancedPointers(); + QSymbianControl *window = static_cast<QSymbianControl *>(q->effectiveWinId()); + //Enabling advanced pointer events for controls that already have active windows causes a panic. + if (!window->isControlActive()) + rwindow->EnableAdvancedPointers(); } #endif } |