summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-11-19 10:52:06 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-11-19 10:52:06 (GMT)
commitbecc25ad78a89199764a54f45248e4113600f0af (patch)
treed0431605259fdbf023c368de62947264bfdb107e /src/gui
parentd2fbb87ab12e9530e162a30df3cb00184af3fe8b (diff)
downloadQt-becc25ad78a89199764a54f45248e4113600f0af.zip
Qt-becc25ad78a89199764a54f45248e4113600f0af.tar.gz
Qt-becc25ad78a89199764a54f45248e4113600f0af.tar.bz2
QS60Style: Null pointer crash when using itemviews in some cases (pt2)
Also remove accidentally added whitespaces. Task-number: QTBUG-15455 Reviewed-by: TrustMe
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/styles/qs60style.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index a58c8e5..2f09529 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -1438,8 +1438,8 @@ 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 &&
+
+ const bool singleSelection = itemView &&
((itemView->selectionMode() == QAbstractItemView::SingleSelection ||
itemView->selectionMode() == QAbstractItemView::NoSelection));
const bool selectItems = itemView && (itemView->selectionBehavior() == QAbstractItemView::SelectItems);