qabstractproxymodel.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/corelib/itemmodels/qabstractproxymodel.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7void QAbstractProxyModelPrivate::_q_sourceModelDestroyed()-
8{-
9 invalidatePersistentIndexes();-
10 model = QAbstractItemModelPrivate::staticEmptyModel();-
11}
executed 361 times by 22 tests: end of block
Executed by:
  • tst_QAbstractItemModel
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTreeView
  • tst_languageChange
  • tst_modeltest - unknown status
  • tst_qapplication - unknown status
  • tst_qsortfilterproxymodel - unknown status
361
12-
13-
14-
15-
16-
17QAbstractProxyModel::QAbstractProxyModel(QObject *parent)-
18 :QAbstractItemModel(*new QAbstractProxyModelPrivate, parent)-
19{-
20 setSourceModel(QAbstractItemModelPrivate::staticEmptyModel());-
21}
executed 19 times by 2 tests: end of block
Executed by:
  • tst_QAbstractProxyModel
  • tst_QSortFilterProxyModel
19
22-
23-
24-
25-
26-
27QAbstractProxyModel::QAbstractProxyModel(QAbstractProxyModelPrivate &dd, QObject *parent)-
28 : QAbstractItemModel(dd, parent)-
29{-
30 setSourceModel(QAbstractItemModelPrivate::staticEmptyModel());-
31}
executed 753 times by 27 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_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTreeView
  • ...
753
32-
33-
34-
35-
36QAbstractProxyModel::~QAbstractProxyModel()-
37{-
38-
39}-
40void QAbstractProxyModel::setSourceModel(QAbstractItemModel *sourceModel)-
41{-
42 QAbstractProxyModelPrivate * const d = d_func();-
43 if (sourceModel != d->model
sourceModel != d->modelDescription
TRUEevaluated 2024 times by 28 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • 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_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QIdentityProxyModel
) {
1-2024
44 if (d->model
d->modelDescription
TRUEevaluated 1252 times by 28 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • 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_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
FALSEevaluated 772 times by 28 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • 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_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
)
772-1252
45 disconnect(d->model, qFlagLocation("2""destroyed()" "\0" __FILE__ ":" "136"), this, qFlagLocation("1""_q_sourceModelDestroyed()" "\0" __FILE__ ":" "136"));
executed 1252 times by 28 tests: disconnect(d->model, qFlagLocation("2""destroyed()" "\0" __FILE__ ":" "136"), this, qFlagLocation("1""_q_sourceModelDestroyed()" "\0" __FILE__ ":" "136"));
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • 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_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
1252
46-
47 if (sourceModel
sourceModelDescription
TRUEevaluated 1657 times by 28 tests
Evaluated by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • 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_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
FALSEevaluated 367 times by 18 tests
Evaluated by:
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qapplication - unknown status
) {
367-1657
48 d->model = sourceModel;-
49 connect(d->model, qFlagLocation("2""destroyed()" "\0" __FILE__ ":" "140"), this, qFlagLocation("1""_q_sourceModelDestroyed()" "\0" __FILE__ ":" "140"));-
50 }
executed 1657 times by 28 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • 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_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
else {
1657
51 d->model = QAbstractItemModelPrivate::staticEmptyModel();-
52 }
executed 367 times by 18 tests: end of block
Executed by:
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qapplication - unknown status
367
53 d->roleNames = d->model->roleNames();-
54 sourceModelChanged(QPrivateSignal());-
55 }
executed 2024 times by 28 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • 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_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
2024
56}
executed 2025 times by 28 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QAbstractItemModel
  • tst_QAbstractItemView
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • 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_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • ...
2025
57-
58-
59-
60-
61void QAbstractProxyModel::resetInternalData()-
62{-
63 QAbstractProxyModelPrivate * const d = d_func();-
64 d->roleNames = d->model->roleNames();-
65}
executed 6084 times by 27 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_QGraphicsProxyWidget
  • tst_QHeaderView
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QItemSelectionModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_QTableView
  • tst_QTreeView
  • ...
6084
66-
67-
68-
69-
70QAbstractItemModel *QAbstractProxyModel::sourceModel() const-
71{-
72 const QAbstractProxyModelPrivate * const d = d_func();-
73 if (d->model == QAbstractItemModelPrivate::staticEmptyModel()
d->model == QA...icEmptyModel()Description
TRUEevaluated 1751 times by 19 tests
Evaluated by:
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qapplication - unknown status
FALSEevaluated 30852 times by 20 tests
Evaluated by:
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qapplication - unknown status
)
1751-30852
74 return
executed 1751 times by 19 tests: return 0;
Executed by:
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qapplication - unknown status
0;
executed 1751 times by 19 tests: return 0;
Executed by:
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qapplication - unknown status
1751
75 return
executed 30852 times by 20 tests: return d->model;
Executed by:
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qapplication - unknown status
d->model;
executed 30852 times by 20 tests: return d->model;
Executed by:
  • tst_QAbstractProxyModel
  • tst_QAccessibility
  • tst_QComboBox
  • tst_QCompleter
  • tst_QDataWidgetMapper
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QFontComboBox
  • tst_QGraphicsProxyWidget
  • tst_QIdentityProxyModel
  • tst_QInputDialog
  • tst_QItemModel
  • tst_QLineEdit
  • tst_QListWidget
  • tst_QPrinter
  • tst_QSortFilterProxyModel
  • tst_QStyle
  • tst_QStyleSheetStyle
  • tst_languageChange
  • tst_qapplication - unknown status
30852
76}-
77-
78-
79-
80-
81bool QAbstractProxyModel::submit()-
82{-
83 QAbstractProxyModelPrivate * const d = d_func();-
84 return
executed 182 times by 6 tests: return d->model->submit();
Executed by:
  • tst_QAbstractProxyModel
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTreeView
d->model->submit();
executed 182 times by 6 tests: return d->model->submit();
Executed by:
  • tst_QAbstractProxyModel
  • tst_QFileDialog2
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QTableView
  • tst_QTreeView
182
85}-
86-
87-
88-
89-
90void QAbstractProxyModel::revert()-
91{-
92 QAbstractProxyModelPrivate * const d = d_func();-
93 d->model->revert();-
94}
executed 5 times by 2 tests: end of block
Executed by:
  • tst_QAbstractProxyModel
  • tst_QItemModel
5
95QItemSelection QAbstractProxyModel::mapSelectionToSource(const QItemSelection &proxySelection) const-
96{-
97 QModelIndexList proxyIndexes = proxySelection.indexes();-
98 QItemSelection sourceSelection;-
99 for (int i = 0; i < proxyIndexes.size()
i < proxyIndexes.size()Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tst_QAbstractProxyModel
; ++i) {
0-3
100 const QModelIndex proxyIdx = mapToSource(proxyIndexes.at(i));-
101 if (!proxyIdx.isValid()
!proxyIdx.isValid()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
102 continue;
never executed: continue;
0
103 sourceSelection << QItemSelectionRange(proxyIdx);-
104 }
never executed: end of block
0
105 return
executed 3 times by 1 test: return sourceSelection;
Executed by:
  • tst_QAbstractProxyModel
sourceSelection;
executed 3 times by 1 test: return sourceSelection;
Executed by:
  • tst_QAbstractProxyModel
3
106}-
107-
108-
109-
110-
111-
112-
113QItemSelection QAbstractProxyModel::mapSelectionFromSource(const QItemSelection &sourceSelection) const-
114{-
115 QModelIndexList sourceIndexes = sourceSelection.indexes();-
116 QItemSelection proxySelection;-
117 for (int i = 0; i < sourceIndexes.size()
i < sourceIndexes.size()Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_QSortFilterProxyModel
FALSEevaluated 4 times by 2 tests
Evaluated by:
  • tst_QAbstractProxyModel
  • tst_QSortFilterProxyModel
; ++i) {
3-4
118 const QModelIndex srcIdx = mapFromSource(sourceIndexes.at(i));-
119 if (!srcIdx.isValid()
!srcIdx.isValid()Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_QSortFilterProxyModel
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_QSortFilterProxyModel
)
1-2
120 continue;
executed 2 times by 1 test: continue;
Executed by:
  • tst_QSortFilterProxyModel
2
121 proxySelection << QItemSelectionRange(srcIdx);-
122 }
executed 1 time by 1 test: end of block
Executed by:
  • tst_QSortFilterProxyModel
1
123 return
executed 4 times by 2 tests: return proxySelection;
Executed by:
  • tst_QAbstractProxyModel
  • tst_QSortFilterProxyModel
proxySelection;
executed 4 times by 2 tests: return proxySelection;
Executed by:
  • tst_QAbstractProxyModel
  • tst_QSortFilterProxyModel
4
124}-
125-
126-
127-
128-
129QVariant QAbstractProxyModel::data(const QModelIndex &proxyIndex, int role) const-
130{-
131 const QAbstractProxyModelPrivate * const d = d_func();-
132 return
executed 619 times by 2 tests: return d->model->data(mapToSource(proxyIndex), role);
Executed by:
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
d->model->data(mapToSource(proxyIndex), role);
executed 619 times by 2 tests: return d->model->data(mapToSource(proxyIndex), role);
Executed by:
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
619
133}-
134-
135-
136-
137-
138QVariant QAbstractProxyModel::headerData(int section, Qt::Orientation orientation, int role) const-
139{-
140 const QAbstractProxyModelPrivate * const d = d_func();-
141 int sourceSection;-
142 if (orientation == Qt::Horizontal
orientation == Qt::HorizontalDescription
TRUEevaluated 511 times by 8 tests
Evaluated by:
  • tst_ModelTest
  • tst_QFileDialog2
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QTableView
  • tst_QTreeView
FALSEevaluated 1764 times by 5 tests
Evaluated by:
  • tst_QAbstractProxyModel
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QSqlQueryModel
  • tst_QTableView
) {
511-1764
143 const QModelIndex proxyIndex = index(0, section);-
144 sourceSection = mapToSource(proxyIndex).column();-
145 }
executed 511 times by 8 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QFileDialog2
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QTableView
  • tst_QTreeView
else {
511
146 const QModelIndex proxyIndex = index(section, 0);-
147 sourceSection = mapToSource(proxyIndex).row();-
148 }
executed 1764 times by 5 tests: end of block
Executed by:
  • tst_QAbstractProxyModel
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QSqlQueryModel
  • tst_QTableView
1764
149 return
executed 2275 times by 9 tests: return d->model->headerData(sourceSection, orientation, role);
Executed by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
  • tst_QFileDialog2
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QTableView
  • tst_QTreeView
d->model->headerData(sourceSection, orientation, role);
executed 2275 times by 9 tests: return d->model->headerData(sourceSection, orientation, role);
Executed by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
  • tst_QFileDialog2
  • tst_QHeaderView
  • tst_QItemModel
  • tst_QSortFilterProxyModel
  • tst_QSqlQueryModel
  • tst_QTableView
  • tst_QTreeView
2275
150}-
151-
152-
153-
154-
155QMap<int, QVariant> QAbstractProxyModel::itemData(const QModelIndex &proxyIndex) const-
156{-
157 return
executed 51 times by 5 tests: return QAbstractItemModel::itemData(proxyIndex);
Executed by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
QAbstractItemModel::itemData(proxyIndex);
executed 51 times by 5 tests: return QAbstractItemModel::itemData(proxyIndex);
Executed by:
  • tst_ModelTest
  • tst_QAbstractProxyModel
  • tst_QIdentityProxyModel
  • tst_QItemModel
  • tst_QSortFilterProxyModel
51
158}-
159-
160-
161-
162-
163Qt::ItemFlags QAbstractProxyModel::flags(const QModelIndex &index) const-
164{-
165 const QAbstractProxyModelPrivate * const d = d_func();-
166 return
executed 660 times by 8 tests: return d->model->flags(mapToSource(index));
Executed by:
  • tst_QAbstractProxyModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QIdentityProxyModel
  • tst_QLineEdit
  • tst_QListWidget
d->model->flags(mapToSource(index));
executed 660 times by 8 tests: return d->model->flags(mapToSource(index));
Executed by:
  • tst_QAbstractProxyModel
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
  • tst_QIdentityProxyModel
  • tst_QLineEdit
  • tst_QListWidget
660
167}-
168-
169-
170-
171-
172bool QAbstractProxyModel::setData(const QModelIndex &index, const QVariant &value, int role)-
173{-
174 QAbstractProxyModelPrivate * const d = d_func();-
175 return
never executed: return d->model->setData(mapToSource(index), value, role);
d->model->setData(mapToSource(index), value, role);
never executed: return d->model->setData(mapToSource(index), value, role);
0
176}-
177-
178-
179-
180-
181bool QAbstractProxyModel::setItemData(const QModelIndex &index, const QMap< int, QVariant >& roles)-
182{-
183 return
executed 3 times by 1 test: return QAbstractItemModel::setItemData(index, roles);
Executed by:
  • tst_QItemModel
QAbstractItemModel::setItemData(index, roles);
executed 3 times by 1 test: return QAbstractItemModel::setItemData(index, roles);
Executed by:
  • tst_QItemModel
3
184}-
185-
186-
187-
188-
189bool QAbstractProxyModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role)-
190{-
191 QAbstractProxyModelPrivate * const d = d_func();-
192 int sourceSection;-
193 if (orientation == Qt::Horizontal
orientation == Qt::HorizontalDescription
TRUEevaluated 92 times by 3 tests
Evaluated by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QSortFilterProxyModel
FALSEevaluated 10 times by 1 test
Evaluated by:
  • tst_QItemModel
) {
10-92
194 const QModelIndex proxyIndex = index(0, section);-
195 sourceSection = mapToSource(proxyIndex).column();-
196 }
executed 92 times by 3 tests: end of block
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QSortFilterProxyModel
else {
92
197 const QModelIndex proxyIndex = index(section, 0);-
198 sourceSection = mapToSource(proxyIndex).row();-
199 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_QItemModel
10
200 return
executed 102 times by 3 tests: return d->model->setHeaderData(sourceSection, orientation, value, role);
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QSortFilterProxyModel
d->model->setHeaderData(sourceSection, orientation, value, role);
executed 102 times by 3 tests: return d->model->setHeaderData(sourceSection, orientation, value, role);
Executed by:
  • tst_ModelTest
  • tst_QItemModel
  • tst_QSortFilterProxyModel
102
201}-
202-
203-
204-
205-
206QModelIndex QAbstractProxyModel::buddy(const QModelIndex &index) const-
207{-
208 const QAbstractProxyModelPrivate * const d = d_func();-
209 return
executed 97 times by 3 tests: return mapFromSource(d->model->buddy(mapToSource(index)));
Executed by:
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
mapFromSource(d->model->buddy(mapToSource(index)));
executed 97 times by 3 tests: return mapFromSource(d->model->buddy(mapToSource(index)));
Executed by:
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
97
210}-
211-
212-
213-
214-
215bool QAbstractProxyModel::canFetchMore(const QModelIndex &parent) const-
216{-
217 const QAbstractProxyModelPrivate * const d = d_func();-
218 return
executed 50 times by 4 tests: return d->model->canFetchMore(mapToSource(parent));
Executed by:
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
d->model->canFetchMore(mapToSource(parent));
executed 50 times by 4 tests: return d->model->canFetchMore(mapToSource(parent));
Executed by:
  • tst_QComboBox
  • tst_QCompleter
  • tst_QFileDialog2
  • tst_QFiledialog
50
219}-
220-
221-
222-
223-
224void QAbstractProxyModel::fetchMore(const QModelIndex &parent)-
225{-
226 QAbstractProxyModelPrivate * const d = d_func();-
227 d->model->fetchMore(mapToSource(parent));-
228}
never executed: end of block
0
229-
230-
231-
232-
233void QAbstractProxyModel::sort(int column, Qt::SortOrder order)-
234{-
235 QAbstractProxyModelPrivate * const d = d_func();-
236 d->model->sort(column, order);-
237}
never executed: end of block
0
238-
239-
240-
241-
242QSize QAbstractProxyModel::span(const QModelIndex &index) const-
243{-
244 const QAbstractProxyModelPrivate * const d = d_func();-
245 return
never executed: return d->model->span(mapToSource(index));
d->model->span(mapToSource(index));
never executed: return d->model->span(mapToSource(index));
0
246}-
247-
248-
249-
250-
251bool QAbstractProxyModel::hasChildren(const QModelIndex &parent) const-
252{-
253 const QAbstractProxyModelPrivate * const d = d_func();-
254 return
executed 97 times by 1 test: return d->model->hasChildren(mapToSource(parent));
Executed by:
  • tst_QIdentityProxyModel
d->model->hasChildren(mapToSource(parent));
executed 97 times by 1 test: return d->model->hasChildren(mapToSource(parent));
Executed by:
  • tst_QIdentityProxyModel
97
255}-
256-
257-
258-
259-
260QModelIndex QAbstractProxyModel::sibling(int row, int column, const QModelIndex &idx) const-
261{-
262 return
executed 62 times by 3 tests: return index(row, column, idx.parent());
Executed by:
  • tst_QAbstractProxyModel
  • tst_QCompleter
  • tst_QFileDialog2
index(row, column, idx.parent());
executed 62 times by 3 tests: return index(row, column, idx.parent());
Executed by:
  • tst_QAbstractProxyModel
  • tst_QCompleter
  • tst_QFileDialog2
62
263}-
264-
265-
266-
267-
268QMimeData* QAbstractProxyModel::mimeData(const QModelIndexList &indexes) const-
269{-
270 const QAbstractProxyModelPrivate * const d = d_func();-
271 QModelIndexList list;-
272 list.reserve(indexes.count());-
273 for (const QModelIndex &index : indexes)-
274 list << mapToSource(index);
never executed: list << mapToSource(index);
0
275 return
never executed: return d->model->mimeData(list);
d->model->mimeData(list);
never executed: return d->model->mimeData(list);
0
276}-
277-
278void QAbstractProxyModelPrivate::mapDropCoordinatesToSource(int row, int column, const QModelIndex &parent,-
279 int *sourceRow, int *sourceColumn, QModelIndex *sourceParent) const-
280{-
281 const QAbstractProxyModel * const q = q_func();-
282 *sourceRow = -1;-
283 *sourceColumn = -1;-
284 if (row == -1
row == -1Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QSortFilterProxyModel
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QSortFilterProxyModel
&& column == -1
column == -1Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tst_QSortFilterProxyModel
FALSEnever evaluated
) {
0-10
285 *sourceParent = q->mapToSource(parent);-
286 }
executed 10 times by 1 test: end of block
Executed by:
  • tst_QSortFilterProxyModel
else if (row == q->rowCount(parent)
row == q->rowCount(parent)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_QSortFilterProxyModel
) {
0-10
287 *sourceParent = q->mapToSource(parent);-
288 *sourceRow = model->rowCount(*sourceParent);-
289 }
never executed: end of block
else {
0
290 QModelIndex proxyIndex = q->index(row, column, parent);-
291 QModelIndex sourceIndex = q->mapToSource(proxyIndex);-
292 *sourceRow = sourceIndex.row();-
293 *sourceColumn = sourceIndex.column();-
294 *sourceParent = sourceIndex.parent();-
295 }
executed 2 times by 1 test: end of block
Executed by:
  • tst_QSortFilterProxyModel
2
296}-
297-
298-
299-
300-
301-
302bool QAbstractProxyModel::canDropMimeData(const QMimeData *data, Qt::DropAction action,-
303 int row, int column, const QModelIndex &parent) const-
304{-
305 const QAbstractProxyModelPrivate * const d = d_func();-
306 int sourceDestinationRow;-
307 int sourceDestinationColumn;-
308 QModelIndex sourceParent;-
309 d->mapDropCoordinatesToSource(row, column, parent, &sourceDestinationRow, &sourceDestinationColumn, &sourceParent);-
310 return
executed 11 times by 1 test: return d->model->canDropMimeData(data, action, sourceDestinationRow, sourceDestinationColumn, sourceParent);
Executed by:
  • tst_QSortFilterProxyModel
d->model->canDropMimeData(data, action, sourceDestinationRow, sourceDestinationColumn, sourceParent);
executed 11 times by 1 test: return d->model->canDropMimeData(data, action, sourceDestinationRow, sourceDestinationColumn, sourceParent);
Executed by:
  • tst_QSortFilterProxyModel
11
311}-
312-
313-
314-
315-
316-
317bool QAbstractProxyModel::dropMimeData(const QMimeData *data, Qt::DropAction action,-
318 int row, int column, const QModelIndex &parent)-
319{-
320 QAbstractProxyModelPrivate * const d = d_func();-
321 int sourceDestinationRow;-
322 int sourceDestinationColumn;-
323 QModelIndex sourceParent;-
324 d->mapDropCoordinatesToSource(row, column, parent, &sourceDestinationRow, &sourceDestinationColumn, &sourceParent);-
325 return
executed 1 time by 1 test: return d->model->dropMimeData(data, action, sourceDestinationRow, sourceDestinationColumn, sourceParent);
Executed by:
  • tst_QSortFilterProxyModel
d->model->dropMimeData(data, action, sourceDestinationRow, sourceDestinationColumn, sourceParent);
executed 1 time by 1 test: return d->model->dropMimeData(data, action, sourceDestinationRow, sourceDestinationColumn, sourceParent);
Executed by:
  • tst_QSortFilterProxyModel
1
326}-
327-
328-
329-
330-
331QStringList QAbstractProxyModel::mimeTypes() const-
332{-
333 const QAbstractProxyModelPrivate * const d = d_func();-
334 return
executed 1 time by 1 test: return d->model->mimeTypes();
Executed by:
  • tst_QAbstractProxyModel
d->model->mimeTypes();
executed 1 time by 1 test: return d->model->mimeTypes();
Executed by:
  • tst_QAbstractProxyModel
1
335}-
336-
337-
338-
339-
340Qt::DropActions QAbstractProxyModel::supportedDragActions() const-
341{-
342 const QAbstractProxyModelPrivate * const d = d_func();-
343 return
executed 1 time by 1 test: return d->model->supportedDragActions();
Executed by:
  • tst_QAbstractProxyModel
d->model->supportedDragActions();
executed 1 time by 1 test: return d->model->supportedDragActions();
Executed by:
  • tst_QAbstractProxyModel
1
344}-
345-
346-
347-
348-
349Qt::DropActions QAbstractProxyModel::supportedDropActions() const-
350{-
351 const QAbstractProxyModelPrivate * const d = d_func();-
352 return
executed 1 time by 1 test: return d->model->supportedDropActions();
Executed by:
  • tst_QAbstractProxyModel
d->model->supportedDropActions();
executed 1 time by 1 test: return d->model->supportedDropActions();
Executed by:
  • tst_QAbstractProxyModel
1
353}-
354-
355-
356-
Switch to Source codePreprocessed file

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