summaryrefslogtreecommitdiffstats
path: root/src/gui/itemviews
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-08-17 10:01:21 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-08-17 10:52:07 (GMT)
commit213e2c937b667dba7e4996b0857ae5791c6d5fc8 (patch)
treeb8db403c4859966fa7a18fcf413a00cf8e3eecd4 /src/gui/itemviews
parent83940f25dba51a9942ab55ed8475fc7fc8a8da84 (diff)
downloadQt-213e2c937b667dba7e4996b0857ae5791c6d5fc8.zip
Qt-213e2c937b667dba7e4996b0857ae5791c6d5fc8.tar.gz
Qt-213e2c937b667dba7e4996b0857ae5791c6d5fc8.tar.bz2
Fixed coverity warnings
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r--src/gui/itemviews/qlistview.cpp1
-rw-r--r--src/gui/itemviews/qlistview_p.h7
-rw-r--r--src/gui/itemviews/qtreewidget.cpp1
3 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 1870a3b..3ab3204 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -1957,7 +1957,6 @@ bool QListView::event(QEvent *e)
QListViewPrivate::QListViewPrivate()
: QAbstractItemViewPrivate(),
dynamicListView(0),
- staticListView(0),
wrap(false),
space(0),
flow(QListView::TopToBottom),
diff --git a/src/gui/itemviews/qlistview_p.h b/src/gui/itemviews/qlistview_p.h
index 1131059..6c8d324 100644
--- a/src/gui/itemviews/qlistview_p.h
+++ b/src/gui/itemviews/qlistview_p.h
@@ -351,9 +351,10 @@ public:
QItemViewPaintPairs draggablePaintPairs(const QModelIndexList &indexes, QRect *r) const;
- // ### FIXME: we only need one at a time
- QDynamicListViewBase *dynamicListView;
- QStaticListViewBase *staticListView;
+ union {
+ QDynamicListViewBase *dynamicListView;
+ QStaticListViewBase *staticListView;
+ };
// ### FIXME: see if we can move the members into the dynamic/static classes
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp
index 025f83c..1ab69df 100644
--- a/src/gui/itemviews/qtreewidget.cpp
+++ b/src/gui/itemviews/qtreewidget.cpp
@@ -1768,6 +1768,7 @@ QVariant QTreeWidgetItem::data(int column, int role) const
// special case for check state in tristate
if (children.count() && (itemFlags & Qt::ItemIsTristate))
return childrenCheckState(column);
+ // fallthrough intended
default:
if (column >= 0 && column < values.size()) {
const QVector<QWidgetItemData> &column_values = values.at(column);