summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-08-26 21:37:46 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-08-26 21:37:46 (GMT)
commita5ac66200f77fd09d4c4ee5af3a9380efce871ad (patch)
tree46429b3c1c7835d120e4653f863e57079c3fc47e /src/gui
parentef4c65fc364a0262389c0497092a0fa5e1f7d4c3 (diff)
parentfe8e118c41c6243ace972647934c90b7f937f60e (diff)
downloadQt-a5ac66200f77fd09d4c4ee5af3a9380efce871ad.zip
Qt-a5ac66200f77fd09d4c4ee5af3a9380efce871ad.tar.gz
Qt-a5ac66200f77fd09d4c4ee5af3a9380efce871ad.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (61 commits) Autotest: don't use Q_FUNC_INFO for testing which method got called fix generated makefile dependencies Cocoa: Demo browser can get stuck after closing modal dialog Restore default if to system default on session close. tst_qmake doesn't need QtGui Use the full path to qmake in the qmake unit test qdoc: Fixed erroneous links to QML basic types. Fixed item view background color in Gtk style scope fixes and clutter reduction for sql driver projects I don't know why some linkers can't call this function, so comment it out. QNetworkSession::close() method now send closed() signal while faking disconnection. Add the missing license headers to the QString benchmark data Fix building of qsimd.cpp on Windows CE Use QElapsedTimer for the benchlib tests. Properly implement the CPU feature disabling in qsimd.cpp. Report the detected CPU features in the corelib boilerplate Detect CPU features on ARM by reading the ELF auxvec. Split the CPU-detection code into multiple functions for readability Fixed delivering gestures to a toplevel widget. Unroll the SSSE3 code even more to avoid the need to keep an extra variable for inverting the result ...
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp9
-rw-r--r--src/gui/gui.pro2
-rw-r--r--src/gui/kernel/qeventdispatcher_mac.mm6
-rw-r--r--src/gui/kernel/qgesturemanager.cpp5
-rw-r--r--src/gui/styles/qgtkstyle.cpp5
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);