summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2010-11-19 10:48:14 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2010-11-19 10:48:14 (GMT)
commit7b0e00bb59a9bbff2f1114760ab4b0a86460d055 (patch)
treeba13e9fcffad351b7051c126f0682871be9f72bb /src
parent1be70363b77b0a2ff75a23b5973861922f7a85c7 (diff)
parentd2fbb87ab12e9530e162a30df3cb00184af3fe8b (diff)
downloadQt-7b0e00bb59a9bbff2f1114760ab4b0a86460d055.zip
Qt-7b0e00bb59a9bbff2f1114760ab4b0a86460d055.tar.gz
Qt-7b0e00bb59a9bbff2f1114760ab4b0a86460d055.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-water-team into 4.7
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qs60style.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 5eddc98..a58c8e5 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -1438,10 +1438,11 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
const QRect iconRect = subElementRect(SE_ItemViewItemDecoration, &voptAdj, widget);
QRect textRect = subElementRect(SE_ItemViewItemText, &voptAdj, widget);
const QAbstractItemView *itemView = qobject_cast<const QAbstractItemView *>(widget);
- const bool singleSelection =
- (itemView->selectionMode() == QAbstractItemView::SingleSelection ||
- itemView->selectionMode() == QAbstractItemView::NoSelection);
- const bool selectItems = (itemView->selectionBehavior() == QAbstractItemView::SelectItems);
+
+ const bool singleSelection = itemView &&
+ ((itemView->selectionMode() == QAbstractItemView::SingleSelection ||
+ itemView->selectionMode() == QAbstractItemView::NoSelection));
+ const bool selectItems = itemView && (itemView->selectionBehavior() == QAbstractItemView::SelectItems);
// draw themed background for itemview unless background brush has been defined.
if (vopt->backgroundBrush == Qt::NoBrush) {