| Line | Source Code | Coverage |
|---|
| 1 | | - |
| 2 | | - |
| 3 | | - |
| 4 | | - |
| 5 | | - |
| 6 | | - |
| 7 | class QIdentityProxyModelPrivate : public QAbstractProxyModelPrivate | - |
| 8 | { | - |
| 9 | QIdentityProxyModelPrivate() | - |
| 10 | { | - |
| 11 | | - |
| 12 | } | - |
| 13 | | - |
| 14 | inline QIdentityProxyModel* q_func() { return static_cast<QIdentityProxyModel *>(q_ptr); } inline const QIdentityProxyModel* q_func() const { return static_cast<const QIdentityProxyModel *>(q_ptr); } friend class QIdentityProxyModel; | - |
| 15 | | - |
| 16 | QList<QPersistentModelIndex> layoutChangePersistentIndexes; | - |
| 17 | QModelIndexList proxyIndexes; | - |
| 18 | | - |
| 19 | void _q_sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end); | - |
| 20 | void _q_sourceRowsInserted(const QModelIndex &parent, int start, int end); | - |
| 21 | void _q_sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end); | - |
| 22 | void _q_sourceRowsRemoved(const QModelIndex &parent, int start, int end); | - |
| 23 | void _q_sourceRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest); | - |
| 24 | void _q_sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest); | - |
| 25 | | - |
| 26 | void _q_sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end); | - |
| 27 | void _q_sourceColumnsInserted(const QModelIndex &parent, int start, int end); | - |
| 28 | void _q_sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end); | - |
| 29 | void _q_sourceColumnsRemoved(const QModelIndex &parent, int start, int end); | - |
| 30 | void _q_sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest); | - |
| 31 | void _q_sourceColumnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest); | - |
| 32 | | - |
| 33 | void _q_sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles); | - |
| 34 | void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last); | - |
| 35 | | - |
| 36 | void _q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint); | - |
| 37 | void _q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint); | - |
| 38 | void _q_sourceModelAboutToBeReset(); | - |
| 39 | void _q_sourceModelReset(); | - |
| 40 | | - |
| 41 | }; | - |
| 42 | QIdentityProxyModel::QIdentityProxyModel(QObject* parent) | - |
| 43 | : QAbstractProxyModel(*new QIdentityProxyModelPrivate, parent) | - |
| 44 | { | - |
| 45 | | - |
| 46 | } executed: }Execution Count:1 | 1 |
| 47 | | - |
| 48 | | - |
| 49 | | - |
| 50 | | - |
| 51 | QIdentityProxyModel::QIdentityProxyModel(QIdentityProxyModelPrivate &dd, QObject* parent) | - |
| 52 | : QAbstractProxyModel(dd, parent) | - |
| 53 | { | - |
| 54 | | - |
| 55 | } | 0 |
| 56 | | - |
| 57 | | - |
| 58 | | - |
| 59 | | - |
| 60 | QIdentityProxyModel::~QIdentityProxyModel() | - |
| 61 | { | - |
| 62 | } | - |
| 63 | | - |
| 64 | | - |
| 65 | | - |
| 66 | | - |
| 67 | int QIdentityProxyModel::columnCount(const QModelIndex& parent) const | - |
| 68 | { | - |
| 69 | qt_noop(); | - |
| 70 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 71 | return d->model->columnCount(mapToSource(parent)); executed: return d->model->columnCount(mapToSource(parent));Execution Count:31 | 31 |
| 72 | } | - |
| 73 | | - |
| 74 | | - |
| 75 | | - |
| 76 | | - |
| 77 | bool QIdentityProxyModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) | - |
| 78 | { | - |
| 79 | qt_noop(); | - |
| 80 | QIdentityProxyModelPrivate * const d = d_func(); | - |
| 81 | return d->model->dropMimeData(data, action, row, column, mapToSource(parent)); never executed: return d->model->dropMimeData(data, action, row, column, mapToSource(parent)); | 0 |
| 82 | } | - |
| 83 | | - |
| 84 | | - |
| 85 | | - |
| 86 | | - |
| 87 | QModelIndex QIdentityProxyModel::index(int row, int column, const QModelIndex& parent) const | - |
| 88 | { | - |
| 89 | qt_noop(); | - |
| 90 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 91 | if (!hasIndex(row, column, parent)) never evaluated: !hasIndex(row, column, parent) | 0 |
| 92 | return QModelIndex(); never executed: return QModelIndex(); | 0 |
| 93 | const QModelIndex sourceParent = mapToSource(parent); | - |
| 94 | const QModelIndex sourceIndex = d->model->index(row, column, sourceParent); | - |
| 95 | qt_noop(); | - |
| 96 | return mapFromSource(sourceIndex); never executed: return mapFromSource(sourceIndex); | 0 |
| 97 | } | - |
| 98 | | - |
| 99 | | - |
| 100 | | - |
| 101 | | - |
| 102 | QModelIndex QIdentityProxyModel::sibling(int row, int column, const QModelIndex &idx) const | - |
| 103 | { | - |
| 104 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 105 | return mapFromSource(d->model->sibling(row, column, mapToSource(idx))); never executed: return mapFromSource(d->model->sibling(row, column, mapToSource(idx))); | 0 |
| 106 | } | - |
| 107 | | - |
| 108 | | - |
| 109 | | - |
| 110 | | - |
| 111 | bool QIdentityProxyModel::insertColumns(int column, int count, const QModelIndex& parent) | - |
| 112 | { | - |
| 113 | qt_noop(); | - |
| 114 | QIdentityProxyModelPrivate * const d = d_func(); | - |
| 115 | return d->model->insertColumns(column, count, mapToSource(parent)); never executed: return d->model->insertColumns(column, count, mapToSource(parent)); | 0 |
| 116 | } | - |
| 117 | | - |
| 118 | | - |
| 119 | | - |
| 120 | | - |
| 121 | bool QIdentityProxyModel::insertRows(int row, int count, const QModelIndex& parent) | - |
| 122 | { | - |
| 123 | qt_noop(); | - |
| 124 | QIdentityProxyModelPrivate * const d = d_func(); | - |
| 125 | return d->model->insertRows(row, count, mapToSource(parent)); never executed: return d->model->insertRows(row, count, mapToSource(parent)); | 0 |
| 126 | } | - |
| 127 | | - |
| 128 | | - |
| 129 | | - |
| 130 | | - |
| 131 | QModelIndex QIdentityProxyModel::mapFromSource(const QModelIndex& sourceIndex) const | - |
| 132 | { | - |
| 133 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 134 | if (!d->model || !sourceIndex.isValid()) partially evaluated: !d->model| no Evaluation Count:0 | yes Evaluation Count:236 |
evaluated: !sourceIndex.isValid()| yes Evaluation Count:65 | yes Evaluation Count:171 |
| 0-236 |
| 135 | return QModelIndex(); executed: return QModelIndex();Execution Count:65 | 65 |
| 136 | | - |
| 137 | qt_noop(); | - |
| 138 | return createIndex(sourceIndex.row(), sourceIndex.column(), sourceIndex.internalPointer()); executed: return createIndex(sourceIndex.row(), sourceIndex.column(), sourceIndex.internalPointer());Execution Count:171 | 171 |
| 139 | } | - |
| 140 | | - |
| 141 | | - |
| 142 | | - |
| 143 | | - |
| 144 | QItemSelection QIdentityProxyModel::mapSelectionFromSource(const QItemSelection& selection) const | - |
| 145 | { | - |
| 146 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 147 | QItemSelection proxySelection; | - |
| 148 | | - |
| 149 | if (!d->model) never evaluated: !d->model | 0 |
| 150 | return proxySelection; never executed: return proxySelection; | 0 |
| 151 | | - |
| 152 | QItemSelection::const_iterator it = selection.constBegin(); | - |
| 153 | const QItemSelection::const_iterator end = selection.constEnd(); | - |
| 154 | for ( ; it != end; ++it) { never evaluated: it != end | 0 |
| 155 | qt_noop(); | - |
| 156 | const QItemSelectionRange range(mapFromSource(it->topLeft()), mapFromSource(it->bottomRight())); | - |
| 157 | proxySelection.append(range); | - |
| 158 | } | 0 |
| 159 | | - |
| 160 | return proxySelection; never executed: return proxySelection; | 0 |
| 161 | } | - |
| 162 | | - |
| 163 | | - |
| 164 | | - |
| 165 | | - |
| 166 | QItemSelection QIdentityProxyModel::mapSelectionToSource(const QItemSelection& selection) const | - |
| 167 | { | - |
| 168 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 169 | QItemSelection sourceSelection; | - |
| 170 | | - |
| 171 | if (!d->model) never evaluated: !d->model | 0 |
| 172 | return sourceSelection; never executed: return sourceSelection; | 0 |
| 173 | | - |
| 174 | QItemSelection::const_iterator it = selection.constBegin(); | - |
| 175 | const QItemSelection::const_iterator end = selection.constEnd(); | - |
| 176 | for ( ; it != end; ++it) { never evaluated: it != end | 0 |
| 177 | qt_noop(); | - |
| 178 | const QItemSelectionRange range(mapToSource(it->topLeft()), mapToSource(it->bottomRight())); | - |
| 179 | sourceSelection.append(range); | - |
| 180 | } | 0 |
| 181 | | - |
| 182 | return sourceSelection; never executed: return sourceSelection; | 0 |
| 183 | } | - |
| 184 | | - |
| 185 | | - |
| 186 | | - |
| 187 | | - |
| 188 | QModelIndex QIdentityProxyModel::mapToSource(const QModelIndex& proxyIndex) const | - |
| 189 | { | - |
| 190 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 191 | if (!d->model || !proxyIndex.isValid()) partially evaluated: !d->model| no Evaluation Count:0 | yes Evaluation Count:677 |
evaluated: !proxyIndex.isValid()| yes Evaluation Count:35 | yes Evaluation Count:642 |
| 0-677 |
| 192 | return QModelIndex(); executed: return QModelIndex();Execution Count:35 | 35 |
| 193 | qt_noop(); | - |
| 194 | return d->model->createIndex(proxyIndex.row(), proxyIndex.column(), proxyIndex.internalPointer()); executed: return d->model->createIndex(proxyIndex.row(), proxyIndex.column(), proxyIndex.internalPointer());Execution Count:642 | 642 |
| 195 | } | - |
| 196 | | - |
| 197 | | - |
| 198 | | - |
| 199 | | - |
| 200 | QModelIndexList QIdentityProxyModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const | - |
| 201 | { | - |
| 202 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 203 | qt_noop(); | - |
| 204 | if (!d->model) never evaluated: !d->model | 0 |
| 205 | return QModelIndexList(); never executed: return QModelIndexList(); | 0 |
| 206 | | - |
| 207 | const QModelIndexList sourceList = d->model->match(mapToSource(start), role, value, hits, flags); | - |
| 208 | QModelIndexList::const_iterator it = sourceList.constBegin(); | - |
| 209 | const QModelIndexList::const_iterator end = sourceList.constEnd(); | - |
| 210 | QModelIndexList proxyList; | - |
| 211 | for ( ; it != end; ++it) never evaluated: it != end | 0 |
| 212 | proxyList.append(mapFromSource(*it)); never executed: proxyList.append(mapFromSource(*it)); | 0 |
| 213 | return proxyList; never executed: return proxyList; | 0 |
| 214 | } | - |
| 215 | | - |
| 216 | | - |
| 217 | | - |
| 218 | | - |
| 219 | QModelIndex QIdentityProxyModel::parent(const QModelIndex& child) const | - |
| 220 | { | - |
| 221 | qt_noop(); | - |
| 222 | const QModelIndex sourceIndex = mapToSource(child); | - |
| 223 | const QModelIndex sourceParent = sourceIndex.parent(); | - |
| 224 | return mapFromSource(sourceParent); executed: return mapFromSource(sourceParent);Execution Count:98 | 98 |
| 225 | } | - |
| 226 | | - |
| 227 | | - |
| 228 | | - |
| 229 | | - |
| 230 | bool QIdentityProxyModel::removeColumns(int column, int count, const QModelIndex& parent) | - |
| 231 | { | - |
| 232 | qt_noop(); | - |
| 233 | QIdentityProxyModelPrivate * const d = d_func(); | - |
| 234 | return d->model->removeColumns(column, count, mapToSource(parent)); never executed: return d->model->removeColumns(column, count, mapToSource(parent)); | 0 |
| 235 | } | - |
| 236 | | - |
| 237 | | - |
| 238 | | - |
| 239 | | - |
| 240 | bool QIdentityProxyModel::removeRows(int row, int count, const QModelIndex& parent) | - |
| 241 | { | - |
| 242 | qt_noop(); | - |
| 243 | QIdentityProxyModelPrivate * const d = d_func(); | - |
| 244 | return d->model->removeRows(row, count, mapToSource(parent)); never executed: return d->model->removeRows(row, count, mapToSource(parent)); | 0 |
| 245 | } | - |
| 246 | | - |
| 247 | | - |
| 248 | | - |
| 249 | | - |
| 250 | int QIdentityProxyModel::rowCount(const QModelIndex& parent) const | - |
| 251 | { | - |
| 252 | qt_noop(); | - |
| 253 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 254 | return d->model->rowCount(mapToSource(parent)); executed: return d->model->rowCount(mapToSource(parent));Execution Count:127 | 127 |
| 255 | } | - |
| 256 | | - |
| 257 | | - |
| 258 | | - |
| 259 | | - |
| 260 | QVariant QIdentityProxyModel::headerData(int section, Qt::Orientation orientation, int role) const | - |
| 261 | { | - |
| 262 | const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 263 | return d->model->headerData(section, orientation, role); never executed: return d->model->headerData(section, orientation, role); | 0 |
| 264 | } | - |
| 265 | | - |
| 266 | | - |
| 267 | | - |
| 268 | | - |
| 269 | void QIdentityProxyModel::setSourceModel(QAbstractItemModel* newSourceModel) | - |
| 270 | { | - |
| 271 | beginResetModel(); | - |
| 272 | | - |
| 273 | if (sourceModel()) { evaluated: sourceModel()| yes Evaluation Count:5 | yes Evaluation Count:3 |
| 3-5 |
| 274 | disconnect(sourceModel(), "2""rowsAboutToBeInserted(QModelIndex,int,int)", | - |
| 275 | this, "1""_q_sourceRowsAboutToBeInserted(QModelIndex,int,int)"); | - |
| 276 | disconnect(sourceModel(), "2""rowsInserted(QModelIndex,int,int)", | - |
| 277 | this, "1""_q_sourceRowsInserted(QModelIndex,int,int)"); | - |
| 278 | disconnect(sourceModel(), "2""rowsAboutToBeRemoved(QModelIndex,int,int)", | - |
| 279 | this, "1""_q_sourceRowsAboutToBeRemoved(QModelIndex,int,int)"); | - |
| 280 | disconnect(sourceModel(), "2""rowsRemoved(QModelIndex,int,int)", | - |
| 281 | this, "1""_q_sourceRowsRemoved(QModelIndex,int,int)"); | - |
| 282 | disconnect(sourceModel(), "2""rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 283 | this, "1""_q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 284 | disconnect(sourceModel(), "2""rowsMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 285 | this, "1""_q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 286 | disconnect(sourceModel(), "2""columnsAboutToBeInserted(QModelIndex,int,int)", | - |
| 287 | this, "1""_q_sourceColumnsAboutToBeInserted(QModelIndex,int,int)"); | - |
| 288 | disconnect(sourceModel(), "2""columnsInserted(QModelIndex,int,int)", | - |
| 289 | this, "1""_q_sourceColumnsInserted(QModelIndex,int,int)"); | - |
| 290 | disconnect(sourceModel(), "2""columnsAboutToBeRemoved(QModelIndex,int,int)", | - |
| 291 | this, "1""_q_sourceColumnsAboutToBeRemoved(QModelIndex,int,int)"); | - |
| 292 | disconnect(sourceModel(), "2""columnsRemoved(QModelIndex,int,int)", | - |
| 293 | this, "1""_q_sourceColumnsRemoved(QModelIndex,int,int)"); | - |
| 294 | disconnect(sourceModel(), "2""columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 295 | this, "1""_q_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 296 | disconnect(sourceModel(), "2""columnsMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 297 | this, "1""_q_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 298 | disconnect(sourceModel(), "2""modelAboutToBeReset()", | - |
| 299 | this, "1""_q_sourceModelAboutToBeReset()"); | - |
| 300 | disconnect(sourceModel(), "2""modelReset()", | - |
| 301 | this, "1""_q_sourceModelReset()"); | - |
| 302 | disconnect(sourceModel(), "2""dataChanged(QModelIndex,QModelIndex,QVector<int>)", | - |
| 303 | this, "1""_q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>)"); | - |
| 304 | disconnect(sourceModel(), "2""headerDataChanged(Qt::Orientation,int,int)", | - |
| 305 | this, "1""_q_sourceHeaderDataChanged(Qt::Orientation,int,int)"); | - |
| 306 | disconnect(sourceModel(), "2""layoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)", | - |
| 307 | this, "1""_q_sourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)"); | - |
| 308 | disconnect(sourceModel(), "2""layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)", | - |
| 309 | this, "1""_q_sourceLayoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)"); | - |
| 310 | } executed: }Execution Count:5 | 5 |
| 311 | | - |
| 312 | QAbstractProxyModel::setSourceModel(newSourceModel); | - |
| 313 | | - |
| 314 | if (sourceModel()) { evaluated: sourceModel()| yes Evaluation Count:5 | yes Evaluation Count:3 |
| 3-5 |
| 315 | connect(sourceModel(), "2""rowsAboutToBeInserted(QModelIndex,int,int)", | - |
| 316 | "1""_q_sourceRowsAboutToBeInserted(QModelIndex,int,int)"); | - |
| 317 | connect(sourceModel(), "2""rowsInserted(QModelIndex,int,int)", | - |
| 318 | "1""_q_sourceRowsInserted(QModelIndex,int,int)"); | - |
| 319 | connect(sourceModel(), "2""rowsAboutToBeRemoved(QModelIndex,int,int)", | - |
| 320 | "1""_q_sourceRowsAboutToBeRemoved(QModelIndex,int,int)"); | - |
| 321 | connect(sourceModel(), "2""rowsRemoved(QModelIndex,int,int)", | - |
| 322 | "1""_q_sourceRowsRemoved(QModelIndex,int,int)"); | - |
| 323 | connect(sourceModel(), "2""rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 324 | "1""_q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 325 | connect(sourceModel(), "2""rowsMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 326 | "1""_q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 327 | connect(sourceModel(), "2""columnsAboutToBeInserted(QModelIndex,int,int)", | - |
| 328 | "1""_q_sourceColumnsAboutToBeInserted(QModelIndex,int,int)"); | - |
| 329 | connect(sourceModel(), "2""columnsInserted(QModelIndex,int,int)", | - |
| 330 | "1""_q_sourceColumnsInserted(QModelIndex,int,int)"); | - |
| 331 | connect(sourceModel(), "2""columnsAboutToBeRemoved(QModelIndex,int,int)", | - |
| 332 | "1""_q_sourceColumnsAboutToBeRemoved(QModelIndex,int,int)"); | - |
| 333 | connect(sourceModel(), "2""columnsRemoved(QModelIndex,int,int)", | - |
| 334 | "1""_q_sourceColumnsRemoved(QModelIndex,int,int)"); | - |
| 335 | connect(sourceModel(), "2""columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 336 | "1""_q_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 337 | connect(sourceModel(), "2""columnsMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 338 | "1""_q_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 339 | connect(sourceModel(), "2""modelAboutToBeReset()", | - |
| 340 | "1""_q_sourceModelAboutToBeReset()"); | - |
| 341 | connect(sourceModel(), "2""modelReset()", | - |
| 342 | "1""_q_sourceModelReset()"); | - |
| 343 | connect(sourceModel(), "2""dataChanged(QModelIndex,QModelIndex,QVector<int>)", | - |
| 344 | "1""_q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>)"); | - |
| 345 | connect(sourceModel(), "2""headerDataChanged(Qt::Orientation,int,int)", | - |
| 346 | "1""_q_sourceHeaderDataChanged(Qt::Orientation,int,int)"); | - |
| 347 | connect(sourceModel(), "2""layoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)", | - |
| 348 | "1""_q_sourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)"); | - |
| 349 | connect(sourceModel(), "2""layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)", | - |
| 350 | "1""_q_sourceLayoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)"); | - |
| 351 | } executed: }Execution Count:5 | 5 |
| 352 | | - |
| 353 | endResetModel(); | - |
| 354 | } executed: }Execution Count:8 | 8 |
| 355 | | - |
| 356 | void QIdentityProxyModelPrivate::_q_sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end) | - |
| 357 | { | - |
| 358 | qt_noop(); | - |
| 359 | QIdentityProxyModel * const q = q_func(); | - |
| 360 | q->beginInsertColumns(q->mapFromSource(parent), start, end); | - |
| 361 | } executed: }Execution Count:6 | 6 |
| 362 | | - |
| 363 | void QIdentityProxyModelPrivate::_q_sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest) | - |
| 364 | { | - |
| 365 | qt_noop(); | - |
| 366 | qt_noop(); | - |
| 367 | QIdentityProxyModel * const q = q_func(); | - |
| 368 | q->beginMoveColumns(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destParent), dest); | - |
| 369 | } | 0 |
| 370 | | - |
| 371 | void QIdentityProxyModelPrivate::_q_sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end) | - |
| 372 | { | - |
| 373 | qt_noop(); | - |
| 374 | QIdentityProxyModel * const q = q_func(); | - |
| 375 | q->beginRemoveColumns(q->mapFromSource(parent), start, end); | - |
| 376 | } | 0 |
| 377 | | - |
| 378 | void QIdentityProxyModelPrivate::_q_sourceColumnsInserted(const QModelIndex &parent, int start, int end) | - |
| 379 | { | - |
| 380 | qt_noop(); | - |
| 381 | QIdentityProxyModel * const q = q_func(); | - |
| 382 | (void)parent; | - |
| 383 | (void)start; | - |
| 384 | (void)end; | - |
| 385 | q->endInsertColumns(); | - |
| 386 | } executed: }Execution Count:6 | 6 |
| 387 | | - |
| 388 | void QIdentityProxyModelPrivate::_q_sourceColumnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest) | - |
| 389 | { | - |
| 390 | qt_noop(); | - |
| 391 | qt_noop(); | - |
| 392 | QIdentityProxyModel * const q = q_func(); | - |
| 393 | (void)sourceParent; | - |
| 394 | (void)sourceStart; | - |
| 395 | (void)sourceEnd; | - |
| 396 | (void)destParent; | - |
| 397 | (void)dest; | - |
| 398 | q->endMoveColumns(); | - |
| 399 | } | 0 |
| 400 | | - |
| 401 | void QIdentityProxyModelPrivate::_q_sourceColumnsRemoved(const QModelIndex &parent, int start, int end) | - |
| 402 | { | - |
| 403 | qt_noop(); | - |
| 404 | QIdentityProxyModel * const q = q_func(); | - |
| 405 | (void)parent; | - |
| 406 | (void)start; | - |
| 407 | (void)end; | - |
| 408 | q->endRemoveColumns(); | - |
| 409 | } | 0 |
| 410 | | - |
| 411 | void QIdentityProxyModelPrivate::_q_sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles) | - |
| 412 | { | - |
| 413 | qt_noop(); | - |
| 414 | qt_noop(); | - |
| 415 | QIdentityProxyModel * const q = q_func(); | - |
| 416 | q->dataChanged(q->mapFromSource(topLeft), q->mapFromSource(bottomRight), roles); | - |
| 417 | } executed: }Execution Count:1 | 1 |
| 418 | | - |
| 419 | void QIdentityProxyModelPrivate::_q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last) | - |
| 420 | { | - |
| 421 | QIdentityProxyModel * const q = q_func(); | - |
| 422 | q->headerDataChanged(orientation, first, last); | - |
| 423 | } | 0 |
| 424 | | - |
| 425 | void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint) | - |
| 426 | { | - |
| 427 | QIdentityProxyModel * const q = q_func(); | - |
| 428 | | - |
| 429 | for (QForeachContainer<__typeof__(q->persistentIndexList())> _container_(q->persistentIndexList()); !_container_.brk && _container_.i != _container_.e; __extension__ ({ ++_container_.brk; ++_container_.i; })) for (const QPersistentModelIndex &proxyPersistentIndex = *_container_.i;; __extension__ ({--_container_.brk; break;})) { | - |
| 430 | proxyIndexes << proxyPersistentIndex; | - |
| 431 | qt_noop(); | - |
| 432 | const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex); | - |
| 433 | qt_noop(); | - |
| 434 | layoutChangePersistentIndexes << srcPersistentIndex; | - |
| 435 | } | 0 |
| 436 | | - |
| 437 | QList<QPersistentModelIndex> parents; | - |
| 438 | parents.reserve(sourceParents.size()); | - |
| 439 | for (QForeachContainer<__typeof__(sourceParents)> _container_(sourceParents); !_container_.brk && _container_.i != _container_.e; __extension__ ({ ++_container_.brk; ++_container_.i; })) for (const QPersistentModelIndex &parent = *_container_.i;; __extension__ ({--_container_.brk; break;})) { | - |
| 440 | if (!parent.isValid()) { never evaluated: !parent.isValid() | 0 |
| 441 | parents << QPersistentModelIndex(); | - |
| 442 | continue; never executed: continue; | 0 |
| 443 | } | - |
| 444 | const QModelIndex mappedParent = q->mapFromSource(parent); | - |
| 445 | qt_noop(); | - |
| 446 | parents << mappedParent; | - |
| 447 | } | 0 |
| 448 | | - |
| 449 | q->layoutAboutToBeChanged(parents, hint); | - |
| 450 | } | 0 |
| 451 | | - |
| 452 | void QIdentityProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint) | - |
| 453 | { | - |
| 454 | QIdentityProxyModel * const q = q_func(); | - |
| 455 | | - |
| 456 | for (int i = 0; i < proxyIndexes.size(); ++i) { never evaluated: i < proxyIndexes.size() | 0 |
| 457 | q->changePersistentIndex(proxyIndexes.at(i), q->mapFromSource(layoutChangePersistentIndexes.at(i))); | - |
| 458 | } | 0 |
| 459 | | - |
| 460 | layoutChangePersistentIndexes.clear(); | - |
| 461 | proxyIndexes.clear(); | - |
| 462 | | - |
| 463 | QList<QPersistentModelIndex> parents; | - |
| 464 | parents.reserve(sourceParents.size()); | - |
| 465 | for (QForeachContainer<__typeof__(sourceParents)> _container_(sourceParents); !_container_.brk && _container_.i != _container_.e; __extension__ ({ ++_container_.brk; ++_container_.i; })) for (const QPersistentModelIndex &parent = *_container_.i;; __extension__ ({--_container_.brk; break;})) { | - |
| 466 | if (!parent.isValid()) { never evaluated: !parent.isValid() | 0 |
| 467 | parents << QPersistentModelIndex(); | - |
| 468 | continue; never executed: continue; | 0 |
| 469 | } | - |
| 470 | const QModelIndex mappedParent = q->mapFromSource(parent); | - |
| 471 | qt_noop(); | - |
| 472 | parents << mappedParent; | - |
| 473 | } | 0 |
| 474 | | - |
| 475 | q->layoutChanged(parents, hint); | - |
| 476 | } | 0 |
| 477 | | - |
| 478 | void QIdentityProxyModelPrivate::_q_sourceModelAboutToBeReset() | - |
| 479 | { | - |
| 480 | QIdentityProxyModel * const q = q_func(); | - |
| 481 | q->beginResetModel(); | - |
| 482 | } executed: }Execution Count:3 | 3 |
| 483 | | - |
| 484 | void QIdentityProxyModelPrivate::_q_sourceModelReset() | - |
| 485 | { | - |
| 486 | QIdentityProxyModel * const q = q_func(); | - |
| 487 | q->endResetModel(); | - |
| 488 | } executed: }Execution Count:3 | 3 |
| 489 | | - |
| 490 | void QIdentityProxyModelPrivate::_q_sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end) | - |
| 491 | { | - |
| 492 | qt_noop(); | - |
| 493 | QIdentityProxyModel * const q = q_func(); | - |
| 494 | q->beginInsertRows(q->mapFromSource(parent), start, end); | - |
| 495 | } executed: }Execution Count:5 | 5 |
| 496 | | - |
| 497 | void QIdentityProxyModelPrivate::_q_sourceRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest) | - |
| 498 | { | - |
| 499 | qt_noop(); | - |
| 500 | qt_noop(); | - |
| 501 | QIdentityProxyModel * const q = q_func(); | - |
| 502 | q->beginMoveRows(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destParent), dest); | - |
| 503 | } executed: }Execution Count:1 | 1 |
| 504 | | - |
| 505 | void QIdentityProxyModelPrivate::_q_sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end) | - |
| 506 | { | - |
| 507 | qt_noop(); | - |
| 508 | QIdentityProxyModel * const q = q_func(); | - |
| 509 | q->beginRemoveRows(q->mapFromSource(parent), start, end); | - |
| 510 | } executed: }Execution Count:1 | 1 |
| 511 | | - |
| 512 | void QIdentityProxyModelPrivate::_q_sourceRowsInserted(const QModelIndex &parent, int start, int end) | - |
| 513 | { | - |
| 514 | qt_noop(); | - |
| 515 | QIdentityProxyModel * const q = q_func(); | - |
| 516 | (void)parent; | - |
| 517 | (void)start; | - |
| 518 | (void)end; | - |
| 519 | q->endInsertRows(); | - |
| 520 | } executed: }Execution Count:5 | 5 |
| 521 | | - |
| 522 | void QIdentityProxyModelPrivate::_q_sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest) | - |
| 523 | { | - |
| 524 | qt_noop(); | - |
| 525 | qt_noop(); | - |
| 526 | QIdentityProxyModel * const q = q_func(); | - |
| 527 | (void)sourceParent; | - |
| 528 | (void)sourceStart; | - |
| 529 | (void)sourceEnd; | - |
| 530 | (void)destParent; | - |
| 531 | (void)dest; | - |
| 532 | q->endMoveRows(); | - |
| 533 | } executed: }Execution Count:1 | 1 |
| 534 | | - |
| 535 | void QIdentityProxyModelPrivate::_q_sourceRowsRemoved(const QModelIndex &parent, int start, int end) | - |
| 536 | { | - |
| 537 | qt_noop(); | - |
| 538 | QIdentityProxyModel * const q = q_func(); | - |
| 539 | (void)parent; | - |
| 540 | (void)start; | - |
| 541 | (void)end; | - |
| 542 | q->endRemoveRows(); | - |
| 543 | } executed: }Execution Count:1 | 1 |
| 544 | | - |
| 545 | | - |
| 546 | | - |
| 547 | | - |
| | |