OpenCoverage

qabstractitemmodel.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/itemmodels/qabstractitemmodel.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5QPersistentModelIndexData *QPersistentModelIndexData::create(const QModelIndex &index)-
6{-
7 ((!(index.isValid())) ? qt_assert("index.isValid()",__FILE__,57) : qt_noop());-
8 QPersistentModelIndexData *d = 0;-
9 QAbstractItemModel *model = const_cast<QAbstractItemModel *>(index.model());-
10 QHash<QModelIndex, QPersistentModelIndexData *> &indexes = model->d_func()->persistent.indexes;-
11 const auto it = indexes.constFind(index);-
12 if (it != indexes.cend()
it != indexes.cend()Description
TRUEevaluated 77648 times by 34 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • ...
FALSEevaluated 26745 times by 41 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
) {
26745-77648
13 d = (*it);-
14 }
executed 77648 times by 34 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • ...
else {
77648
15 d = new QPersistentModelIndexData(index);-
16 indexes.insert(index, d);-
17 }
executed 26745 times by 41 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
26745
18 ((!(d)) ? qt_assert("d",__FILE__,68) : qt_noop());-
19 return
executed 104393 times by 41 tests: return d;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
d;
executed 104393 times by 41 tests: return d;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
104393
20}-
21-
22void QPersistentModelIndexData::destroy(QPersistentModelIndexData *data)-
23{-
24 ((!(data)) ? qt_assert("data",__FILE__,74) : qt_noop());-
25 ((!(data->ref.load() == 0)) ? qt_assert("data->ref.load() == 0",__FILE__,75) : qt_noop());-
26 QAbstractItemModel *model = const_cast<QAbstractItemModel *>(data->model);-
27-
28 if (model
modelDescription
TRUEevaluated 21136 times by 38 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
FALSEevaluated 5595 times by 39 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QPrinter
  • ...
) {
5595-21136
29 QAbstractItemModelPrivate *p = model->d_func();-
30 ((!(p)) ? qt_assert("p",__FILE__,80) : qt_noop());-
31 p->removePersistentIndexData(data);-
32 }
executed 21136 times by 38 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
21136
33 delete data;-
34}
executed 26731 times by 43 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
26731
35QPersistentModelIndex::QPersistentModelIndex()-
36 : d(0)-
37{-
38}
executed 38001 times by 49 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLayout
  • ...
38001
39QPersistentModelIndex::QPersistentModelIndex(const QPersistentModelIndex &other)-
40 : d(other.d)-
41{-
42 if (d
dDescription
TRUEevaluated 94049 times by 34 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • ...
FALSEevaluated 1776 times by 36 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QMetaType
  • ...
) d->ref.ref();
executed 94049 times by 34 tests: d->ref.ref();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • ...
1776-94049
43}
executed 95825 times by 37 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QMetaType
  • ...
95825
44-
45-
46-
47-
48-
49QPersistentModelIndex::QPersistentModelIndex(const QModelIndex &index)-
50 : d(0)-
51{-
52 if (index.isValid()
index.isValid()Description
TRUEevaluated 96651 times by 41 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
FALSEevaluated 615 times by 23 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItem
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QVariant
) {
615-96651
53 d = QPersistentModelIndexData::create(index);-
54 d->ref.ref();-
55 }
executed 96651 times by 41 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
96651
56}
executed 97266 times by 43 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
97266
57-
58-
59-
60-
61-
62-
63-
64QPersistentModelIndex::~QPersistentModelIndex()-
65{-
66 if (d
dDescription
TRUEevaluated 193749 times by 43 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
FALSEevaluated 35186 times by 52 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLayout
  • ...
&& !d->ref.deref()
!d->ref.deref()Description
TRUEevaluated 18743 times by 43 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
FALSEevaluated 175006 times by 36 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • ...
) {
18743-193749
67 QPersistentModelIndexData::destroy(d);-
68 d = 0;-
69 }
executed 18743 times by 43 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
18743
70}
executed 228935 times by 53 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLayout
  • ...
228935
71bool QPersistentModelIndex::operator==(const QPersistentModelIndex &other) const-
72{-
73 if (d
dDescription
TRUEevaluated 40738 times by 27 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • ...
FALSEevaluated 708 times by 15 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMetaType
  • tst_QSqlQueryModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
&& other.d
other.dDescription
TRUEevaluated 39163 times by 27 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • ...
FALSEevaluated 1575 times by 6 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QListView
  • tst_QTreeView
  • tst_QTreeWidget
)
708-40738
74 return
executed 39163 times by 27 tests: return d->index == other.d->index;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • ...
d->index == other.d->index;
executed 39163 times by 27 tests: return d->index == other.d->index;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • ...
39163
75 return
executed 2283 times by 15 tests: return d == other.d;
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMetaType
  • tst_QSqlQueryModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
d == other.d;
executed 2283 times by 15 tests: return d == other.d;
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMetaType
  • tst_QSqlQueryModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
2283
76}-
77bool QPersistentModelIndex::operator<(const QPersistentModelIndex &other) const-
78{-
79 if (d
dDescription
TRUEevaluated 1934 times by 8 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeWidget
FALSEnever evaluated
&& other.d
other.dDescription
TRUEevaluated 1934 times by 8 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeWidget
FALSEnever evaluated
)
0-1934
80 return
executed 1934 times by 8 tests: return d->index < other.d->index;
Executed by:
  • tst_QAbstractItemView
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeWidget
d->index < other.d->index;
executed 1934 times by 8 tests: return d->index < other.d->index;
Executed by:
  • tst_QAbstractItemView
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeWidget
1934
81-
82 return
never executed: return d < other.d;
d < other.d;
never executed: return d < other.d;
0
83}-
84QPersistentModelIndex &QPersistentModelIndex::operator=(const QPersistentModelIndex &other)-
85{-
86 if (d == other.d
d == other.dDescription
TRUEevaluated 152 times by 10 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemView
  • tst_QListView
  • tst_QSidebar
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 14678 times by 21 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
)
152-14678
87 return
executed 152 times by 10 tests: return *this;
Executed by:
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemView
  • tst_QListView
  • tst_QSidebar
  • tst_QTreeView
  • tst_QTreeWidget
*this;
executed 152 times by 10 tests: return *this;
Executed by:
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemView
  • tst_QListView
  • tst_QSidebar
  • tst_QTreeView
  • tst_QTreeWidget
152
88 if (d
dDescription
TRUEevaluated 14386 times by 15 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 292 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
&& !d->ref.deref()
!d->ref.deref()Description
TRUEevaluated 5918 times by 8 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QItemView
  • tst_QListView
  • tst_QTableWidget
  • tst_QTreeView
FALSEevaluated 8468 times by 15 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
)
292-14386
89 QPersistentModelIndexData::destroy(d);
executed 5918 times by 8 tests: QPersistentModelIndexData::destroy(d);
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QItemView
  • tst_QListView
  • tst_QTableWidget
  • tst_QTreeView
5918
90 d = other.d;-
91 if (d
dDescription
TRUEevaluated 14655 times by 21 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 23 times by 5 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QListView
  • tst_QTreeView
  • tst_QTreeWidget
) d->ref.ref();
executed 14655 times by 21 tests: d->ref.ref();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
23-14655
92 return
executed 14678 times by 21 tests: return *this;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
*this;
executed 14678 times by 21 tests: return *this;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
14678
93}-
94QPersistentModelIndex &QPersistentModelIndex::operator=(const QModelIndex &other)-
95{-
96 if (d
dDescription
TRUEevaluated 4936 times by 29 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
FALSEevaluated 22858 times by 44 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
&& !d->ref.deref()
!d->ref.deref()Description
TRUEevaluated 2070 times by 27 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • ...
FALSEevaluated 2866 times by 24 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
)
2070-22858
97 QPersistentModelIndexData::destroy(d);
executed 2070 times by 27 tests: QPersistentModelIndexData::destroy(d);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • ...
2070
98 if (other.isValid()
other.isValid()Description
TRUEevaluated 7742 times by 32 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
FALSEevaluated 20052 times by 43 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • ...
) {
7742-20052
99 d = QPersistentModelIndexData::create(other);-
100 if (d
dDescription
TRUEevaluated 7742 times by 32 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
FALSEnever evaluated
) d->ref.ref();
executed 7742 times by 32 tests: d->ref.ref();
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
0-7742
101 }
executed 7742 times by 32 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
else {
7742
102 d = 0;-
103 }
executed 20052 times by 43 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • ...
20052
104 return
executed 27794 times by 44 tests: return *this;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
*this;
executed 27794 times by 44 tests: return *this;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
27794
105}-
106-
107-
108-
109-
110-
111-
112-
113QPersistentModelIndex::operator const QModelIndex&() const-
114{-
115 static const QModelIndex invalid;-
116 if (d
dDescription
TRUEevaluated 114022 times by 40 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
FALSEevaluated 530197 times by 48 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLayout
  • tst_QLineEdit
  • ...
)
114022-530197
117 return
executed 114022 times by 40 tests: return d->index;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
d->index;
executed 114022 times by 40 tests: return d->index;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • ...
114022
118 return
executed 530197 times by 48 tests: return invalid;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLayout
  • tst_QLineEdit
  • ...
invalid;
executed 530197 times by 48 tests: return invalid;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLayout
  • tst_QLineEdit
  • ...
530197
119}-
120bool QPersistentModelIndex::operator==(const QModelIndex &other) const-
121{-
122 if (d
dDescription
TRUEevaluated 809 times by 9 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QColumnView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QTreeView
FALSEevaluated 1850 times by 22 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLayout
  • tst_QPrinter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QWidgetAction
  • tst_QWizard
  • tst_languageChange
  • tst_qapplication - unknown status
)
809-1850
123 return
executed 809 times by 9 tests: return d->index == other;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QColumnView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QTreeView
d->index == other;
executed 809 times by 9 tests: return d->index == other;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QColumnView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QTreeView
809
124 return
executed 1850 times by 22 tests: return !other.isValid();
Executed by:
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLayout
  • tst_QPrinter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QWidgetAction
  • tst_QWizard
  • tst_languageChange
  • tst_qapplication - unknown status
!other.isValid();
executed 1850 times by 22 tests: return !other.isValid();
Executed by:
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QLayout
  • tst_QPrinter
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QWidgetAction
  • tst_QWizard
  • tst_languageChange
  • tst_qapplication - unknown status
1850
125}-
126bool QPersistentModelIndex::operator!=(const QModelIndex &other) const-
127{-
128 if (d
dDescription
TRUEevaluated 189 times by 3 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QItemView
  • tst_QTableView
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemView
)
2-189
129 return
executed 189 times by 3 tests: return d->index != other;
Executed by:
  • tst_QAbstractItemView
  • tst_QItemView
  • tst_QTableView
d->index != other;
executed 189 times by 3 tests: return d->index != other;
Executed by:
  • tst_QAbstractItemView
  • tst_QItemView
  • tst_QTableView
189
130 return
executed 2 times by 1 test: return other.isValid();
Executed by:
  • tst_QAbstractItemView
other.isValid();
executed 2 times by 1 test: return other.isValid();
Executed by:
  • tst_QAbstractItemView
2
131}-
132-
133-
134-
135-
136-
137-
138-
139int QPersistentModelIndex::row() const-
140{-
141 if (d
dDescription
TRUEevaluated 257311 times by 39 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
FALSEevaluated 3978 times by 36 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QPrinter
  • ...
)
3978-257311
142 return
executed 257311 times by 39 tests: return d->index.row();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
d->index.row();
executed 257311 times by 39 tests: return d->index.row();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
257311
143 return
executed 3978 times by 36 tests: return -1;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QPrinter
  • ...
-1;
executed 3978 times by 36 tests: return -1;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QPrinter
  • ...
3978
144}-
145-
146-
147-
148-
149-
150-
151-
152int QPersistentModelIndex::column() const-
153{-
154 if (d
dDescription
TRUEevaluated 193402 times by 34 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • ...
FALSEevaluated 1944 times by 28 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • ...
)
1944-193402
155 return
executed 193402 times by 34 tests: return d->index.column();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • ...
d->index.column();
executed 193402 times by 34 tests: return d->index.column();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • ...
193402
156 return
executed 1944 times by 28 tests: return -1;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • ...
-1;
executed 1944 times by 28 tests: return -1;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • ...
1944
157}-
158void *QPersistentModelIndex::internalPointer() const-
159{-
160 if (d
dDescription
TRUEevaluated 108 times by 2 tests
Evaluated by:
  • tst_QListWidget
  • tst_QTreeWidget
FALSEnever evaluated
)
0-108
161 return
executed 108 times by 2 tests: return d->index.internalPointer();
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
d->index.internalPointer();
executed 108 times by 2 tests: return d->index.internalPointer();
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
108
162 return
never executed: return 0;
0;
never executed: return 0;
0
163}-
164quintptr QPersistentModelIndex::internalId() const-
165{-
166 if (d
dDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEnever evaluated
)
0-4
167 return
executed 4 times by 1 test: return d->index.internalId();
Executed by:
  • tst_QAbstractItemModel
d->index.internalId();
executed 4 times by 1 test: return d->index.internalId();
Executed by:
  • tst_QAbstractItemModel
4
168 return
never executed: return 0;
0;
never executed: return 0;
0
169}-
170-
171-
172-
173-
174-
175-
176-
177QModelIndex QPersistentModelIndex::parent() const-
178{-
179 if (d
dDescription
TRUEevaluated 196283 times by 30 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • ...
FALSEevaluated 3363 times by 12 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
)
3363-196283
180 return
executed 196283 times by 30 tests: return d->index.parent();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • ...
d->index.parent();
executed 196283 times by 30 tests: return d->index.parent();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • ...
196283
181 return
executed 3363 times by 12 tests: return QModelIndex();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
QModelIndex();
executed 3363 times by 12 tests: return QModelIndex();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
3363
182}-
183QModelIndex QPersistentModelIndex::sibling(int row, int column) const-
184{-
185 if (d
dDescription
TRUEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QItemSelectionModel
FALSEnever evaluated
)
0-13
186 return
executed 13 times by 2 tests: return d->index.sibling(row, column);
Executed by:
  • tst_QAbstractItemView
  • tst_QItemSelectionModel
d->index.sibling(row, column);
executed 13 times by 2 tests: return d->index.sibling(row, column);
Executed by:
  • tst_QAbstractItemView
  • tst_QItemSelectionModel
13
187 return
never executed: return QModelIndex();
QModelIndex();
never executed: return QModelIndex();
0
188}-
189QModelIndex QPersistentModelIndex::child(int row, int column) const-
190{-
191 if (d
dDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
192 return
never executed: return d->index.child(row, column);
d->index.child(row, column);
never executed: return d->index.child(row, column);
0
193 return
never executed: return QModelIndex();
QModelIndex();
never executed: return QModelIndex();
0
194}-
195-
196-
197-
198-
199-
200-
201-
202QVariant QPersistentModelIndex::data(int role) const-
203{-
204 if (d
dDescription
TRUEevaluated 232 times by 6 tests
Evaluated by:
  • tst_QComboBox
  • tst_QDataWidgetMapper
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QPrinter
  • tst_QTableWidget
FALSEnever evaluated
)
0-232
205 return
executed 232 times by 6 tests: return d->index.data(role);
Executed by:
  • tst_QComboBox
  • tst_QDataWidgetMapper
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QPrinter
  • tst_QTableWidget
d->index.data(role);
executed 232 times by 6 tests: return d->index.data(role);
Executed by:
  • tst_QComboBox
  • tst_QDataWidgetMapper
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QPrinter
  • tst_QTableWidget
232
206 return
never executed: return QVariant();
QVariant();
never executed: return QVariant();
0
207}-
208-
209-
210-
211-
212-
213-
214Qt::ItemFlags QPersistentModelIndex::flags() const-
215{-
216 if (d
dDescription
TRUEevaluated 841 times by 3 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QTreeView
  • tst_QTreeWidget
FALSEnever evaluated
)
0-841
217 return
executed 841 times by 3 tests: return d->index.flags();
Executed by:
  • tst_QAccessibility
  • tst_QTreeView
  • tst_QTreeWidget
d->index.flags();
executed 841 times by 3 tests: return d->index.flags();
Executed by:
  • tst_QAccessibility
  • tst_QTreeView
  • tst_QTreeWidget
841
218 return
never executed: return 0;
0;
never executed: return 0;
0
219}-
220-
221-
222-
223-
224const QAbstractItemModel *QPersistentModelIndex::model() const-
225{-
226 if (d
dDescription
TRUEevaluated 32910 times by 23 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
FALSEnever evaluated
)
0-32910
227 return
executed 32910 times by 23 tests: return d->index.model();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
d->index.model();
executed 32910 times by 23 tests: return d->index.model();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QItemDelegate
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
32910
228 return
never executed: return 0;
0;
never executed: return 0;
0
229}-
230bool QPersistentModelIndex::isValid() const-
231{-
232 return
executed 140803 times by 42 tests: return d && d->index.isValid();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
d && d->index.isValid();
executed 140803 times by 42 tests: return d && d->index.isValid();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
140803
233}-
234-
235-
236QDebug operator<<(QDebug dbg, const QModelIndex &idx)-
237{-
238 QDebugStateSaver saver(dbg);-
239 dbg.nospace() << "QModelIndex(" << idx.row() << ',' << idx.column()-
240 << ',' << idx.internalPointer() << ',' << idx.model() << ')';-
241 return
executed 15 times by 3 tests: return dbg;
Executed by:
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QVariant
dbg;
executed 15 times by 3 tests: return dbg;
Executed by:
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QVariant
15
242}-
243-
244QDebug operator<<(QDebug dbg, const QPersistentModelIndex &idx)-
245{-
246 if (idx.d
idx.dDescription
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QVariant
)
0-1
247 dbg << idx.d->index;
never executed: dbg << idx.d->index;
0
248 else-
249 dbg << QModelIndex();
executed 1 time by 1 test: dbg << QModelIndex();
Executed by:
  • tst_QVariant
1
250 return
executed 1 time by 1 test: return dbg;
Executed by:
  • tst_QVariant
dbg;
executed 1 time by 1 test: return dbg;
Executed by:
  • tst_QVariant
1
251}-
252-
253-
254class QEmptyItemModel : public QAbstractItemModel-
255{-
256public:-
257 explicit QEmptyItemModel(QObject *parent = 0) : QAbstractItemModel(parent) {}
executed 45 times by 45 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • ...
45
258 QModelIndex index(int, int, const QModelIndex &) const override { return
executed 56 times by 5 tests: return QModelIndex();
Executed by:
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QItemView
  • tst_QListView
  • tst_QTreeView
QModelIndex();
executed 56 times by 5 tests: return QModelIndex();
Executed by:
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QItemView
  • tst_QListView
  • tst_QTreeView
}
56
259 QModelIndex parent(const QModelIndex &) const override { return
never executed: return QModelIndex();
QModelIndex();
never executed: return QModelIndex();
}
0
260 int rowCount(const QModelIndex &) const override { return
executed 1475 times by 23 tests: return 0;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QWidget
  • tst_languageChange
0;
executed 1475 times by 23 tests: return 0;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QWidget
  • tst_languageChange
}
1475
261 int columnCount(const QModelIndex &) const override { return
executed 2492 times by 32 tests: return 0;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSplitter
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
0;
executed 2492 times by 32 tests: return 0;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSplitter
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
}
2492
262 bool hasChildren(const QModelIndex &) const override { return
executed 242 times by 8 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QSplitter
  • tst_QStyleSheetStyle
  • tst_QTreeView
false;
executed 242 times by 8 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QSplitter
  • tst_QStyleSheetStyle
  • tst_QTreeView
}
242
263 QVariant data(const QModelIndex &, int) const override { return
executed 1030 times by 2 tests: return QVariant();
Executed by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
QVariant();
executed 1030 times by 2 tests: return QVariant();
Executed by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
}
1030
264};-
265-
266namespace { namespace Q_QGS_qEmptyModel { typedef QEmptyItemModel Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 46 times by 46 tests
Evaluated by:
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qaccessibility - unknown status
  • tst_qapplication - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdirmodel - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qfilesystemmodel - unknown status
  • tst_qfontcombobox - unknown status
  • tst_qfontdialog - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qheaderview - unknown status
  • tst_qidentityproxymodel - unknown status
  • tst_qinputdialog - unknown status
  • tst_qitemdelegate - unknown status
  • tst_qitemmodel - unknown status
  • ...
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 46 times by 46 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qaccessibility - unknown status
  • tst_qapplication - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdirmodel - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qfilesystemmodel - unknown status
  • tst_qfontcombobox - unknown status
  • tst_qfontdialog - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qheaderview - unknown status
  • tst_qidentityproxymodel - unknown status
  • tst_qinputdialog - unknown status
  • tst_qitemdelegate - unknown status
  • tst_qitemmodel - unknown status
  • ...
}
executed 46 times by 46 tests: end of block
Executed by:
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qaccessibility - unknown status
  • tst_qapplication - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdirmodel - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qfilesystemmodel - unknown status
  • tst_qfontcombobox - unknown status
  • tst_qfontdialog - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qheaderview - unknown status
  • tst_qidentityproxymodel - unknown status
  • tst_qinputdialog - unknown status
  • tst_qitemdelegate - unknown status
  • tst_qitemmodel - unknown status
  • ...
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 212275 times by 49 tests: return &holder.value;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • ...
&holder.value;
executed 212275 times by 49 tests: return &holder.value;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • ...
} } } static QGlobalStatic<QEmptyItemModel, Q_QGS_qEmptyModel::innerFunction, Q_QGS_qEmptyModel::guard> qEmptyModel;
0-212275
267-
268-
269QAbstractItemModelPrivate::QAbstractItemModelPrivate()-
270 : QObjectPrivate(),-
271 supportedDragActions(-1),-
272 roleNames(defaultRoleNames())-
273{-
274}
executed 5394 times by 54 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • ...
5394
275-
276QAbstractItemModelPrivate::~QAbstractItemModelPrivate()-
277{-
278}-
279-
280QAbstractItemModel *QAbstractItemModelPrivate::staticEmptyModel()-
281{-
282 return
executed 212275 times by 49 tests: return qEmptyModel();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • ...
qEmptyModel();
executed 212275 times by 49 tests: return qEmptyModel();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • ...
212275
283}-
284-
285void QAbstractItemModelPrivate::invalidatePersistentIndexes()-
286{-
287 for (QPersistentModelIndexData *data : qAsConst(persistent.indexes)) {-
288 data->index = QModelIndex();-
289 data->model = 0;-
290 }
executed 4404 times by 38 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QPrinter
  • ...
4404
291 persistent.indexes.clear();-
292}
executed 14712 times by 98 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • ...
14712
293-
294-
295-
296-
297-
298-
299void QAbstractItemModelPrivate::invalidatePersistentIndex(const QModelIndex &index) {-
300 const auto it = persistent.indexes.constFind(index);-
301 if (it != persistent.indexes.cend()
it != persiste...indexes.cend()Description
TRUEevaluated 1130 times by 11 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_languageChange
FALSEevaluated 3496222 times by 37 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QPrinter
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
) {
1130-3496222
302 QPersistentModelIndexData *data = *it;-
303 persistent.indexes.erase(it);-
304 data->index = QModelIndex();-
305 data->model = 0;-
306 }
executed 1130 times by 11 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_languageChange
1130
307}
executed 3497352 times by 37 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QPrinter
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
3497352
308-
309namespace {-
310 struct DefaultRoleNames : public QHash<int, QByteArray>-
311 {-
312 DefaultRoleNames() {-
313 (*this)[Qt::DisplayRole] = "display";-
314 (*this)[Qt::DecorationRole] = "decoration";-
315 (*this)[Qt::EditRole] = "edit";-
316 (*this)[Qt::ToolTipRole] = "toolTip";-
317 (*this)[Qt::StatusTipRole] = "statusTip";-
318 (*this)[Qt::WhatsThisRole] = "whatsThis";-
319 }
executed 52 times by 52 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLayout
  • ...
52
320 };-
321}-
322-
323namespace { namespace Q_QGS_qDefaultRoleNames { typedef DefaultRoleNames Type; QBasicAtomicInt guard = { QtGlobalStatic::Uninitialized }; __attribute__((visibility("hidden"))) inline Type *innerFunction() { struct HolderBase { ~HolderBase() noexcept { if (guard.load() == QtGlobalStatic::Initialized
guard.load() =...c::InitializedDescription
TRUEevaluated 54 times by 54 tests
Evaluated by:
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qaccessibility - unknown status
  • tst_qapplication - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdirmodel - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qfilesystemmodel - unknown status
  • tst_qfontcombobox - unknown status
  • tst_qfontdialog - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qgridlayout - unknown status
  • tst_qheaderview - unknown status
  • tst_qidentityproxymodel - unknown status
  • tst_qinputdialog - unknown status
  • tst_qitemdelegate - unknown status
  • ...
FALSEnever evaluated
) guard.store(QtGlobalStatic::Destroyed);
executed 54 times by 54 tests: guard.store(QtGlobalStatic::Destroyed);
Executed by:
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qaccessibility - unknown status
  • tst_qapplication - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdirmodel - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qfilesystemmodel - unknown status
  • tst_qfontcombobox - unknown status
  • tst_qfontdialog - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qgridlayout - unknown status
  • tst_qheaderview - unknown status
  • tst_qidentityproxymodel - unknown status
  • tst_qinputdialog - unknown status
  • tst_qitemdelegate - unknown status
  • ...
}
executed 54 times by 54 tests: end of block
Executed by:
  • tst_languagechange - unknown status
  • tst_modeltest - unknown status
  • tst_qabstractitemmodel - unknown status
  • tst_qabstractitemview - unknown status
  • tst_qabstractproxymodel - unknown status
  • tst_qaccessibility - unknown status
  • tst_qapplication - unknown status
  • tst_qcalendarwidget - unknown status
  • tst_qcolumnview - unknown status
  • tst_qcombobox - unknown status
  • tst_qcompleter - unknown status
  • tst_qdatawidgetmapper - unknown status
  • tst_qdatetimeedit - unknown status
  • tst_qdirmodel - unknown status
  • tst_qfiledialog - unknown status
  • tst_qfiledialog2 - unknown status
  • tst_qfilesystemmodel - unknown status
  • tst_qfontcombobox - unknown status
  • tst_qfontdialog - unknown status
  • tst_qgraphicsproxywidget - unknown status
  • tst_qgridlayout - unknown status
  • tst_qheaderview - unknown status
  • tst_qidentityproxymodel - unknown status
  • tst_qinputdialog - unknown status
  • tst_qitemdelegate - unknown status
  • ...
}; static struct Holder : public HolderBase { Type value; Holder() noexcept(noexcept(Type ())) : value () { guard.store(QtGlobalStatic::Initialized); } } holder; return
executed 5394 times by 54 tests: return &holder.value;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • ...
&holder.value;
executed 5394 times by 54 tests: return &holder.value;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • ...
} } } static QGlobalStatic<DefaultRoleNames, Q_QGS_qDefaultRoleNames::innerFunction, Q_QGS_qDefaultRoleNames::guard> qDefaultRoleNames;
0-5394
324-
325const QHash<int,QByteArray> &QAbstractItemModelPrivate::defaultRoleNames()-
326{-
327 return
executed 5394 times by 54 tests: return *qDefaultRoleNames();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • ...
*qDefaultRoleNames();
executed 5394 times by 54 tests: return *qDefaultRoleNames();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • ...
5394
328}-
329-
330-
331static uint typeOfVariant(const QVariant &value)-
332{-
333-
334 switch (value.userType()) {-
335 case
never executed: case QVariant::Bool:
QVariant::Bool:
never executed: case QVariant::Bool:
0
336 case
executed 26 times by 2 tests: case QVariant::Int:
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
QVariant::Int:
executed 26 times by 2 tests: case QVariant::Int:
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
26
337 case
never executed: case QVariant::UInt:
QVariant::UInt:
never executed: case QVariant::UInt:
0
338 case
never executed: case QVariant::LongLong:
QVariant::LongLong:
never executed: case QVariant::LongLong:
0
339 case
never executed: case QVariant::ULongLong:
QVariant::ULongLong:
never executed: case QVariant::ULongLong:
0
340 case
never executed: case QVariant::Char:
QVariant::Char:
never executed: case QVariant::Char:
0
341 case
never executed: case QMetaType::Short:
QMetaType::Short:
never executed: case QMetaType::Short:
0
342 case
never executed: case QMetaType::UShort:
QMetaType::UShort:
never executed: case QMetaType::UShort:
0
343 case
never executed: case QMetaType::UChar:
QMetaType::UChar:
never executed: case QMetaType::UChar:
0
344 case
never executed: case QMetaType::ULong:
QMetaType::ULong:
never executed: case QMetaType::ULong:
0
345 case
never executed: case QMetaType::Long:
QMetaType::Long:
never executed: case QMetaType::Long:
0
346 return
executed 26 times by 2 tests: return 0;
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
0;
executed 26 times by 2 tests: return 0;
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
26
347 case
never executed: case QVariant::Double:
QVariant::Double:
never executed: case QVariant::Double:
0
348 case
never executed: case QMetaType::Float:
QMetaType::Float:
never executed: case QMetaType::Float:
0
349 return
never executed: return 1;
1;
never executed: return 1;
0
350 default
executed 22804 times by 6 tests: default:
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
:
executed 22804 times by 6 tests: default:
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
22804
351 return
executed 22804 times by 6 tests: return 2;
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
2;
executed 22804 times by 6 tests: return 2;
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
22804
352 }-
353}-
354-
355-
356-
357-
358-
359-
360-
361bool QAbstractItemModelPrivate::variantLessThan(const QVariant &v1, const QVariant &v2)-
362{-
363 switch(qMax(typeOfVariant(v1), typeOfVariant(v2)))-
364 {-
365 case
executed 13 times by 2 tests: case 0:
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
0:
executed 13 times by 2 tests: case 0:
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
13
366 return
executed 13 times by 2 tests: return v1.toLongLong() < v2.toLongLong();
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
v1.toLongLong() < v2.toLongLong();
executed 13 times by 2 tests: return v1.toLongLong() < v2.toLongLong();
Executed by:
  • tst_QListWidget
  • tst_QTreeWidget
13
367 case
never executed: case 1:
1:
never executed: case 1:
0
368 return
never executed: return v1.toReal() < v2.toReal();
v1.toReal() < v2.toReal();
never executed: return v1.toReal() < v2.toReal();
0
369 default
executed 11402 times by 6 tests: default:
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
:
executed 11402 times by 6 tests: default:
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
11402
370 return
executed 11402 times by 6 tests: return v1.toString().localeAwareCompare(v2.toString()) < 0;
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
v1.toString().localeAwareCompare(v2.toString()) < 0;
executed 11402 times by 6 tests: return v1.toString().localeAwareCompare(v2.toString()) < 0;
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
11402
371 }-
372}-
373-
374void QAbstractItemModelPrivate::removePersistentIndexData(QPersistentModelIndexData *data)-
375{-
376 if (data->index.isValid()
data->index.isValid()Description
TRUEevaluated 21134 times by 38 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QDirModel
) {
2-21134
377 int removed = persistent.indexes.remove(data->index);-
378 ((!(removed == 1)) ? qt_assert_x("QPersistentModelIndex::~QPersistentModelIndex", "persistent model indexes corrupted",-
379 __FILE__-
380 ,-
381 599-
382 ) : qt_noop())-
383 ;-
384-
385-
386 (void)removed;;-
387 }
executed 21134 times by 38 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
21134
388-
389 for (int i = persistent.moved.count() - 1; i >= 0
i >= 0Description
TRUEnever evaluated
FALSEevaluated 21136 times by 38 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
; --i) {
0-21136
390 int idx = persistent.moved.at(i).indexOf(data);-
391 if (idx >= 0
idx >= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
392 persistent.moved[i].remove(idx);
never executed: persistent.moved[i].remove(idx);
0
393 }
never executed: end of block
0
394-
395 for (int i = persistent.invalidated.count() - 1; i >= 0
i >= 0Description
TRUEnever evaluated
FALSEevaluated 21136 times by 38 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
; --i) {
0-21136
396 int idx = persistent.invalidated.at(i).indexOf(data);-
397 if (idx >= 0
idx >= 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
398 persistent.invalidated[i].remove(idx);
never executed: persistent.invalidated[i].remove(idx);
0
399 }
never executed: end of block
0
400-
401}
executed 21136 times by 38 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • ...
21136
402-
403void QAbstractItemModelPrivate::rowsAboutToBeInserted(const QModelIndex &parent,-
404 int first, int last)-
405{-
406 QAbstractItemModel * const q = q_func();-
407 (void)last;;-
408 QVector<QPersistentModelIndexData *> persistent_moved;-
409 if (first < q->rowCount(parent)
first < q->rowCount(parent)Description
TRUEevaluated 2726 times by 25 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 119270 times by 43 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • ...
) {
2726-119270
410 for (QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator it = persistent.indexes.constBegin();-
411 it != persistent.indexes.constEnd()
it != persiste...xes.constEnd()Description
TRUEevaluated 7852 times by 15 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 2726 times by 25 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
; ++it) {
2726-7852
412 QPersistentModelIndexData *data = *it;-
413 const QModelIndex &index = data->index;-
414 if (index.row() >= first
index.row() >= firstDescription
TRUEevaluated 6498 times by 15 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 1354 times by 9 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
&& index.isValid()
index.isValid()Description
TRUEevaluated 6498 times by 15 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
FALSEnever evaluated
&& index.parent() == parent
index.parent() == parentDescription
TRUEevaluated 6164 times by 12 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeWidget
FALSEevaluated 334 times by 5 tests
Evaluated by:
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
) {
0-6498
415 persistent_moved.append(data);-
416 }
executed 6164 times by 12 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeWidget
6164
417 }
executed 7852 times by 15 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
7852
418 }
executed 2726 times by 25 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
2726
419 persistent.moved.push(persistent_moved);-
420}
executed 121996 times by 45 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
121996
421-
422void QAbstractItemModelPrivate::rowsInserted(const QModelIndex &parent,-
423 int first, int last)-
424{-
425 QVector<QPersistentModelIndexData *> persistent_moved = persistent.moved.pop();-
426 int count = (last - first) + 1;-
427 for (QVector<QPersistentModelIndexData *>::const_iterator it = persistent_moved.constBegin();-
428 it != persistent_moved.constEnd()
it != persiste...ved.constEnd()Description
TRUEevaluated 6164 times by 12 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeWidget
FALSEevaluated 121996 times by 45 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
; ++it) {
6164-121996
429 QPersistentModelIndexData *data = *it;-
430 QModelIndex old = data->index;-
431 persistent.indexes.erase(persistent.indexes.constFind(old));-
432 data->index = q_func()->index(old.row() + count, old.column(), parent);-
433 if (data->index.isValid()
data->index.isValid()Description
TRUEevaluated 6164 times by 12 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeWidget
FALSEnever evaluated
) {
0-6164
434 persistent.insertMultiAtEnd(data->index, data);-
435 }
executed 6164 times by 12 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFiledialog
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeWidget
else {
6164
436 QMessageLogger(__FILE__, 652, __PRETTY_FUNCTION__).warning() << "QAbstractItemModel::endInsertRows: Invalid index (" << old.row() + count << ',' << old.column() << ") in model" << q_func();-
437 }
never executed: end of block
0
438 }-
439}
executed 121996 times by 45 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
121996
440-
441void QAbstractItemModelPrivate::itemsAboutToBeMoved(const QModelIndex &srcParent, int srcFirst, int srcLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation)-
442{-
443 QVector<QPersistentModelIndexData *> persistent_moved_explicitly;-
444 QVector<QPersistentModelIndexData *> persistent_moved_in_source;-
445 QVector<QPersistentModelIndexData *> persistent_moved_in_destination;-
446-
447 QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator it;-
448 const QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator begin = persistent.indexes.constBegin();-
449 const QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator end = persistent.indexes.constEnd();-
450-
451 const bool sameParent = (srcParent == destinationParent);-
452 const bool movingUp = (srcFirst > destinationChild);-
453-
454 for ( it = begin; it != end
it != endDescription
TRUEevaluated 2617 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 72 times by 5 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
; ++it) {
72-2617
455 QPersistentModelIndexData *data = *it;-
456 const QModelIndex &index = data->index;-
457 const QModelIndex &parent = index.parent();-
458 const bool isSourceIndex = (parent == srcParent);-
459 const bool isDestinationIndex = (parent == destinationParent);-
460-
461 int childPosition;-
462 if (orientation == Qt::Vertical
orientation == Qt::VerticalDescription
TRUEevaluated 2617 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
FALSEnever evaluated
)
0-2617
463 childPosition = index.row();
executed 2617 times by 3 tests: childPosition = index.row();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
2617
464 else-
465 childPosition = index.column();
never executed: childPosition = index.column();
0
466-
467 if (!index.isValid()
!index.isValid()Description
TRUEnever evaluated
FALSEevaluated 2617 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
|| !(isSourceIndex
isSourceIndexDescription
TRUEevaluated 1312 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 1305 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
|| isDestinationIndex
isDestinationIndexDescription
TRUEevaluated 823 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 482 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
) )
0-2617
468 continue;
executed 482 times by 2 tests: continue;
Executed by:
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
482
469-
470 if (!sameParent
!sameParentDescription
TRUEevaluated 1655 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 480 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& isDestinationIndex
isDestinationIndexDescription
TRUEevaluated 823 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 832 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
) {
480-1655
471 if (childPosition >= destinationChild
childPosition ...stinationChildDescription
TRUEevaluated 376 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 447 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
)
376-447
472 persistent_moved_in_destination.append(data);
executed 376 times by 1 test: persistent_moved_in_destination.append(data);
Executed by:
  • tst_QAbstractItemModel
376
473 continue;
executed 823 times by 2 tests: continue;
Executed by:
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
823
474 }-
475-
476 if (sameParent
sameParentDescription
TRUEevaluated 480 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 832 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
&& movingUp
movingUpDescription
TRUEevaluated 160 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 320 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& childPosition < destinationChild
childPosition ...stinationChildDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 132 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
28-832
477 continue;
executed 28 times by 1 test: continue;
Executed by:
  • tst_QAbstractItemModel
28
478-
479 if (sameParent
sameParentDescription
TRUEevaluated 452 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 832 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
&& !movingUp
!movingUpDescription
TRUEevaluated 320 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 132 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& childPosition < srcFirst
childPosition < srcFirstDescription
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 272 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
48-832
480 continue;
executed 48 times by 1 test: continue;
Executed by:
  • tst_QAbstractItemModel
48
481-
482 if (!sameParent
!sameParentDescription
TRUEevaluated 832 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 404 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& childPosition < srcFirst
childPosition < srcFirstDescription
TRUEevaluated 386 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 446 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
)
386-832
483 continue;
executed 386 times by 1 test: continue;
Executed by:
  • tst_QAbstractItemModel
386
484-
485 if (sameParent
sameParentDescription
TRUEevaluated 404 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 446 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
&& (
(childPosition > srcLast)Description
TRUEevaluated 192 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 212 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
childPosition > srcLast)
(childPosition > srcLast)Description
TRUEevaluated 192 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 212 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& (
(childPosition...inationChild )Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 144 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
childPosition >= destinationChild )
(childPosition...inationChild )Description
TRUEevaluated 48 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 144 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
48-446
486 continue;
executed 48 times by 1 test: continue;
Executed by:
  • tst_QAbstractItemModel
48
487-
488 if ((
(childPosition <= srcLast)Description
TRUEevaluated 463 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 339 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
childPosition <= srcLast)
(childPosition <= srcLast)Description
TRUEevaluated 463 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 339 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
&& (
(childPosition >= srcFirst)Description
TRUEevaluated 387 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
childPosition >= srcFirst)
(childPosition >= srcFirst)Description
TRUEevaluated 387 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 76 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
) {
76-463
489 persistent_moved_explicitly.append(data);-
490 }
executed 387 times by 2 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
else {
387
491 persistent_moved_in_source.append(data);-
492 }
executed 415 times by 2 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
415
493 }-
494 persistent.moved.push(persistent_moved_explicitly);-
495 persistent.moved.push(persistent_moved_in_source);-
496 persistent.moved.push(persistent_moved_in_destination);-
497}
executed 72 times by 5 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
72
498void QAbstractItemModelPrivate::movePersistentIndexes(const QVector<QPersistentModelIndexData *> &indexes, int change, const QModelIndex &parent, Qt::Orientation orientation)-
499{-
500 QVector<QPersistentModelIndexData *>::const_iterator it;-
501 const QVector<QPersistentModelIndexData *>::const_iterator begin = indexes.constBegin();-
502 const QVector<QPersistentModelIndexData *>::const_iterator end = indexes.constEnd();-
503-
504 for (it = begin; it != end
it != endDescription
TRUEevaluated 1178 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 216 times by 5 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
; ++it)
216-1178
505 {-
506 QPersistentModelIndexData *data = *it;-
507-
508 int row = data->index.row();-
509 int column = data->index.column();-
510-
511 if (Qt::Vertical == orientation
Qt::Vertical == orientationDescription
TRUEevaluated 1178 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEnever evaluated
)
0-1178
512 row += change;
executed 1178 times by 2 tests: row += change;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
1178
513 else-
514 column += change;
never executed: column += change;
0
515-
516 persistent.indexes.erase(persistent.indexes.constFind(data->index));-
517 data->index = q_func()->index(row, column, parent);-
518 if (data->index.isValid()
data->index.isValid()Description
TRUEevaluated 1178 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEnever evaluated
) {
0-1178
519 persistent.insertMultiAtEnd(data->index, data);-
520 }
executed 1178 times by 2 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
else {
1178
521 QMessageLogger(__FILE__, 745, __PRETTY_FUNCTION__).warning() << "QAbstractItemModel::endMoveRows: Invalid index (" << row << "," << column << ") in model" << q_func();-
522 }
never executed: end of block
0
523 }-
524}
executed 216 times by 5 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
216
525-
526void QAbstractItemModelPrivate::itemsMoved(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild, Qt::Orientation orientation)-
527{-
528 QVector<QPersistentModelIndexData *> moved_in_destination = persistent.moved.pop();-
529 QVector<QPersistentModelIndexData *> moved_in_source = persistent.moved.pop();-
530 QVector<QPersistentModelIndexData *> moved_explicitly = persistent.moved.pop();-
531-
532 const bool sameParent = (sourceParent == destinationParent);-
533 const bool movingUp = (sourceFirst > destinationChild);-
534-
535 const int explicit_change = (!sameParent
!sameParentDescription
TRUEevaluated 46 times by 4 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
|| movingUp
movingUpDescription
TRUEevaluated 14 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
FALSEevaluated 12 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
) ? destinationChild - sourceFirst : destinationChild - sourceLast - 1 ;
12-46
536 const int source_change = (!sameParent
!sameParentDescription
TRUEevaluated 46 times by 4 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
|| !movingUp
!movingUpDescription
TRUEevaluated 12 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
FALSEevaluated 14 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
) ? -1*(sourceLast - sourceFirst + 1) : sourceLast - sourceFirst + 1 ;
12-46
537 const int destination_change = sourceLast - sourceFirst + 1;-
538-
539 movePersistentIndexes(moved_explicitly, explicit_change, destinationParent, orientation);-
540 movePersistentIndexes(moved_in_source, source_change, sourceParent, orientation);-
541 movePersistentIndexes(moved_in_destination, destination_change, destinationParent, orientation);-
542}
executed 72 times by 5 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
72
543-
544void QAbstractItemModelPrivate::rowsAboutToBeRemoved(const QModelIndex &parent,-
545 int first, int last)-
546{-
547 QVector<QPersistentModelIndexData *> persistent_moved;-
548 QVector<QPersistentModelIndexData *> persistent_invalidated;-
549-
550-
551 for (QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator it = persistent.indexes.constBegin();-
552 it != persistent.indexes.constEnd()
it != persiste...xes.constEnd()Description
TRUEevaluated 3751 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 2919 times by 31 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • ...
; ++it) {
2919-3751
553 QPersistentModelIndexData *data = *it;-
554 bool level_changed = false;-
555 QModelIndex current = data->index;-
556 while (current.isValid()
current.isValid()Description
TRUEevaluated 4572 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 223 times by 9 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_QTreeWidget
) {
223-4572
557 QModelIndex current_parent = current.parent();-
558 if (current_parent == parent
current_parent == parentDescription
TRUEevaluated 3528 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 1044 times by 9 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_QTreeWidget
) {
1044-3528
559 if (!level_changed
!level_changedDescription
TRUEevaluated 3212 times by 18 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 316 times by 6 tests
Evaluated by:
  • tst_QDirModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
&& current.row() > last
current.row() > lastDescription
TRUEevaluated 1097 times by 12 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 2115 times by 16 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
)
316-3212
560 persistent_moved.append(data);
executed 1097 times by 12 tests: persistent_moved.append(data);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_QTreeWidget
1097
561 else if (current.row() <= last
current.row() <= lastDescription
TRUEevaluated 2316 times by 17 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 115 times by 1 test
Evaluated by:
  • tst_QStandardItemModel
&& current.row() >= first
current.row() >= firstDescription
TRUEevaluated 1191 times by 15 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 1125 times by 11 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
)
115-2316
562 persistent_invalidated.append(data);
executed 1191 times by 15 tests: persistent_invalidated.append(data);
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
1191
563 break;
executed 3528 times by 18 tests: break;
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
3528
564 }-
565 current = current_parent;-
566 level_changed = true;-
567 }
executed 1044 times by 9 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_QTreeWidget
1044
568 }
executed 3751 times by 18 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
3751
569-
570 persistent.moved.push(persistent_moved);-
571 persistent.invalidated.push(persistent_invalidated);-
572}
executed 2919 times by 31 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • ...
2919
573-
574void QAbstractItemModelPrivate::rowsRemoved(const QModelIndex &parent,-
575 int first, int last)-
576{-
577 QVector<QPersistentModelIndexData *> persistent_moved = persistent.moved.pop();-
578 int count = (last - first) + 1;-
579 for (QVector<QPersistentModelIndexData *>::const_iterator it = persistent_moved.constBegin();-
580 it != persistent_moved.constEnd()
it != persiste...ved.constEnd()Description
TRUEevaluated 1097 times by 12 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 2919 times by 31 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • ...
; ++it) {
1097-2919
581 QPersistentModelIndexData *data = *it;-
582 QModelIndex old = data->index;-
583 persistent.indexes.erase(persistent.indexes.constFind(old));-
584 data->index = q_func()->index(old.row() - count, old.column(), parent);-
585 if (data->index.isValid()
data->index.isValid()Description
TRUEevaluated 1097 times by 12 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_QTreeWidget
FALSEnever evaluated
) {
0-1097
586 persistent.insertMultiAtEnd(data->index, data);-
587 }
executed 1097 times by 12 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeView
  • tst_QTreeWidget
else {
1097
588 QMessageLogger(__FILE__, 812, __PRETTY_FUNCTION__).warning() << "QAbstractItemModel::endRemoveRows: Invalid index (" << old.row() - count << ',' << old.column() << ") in model" << q_func();-
589 }
never executed: end of block
0
590 }-
591 QVector<QPersistentModelIndexData *> persistent_invalidated = persistent.invalidated.pop();-
592 for (QVector<QPersistentModelIndexData *>::const_iterator it = persistent_invalidated.constBegin();-
593 it != persistent_invalidated.constEnd()
it != persiste...ted.constEnd()Description
TRUEevaluated 1191 times by 15 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 2919 times by 31 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • ...
; ++it) {
1191-2919
594 QPersistentModelIndexData *data = *it;-
595 persistent.indexes.erase(persistent.indexes.constFind(data->index));-
596 data->index = QModelIndex();-
597 data->model = 0;-
598 }
executed 1191 times by 15 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
1191
599}
executed 2919 times by 31 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • ...
2919
600-
601void QAbstractItemModelPrivate::columnsAboutToBeInserted(const QModelIndex &parent,-
602 int first, int last)-
603{-
604 QAbstractItemModel * const q = q_func();-
605 (void)last;;-
606 QVector<QPersistentModelIndexData *> persistent_moved;-
607 if (first < q->columnCount(parent)
first < q->columnCount(parent)Description
TRUEevaluated 338 times by 11 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
FALSEevaluated 13194 times by 31 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItem
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • ...
) {
338-13194
608 for (QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator it = persistent.indexes.constBegin();-
609 it != persistent.indexes.constEnd()
it != persiste...xes.constEnd()Description
TRUEevaluated 63 times by 6 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QStandardItemModel
  • tst_QTableView
FALSEevaluated 338 times by 11 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
; ++it) {
63-338
610 QPersistentModelIndexData *data = *it;-
611 const QModelIndex &index = data->index;-
612 if (index.column() >= first
index.column() >= firstDescription
TRUEevaluated 30 times by 5 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QItemModel
  • tst_QStandardItemModel
  • tst_QTableView
FALSEevaluated 33 times by 5 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QTableView
&& index.isValid()
index.isValid()Description
TRUEevaluated 30 times by 5 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QItemModel
  • tst_QStandardItemModel
  • tst_QTableView
FALSEnever evaluated
&& index.parent() == parent
index.parent() == parentDescription
TRUEevaluated 15 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QStandardItemModel
  • tst_QTableView
FALSEevaluated 15 times by 1 test
Evaluated by:
  • tst_QItemModel
)
0-33
613 persistent_moved.append(data);
executed 15 times by 4 tests: persistent_moved.append(data);
Executed by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QStandardItemModel
  • tst_QTableView
15
614 }
executed 63 times by 6 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QStandardItemModel
  • tst_QTableView
63
615 }
executed 338 times by 11 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
338
616 persistent.moved.push(persistent_moved);-
617}
executed 13532 times by 33 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
13532
618-
619void QAbstractItemModelPrivate::columnsInserted(const QModelIndex &parent,-
620 int first, int last)-
621{-
622 QVector<QPersistentModelIndexData *> persistent_moved = persistent.moved.pop();-
623 int count = (last - first) + 1;-
624 for (QVector<QPersistentModelIndexData *>::const_iterator it = persistent_moved.constBegin();-
625 it != persistent_moved.constEnd()
it != persiste...ved.constEnd()Description
TRUEevaluated 15 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QStandardItemModel
  • tst_QTableView
FALSEevaluated 13532 times by 33 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
; ++it) {
15-13532
626 QPersistentModelIndexData *data = *it;-
627 QModelIndex old = data->index;-
628 persistent.indexes.erase(persistent.indexes.constFind(old));-
629 data->index = q_func()->index(old.row(), old.column() + count, parent);-
630 if (data->index.isValid()
data->index.isValid()Description
TRUEevaluated 15 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QStandardItemModel
  • tst_QTableView
FALSEnever evaluated
) {
0-15
631 persistent.insertMultiAtEnd(data->index, data);-
632 }
executed 15 times by 4 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QStandardItemModel
  • tst_QTableView
else {
15
633 QMessageLogger(__FILE__, 857, __PRETTY_FUNCTION__).warning() << "QAbstractItemModel::endInsertColumns: Invalid index (" << old.row() << ',' << old.column() + count << ") in model" << q_func();-
634 }
never executed: end of block
0
635 }-
636}
executed 13532 times by 33 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
13532
637-
638void QAbstractItemModelPrivate::columnsAboutToBeRemoved(const QModelIndex &parent,-
639 int first, int last)-
640{-
641 QVector<QPersistentModelIndexData *> persistent_moved;-
642 QVector<QPersistentModelIndexData *> persistent_invalidated;-
643-
644-
645 for (QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator it = persistent.indexes.constBegin();-
646 it != persistent.indexes.constEnd()
it != persiste...xes.constEnd()Description
TRUEevaluated 100 times by 11 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
FALSEevaluated 210 times by 16 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
; ++it) {
100-210
647 QPersistentModelIndexData *data = *it;-
648 bool level_changed = false;-
649 QModelIndex current = data->index;-
650 while (current.isValid()
current.isValid()Description
TRUEevaluated 101 times by 11 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
FALSEevaluated 35 times by 1 test
Evaluated by:
  • tst_QItemModel
) {
35-101
651 QModelIndex current_parent = current.parent();-
652 if (current_parent == parent
current_parent == parentDescription
TRUEevaluated 65 times by 11 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
FALSEevaluated 36 times by 2 tests
Evaluated by:
  • tst_QItemModel
  • tst_QStandardItemModel
) {
36-65
653 if (!level_changed
!level_changedDescription
TRUEevaluated 64 times by 11 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QStandardItemModel
&& current.column() > last
current.column() > lastDescription
TRUEevaluated 15 times by 6 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
FALSEevaluated 49 times by 9 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
)
1-64
654 persistent_moved.append(data);
executed 15 times by 6 tests: persistent_moved.append(data);
Executed by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
15
655 else if (current.column() <= last
current.column() <= lastDescription
TRUEevaluated 50 times by 9 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
FALSEnever evaluated
&& current.column() >= first
current.column() >= firstDescription
TRUEevaluated 26 times by 7 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
FALSEevaluated 24 times by 7 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
)
0-50
656 persistent_invalidated.append(data);
executed 26 times by 7 tests: persistent_invalidated.append(data);
Executed by:
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
26
657 break;
executed 65 times by 11 tests: break;
Executed by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
65
658 }-
659 current = current_parent;-
660 level_changed = true;-
661 }
executed 36 times by 2 tests: end of block
Executed by:
  • tst_QItemModel
  • tst_QStandardItemModel
36
662 }
executed 100 times by 11 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
100
663-
664 persistent.moved.push(persistent_moved);-
665 persistent.invalidated.push(persistent_invalidated);-
666-
667}
executed 210 times by 16 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
210
668-
669void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,-
670 int first, int last)-
671{-
672 QVector<QPersistentModelIndexData *> persistent_moved = persistent.moved.pop();-
673 int count = (last - first) + 1;-
674 for (QVector<QPersistentModelIndexData *>::const_iterator it = persistent_moved.constBegin();-
675 it != persistent_moved.constEnd()
it != persiste...ved.constEnd()Description
TRUEevaluated 15 times by 6 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
FALSEevaluated 210 times by 16 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
; ++it) {
15-210
676 QPersistentModelIndexData *data = *it;-
677 QModelIndex old = data->index;-
678 persistent.indexes.erase(persistent.indexes.constFind(old));-
679 data->index = q_func()->index(old.row(), old.column() - count, parent);-
680 if (data->index.isValid()
data->index.isValid()Description
TRUEevaluated 15 times by 6 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
FALSEnever evaluated
) {
0-15
681 persistent.insertMultiAtEnd(data->index, data);-
682 }
executed 15 times by 6 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
else {
15
683 QMessageLogger(__FILE__, 907, __PRETTY_FUNCTION__).warning() << "QAbstractItemModel::endRemoveColumns: Invalid index (" << old.row() << ',' << old.column() - count << ") in model" << q_func();-
684 }
never executed: end of block
0
685 }-
686 QVector<QPersistentModelIndexData *> persistent_invalidated = persistent.invalidated.pop();-
687 for (QVector<QPersistentModelIndexData *>::const_iterator it = persistent_invalidated.constBegin();-
688 it != persistent_invalidated.constEnd()
it != persiste...ted.constEnd()Description
TRUEevaluated 26 times by 7 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
FALSEevaluated 210 times by 16 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
; ++it) {
26-210
689 QPersistentModelIndexData *data = *it;-
690 persistent.indexes.erase(persistent.indexes.constFind(data->index));-
691 data->index = QModelIndex();-
692 data->model = 0;-
693 }
executed 26 times by 7 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
26
694}
executed 210 times by 16 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
210
695void QAbstractItemModel::resetInternalData()-
696{-
697-
698}-
699QAbstractItemModel::QAbstractItemModel(QObject *parent)-
700 : QObject(*new QAbstractItemModelPrivate, parent)-
701{-
702}
executed 1568 times by 48 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • ...
1568
703-
704-
705-
706-
707QAbstractItemModel::QAbstractItemModel(QAbstractItemModelPrivate &dd, QObject *parent)-
708 : QObject(dd, parent)-
709{-
710}
executed 3826 times by 44 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLayout
  • ...
3826
711-
712-
713-
714-
715QAbstractItemModel::~QAbstractItemModel()-
716{-
717 d_func()->invalidatePersistentIndexes();-
718}
executed 5227 times by 98 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • ...
5227
719bool QAbstractItemModel::hasIndex(int row, int column, const QModelIndex &parent) const-
720{-
721 if (row < 0
row < 0Description
TRUEevaluated 586 times by 10 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
FALSEevaluated 226416 times by 32 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • ...
|| column < 0
column < 0Description
TRUEevaluated 1340 times by 5 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
FALSEevaluated 225076 times by 32 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • ...
)
586-226416
722 return
executed 1926 times by 10 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
false;
executed 1926 times by 10 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
1926
723 return
executed 225076 times by 32 tests: return row < rowCount(parent) && column < columnCount(parent);
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • ...
row < rowCount(parent) && column < columnCount(parent);
executed 225076 times by 32 tests: return row < rowCount(parent) && column < columnCount(parent);
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • ...
225076
724}-
725bool QAbstractItemModel::hasChildren(const QModelIndex &parent) const-
726{-
727 return
executed 2127 times by 5 tests: return (rowCount(parent) > 0) && (columnCount(parent) > 0);
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
  • tst_QTreeView
(rowCount(parent) > 0) && (columnCount(parent) > 0);
executed 2127 times by 5 tests: return (rowCount(parent) > 0) && (columnCount(parent) > 0);
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
  • tst_QTreeView
2127
728}-
729QModelIndex QAbstractItemModel::sibling(int row, int column, const QModelIndex &idx) const-
730{-
731 return
executed 32937 times by 16 tests: return (row == idx.row() && column == idx.column()) ? idx : index(row, column, parent(idx));
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
(row == idx.row() && column == idx.column()) ? idx : index(row, column, parent(idx));
executed 32937 times by 16 tests: return (row == idx.row() && column == idx.column()) ? idx : index(row, column, parent(idx));
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDirModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
32937
732}-
733QMap<int, QVariant> QAbstractItemModel::itemData(const QModelIndex &index) const-
734{-
735 QMap<int, QVariant> roles;-
736 for (int i = 0; i < Qt::UserRole
i < Qt::UserRoleDescription
TRUEevaluated 116480 times by 6 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 455 times by 6 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
; ++i) {
455-116480
737 QVariant variantData = data(index, i);-
738 if (variantData.isValid()
variantData.isValid()Description
TRUEevaluated 101145 times by 5 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 15335 times by 5 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
)
15335-101145
739 roles.insert(i, variantData);
executed 101145 times by 5 tests: roles.insert(i, variantData);
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
101145
740 }
executed 116480 times by 6 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
116480
741 return
executed 455 times by 6 tests: return roles;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
roles;
executed 455 times by 6 tests: return roles;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
455
742}-
743bool QAbstractItemModel::setData(const QModelIndex &index, const QVariant &value, int role)-
744{-
745 (void)index;;-
746 (void)value;;-
747 (void)role;;-
748 return
executed 25 times by 3 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QSortFilterProxyModel
false;
executed 25 times by 3 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QSortFilterProxyModel
25
749}-
750bool QAbstractItemModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles)-
751{-
752 bool b = true;-
753 for (QMap<int, QVariant>::ConstIterator it = roles.begin(); it != roles.end()
it != roles.end()Description
TRUEevaluated 11776 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 59 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QItemModel
; ++it)
59-11776
754 b = b
bDescription
TRUEevaluated 11776 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEnever evaluated
&& setData(index, it.value(), it.key())
setData(index,...e(), it.key())Description
TRUEevaluated 11776 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEnever evaluated
;
executed 11776 times by 1 test: b = b && setData(index, it.value(), it.key());
Executed by:
  • tst_QAbstractItemModel
0-11776
755 return
executed 59 times by 2 tests: return b;
Executed by:
  • tst_QAbstractItemModel
  • tst_QItemModel
b;
executed 59 times by 2 tests: return b;
Executed by:
  • tst_QAbstractItemModel
  • tst_QItemModel
59
756}-
757QStringList QAbstractItemModel::mimeTypes() const-
758{-
759 QStringList types;-
760 types << ([]() -> QString { enum { Size = sizeof(u"" "application/x-qabstractitemmodeldatalist")/2 - 1 }; static const QStaticStringData<Size> qstring_literal = { { { { -1 } }, Size, 0, 0, sizeof(QStringData) }, u"" "application/x-qabstractitemmodeldatalist" }; QStringDataPtr holder = { qstring_literal.data_ptr() }; const QString qstring_literal_temp(holder); return
executed 174 times by 7 tests: return qstring_literal_temp;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
qstring_literal_temp;
executed 174 times by 7 tests: return qstring_literal_temp;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
}());
174
761 return
executed 174 times by 7 tests: return types;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
types;
executed 174 times by 7 tests: return types;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
174
762}-
763QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const-
764{-
765 if (indexes.count() <= 0
indexes.count() <= 0Description
TRUEevaluated 8 times by 2 tests
Evaluated by:
  • tst_QListWidget
  • tst_QTableWidget
FALSEevaluated 28 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
  • tst_QStandardItemModel
  • tst_QTableWidget
)
8-28
766 return
executed 8 times by 2 tests: return 0;
Executed by:
  • tst_QListWidget
  • tst_QTableWidget
0;
executed 8 times by 2 tests: return 0;
Executed by:
  • tst_QListWidget
  • tst_QTableWidget
8
767 QStringList types = mimeTypes();-
768 if (types.isEmpty()
types.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 28 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
  • tst_QStandardItemModel
  • tst_QTableWidget
)
0-28
769 return
never executed: return 0;
0;
never executed: return 0;
0
770 QMimeData *data = new QMimeData();-
771 QString format = types.at(0);-
772 QByteArray encoded;-
773 QDataStream stream(&encoded, QIODevice::WriteOnly);-
774 encodeData(indexes, stream);-
775 data->setData(format, encoded);-
776 return
executed 28 times by 4 tests: return data;
Executed by:
  • tst_QAbstractItemModel
  • tst_QListWidget
  • tst_QStandardItemModel
  • tst_QTableWidget
data;
executed 28 times by 4 tests: return data;
Executed by:
  • tst_QAbstractItemModel
  • tst_QListWidget
  • tst_QStandardItemModel
  • tst_QTableWidget
28
777}-
778bool QAbstractItemModel::canDropMimeData(const QMimeData *data, Qt::DropAction action,-
779 int row, int column,-
780 const QModelIndex &parent) const-
781{-
782 (void)row;-
783 (void)column;-
784 (void)parent;-
785-
786 if (!(action & supportedDropActions())
!(action & sup...DropActions())Description
TRUEnever evaluated
FALSEnever evaluated
)
0
787 return
never executed: return false;
false;
never executed: return false;
0
788-
789 const QStringList modelTypes = mimeTypes();-
790 for (int i = 0; i < modelTypes.count()
i < modelTypes.count()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
791 if (data->hasFormat(modelTypes.at(i))
data->hasForma...elTypes.at(i))Description
TRUEnever evaluated
FALSEnever evaluated
)
0
792 return
never executed: return true;
true;
never executed: return true;
0
793 }
never executed: end of block
0
794 return
never executed: return false;
false;
never executed: return false;
0
795}-
796bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action,-
797 int row, int column, const QModelIndex &parent)-
798{-
799-
800 if (!data
!dataDescription
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
|| !(action == Qt::CopyAction
action == Qt::CopyActionDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEnever evaluated
|| action == Qt::MoveAction
action == Qt::MoveActionDescription
TRUEnever evaluated
FALSEnever evaluated
))
0-12
801 return
never executed: return false;
false;
never executed: return false;
0
802-
803 QStringList types = mimeTypes();-
804 if (types.isEmpty()
types.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
0-12
805 return
never executed: return false;
false;
never executed: return false;
0
806 QString format = types.at(0);-
807 if (!data->hasFormat(format)
!data->hasFormat(format)Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
0-12
808 return
never executed: return false;
false;
never executed: return false;
0
809 if (row > rowCount(parent)
row > rowCount(parent)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
4-8
810 row = rowCount(parent);
executed 4 times by 1 test: row = rowCount(parent);
Executed by:
  • tst_QAbstractItemModel
4
811 if (row == -1
row == -1Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
0-12
812 row = rowCount(parent);
never executed: row = rowCount(parent);
0
813 if (column == -1
column == -1Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
0-12
814 column = 0;
never executed: column = 0;
0
815-
816 QByteArray encoded = data->data(format);-
817 QDataStream stream(&encoded, QIODevice::ReadOnly);-
818 return
executed 12 times by 1 test: return decodeData(row, column, parent, stream);
Executed by:
  • tst_QAbstractItemModel
decodeData(row, column, parent, stream);
executed 12 times by 1 test: return decodeData(row, column, parent, stream);
Executed by:
  • tst_QAbstractItemModel
12
819}-
820Qt::DropActions QAbstractItemModel::supportedDropActions() const-
821{-
822 return
executed 91 times by 4 tests: return Qt::CopyAction;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
Qt::CopyAction;
executed 91 times by 4 tests: return Qt::CopyAction;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
91
823}-
824Qt::DropActions QAbstractItemModel::supportedDragActions() const-
825{-
826 const QAbstractItemModelPrivate * const d = d_func();-
827 if (d->supportedDragActions != -1
d->supportedDragActions != -1Description
TRUEnever evaluated
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
0-1
828 return
never executed: return d->supportedDragActions;
d->supportedDragActions;
never executed: return d->supportedDragActions;
0
829 return
executed 1 time by 1 test: return supportedDropActions();
Executed by:
  • tst_QAbstractItemModel
supportedDropActions();
executed 1 time by 1 test: return supportedDropActions();
Executed by:
  • tst_QAbstractItemModel
1
830}-
831-
832-
833-
834-
835void QAbstractItemModel::doSetSupportedDragActions(Qt::DropActions actions)-
836{-
837 QAbstractItemModelPrivate * const d = d_func();-
838 d->supportedDragActions = actions;-
839}
never executed: end of block
0
840bool QAbstractItemModel::insertRows(int, int, const QModelIndex &)-
841{-
842 return
never executed: return false;
false;
never executed: return false;
0
843}-
844bool QAbstractItemModel::insertColumns(int, int, const QModelIndex &)-
845{-
846 return
executed 76 times by 1 test: return false;
Executed by:
  • tst_QItemModel
false;
executed 76 times by 1 test: return false;
Executed by:
  • tst_QItemModel
76
847}-
848bool QAbstractItemModel::removeRows(int, int, const QModelIndex &)-
849{-
850 return
never executed: return false;
false;
never executed: return false;
0
851}-
852bool QAbstractItemModel::removeColumns(int, int, const QModelIndex &)-
853{-
854 return
executed 132 times by 1 test: return false;
Executed by:
  • tst_QItemModel
false;
executed 132 times by 1 test: return false;
Executed by:
  • tst_QItemModel
132
855}-
856bool QAbstractItemModel::moveRows(const QModelIndex &, int , int , const QModelIndex &, int)-
857{-
858 return
never executed: return false;
false;
never executed: return false;
0
859}-
860bool QAbstractItemModel::moveColumns(const QModelIndex &, int , int , const QModelIndex &, int)-
861{-
862 return
never executed: return false;
false;
never executed: return false;
0
863}-
864void QAbstractItemModel::fetchMore(const QModelIndex &)-
865{-
866-
867}-
868bool QAbstractItemModel::canFetchMore(const QModelIndex &) const-
869{-
870 return
executed 8043 times by 37 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • ...
false;
executed 8043 times by 37 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • ...
8043
871}-
872Qt::ItemFlags QAbstractItemModel::flags(const QModelIndex &index) const-
873{-
874 const QAbstractItemModelPrivate * const d = d_func();-
875 if (!d->indexValid(index)
!d->indexValid(index)Description
TRUEevaluated 38 times by 5 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 45712 times by 26 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QTableView
  • tst_QTreeView
  • ...
)
38-45712
876 return
executed 38 times by 5 tests: return 0;
Executed by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QSortFilterProxyModel
0;
executed 38 times by 5 tests: return 0;
Executed by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QSortFilterProxyModel
38
877-
878 return
executed 45712 times by 26 tests: return Qt::ItemIsSelectable|Qt::ItemIsEnabled;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QTableView
  • tst_QTreeView
  • ...
Qt::ItemIsSelectable|Qt::ItemIsEnabled;
executed 45712 times by 26 tests: return Qt::ItemIsSelectable|Qt::ItemIsEnabled;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QTableView
  • tst_QTreeView
  • ...
45712
879}-
880-
881-
882-
883-
884-
885-
886void QAbstractItemModel::sort(int column, Qt::SortOrder order)-
887{-
888 (void)column;;-
889 (void)order;;-
890-
891}
executed 486 times by 9 tests: end of block
Executed by:
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_languageChange
486
892QModelIndex QAbstractItemModel::buddy(const QModelIndex &index) const-
893{-
894 return
executed 15196 times by 29 tests: return index;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
index;
executed 15196 times by 29 tests: return index;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
15196
895}-
896QModelIndexList QAbstractItemModel::match(const QModelIndex &start, int role,-
897 const QVariant &value, int hits,-
898 Qt::MatchFlags flags) const-
899{-
900 QModelIndexList result;-
901 uint matchType = flags & 0x0F;-
902 Qt::CaseSensitivity cs = flags & Qt::MatchCaseSensitive
flags & Qt::MatchCaseSensitiveDescription
TRUEevaluated 274 times by 9 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QPrinter
  • tst_languageChange
FALSEevaluated 361 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
? Qt::CaseSensitive : Qt::CaseInsensitive;
274-361
903 bool recurse = flags & Qt::MatchRecursive;-
904 bool wrap = flags & Qt::MatchWrap;-
905 bool allHits = (hits == -1);-
906 QString text;-
907 QModelIndex p = parent(start);-
908 int from = start.row();-
909 int to = rowCount(p);-
910-
911-
912 for (int i = 0; (wrap
wrapDescription
TRUEevaluated 585 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 880 times by 13 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
  • tst_languageChange
&& i < 2
i < 2Description
TRUEevaluated 390 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 195 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
) || (!wrap
!wrapDescription
TRUEevaluated 880 times by 13 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 195 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
&& i < 1
i < 1Description
TRUEevaluated 440 times by 13 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 440 times by 13 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
  • tst_languageChange
); ++i) {
195-880
913 for (int r = from; (
(r < to)Description
TRUEevaluated 3160 times by 20 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 719 times by 18 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
r < to)
(r < to)Description
TRUEevaluated 3160 times by 20 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 719 times by 18 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
&& (allHits
allHitsDescription
TRUEevaluated 138 times by 5 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QCompleter
  • tst_QListWidget
  • tst_QStandardItemModel
  • tst_QTreeWidget
FALSEevaluated 3022 times by 20 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
|| result.count() < hits
result.count() < hitsDescription
TRUEevaluated 2911 times by 20 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 111 times by 10 tests
Evaluated by:
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QTableWidget
  • tst_QTreeView
); ++r) {
111-3160
914 QModelIndex idx = index(r, start.column(), p);-
915 if (!idx.isValid()
!idx.isValid()Description
TRUEevaluated 1899 times by 9 tests
Evaluated by:
  • tst_ModelTest
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
FALSEevaluated 1150 times by 18 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
)
1150-1899
916 continue;
executed 1899 times by 9 tests: continue;
Executed by:
  • tst_ModelTest
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFiledialog
  • tst_QItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
1899
917 QVariant v = data(idx, role);-
918-
919 if (matchType == Qt::MatchExactly
matchType == Qt::MatchExactlyDescription
TRUEevaluated 429 times by 12 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 721 times by 10 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QListView
  • tst_QListWidget
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
) {
429-721
920 if (value == v
value == vDescription
TRUEevaluated 44 times by 10 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
FALSEevaluated 385 times by 12 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
  • tst_languageChange
)
44-385
921 result.append(idx);
executed 44 times by 10 tests: result.append(idx);
Executed by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QInputDialog
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
44
922 }
executed 429 times by 12 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTreeWidget
  • tst_languageChange
else {
429
923 if (text.isEmpty()
text.isEmpty()Description
TRUEevaluated 261 times by 10 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QListView
  • tst_QListWidget
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
FALSEevaluated 460 times by 8 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QListView
  • tst_QListWidget
  • tst_QTableView
  • tst_QTreeView
)
261-460
924 text = value.toString();
executed 261 times by 10 tests: text = value.toString();
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QListView
  • tst_QListWidget
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
261
925 QString t = v.toString();-
926 switch (matchType) {-
927 case
executed 8 times by 1 test: case Qt::MatchRegExp:
Executed by:
  • tst_QAbstractItemModel
Qt::MatchRegExp:
executed 8 times by 1 test: case Qt::MatchRegExp:
Executed by:
  • tst_QAbstractItemModel
8
928 if (QRegExp(text, cs).exactMatch(t)
QRegExp(text, ....exactMatch(t)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 6 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
2-6
929 result.append(idx);
executed 2 times by 1 test: result.append(idx);
Executed by:
  • tst_QAbstractItemModel
2
930 break;
executed 8 times by 1 test: break;
Executed by:
  • tst_QAbstractItemModel
8
931 case
executed 4 times by 1 test: case Qt::MatchWildcard:
Executed by:
  • tst_QAbstractItemModel
Qt::MatchWildcard:
executed 4 times by 1 test: case Qt::MatchWildcard:
Executed by:
  • tst_QAbstractItemModel
4
932 if (QRegExp(text, cs, QRegExp::Wildcard).exactMatch(t)
QRegExp(text, ....exactMatch(t)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
1-3
933 result.append(idx);
executed 3 times by 1 test: result.append(idx);
Executed by:
  • tst_QAbstractItemModel
3
934 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_QAbstractItemModel
4
935 case
executed 341 times by 9 tests: case Qt::MatchStartsWith:
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QListView
  • tst_QListWidget
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
Qt::MatchStartsWith:
executed 341 times by 9 tests: case Qt::MatchStartsWith:
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QListView
  • tst_QListWidget
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
341
936 if (t.startsWith(text, cs)
t.startsWith(text, cs)Description
TRUEevaluated 47 times by 7 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QListView
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeView
FALSEevaluated 294 times by 8 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QListView
  • tst_QListWidget
  • tst_QTableView
  • tst_QTreeView
)
47-294
937 result.append(idx);
executed 47 times by 7 tests: result.append(idx);
Executed by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QListView
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeView
47
938 break;
executed 341 times by 9 tests: break;
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QListView
  • tst_QListWidget
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
341
939 case
executed 4 times by 1 test: case Qt::MatchEndsWith:
Executed by:
  • tst_QAbstractItemModel
Qt::MatchEndsWith:
executed 4 times by 1 test: case Qt::MatchEndsWith:
Executed by:
  • tst_QAbstractItemModel
4
940 if (t.endsWith(text, cs)
t.endsWith(text, cs)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
2
941 result.append(idx);
executed 2 times by 1 test: result.append(idx);
Executed by:
  • tst_QAbstractItemModel
2
942 break;
executed 4 times by 1 test: break;
Executed by:
  • tst_QAbstractItemModel
4
943 case
executed 360 times by 4 tests: case Qt::MatchFixedString:
Executed by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
Qt::MatchFixedString:
executed 360 times by 4 tests: case Qt::MatchFixedString:
Executed by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
360
944 if (t.compare(text, cs) == 0
t.compare(text, cs) == 0Description
TRUEevaluated 66 times by 3 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
FALSEevaluated 294 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
)
66-294
945 result.append(idx);
executed 66 times by 3 tests: result.append(idx);
Executed by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
66
946 break;
executed 360 times by 4 tests: break;
Executed by:
  • tst_QAbstractItemModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
360
947 case
executed 4 times by 1 test: case Qt::MatchContains:
Executed by:
  • tst_QAbstractItemModel
Qt::MatchContains:
executed 4 times by 1 test: case Qt::MatchContains:
Executed by:
  • tst_QAbstractItemModel
4
948 default
never executed: default:
:
never executed: default:
0
949 if (t.contains(text, cs)
t.contains(text, cs)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
1-3
950 result.append(idx);
executed 3 times by 1 test: result.append(idx);
Executed by:
  • tst_QAbstractItemModel
3
951 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
4
952 }-
953 if (recurse
recurseDescription
TRUEevaluated 40 times by 2 tests
Evaluated by:
  • tst_QStandardItemModel
  • tst_QTreeWidget
FALSEevaluated 1110 times by 17 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_languageChange
&& hasChildren(idx)
hasChildren(idx)Description
TRUEevaluated 13 times by 2 tests
Evaluated by:
  • tst_QStandardItemModel
  • tst_QTreeWidget
FALSEevaluated 27 times by 2 tests
Evaluated by:
  • tst_QStandardItemModel
  • tst_QTreeWidget
) {
13-1110
954 result += match(index(0, idx.column(), idx), role,-
955 (text.isEmpty() ? value : text),-
956 (allHits ? -1 : hits - result.count()), flags);-
957 }
executed 13 times by 2 tests: end of block
Executed by:
  • tst_QStandardItemModel
  • tst_QTreeWidget
13
958 }
executed 1150 times by 18 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
1150
959-
960 from = 0;-
961 to = start.row();-
962 }
executed 830 times by 20 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
830
963 return
executed 635 times by 20 tests: return result;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
result;
executed 635 times by 20 tests: return result;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
635
964}-
965-
966-
967-
968-
969-
970-
971-
972QSize QAbstractItemModel::span(const QModelIndex &) const-
973{-
974 return
executed 131 times by 4 tests: return QSize(1, 1);
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
QSize(1, 1);
executed 131 times by 4 tests: return QSize(1, 1);
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
131
975}-
976void QAbstractItemModel::doSetRoleNames(const QHash<int,QByteArray> &roleNames)-
977{-
978 QAbstractItemModelPrivate * const d = d_func();-
979 d->roleNames = roleNames;-
980}
executed 2 times by 2 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractProxyModel
2
981QHash<int,QByteArray> QAbstractItemModel::roleNames() const-
982{-
983 const QAbstractItemModelPrivate * const d = d_func();-
984 return
executed 8131 times by 31 tests: return d->roleNames;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • ...
d->roleNames;
executed 8131 times by 31 tests: return d->roleNames;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • ...
8131
985}-
986bool QAbstractItemModel::submit()-
987{-
988 return
executed 2971 times by 21 tests: return true;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
true;
executed 2971 times by 21 tests: return true;
Executed by:
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDataWidgetMapper
  • tst_QDateTimeEdit
  • tst_QDirModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
2971
989}-
990void QAbstractItemModel::revert()-
991{-
992-
993}-
994QVariant QAbstractItemModel::headerData(int section, Qt::Orientation orientation, int role) const-
995{-
996 (void)orientation;;-
997 if (role == Qt::DisplayRole
role == Qt::DisplayRoleDescription
TRUEevaluated 22540 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QComboBox
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
FALSEevaluated 78640 times by 18 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_languageChange
)
22540-78640
998 return
executed 22540 times by 14 tests: return section + 1;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QComboBox
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
section + 1;
executed 22540 times by 14 tests: return section + 1;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QComboBox
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
22540
999 return
executed 78640 times by 18 tests: return QVariant();
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_languageChange
QVariant();
executed 78640 times by 18 tests: return QVariant();
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QComboBox
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTreeView
  • tst_languageChange
78640
1000}-
1001bool QAbstractItemModel::setHeaderData(int section, Qt::Orientation orientation,-
1002 const QVariant &value, int role)-
1003{-
1004 (void)section;;-
1005 (void)orientation;;-
1006 (void)value;;-
1007 (void)role;;-
1008 return
executed 84 times by 4 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
false;
executed 84 times by 4 tests: return false;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
84
1009}-
1010void QAbstractItemModel::encodeData(const QModelIndexList &indexes, QDataStream &stream) const-
1011{-
1012 QModelIndexList::ConstIterator it = indexes.begin();-
1013 for (; it != indexes.end()
it != indexes.end()Description
TRUEevaluated 77 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
  • tst_QStandardItemModel
  • tst_QTableWidget
FALSEevaluated 28 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
  • tst_QStandardItemModel
  • tst_QTableWidget
; ++it)
28-77
1014 stream << (*it).row() << (*it).column() << itemData(*it);
executed 77 times by 4 tests: stream << (*it).row() << (*it).column() << itemData(*it);
Executed by:
  • tst_QAbstractItemModel
  • tst_QListWidget
  • tst_QStandardItemModel
  • tst_QTableWidget
77
1015}
executed 28 times by 4 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QListWidget
  • tst_QStandardItemModel
  • tst_QTableWidget
28
1016-
1017-
1018-
1019-
1020bool QAbstractItemModel::decodeData(int row, int column, const QModelIndex &parent,-
1021 QDataStream &stream)-
1022{-
1023 int top = 2147483647;-
1024 int left = 2147483647;-
1025 int bottom = 0;-
1026 int right = 0;-
1027 QVector<int> rows, columns;-
1028 QVector<QMap<int, QVariant> > data;-
1029-
1030 while (!stream.atEnd()
!stream.atEnd()Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
) {
12-46
1031 int r, c;-
1032 QMap<int, QVariant> v;-
1033 stream >> r >> c >> v;-
1034 rows.append(r);-
1035 columns.append(c);-
1036 data.append(v);-
1037 top = qMin(r, top);-
1038 left = qMin(c, left);-
1039 bottom = qMax(r, bottom);-
1040 right = qMax(c, right);-
1041 }
executed 46 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
46
1042-
1043-
1044-
1045 int dragRowCount = 0;-
1046 int dragColumnCount = right - left + 1;-
1047-
1048-
1049 QVector<int> rowsToInsert(bottom + 1);-
1050 for (int i = 0; i < rows.count()
i < rows.count()Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
; ++i)
12-46
1051 rowsToInsert[rows.at(i)] = 1;
executed 46 times by 1 test: rowsToInsert[rows.at(i)] = 1;
Executed by:
  • tst_QAbstractItemModel
46
1052 for (int i = 0; i < rowsToInsert.count()
i < rowsToInsert.count()Description
TRUEevaluated 24 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
; ++i) {
12-24
1053 if (rowsToInsert.at(i) == 1
rowsToInsert.at(i) == 1Description
TRUEevaluated 22 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
){
2-22
1054 rowsToInsert[i] = dragRowCount;-
1055 ++dragRowCount;-
1056 }
executed 22 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
22
1057 }
executed 24 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
24
1058 for (int i = 0; i < rows.count()
i < rows.count()Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
; ++i)
12-46
1059 rows[i] = top + rowsToInsert.at(rows.at(i));
executed 46 times by 1 test: rows[i] = top + rowsToInsert.at(rows.at(i));
Executed by:
  • tst_QAbstractItemModel
46
1060-
1061 QBitArray isWrittenTo(dragRowCount * dragColumnCount);-
1062-
1063-
1064 int colCount = columnCount(parent);-
1065 if (colCount == 0
colCount == 0Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
) {
0-12
1066 insertColumns(colCount, dragColumnCount - colCount, parent);-
1067 colCount = columnCount(parent);-
1068 }
never executed: end of block
0
1069 insertRows(row, dragRowCount, parent);-
1070-
1071 row = qMax(0, row);-
1072 column = qMax(0, column);-
1073-
1074 QVector<QPersistentModelIndex> newIndexes(data.size());-
1075-
1076 for (int j = 0; j < data.size()
j < data.size()Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
; ++j) {
12-46
1077 int relativeRow = rows.at(j) - top;-
1078 int relativeColumn = columns.at(j) - left;-
1079 int destinationRow = relativeRow + row;-
1080 int destinationColumn = relativeColumn + column;-
1081 int flat = (relativeRow * dragColumnCount) + relativeColumn;-
1082-
1083 if (destinationColumn >= colCount
destinationColumn >= colCountDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 37 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
|| isWrittenTo.testBit(flat)
isWrittenTo.testBit(flat)Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 34 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
) {
3-37
1084 destinationColumn = qBound(column, destinationColumn, colCount - 1);-
1085 destinationRow = row + dragRowCount;-
1086 insertRows(row + dragRowCount, 1, parent);-
1087 flat = (dragRowCount * dragColumnCount) + relativeColumn;-
1088 isWrittenTo.resize(++dragRowCount * dragColumnCount);-
1089 }
executed 12 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
12
1090 if (!isWrittenTo.testBit(flat)
!isWrittenTo.testBit(flat)Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEnever evaluated
) {
0-46
1091 newIndexes[j] = index(destinationRow, destinationColumn, parent);-
1092 isWrittenTo.setBit(flat);-
1093 }
executed 46 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
46
1094 }
executed 46 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
46
1095-
1096 for(int k = 0; k < newIndexes.size()
k < newIndexes.size()Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
; k++) {
12-46
1097 if (newIndexes.at(k).isValid()
newIndexes.at(k).isValid()Description
TRUEevaluated 46 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEnever evaluated
)
0-46
1098 setItemData(newIndexes.at(k), data.at(k));
executed 46 times by 1 test: setItemData(newIndexes.at(k), data.at(k));
Executed by:
  • tst_QAbstractItemModel
46
1099 }
executed 46 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
46
1100-
1101 return
executed 12 times by 1 test: return true;
Executed by:
  • tst_QAbstractItemModel
true;
executed 12 times by 1 test: return true;
Executed by:
  • tst_QAbstractItemModel
12
1102}-
1103void QAbstractItemModel::beginInsertRows(const QModelIndex &parent, int first, int last)-
1104{-
1105 ((!(first >= 0)) ? qt_assert("first >= 0",__FILE__,2640) : qt_noop());-
1106 ((!(last >= first)) ? qt_assert("last >= first",__FILE__,2641) : qt_noop());-
1107 QAbstractItemModelPrivate * const d = d_func();-
1108 d->changes.push(QAbstractItemModelPrivate::Change(parent, first, last));-
1109 rowsAboutToBeInserted(parent, first, last, QPrivateSignal());-
1110 d->rowsAboutToBeInserted(parent, first, last);-
1111}
executed 121996 times by 45 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
121996
1112void QAbstractItemModel::endInsertRows()-
1113{-
1114 QAbstractItemModelPrivate * const d = d_func();-
1115 QAbstractItemModelPrivate::Change change = d->changes.pop();-
1116 d->rowsInserted(change.parent, change.first, change.last);-
1117 rowsInserted(change.parent, change.first, change.last, QPrivateSignal());-
1118}
executed 121996 times by 45 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QGridLayout
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • ...
121996
1119void QAbstractItemModel::beginRemoveRows(const QModelIndex &parent, int first, int last)-
1120{-
1121 ((!(first >= 0)) ? qt_assert("first >= 0",__FILE__,2694) : qt_noop());-
1122 ((!(last >= first)) ? qt_assert("last >= first",__FILE__,2695) : qt_noop());-
1123 QAbstractItemModelPrivate * const d = d_func();-
1124 d->changes.push(QAbstractItemModelPrivate::Change(parent, first, last));-
1125 rowsAboutToBeRemoved(parent, first, last, QPrivateSignal());-
1126 d->rowsAboutToBeRemoved(parent, first, last);-
1127}
executed 2893 times by 30 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • tst_QTableView
  • ...
2893
1128void QAbstractItemModel::endRemoveRows()-
1129{-
1130 QAbstractItemModelPrivate * const d = d_func();-
1131 QAbstractItemModelPrivate::Change change = d->changes.pop();-
1132 d->rowsRemoved(change.parent, change.first, change.last);-
1133 rowsRemoved(change.parent, change.first, change.last, QPrivateSignal());-
1134}
executed 2893 times by 30 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStandardItemModel
  • tst_QStringListModel
  • tst_QTableView
  • ...
2893
1135bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int start, int end, const QModelIndex &destinationParent, int destinationStart, Qt::Orientation orientation)-
1136{-
1137-
1138 if (destinationParent == srcParent
destinationParent == srcParentDescription
TRUEevaluated 53 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
FALSEevaluated 106 times by 4 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
)
53-106
1139 return
executed 53 times by 2 tests: return !(destinationStart >= start && destinationStart <= end + 1);
Executed by:
  • tst_QAbstractItemModel
  • tst_QListWidget
!(destinationStart >= start && destinationStart <= end + 1);
executed 53 times by 2 tests: return !(destinationStart >= start && destinationStart <= end + 1);
Executed by:
  • tst_QAbstractItemModel
  • tst_QListWidget
53
1140-
1141 QModelIndex destinationAncestor = destinationParent;-
1142 int pos = (
(Qt::Vertical == orientation)Description
TRUEevaluated 106 times by 4 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
FALSEnever evaluated
Qt::Vertical == orientation)
(Qt::Vertical == orientation)Description
TRUEevaluated 106 times by 4 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
FALSEnever evaluated
? destinationAncestor.row() : destinationAncestor.column();
0-106
1143 for(;;) {-
1144 if (destinationAncestor == srcParent
destinationAnc...r == srcParentDescription
TRUEevaluated 75 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 270 times by 4 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
) {
75-270
1145 if (pos >= start
pos >= startDescription
TRUEevaluated 67 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& pos <= end
pos <= endDescription
TRUEevaluated 60 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEevaluated 7 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
)
7-67
1146 return
executed 60 times by 1 test: return false;
Executed by:
  • tst_QAbstractItemModel
false;
executed 60 times by 1 test: return false;
Executed by:
  • tst_QAbstractItemModel
60
1147 break;
executed 15 times by 2 tests: break;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
15
1148 }-
1149-
1150 if (!destinationAncestor.isValid()
!destinationAncestor.isValid()Description
TRUEevaluated 31 times by 3 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
FALSEevaluated 239 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
)
31-239
1151 break;
executed 31 times by 3 tests: break;
Executed by:
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
31
1152-
1153 pos = (
(Qt::Vertical == orientation)Description
TRUEevaluated 239 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
FALSEnever evaluated
Qt::Vertical == orientation)
(Qt::Vertical == orientation)Description
TRUEevaluated 239 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
FALSEnever evaluated
? destinationAncestor.row() : destinationAncestor.column();
0-239
1154 destinationAncestor = destinationAncestor.parent();-
1155 }
executed 239 times by 3 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
239
1156-
1157 return
executed 46 times by 4 tests: return true;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
true;
executed 46 times by 4 tests: return true;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
46
1158}-
1159bool QAbstractItemModel::beginMoveRows(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild)-
1160{-
1161 ((!(sourceFirst >= 0)) ? qt_assert("sourceFirst >= 0",__FILE__,2843) : qt_noop());-
1162 ((!(sourceLast >= sourceFirst)) ? qt_assert("sourceLast >= sourceFirst",__FILE__,2844) : qt_noop());-
1163 ((!(destinationChild >= 0)) ? qt_assert("destinationChild >= 0",__FILE__,2845) : qt_noop());-
1164 QAbstractItemModelPrivate * const d = d_func();-
1165-
1166 if (!d->allowMove(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Vertical)
!d->allowMove(... Qt::Vertical)Description
TRUEevaluated 87 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QListWidget
FALSEevaluated 70 times by 5 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
) {
70-87
1167 return
executed 87 times by 2 tests: return false;
Executed by:
  • tst_QAbstractItemModel
  • tst_QListWidget
false;
executed 87 times by 2 tests: return false;
Executed by:
  • tst_QAbstractItemModel
  • tst_QListWidget
87
1168 }-
1169-
1170 QAbstractItemModelPrivate::Change sourceChange(sourceParent, sourceFirst, sourceLast);-
1171 sourceChange.needsAdjust = sourceParent.isValid()
sourceParent.isValid()Description
TRUEevaluated 39 times by 3 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
FALSEevaluated 31 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QListWidget
&& sourceParent.row() >= destinationChild
sourceParent.r...stinationChildDescription
TRUEevaluated 25 times by 3 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QSortFilterProxyModel
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& sourceParent.parent() == destinationParent
sourceParent.p...tinationParentDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
FALSEevaluated 15 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
;
10-39
1172 d->changes.push(sourceChange);-
1173 int destinationLast = destinationChild + (sourceLast - sourceFirst);-
1174 QAbstractItemModelPrivate::Change destinationChange(destinationParent, destinationChild, destinationLast);-
1175 destinationChange.needsAdjust = destinationParent.isValid()
destinationParent.isValid()Description
TRUEevaluated 37 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 33 times by 3 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
&& destinationParent.row() >= sourceLast
destinationPar... >= sourceLastDescription
TRUEevaluated 16 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 21 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& destinationParent.parent() == sourceParent
destinationPar...= sourceParentDescription
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 9 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QSortFilterProxyModel
;
7-37
1176 d->changes.push(destinationChange);-
1177-
1178 rowsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, QPrivateSignal());-
1179 d->itemsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Vertical);-
1180 return
executed 70 times by 5 tests: return true;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
true;
executed 70 times by 5 tests: return true;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
70
1181}-
1182void QAbstractItemModel::endMoveRows()-
1183{-
1184 QAbstractItemModelPrivate * const d = d_func();-
1185-
1186 QAbstractItemModelPrivate::Change insertChange = d->changes.pop();-
1187 QAbstractItemModelPrivate::Change removeChange = d->changes.pop();-
1188-
1189 QModelIndex adjustedSource = removeChange.parent;-
1190 QModelIndex adjustedDestination = insertChange.parent;-
1191-
1192 const int numMoved = removeChange.last - removeChange.first + 1;-
1193 if (insertChange.needsAdjust
insertChange.needsAdjustDescription
TRUEevaluated 7 times by 2 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
FALSEevaluated 63 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
)
7-63
1194 adjustedDestination = createIndex(adjustedDestination.row() - numMoved, adjustedDestination.column(), adjustedDestination.internalPointer());
executed 7 times by 2 tests: adjustedDestination = createIndex(adjustedDestination.row() - numMoved, adjustedDestination.column(), adjustedDestination.internalPointer());
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
7
1195-
1196 if (removeChange.needsAdjust
removeChange.needsAdjustDescription
TRUEevaluated 10 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
FALSEevaluated 60 times by 4 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
)
10-60
1197 adjustedSource = createIndex(adjustedSource.row() + numMoved, adjustedSource.column(), adjustedSource.internalPointer());
executed 10 times by 2 tests: adjustedSource = createIndex(adjustedSource.row() + numMoved, adjustedSource.column(), adjustedSource.internalPointer());
Executed by:
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
10
1198-
1199 d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Vertical);-
1200-
1201 rowsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, QPrivateSignal());-
1202}
executed 70 times by 5 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QIdentityProxyModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
70
1203void QAbstractItemModel::beginInsertColumns(const QModelIndex &parent, int first, int last)-
1204{-
1205 ((!(first >= 0)) ? qt_assert("first >= 0",__FILE__,2941) : qt_noop());-
1206 ((!(last >= first)) ? qt_assert("last >= first",__FILE__,2942) : qt_noop());-
1207 QAbstractItemModelPrivate * const d = d_func();-
1208 d->changes.push(QAbstractItemModelPrivate::Change(parent, first, last));-
1209 columnsAboutToBeInserted(parent, first, last, QPrivateSignal());-
1210 d->columnsAboutToBeInserted(parent, first, last);-
1211}
executed 13532 times by 33 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
13532
1212void QAbstractItemModel::endInsertColumns()-
1213{-
1214 QAbstractItemModelPrivate * const d = d_func();-
1215 QAbstractItemModelPrivate::Change change = d->changes.pop();-
1216 d->columnsInserted(change.parent, change.first, change.last);-
1217 columnsInserted(change.parent, change.first, change.last, QPrivateSignal());-
1218}
executed 13532 times by 33 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QItemView
  • tst_QLineEdit
  • tst_QListView
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlTableModel
  • tst_QStandardItem
  • tst_QStandardItemModel
  • ...
13532
1219void QAbstractItemModel::beginRemoveColumns(const QModelIndex &parent, int first, int last)-
1220{-
1221 ((!(first >= 0)) ? qt_assert("first >= 0",__FILE__,2996) : qt_noop());-
1222 ((!(last >= first)) ? qt_assert("last >= first",__FILE__,2997) : qt_noop());-
1223 QAbstractItemModelPrivate * const d = d_func();-
1224 d->changes.push(QAbstractItemModelPrivate::Change(parent, first, last));-
1225 columnsAboutToBeRemoved(parent, first, last, QPrivateSignal());-
1226 d->columnsAboutToBeRemoved(parent, first, last);-
1227}
executed 210 times by 16 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
210
1228void QAbstractItemModel::endRemoveColumns()-
1229{-
1230 QAbstractItemModelPrivate * const d = d_func();-
1231 QAbstractItemModelPrivate::Change change = d->changes.pop();-
1232 d->columnsRemoved(change.parent, change.first, change.last);-
1233 columnsRemoved(change.parent, change.first, change.last, QPrivateSignal());-
1234}
executed 210 times by 16 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
210
1235bool QAbstractItemModel::beginMoveColumns(const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationChild)-
1236{-
1237 ((!(sourceFirst >= 0)) ? qt_assert("sourceFirst >= 0",__FILE__,3060) : qt_noop());-
1238 ((!(sourceLast >= sourceFirst)) ? qt_assert("sourceLast >= sourceFirst",__FILE__,3061) : qt_noop());-
1239 ((!(destinationChild >= 0)) ? qt_assert("destinationChild >= 0",__FILE__,3062) : qt_noop());-
1240 QAbstractItemModelPrivate * const d = d_func();-
1241-
1242 if (!d->allowMove(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Horizontal)
!d->allowMove(...t::Horizontal)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
) {
0-2
1243 return
never executed: return false;
false;
never executed: return false;
0
1244 }-
1245-
1246 QAbstractItemModelPrivate::Change sourceChange(sourceParent, sourceFirst, sourceLast);-
1247 sourceChange.needsAdjust = sourceParent.isValid()
sourceParent.isValid()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& sourceParent.row() >= destinationChild
sourceParent.r...stinationChildDescription
TRUEnever evaluated
FALSEnever evaluated
&& sourceParent.parent() == destinationParent
sourceParent.p...tinationParentDescription
TRUEnever evaluated
FALSEnever evaluated
;
0-2
1248 d->changes.push(sourceChange);-
1249 int destinationLast = destinationChild + (sourceLast - sourceFirst);-
1250 QAbstractItemModelPrivate::Change destinationChange(destinationParent, destinationChild, destinationLast);-
1251 destinationChange.needsAdjust = destinationParent.isValid()
destinationParent.isValid()Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
&& destinationParent.row() >= sourceLast
destinationPar... >= sourceLastDescription
TRUEnever evaluated
FALSEnever evaluated
&& destinationParent.parent() == sourceParent
destinationPar...= sourceParentDescription
TRUEnever evaluated
FALSEnever evaluated
;
0-2
1252 d->changes.push(destinationChange);-
1253-
1254 d->itemsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, Qt::Horizontal);-
1255-
1256 columnsAboutToBeMoved(sourceParent, sourceFirst, sourceLast, destinationParent, destinationChild, QPrivateSignal());-
1257 return
executed 2 times by 1 test: return true;
Executed by:
  • tst_QAbstractItemModel
true;
executed 2 times by 1 test: return true;
Executed by:
  • tst_QAbstractItemModel
2
1258}-
1259void QAbstractItemModel::endMoveColumns()-
1260{-
1261 QAbstractItemModelPrivate * const d = d_func();-
1262-
1263 QAbstractItemModelPrivate::Change insertChange = d->changes.pop();-
1264 QAbstractItemModelPrivate::Change removeChange = d->changes.pop();-
1265-
1266 QModelIndex adjustedSource = removeChange.parent;-
1267 QModelIndex adjustedDestination = insertChange.parent;-
1268-
1269 const int numMoved = removeChange.last - removeChange.first + 1;-
1270 if (insertChange.needsAdjust
insertChange.needsAdjustDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
0-2
1271 adjustedDestination = createIndex(adjustedDestination.row(), adjustedDestination.column() - numMoved, adjustedDestination.internalPointer());
never executed: adjustedDestination = createIndex(adjustedDestination.row(), adjustedDestination.column() - numMoved, adjustedDestination.internalPointer());
0
1272-
1273 if (removeChange.needsAdjust
removeChange.needsAdjustDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
0-2
1274 adjustedSource = createIndex(adjustedSource.row(), adjustedSource.column() + numMoved, adjustedSource.internalPointer());
never executed: adjustedSource = createIndex(adjustedSource.row(), adjustedSource.column() + numMoved, adjustedSource.internalPointer());
0
1275-
1276 d->itemsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, Qt::Horizontal);-
1277-
1278 columnsMoved(adjustedSource, removeChange.first, removeChange.last, adjustedDestination, insertChange.first, QPrivateSignal());-
1279}
executed 2 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
2
1280void QAbstractItemModel::beginResetModel()-
1281{-
1282 modelAboutToBeReset(QPrivateSignal());-
1283}
executed 8999 times by 41 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QPrinter
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
8999
1284void QAbstractItemModel::endResetModel()-
1285{-
1286 QAbstractItemModelPrivate * const d = d_func();-
1287 d->invalidatePersistentIndexes();-
1288 QMetaObject::invokeMethod(this, "resetInternalData");-
1289 modelReset(QPrivateSignal());-
1290}
executed 8998 times by 41 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QPrinter
  • tst_QSidebar
  • tst_QSortFilterProxyModel
  • ...
8998
1291void QAbstractItemModel::changePersistentIndex(const QModelIndex &from, const QModelIndex &to)-
1292{-
1293 QAbstractItemModelPrivate * const d = d_func();-
1294 if (d->persistent.indexes.isEmpty()
d->persistent....exes.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
)
0-12
1295 return;
never executed: return;
0
1296-
1297 const auto it = d->persistent.indexes.constFind(from);-
1298 if (it != d->persistent.indexes.cend()
it != d->persi...indexes.cend()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEnever evaluated
) {
0-12
1299 QPersistentModelIndexData *data = *it;-
1300 d->persistent.indexes.erase(it);-
1301 data->index = to;-
1302 if (to.isValid()
to.isValid()Description
TRUEevaluated 12 times by 1 test
Evaluated by:
  • tst_QAbstractItemModel
FALSEnever evaluated
)
0-12
1303 d->persistent.insertMultiAtEnd(to, data);
executed 12 times by 1 test: d->persistent.insertMultiAtEnd(to, data);
Executed by:
  • tst_QAbstractItemModel
12
1304 else-
1305 data->model = 0;
never executed: data->model = 0;
0
1306 }-
1307}
executed 12 times by 1 test: end of block
Executed by:
  • tst_QAbstractItemModel
12
1308void QAbstractItemModel::changePersistentIndexList(const QModelIndexList &from,-
1309 const QModelIndexList &to)-
1310{-
1311 QAbstractItemModelPrivate * const d = d_func();-
1312 if (d->persistent.indexes.isEmpty()
d->persistent....exes.isEmpty()Description
TRUEevaluated 4679 times by 24 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItem
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
FALSEevaluated 735 times by 18 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItem
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
)
735-4679
1313 return;
executed 4679 times by 24 tests: return;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStandardItem
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_QTreeWidgetItemIterator
  • tst_languageChange
4679
1314 QVector<QPersistentModelIndexData *> toBeReinserted;-
1315 toBeReinserted.reserve(to.count());-
1316 for (int i = 0; i < from.count()
i < from.count()Description
TRUEevaluated 1672 times by 17 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 735 times by 18 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItem
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
; ++i) {
735-1672
1317 if (from.at(i) == to.at(i)
from.at(i) == to.at(i)Description
TRUEevaluated 1012 times by 16 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 660 times by 13 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QHeaderView
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
)
660-1012
1318 continue;
executed 1012 times by 16 tests: continue;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
1012
1319 const auto it = d->persistent.indexes.constFind(from.at(i));-
1320 if (it != d->persistent.indexes.cend()
it != d->persi...indexes.cend()Description
TRUEevaluated 534 times by 13 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QHeaderView
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 126 times by 2 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QTableWidget
) {
126-534
1321 QPersistentModelIndexData *data = *it;-
1322 d->persistent.indexes.erase(it);-
1323 data->index = to.at(i);-
1324 if (data->index.isValid()
data->index.isValid()Description
TRUEevaluated 534 times by 13 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QHeaderView
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
FALSEnever evaluated
)
0-534
1325 toBeReinserted << data;
executed 534 times by 13 tests: toBeReinserted << data;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QHeaderView
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
534
1326 else-
1327 data->model = 0;
never executed: data->model = 0;
0
1328 }-
1329 }
executed 660 times by 13 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QHeaderView
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
660
1330-
1331 for (QVector<QPersistentModelIndexData *>::const_iterator it = toBeReinserted.constBegin();-
1332 it != toBeReinserted.constEnd()
it != toBeRein...ted.constEnd()Description
TRUEevaluated 534 times by 13 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QHeaderView
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 735 times by 18 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItem
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
; ++it) {
534-735
1333 QPersistentModelIndexData *data = *it;-
1334 d->persistent.insertMultiAtEnd(data->index, data);-
1335 }
executed 534 times by 13 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QHeaderView
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
534
1336}
executed 735 times by 18 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItem
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
735
1337-
1338-
1339-
1340-
1341-
1342-
1343QModelIndexList QAbstractItemModel::persistentIndexList() const-
1344{-
1345 const QAbstractItemModelPrivate * const d = d_func();-
1346 QModelIndexList result;-
1347 result.reserve(d->persistent.indexes.count());-
1348 for (QHash<QModelIndex, QPersistentModelIndexData *>::const_iterator it = d->persistent.indexes.constBegin();-
1349 it != d->persistent.indexes.constEnd()
it != d->persi...xes.constEnd()Description
TRUEevaluated 1242 times by 11 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
FALSEevaluated 1234 times by 15 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
; ++it) {
1234-1242
1350 QPersistentModelIndexData *data = *it;-
1351 result.append(data->index);-
1352 }
executed 1242 times by 11 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QListWidget
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
1242
1353 return
executed 1234 times by 15 tests: return result;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
result;
executed 1234 times by 15 tests: return result;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QItemModel
  • tst_QListWidget
  • tst_QPrinter
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
  • tst_languageChange
1234
1354}-
1355QAbstractTableModel::QAbstractTableModel(QObject *parent)-
1356 : QAbstractItemModel(parent)-
1357{-
1358-
1359}
executed 430 times by 14 tests: end of block
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
430
1360-
1361-
1362-
1363-
1364-
1365-
1366-
1367QAbstractTableModel::QAbstractTableModel(QAbstractItemModelPrivate &dd, QObject *parent)-
1368 : QAbstractItemModel(dd, parent)-
1369{-
1370-
1371}
executed 287 times by 4 tests: end of block
Executed by:
  • tst_QItemModel
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
287
1372-
1373-
1374-
1375-
1376-
1377QAbstractTableModel::~QAbstractTableModel()-
1378{-
1379-
1380}-
1381QModelIndex QAbstractTableModel::index(int row, int column, const QModelIndex &parent) const-
1382{-
1383 return
executed 61784 times by 16 tests: return hasIndex(row, column, parent) ? createIndex(row, column) : QModelIndex();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
hasIndex(row, column, parent) ? createIndex(row, column) : QModelIndex();
executed 61784 times by 16 tests: return hasIndex(row, column, parent) ? createIndex(row, column) : QModelIndex();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
61784
1384}-
1385QModelIndex QAbstractTableModel::parent(const QModelIndex &) const-
1386{-
1387 return
executed 41542 times by 13 tests: return QModelIndex();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
QModelIndex();
executed 41542 times by 13 tests: return QModelIndex();
Executed by:
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QHeaderView
  • tst_QItemDelegate
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
41542
1388}-
1389-
1390-
1391-
1392-
1393QModelIndex QAbstractTableModel::sibling(int row, int column, const QModelIndex &) const-
1394{-
1395 return
executed 7902 times by 5 tests: return index(row, column);
Executed by:
  • tst_QAccessibility
  • tst_QItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
index(row, column);
executed 7902 times by 5 tests: return index(row, column);
Executed by:
  • tst_QAccessibility
  • tst_QItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
7902
1396}-
1397-
1398bool QAbstractTableModel::hasChildren(const QModelIndex &parent) const-
1399{-
1400 if (parent.model() == this
parent.model() == thisDescription
TRUEevaluated 2459 times by 2 tests
Evaluated by:
  • tst_QComboBox
  • tst_QItemModel
FALSEevaluated 254 times by 2 tests
Evaluated by:
  • tst_QItemModel
  • tst_QTreeView
|| !parent.isValid()
!parent.isValid()Description
TRUEevaluated 254 times by 2 tests
Evaluated by:
  • tst_QItemModel
  • tst_QTreeView
FALSEnever evaluated
)
0-2459
1401 return
executed 2713 times by 3 tests: return rowCount(parent) > 0 && columnCount(parent) > 0;
Executed by:
  • tst_QComboBox
  • tst_QItemModel
  • tst_QTreeView
rowCount(parent) > 0 && columnCount(parent) > 0;
executed 2713 times by 3 tests: return rowCount(parent) > 0 && columnCount(parent) > 0;
Executed by:
  • tst_QComboBox
  • tst_QItemModel
  • tst_QTreeView
2713
1402 return
never executed: return false;
false;
never executed: return false;
0
1403}-
1404-
1405-
1406-
1407-
1408Qt::ItemFlags QAbstractTableModel::flags(const QModelIndex &index) const-
1409{-
1410 Qt::ItemFlags f = QAbstractItemModel::flags(index);-
1411 if (index.isValid()
index.isValid()Description
TRUEevaluated 10749 times by 8 tests
Evaluated by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QItemSelectionModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QTableView
  • tst_QTreeView
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QItemModel
)
2-10749
1412 f |= Qt::ItemNeverHasChildren;
executed 10749 times by 8 tests: f |= Qt::ItemNeverHasChildren;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QItemSelectionModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QTableView
  • tst_QTreeView
10749
1413 return
executed 10751 times by 9 tests: return f;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QTableView
  • tst_QTreeView
f;
executed 10751 times by 9 tests: return f;
Executed by:
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QDateTimeEdit
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QSqlRelationalTableModel
  • tst_QSqlTableModel
  • tst_QTableView
  • tst_QTreeView
10751
1414}-
1415QAbstractListModel::QAbstractListModel(QObject *parent)-
1416 : QAbstractItemModel(parent)-
1417{-
1418-
1419}
executed 594 times by 23 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QObject
  • tst_QSortFilterProxyModel
  • tst_QStringListModel
  • tst_QTableView
  • tst_QTreeView
594
1420-
1421-
1422-
1423-
1424-
1425-
1426-
1427QAbstractListModel::QAbstractListModel(QAbstractItemModelPrivate &dd, QObject *parent)-
1428 : QAbstractItemModel(dd, parent)-
1429{-
1430-
1431}
never executed: end of block
0
1432-
1433-
1434-
1435-
1436-
1437QAbstractListModel::~QAbstractListModel()-
1438{-
1439-
1440}-
1441QModelIndex QAbstractListModel::index(int row, int column, const QModelIndex &parent) const-
1442{-
1443 return
executed 99398 times by 20 tests: return hasIndex(row, column, parent) ? createIndex(row, column) : QModelIndex();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStringListModel
  • tst_QTableView
  • tst_QTreeView
hasIndex(row, column, parent) ? createIndex(row, column) : QModelIndex();
executed 99398 times by 20 tests: return hasIndex(row, column, parent) ? createIndex(row, column) : QModelIndex();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStringListModel
  • tst_QTableView
  • tst_QTreeView
99398
1444}-
1445-
1446-
1447-
1448-
1449-
1450-
1451-
1452QModelIndex QAbstractListModel::parent(const QModelIndex & ) const-
1453{-
1454 return
executed 33454 times by 17 tests: return QModelIndex();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontDialog
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTreeView
QModelIndex();
executed 33454 times by 17 tests: return QModelIndex();
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontDialog
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTreeView
33454
1455}-
1456-
1457-
1458-
1459-
1460QModelIndex QAbstractListModel::sibling(int row, int column, const QModelIndex &) const-
1461{-
1462 return
executed 261 times by 5 tests: return index(row, column);
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
index(row, column);
executed 261 times by 5 tests: return index(row, column);
Executed by:
  • tst_QAbstractItemView
  • tst_QComboBox
  • tst_QItemModel
  • tst_QListView
  • tst_QListWidget
261
1463}-
1464-
1465-
1466-
1467-
1468Qt::ItemFlags QAbstractListModel::flags(const QModelIndex &index) const-
1469{-
1470 Qt::ItemFlags f = QAbstractItemModel::flags(index);-
1471 if (index.isValid()
index.isValid()Description
TRUEevaluated 12060 times by 14 tests
Evaluated by:
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTreeView
FALSEevaluated 18 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QSortFilterProxyModel
)
18-12060
1472 f |= Qt::ItemNeverHasChildren;
executed 12060 times by 14 tests: f |= Qt::ItemNeverHasChildren;
Executed by:
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTreeView
12060
1473 return
executed 12078 times by 16 tests: return f;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTreeView
f;
executed 12078 times by 16 tests: return f;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemView
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QTreeView
12078
1474}-
1475int QAbstractListModel::columnCount(const QModelIndex &parent) const-
1476{-
1477 return
executed 134235 times by 22 tests: return parent.isValid() ? 0 : 1;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSortFilterProxyModel
  • tst_QStringListModel
  • tst_QTableView
  • tst_QTreeView
parent.isValid() ? 0 : 1;
executed 134235 times by 22 tests: return parent.isValid() ? 0 : 1;
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QColumnView
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFontComboBox
  • tst_QFontDialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListView
  • tst_QListWidget
  • tst_QMenu
  • tst_QSortFilterProxyModel
  • tst_QStringListModel
  • tst_QTableView
  • tst_QTreeView
134235
1478}-
1479-
1480bool QAbstractListModel::hasChildren(const QModelIndex &parent) const-
1481{-
1482 return
executed 1661 times by 7 tests: return parent.isValid() ? false : (rowCount() > 0);
Executed by:
  • tst_ModelTest
  • tst_QColumnView
  • tst_QComboBox
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QTreeView
parent.isValid() ? false : (rowCount() > 0);
executed 1661 times by 7 tests: return parent.isValid() ? false : (rowCount() > 0);
Executed by:
  • tst_ModelTest
  • tst_QColumnView
  • tst_QComboBox
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QTreeView
1661
1483}-
1484bool QAbstractTableModel::dropMimeData(const QMimeData *data, Qt::DropAction action,-
1485 int row, int column, const QModelIndex &parent)-
1486{-
1487 if (!data
!dataDescription
TRUEnever evaluated
FALSEnever evaluated
|| !(action == Qt::CopyAction
action == Qt::CopyActionDescription
TRUEnever evaluated
FALSEnever evaluated
|| action == Qt::MoveAction
action == Qt::MoveActionDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
1488 return
never executed: return false;
false;
never executed: return false;
0
1489-
1490 QStringList types = mimeTypes();-
1491 if (types.isEmpty()
types.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1492 return
never executed: return false;
false;
never executed: return false;
0
1493 QString format = types.at(0);-
1494 if (!data->hasFormat(format)
!data->hasFormat(format)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1495 return
never executed: return false;
false;
never executed: return false;
0
1496-
1497 QByteArray encoded = data->data(format);-
1498 QDataStream stream(&encoded, QIODevice::ReadOnly);-
1499-
1500-
1501 if (parent.isValid()
parent.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& row == -1
row == -1Description
TRUEnever evaluated
FALSEnever evaluated
&& column == -1
column == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1502 int top = 2147483647;-
1503 int left = 2147483647;-
1504 QVector<int> rows, columns;-
1505 QVector<QMap<int, QVariant> > data;-
1506-
1507 while (!stream.atEnd()
!stream.atEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1508 int r, c;-
1509 QMap<int, QVariant> v;-
1510 stream >> r >> c >> v;-
1511 rows.append(r);-
1512 columns.append(c);-
1513 data.append(v);-
1514 top = qMin(r, top);-
1515 left = qMin(c, left);-
1516 }
never executed: end of block
0
1517-
1518 for (int i = 0; i < data.size()
i < data.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1519 int r = (rows.at(i) - top) + parent.row();-
1520 int c = (columns.at(i) - left) + parent.column();-
1521 if (hasIndex(r, c)
hasIndex(r, c)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1522 setItemData(index(r, c), data.at(i));
never executed: setItemData(index(r, c), data.at(i));
0
1523 }
never executed: end of block
0
1524-
1525 return
never executed: return true;
true;
never executed: return true;
0
1526 }-
1527-
1528-
1529 return
never executed: return decodeData(row, column, parent, stream);
decodeData(row, column, parent, stream);
never executed: return decodeData(row, column, parent, stream);
0
1530}-
1531-
1532-
1533-
1534-
1535bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction action,-
1536 int row, int column, const QModelIndex &parent)-
1537{-
1538 if (!data
!dataDescription
TRUEnever evaluated
FALSEnever evaluated
|| !(action == Qt::CopyAction
action == Qt::CopyActionDescription
TRUEnever evaluated
FALSEnever evaluated
|| action == Qt::MoveAction
action == Qt::MoveActionDescription
TRUEnever evaluated
FALSEnever evaluated
))
0
1539 return
never executed: return false;
false;
never executed: return false;
0
1540-
1541 QStringList types = mimeTypes();-
1542 if (types.isEmpty()
types.isEmpty()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1543 return
never executed: return false;
false;
never executed: return false;
0
1544 QString format = types.at(0);-
1545 if (!data->hasFormat(format)
!data->hasFormat(format)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1546 return
never executed: return false;
false;
never executed: return false;
0
1547-
1548 QByteArray encoded = data->data(format);-
1549 QDataStream stream(&encoded, QIODevice::ReadOnly);-
1550-
1551-
1552 if (parent.isValid()
parent.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
&& row == -1
row == -1Description
TRUEnever evaluated
FALSEnever evaluated
&& column == -1
column == -1Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1553 int top = 2147483647;-
1554 int left = 2147483647;-
1555 QVector<int> rows, columns;-
1556 QVector<QMap<int, QVariant> > data;-
1557-
1558 while (!stream.atEnd()
!stream.atEnd()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
1559 int r, c;-
1560 QMap<int, QVariant> v;-
1561 stream >> r >> c >> v;-
1562 rows.append(r);-
1563 columns.append(c);-
1564 data.append(v);-
1565 top = qMin(r, top);-
1566 left = qMin(c, left);-
1567 }
never executed: end of block
0
1568-
1569 for (int i = 0; i < data.size()
i < data.size()Description
TRUEnever evaluated
FALSEnever evaluated
; ++i) {
0
1570 int r = (rows.at(i) - top) + parent.row();-
1571 if (columns.at(i) == left
columns.at(i) == leftDescription
TRUEnever evaluated
FALSEnever evaluated
&& hasIndex(r, 0)
hasIndex(r, 0)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1572 setItemData(index(r), data.at(i));
never executed: setItemData(index(r), data.at(i));
0
1573 }
never executed: end of block
0
1574-
1575 return
never executed: return true;
true;
never executed: return true;
0
1576 }-
1577-
1578 if (row == -1
row == -1Description
TRUEnever evaluated
FALSEnever evaluated
)
0
1579 row = rowCount(parent);
never executed: row = rowCount(parent);
0
1580-
1581-
1582 return
never executed: return decodeData(row, column, parent, stream);
decodeData(row, column, parent, stream);
never executed: return decodeData(row, column, parent, stream);
0
1583}-
1584void QAbstractItemModelPrivate::Persistent::insertMultiAtEnd(const QModelIndex& key, QPersistentModelIndexData *data)-
1585{-
1586 QHash<QModelIndex,QPersistentModelIndexData *>::iterator newIt =-
1587 indexes.insertMulti(key, data);-
1588 QHash<QModelIndex,QPersistentModelIndexData *>::iterator it = newIt + 1;-
1589 while (it != indexes.end()
it != indexes.end()Description
TRUEevaluated 6622 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
FALSEevaluated 2424 times by 20 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
&& it.key() == key
it.key() == keyDescription
TRUEevaluated 31 times by 4 tests
Evaluated by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QItemSelectionModel
  • tst_QStandardItemModel
FALSEevaluated 6591 times by 14 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
) {
31-6622
1590 qSwap(*newIt,*it);-
1591 newIt = it;-
1592 ++it;-
1593 }
executed 31 times by 4 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QItemSelectionModel
  • tst_QStandardItemModel
31
1594}
executed 9015 times by 21 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAccessibility
  • tst_QCalendarWidget
  • tst_QComboBox
  • tst_QDateTimeEdit
  • tst_QFileDialog2
  • tst_QFileSystemModel
  • tst_QFiledialog
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QListView
  • tst_QListWidget
  • tst_QSortFilterProxyModel
  • tst_QStandardItemModel
  • tst_QTableView
  • tst_QTableWidget
  • tst_QTreeView
  • tst_QTreeWidget
9015
1595-
1596-
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9