diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-13 15:37:05 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-13 15:37:31 (GMT) |
commit | f82a226607b079b360c88afbe0423d990071b0ba (patch) | |
tree | 7e66ef31a0d83d843fe92ccce870c92206a6dbd5 /src/gui | |
parent | 942abf1a3ba60a60207a213dbeb383904f97e47d (diff) | |
download | Qt-f82a226607b079b360c88afbe0423d990071b0ba.zip Qt-f82a226607b079b360c88afbe0423d990071b0ba.tar.gz Qt-f82a226607b079b360c88afbe0423d990071b0ba.tar.bz2 |
Fix coverity warnings
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 1 | ||||
-rw-r--r-- | src/gui/itemviews/qlistview.cpp | 3 | ||||
-rw-r--r-- | src/gui/itemviews/qtreeview.cpp | 9 | ||||
-rw-r--r-- | src/gui/itemviews/qtreeview_p.h | 2 |
4 files changed, 8 insertions, 7 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 769ccef..4f32ecc 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -73,6 +73,7 @@ QAbstractItemViewPrivate::QAbstractItemViewPrivate() currentlyCommittingEditor(0), pressedModifiers(Qt::NoModifier), pressedPosition(QPoint(-1, -1)), + pressedAlreadySelected(false), viewportEnteredNeeded(false), state(QAbstractItemView::NoState), editTriggers(QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed), diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp index 945d5e7..1870a3b 100644 --- a/src/gui/itemviews/qlistview.cpp +++ b/src/gui/itemviews/qlistview.cpp @@ -1968,7 +1968,8 @@ QListViewPrivate::QListViewPrivate() modeProperties(0), column(0), uniformItemSizes(false), - batchSize(100) + batchSize(100), + showElasticBand(false) { } diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index cbe1d2a..539a642 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -2797,15 +2797,14 @@ int QTreeView::indexRowSizeHint(const QModelIndex &index) const if (isRightToLeft()) { start = (start == -1 ? count - 1 : start); - end = (end == -1 ? 0 : end); + end = 0; } else { start = (start == -1 ? 0 : start); - end = (end == -1 ? count - 1 : end); + end = count - 1; } - int tmp = start; - start = qMin(start, end); - end = qMax(tmp, end); + if (end < start) + qSwap(end, start); int height = -1; QStyleOptionViewItemV4 option = d->viewOptionsV4(); diff --git a/src/gui/itemviews/qtreeview_p.h b/src/gui/itemviews/qtreeview_p.h index d17016f..1bbba89 100644 --- a/src/gui/itemviews/qtreeview_p.h +++ b/src/gui/itemviews/qtreeview_p.h @@ -82,7 +82,7 @@ public: uniformRowHeights(false), rootDecoration(true), itemsExpandable(true), sortingEnabled(false), expandsOnDoubleClick(true), - allColumnsShowFocus(false), current(0), + allColumnsShowFocus(false), current(0), spanning(false), animationsEnabled(false), columnResizeTimerID(0), autoExpandDelay(-1), hoverBranch(-1), geometryRecursionBlock(false) {} |