diff options
author | Sami Merila <sami.merila@nokia.com> | 2010-08-27 11:15:05 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2010-08-27 11:15:05 (GMT) |
commit | 287001fcd6d854b58bd61412e8b2c5bbdcb67b05 (patch) | |
tree | d78b4f109c9cce328dc5627de334f96b79331046 /src/gui | |
parent | 9ef61d3d1e53d32dc2568cbfb9f8ff5b19cb4ffc (diff) | |
parent | 8cb399e2c2ba47cdf3b27c7c5cb4d8d35702a068 (diff) | |
download | Qt-287001fcd6d854b58bd61412e8b2c5bbdcb67b05.zip Qt-287001fcd6d854b58bd61412e8b2c5bbdcb67b05.tar.gz Qt-287001fcd6d854b58bd61412e8b2c5bbdcb67b05.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 9 | ||||
-rw-r--r-- | src/gui/gui.pro | 2 | ||||
-rw-r--r-- | src/gui/kernel/qeventdispatcher_mac.mm | 6 | ||||
-rw-r--r-- | src/gui/kernel/qgesturemanager.cpp | 5 | ||||
-rw-r--r-- | src/gui/styles/qgtkstyle.cpp | 5 |
5 files changed, 16 insertions, 11 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 3c23884..4c03d33 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5742,16 +5742,11 @@ void QGraphicsScenePrivate::touchEventHandler(QTouchEvent *sceneTouchEvent) } if (sceneTouchEvent->deviceType() == QTouchEvent::TouchScreen) { - // on touch-screens, combine this touch point with the closest one we find if it - // is a a direct descendent or ancestor ( + // on touch-screens, combine this touch point with the closest one we find int closestTouchPointId = findClosestTouchPointId(touchPoint.scenePos()); QGraphicsItem *closestItem = itemForTouchPointId.value(closestTouchPointId); - if (!item - || (closestItem - && (item->isAncestorOf(closestItem) - || closestItem->isAncestorOf(item)))) { + if (!item || (closestItem && cachedItemsUnderMouse.contains(closestItem))) item = closestItem; - } } if (!item) continue; diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 3943e26..13d2c77 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -99,7 +99,7 @@ neon:*-g++* { contains(QMAKE_MAC_XARCH, no) { DEFINES += QT_NO_MAC_XARCH } else { - win32-g++*|!win32:!*-icc* { + win32-g++*|!win32:!win32-icc*:!macx-icc* { mmx { mmx_compiler.commands = $$QMAKE_CXX -c -Winline 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/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp index c989bd3..c5429dd 100644 --- a/src/gui/styles/qgtkstyle.cpp +++ b/src/gui/styles/qgtkstyle.cpp @@ -836,7 +836,10 @@ void QGtkStyle::drawPrimitive(PrimitiveElement element, case PE_PanelItemViewItem: if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) { - if (vopt->backgroundBrush.style() != Qt::NoBrush) { + uint resolve_mask = vopt->palette.resolve(); + if (vopt->backgroundBrush.style() != Qt::NoBrush + || (resolve_mask & (1 << QPalette::Base))) + { QPointF oldBO = painter->brushOrigin(); painter->setBrushOrigin(vopt->rect.topLeft()); painter->fillRect(vopt->rect, vopt->backgroundBrush); |