summaryrefslogtreecommitdiffstats
path: root/src/gui/styles/qstylesheetstyle.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-01-12 09:42:00 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-01-12 09:42:00 (GMT)
commit10a0134c5a3b40d3fc5e6d43a753eca62c008166 (patch)
treed4c191e9e25505c2b083bc0eefc3f571f9d4f9c5 /src/gui/styles/qstylesheetstyle.cpp
parentbf71ab63e805e49e59fbe25265104a414ab7d039 (diff)
parent2efba0002d26b584c771aa9260e6d699e5ff8da3 (diff)
downloadQt-10a0134c5a3b40d3fc5e6d43a753eca62c008166.zip
Qt-10a0134c5a3b40d3fc5e6d43a753eca62c008166.tar.gz
Qt-10a0134c5a3b40d3fc5e6d43a753eca62c008166.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (73 commits) doc: update snippets for QtScript function expressions Prevent a crash when creating an inputContext from the QApplication dtor. QNAM HTTP Code: Cache socket state inside ensureConnection() tst_qhttpnetworkconnection: Test also HEAD in some tests tst_qhttpnetworkconnection: Relax condition in getMultipleWithPriorities QNAM HTTP Code: When starting new request, prefer connected sockets. typo fix Added the 'framecapture' WebKit example to the default build. Fix code example fix typo in qreadwritelock's documentation QNAM HTTP: Don't call d_func() so often QNAM HTTP: Fix readBuffer maximum size. QNAM HTTP: Optimize eatWhitespace() QNAM HTTP: Check if socket already tries to connect. network internals: fix build on S60 [syncqt] Make -separate-module work with WebKit's directory structure doc: Corrected explanation of when append() does nothing. doc: Added clarification about allocating space for the 0 terminator. Add a way to access the normalised URL in QUrl. [syncqt] Make it possible to synchronize headers for a separate module ...
Diffstat (limited to 'src/gui/styles/qstylesheetstyle.cpp')
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 8b40931..498313b 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
@@ -5611,9 +5611,6 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
case SE_ItemViewItemFocusRect:
if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) {
QRenderRule subRule = renderRule(w, opt, PseudoElement_ViewItem);
- QStyleOptionViewItemV4 optCopy(*vopt);
- optCopy.rect = subRule.contentsRect(vopt->rect);
- QRect rect = ParentStyle::subElementRect(se, &optCopy, w);
PseudoElement pe = PseudoElement_None;
if (se == SE_ItemViewItemText || se == SE_ItemViewItemFocusRect)
pe = PseudoElement_ViewItemText;
@@ -5623,8 +5620,13 @@ QRect QStyleSheetStyle::subElementRect(SubElement se, const QStyleOption *opt, c
pe = PseudoElement_ViewItemIndicator;
else
break;
- QRenderRule subRule2 = renderRule(w, opt, pe);
- return positionRect(w, subRule2, pe, rect, opt->direction);
+ if (subRule.hasGeometry() || subRule.hasBox() || !subRule.hasNativeBorder() || hasStyleRule(w, pe)) {
+ QRenderRule subRule2 = renderRule(w, opt, pe);
+ QStyleOptionViewItemV4 optCopy(*vopt);
+ optCopy.rect = subRule.contentsRect(vopt->rect);
+ QRect rect = ParentStyle::subElementRect(se, &optCopy, w);
+ return positionRect(w, subRule2, pe, rect, opt->direction);
+ }
}
break;
#endif // QT_NO_ITEMVIEWS