| Line | Source Code | Coverage |
|---|
| 1 | /**************************************************************************** | - |
| 2 | ** | - |
| 3 | ** Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com> | - |
| 4 | ** Contact: http://www.qt-project.org/legal | - |
| 5 | ** | - |
| 6 | ** This file is part of the QtGui module of the Qt Toolkit. | - |
| 7 | ** | - |
| 8 | ** $QT_BEGIN_LICENSE:LGPL$ | - |
| 9 | ** Commercial License Usage | - |
| 10 | ** Licensees holding valid commercial Qt licenses may use this file in | - |
| 11 | ** accordance with the commercial license agreement provided with the | - |
| 12 | ** Software or, alternatively, in accordance with the terms contained in | - |
| 13 | ** a written agreement between you and Digia. For licensing terms and | - |
| 14 | ** conditions see http://qt.digia.com/licensing. For further information | - |
| 15 | ** use the contact form at http://qt.digia.com/contact-us. | - |
| 16 | ** | - |
| 17 | ** GNU Lesser General Public License Usage | - |
| 18 | ** Alternatively, this file may be used under the terms of the GNU Lesser | - |
| 19 | ** General Public License version 2.1 as published by the Free Software | - |
| 20 | ** Foundation and appearing in the file LICENSE.LGPL included in the | - |
| 21 | ** packaging of this file. Please review the following information to | - |
| 22 | ** ensure the GNU Lesser General Public License version 2.1 requirements | - |
| 23 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. | - |
| 24 | ** | - |
| 25 | ** In addition, as a special exception, Digia gives you certain additional | - |
| 26 | ** rights. These rights are described in the Digia Qt LGPL Exception | - |
| 27 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. | - |
| 28 | ** | - |
| 29 | ** GNU General Public License Usage | - |
| 30 | ** Alternatively, this file may be used under the terms of the GNU | - |
| 31 | ** General Public License version 3.0 as published by the Free Software | - |
| 32 | ** Foundation and appearing in the file LICENSE.GPL included in the | - |
| 33 | ** packaging of this file. Please review the following information to | - |
| 34 | ** ensure the GNU General Public License version 3.0 requirements will be | - |
| 35 | ** met: http://www.gnu.org/copyleft/gpl.html. | - |
| 36 | ** | - |
| 37 | ** | - |
| 38 | ** $QT_END_LICENSE$ | - |
| 39 | ** | - |
| 40 | ****************************************************************************/ | - |
| 41 | | - |
| 42 | #include "qidentityproxymodel.h" | - |
| 43 | | - |
| 44 | #ifndef QT_NO_IDENTITYPROXYMODEL | - |
| 45 | | - |
| 46 | #include "qitemselectionmodel.h" | - |
| 47 | #include <private/qabstractproxymodel_p.h> | - |
| 48 | | - |
| 49 | QT_BEGIN_NAMESPACE | - |
| 50 | | - |
| 51 | class QIdentityProxyModelPrivate : public QAbstractProxyModelPrivate | - |
| 52 | { | - |
| 53 | QIdentityProxyModelPrivate() | - |
| 54 | { | - |
| 55 | | - |
| 56 | } | - |
| 57 | | - |
| 58 | Q_DECLARE_PUBLIC(QIdentityProxyModel) | - |
| 59 | | - |
| 60 | QList<QPersistentModelIndex> layoutChangePersistentIndexes; | - |
| 61 | QModelIndexList proxyIndexes; | - |
| 62 | | - |
| 63 | void _q_sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end); | - |
| 64 | void _q_sourceRowsInserted(const QModelIndex &parent, int start, int end); | - |
| 65 | void _q_sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end); | - |
| 66 | void _q_sourceRowsRemoved(const QModelIndex &parent, int start, int end); | - |
| 67 | void _q_sourceRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest); | - |
| 68 | void _q_sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest); | - |
| 69 | | - |
| 70 | void _q_sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end); | - |
| 71 | void _q_sourceColumnsInserted(const QModelIndex &parent, int start, int end); | - |
| 72 | void _q_sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end); | - |
| 73 | void _q_sourceColumnsRemoved(const QModelIndex &parent, int start, int end); | - |
| 74 | void _q_sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest); | - |
| 75 | void _q_sourceColumnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest); | - |
| 76 | | - |
| 77 | void _q_sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles); | - |
| 78 | void _q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last); | - |
| 79 | | - |
| 80 | void _q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint); | - |
| 81 | void _q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint); | - |
| 82 | void _q_sourceModelAboutToBeReset(); | - |
| 83 | void _q_sourceModelReset(); | - |
| 84 | | - |
| 85 | }; | - |
| 86 | | - |
| 87 | /*! | - |
| 88 | \since 4.8 | - |
| 89 | \class QIdentityProxyModel | - |
| 90 | \inmodule QtCore | - |
| 91 | \brief The QIdentityProxyModel class proxies its source model unmodified | - |
| 92 | | - |
| 93 | \ingroup model-view | - |
| 94 | | - |
| 95 | QIdentityProxyModel can be used to forward the structure of a source model exactly, with no sorting, filtering or other transformation. | - |
| 96 | This is similar in concept to an identity matrix where A.I = A. | - |
| 97 | | - |
| 98 | Because it does no sorting or filtering, this class is most suitable to proxy models which transform the data() of the source model. | - |
| 99 | For example, a proxy model could be created to define the font used, or the background colour, or the tooltip etc. This removes the | - |
| 100 | need to implement all data handling in the same class that creates the structure of the model, and can also be used to create | - |
| 101 | re-usable components. | - |
| 102 | | - |
| 103 | This also provides a way to change the data in the case where a source model is supplied by a third party which can not be modified. | - |
| 104 | | - |
| 105 | \snippet code/src_gui_itemviews_qidentityproxymodel.cpp 0 | - |
| 106 | | - |
| 107 | \sa QAbstractProxyModel, {Model/View Programming}, QAbstractItemModel | - |
| 108 | | - |
| 109 | */ | - |
| 110 | | - |
| 111 | /*! | - |
| 112 | Constructs an identity model with the given \a parent. | - |
| 113 | */ | - |
| 114 | QIdentityProxyModel::QIdentityProxyModel(QObject* parent) | - |
| 115 | : QAbstractProxyModel(*new QIdentityProxyModelPrivate, parent) | - |
| 116 | { | - |
| 117 | | - |
| 118 | } executed: }Execution Count:1 | 1 |
| 119 | | - |
| 120 | /*! | - |
| 121 | \internal | - |
| 122 | */ | - |
| 123 | QIdentityProxyModel::QIdentityProxyModel(QIdentityProxyModelPrivate &dd, QObject* parent) | - |
| 124 | : QAbstractProxyModel(dd, parent) | - |
| 125 | { | - |
| 126 | | - |
| 127 | } | 0 |
| 128 | | - |
| 129 | /*! | - |
| 130 | Destroys this identity model. | - |
| 131 | */ | - |
| 132 | QIdentityProxyModel::~QIdentityProxyModel() | - |
| 133 | { | - |
| 134 | } | - |
| 135 | | - |
| 136 | /*! | - |
| 137 | \reimp | - |
| 138 | */ | - |
| 139 | int QIdentityProxyModel::columnCount(const QModelIndex& parent) const | - |
| 140 | { | - |
| 141 | Q_ASSERT(parent.isValid() ? parent.model() == this : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 142 | Q_D(const QIdentityProxyModel); executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 143 | return d->model->columnCount(mapToSource(parent)); executed: return d->model->columnCount(mapToSource(parent));Execution Count:31 | 31 |
| 144 | } | - |
| 145 | | - |
| 146 | /*! | - |
| 147 | \reimp | - |
| 148 | */ | - |
| 149 | bool QIdentityProxyModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent) | - |
| 150 | { | - |
| 151 | Q_ASSERT(parent.isValid() ? parent.model() == this : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 152 | Q_D(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModelPrivate * const d = d_func(); | - |
| 153 | return d->model->dropMimeData(data, action, row, column, mapToSource(parent)); never executed: return d->model->dropMimeData(data, action, row, column, mapToSource(parent)); | 0 |
| 154 | } | - |
| 155 | | - |
| 156 | /*! | - |
| 157 | \reimp | - |
| 158 | */ | - |
| 159 | QModelIndex QIdentityProxyModel::index(int row, int column, const QModelIndex& parent) const | - |
| 160 | { | - |
| 161 | Q_ASSERT(parent.isValid() ? parent.model() == this : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 162 | Q_D(const QIdentityProxyModel); never executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 163 | if (!hasIndex(row, column, parent)) never evaluated: !hasIndex(row, column, parent) | 0 |
| 164 | return QModelIndex(); never executed: return QModelIndex(); | 0 |
| 165 | const QModelIndex sourceParent = mapToSource(parent); never executed (the execution status of this line is deduced): const QModelIndex sourceParent = mapToSource(parent); | - |
| 166 | const QModelIndex sourceIndex = d->model->index(row, column, sourceParent); never executed (the execution status of this line is deduced): const QModelIndex sourceIndex = d->model->index(row, column, sourceParent); | - |
| 167 | Q_ASSERT(sourceIndex.isValid()); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 168 | return mapFromSource(sourceIndex); never executed: return mapFromSource(sourceIndex); | 0 |
| 169 | } | - |
| 170 | | - |
| 171 | /*! | - |
| 172 | \reimp | - |
| 173 | */ | - |
| 174 | QModelIndex QIdentityProxyModel::sibling(int row, int column, const QModelIndex &idx) const | - |
| 175 | { | - |
| 176 | Q_D(const QIdentityProxyModel); never executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 177 | return mapFromSource(d->model->sibling(row, column, mapToSource(idx))); never executed: return mapFromSource(d->model->sibling(row, column, mapToSource(idx))); | 0 |
| 178 | } | - |
| 179 | | - |
| 180 | /*! | - |
| 181 | \reimp | - |
| 182 | */ | - |
| 183 | bool QIdentityProxyModel::insertColumns(int column, int count, const QModelIndex& parent) | - |
| 184 | { | - |
| 185 | Q_ASSERT(parent.isValid() ? parent.model() == this : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 186 | Q_D(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModelPrivate * const d = d_func(); | - |
| 187 | return d->model->insertColumns(column, count, mapToSource(parent)); never executed: return d->model->insertColumns(column, count, mapToSource(parent)); | 0 |
| 188 | } | - |
| 189 | | - |
| 190 | /*! | - |
| 191 | \reimp | - |
| 192 | */ | - |
| 193 | bool QIdentityProxyModel::insertRows(int row, int count, const QModelIndex& parent) | - |
| 194 | { | - |
| 195 | Q_ASSERT(parent.isValid() ? parent.model() == this : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 196 | Q_D(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModelPrivate * const d = d_func(); | - |
| 197 | return d->model->insertRows(row, count, mapToSource(parent)); never executed: return d->model->insertRows(row, count, mapToSource(parent)); | 0 |
| 198 | } | - |
| 199 | | - |
| 200 | /*! | - |
| 201 | \reimp | - |
| 202 | */ | - |
| 203 | QModelIndex QIdentityProxyModel::mapFromSource(const QModelIndex& sourceIndex) const | - |
| 204 | { | - |
| 205 | Q_D(const QIdentityProxyModel); executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 206 | 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 |
| 207 | return QModelIndex(); executed: return QModelIndex();Execution Count:65 | 65 |
| 208 | | - |
| 209 | Q_ASSERT(sourceIndex.model() == d->model); executed (the execution status of this line is deduced): qt_noop(); | - |
| 210 | return createIndex(sourceIndex.row(), sourceIndex.column(), sourceIndex.internalPointer()); executed: return createIndex(sourceIndex.row(), sourceIndex.column(), sourceIndex.internalPointer());Execution Count:171 | 171 |
| 211 | } | - |
| 212 | | - |
| 213 | /*! | - |
| 214 | \reimp | - |
| 215 | */ | - |
| 216 | QItemSelection QIdentityProxyModel::mapSelectionFromSource(const QItemSelection& selection) const | - |
| 217 | { | - |
| 218 | Q_D(const QIdentityProxyModel); never executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 219 | QItemSelection proxySelection; never executed (the execution status of this line is deduced): QItemSelection proxySelection; | - |
| 220 | | - |
| 221 | if (!d->model) never evaluated: !d->model | 0 |
| 222 | return proxySelection; never executed: return proxySelection; | 0 |
| 223 | | - |
| 224 | QItemSelection::const_iterator it = selection.constBegin(); never executed (the execution status of this line is deduced): QItemSelection::const_iterator it = selection.constBegin(); | - |
| 225 | const QItemSelection::const_iterator end = selection.constEnd(); never executed (the execution status of this line is deduced): const QItemSelection::const_iterator end = selection.constEnd(); | - |
| 226 | for ( ; it != end; ++it) { never evaluated: it != end | 0 |
| 227 | Q_ASSERT(it->model() == d->model); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 228 | const QItemSelectionRange range(mapFromSource(it->topLeft()), mapFromSource(it->bottomRight())); never executed (the execution status of this line is deduced): const QItemSelectionRange range(mapFromSource(it->topLeft()), mapFromSource(it->bottomRight())); | - |
| 229 | proxySelection.append(range); never executed (the execution status of this line is deduced): proxySelection.append(range); | - |
| 230 | } | 0 |
| 231 | | - |
| 232 | return proxySelection; never executed: return proxySelection; | 0 |
| 233 | } | - |
| 234 | | - |
| 235 | /*! | - |
| 236 | \reimp | - |
| 237 | */ | - |
| 238 | QItemSelection QIdentityProxyModel::mapSelectionToSource(const QItemSelection& selection) const | - |
| 239 | { | - |
| 240 | Q_D(const QIdentityProxyModel); never executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 241 | QItemSelection sourceSelection; never executed (the execution status of this line is deduced): QItemSelection sourceSelection; | - |
| 242 | | - |
| 243 | if (!d->model) never evaluated: !d->model | 0 |
| 244 | return sourceSelection; never executed: return sourceSelection; | 0 |
| 245 | | - |
| 246 | QItemSelection::const_iterator it = selection.constBegin(); never executed (the execution status of this line is deduced): QItemSelection::const_iterator it = selection.constBegin(); | - |
| 247 | const QItemSelection::const_iterator end = selection.constEnd(); never executed (the execution status of this line is deduced): const QItemSelection::const_iterator end = selection.constEnd(); | - |
| 248 | for ( ; it != end; ++it) { never evaluated: it != end | 0 |
| 249 | Q_ASSERT(it->model() == this); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 250 | const QItemSelectionRange range(mapToSource(it->topLeft()), mapToSource(it->bottomRight())); never executed (the execution status of this line is deduced): const QItemSelectionRange range(mapToSource(it->topLeft()), mapToSource(it->bottomRight())); | - |
| 251 | sourceSelection.append(range); never executed (the execution status of this line is deduced): sourceSelection.append(range); | - |
| 252 | } | 0 |
| 253 | | - |
| 254 | return sourceSelection; never executed: return sourceSelection; | 0 |
| 255 | } | - |
| 256 | | - |
| 257 | /*! | - |
| 258 | \reimp | - |
| 259 | */ | - |
| 260 | QModelIndex QIdentityProxyModel::mapToSource(const QModelIndex& proxyIndex) const | - |
| 261 | { | - |
| 262 | Q_D(const QIdentityProxyModel); executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 263 | 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 |
| 264 | return QModelIndex(); executed: return QModelIndex();Execution Count:35 | 35 |
| 265 | Q_ASSERT(proxyIndex.model() == this); executed (the execution status of this line is deduced): qt_noop(); | - |
| 266 | 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 |
| 267 | } | - |
| 268 | | - |
| 269 | /*! | - |
| 270 | \reimp | - |
| 271 | */ | - |
| 272 | QModelIndexList QIdentityProxyModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const | - |
| 273 | { | - |
| 274 | Q_D(const QIdentityProxyModel); never executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 275 | Q_ASSERT(start.isValid() ? start.model() == this : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 276 | if (!d->model) never evaluated: !d->model | 0 |
| 277 | return QModelIndexList(); never executed: return QModelIndexList(); | 0 |
| 278 | | - |
| 279 | const QModelIndexList sourceList = d->model->match(mapToSource(start), role, value, hits, flags); never executed (the execution status of this line is deduced): const QModelIndexList sourceList = d->model->match(mapToSource(start), role, value, hits, flags); | - |
| 280 | QModelIndexList::const_iterator it = sourceList.constBegin(); never executed (the execution status of this line is deduced): QModelIndexList::const_iterator it = sourceList.constBegin(); | - |
| 281 | const QModelIndexList::const_iterator end = sourceList.constEnd(); never executed (the execution status of this line is deduced): const QModelIndexList::const_iterator end = sourceList.constEnd(); | - |
| 282 | QModelIndexList proxyList; never executed (the execution status of this line is deduced): QModelIndexList proxyList; | - |
| 283 | for ( ; it != end; ++it) never evaluated: it != end | 0 |
| 284 | proxyList.append(mapFromSource(*it)); never executed: proxyList.append(mapFromSource(*it)); | 0 |
| 285 | return proxyList; never executed: return proxyList; | 0 |
| 286 | } | - |
| 287 | | - |
| 288 | /*! | - |
| 289 | \reimp | - |
| 290 | */ | - |
| 291 | QModelIndex QIdentityProxyModel::parent(const QModelIndex& child) const | - |
| 292 | { | - |
| 293 | Q_ASSERT(child.isValid() ? child.model() == this : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 294 | const QModelIndex sourceIndex = mapToSource(child); executed (the execution status of this line is deduced): const QModelIndex sourceIndex = mapToSource(child); | - |
| 295 | const QModelIndex sourceParent = sourceIndex.parent(); executed (the execution status of this line is deduced): const QModelIndex sourceParent = sourceIndex.parent(); | - |
| 296 | return mapFromSource(sourceParent); executed: return mapFromSource(sourceParent);Execution Count:98 | 98 |
| 297 | } | - |
| 298 | | - |
| 299 | /*! | - |
| 300 | \reimp | - |
| 301 | */ | - |
| 302 | bool QIdentityProxyModel::removeColumns(int column, int count, const QModelIndex& parent) | - |
| 303 | { | - |
| 304 | Q_ASSERT(parent.isValid() ? parent.model() == this : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 305 | Q_D(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModelPrivate * const d = d_func(); | - |
| 306 | return d->model->removeColumns(column, count, mapToSource(parent)); never executed: return d->model->removeColumns(column, count, mapToSource(parent)); | 0 |
| 307 | } | - |
| 308 | | - |
| 309 | /*! | - |
| 310 | \reimp | - |
| 311 | */ | - |
| 312 | bool QIdentityProxyModel::removeRows(int row, int count, const QModelIndex& parent) | - |
| 313 | { | - |
| 314 | Q_ASSERT(parent.isValid() ? parent.model() == this : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 315 | Q_D(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModelPrivate * const d = d_func(); | - |
| 316 | return d->model->removeRows(row, count, mapToSource(parent)); never executed: return d->model->removeRows(row, count, mapToSource(parent)); | 0 |
| 317 | } | - |
| 318 | | - |
| 319 | /*! | - |
| 320 | \reimp | - |
| 321 | */ | - |
| 322 | int QIdentityProxyModel::rowCount(const QModelIndex& parent) const | - |
| 323 | { | - |
| 324 | Q_ASSERT(parent.isValid() ? parent.model() == this : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 325 | Q_D(const QIdentityProxyModel); executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 326 | return d->model->rowCount(mapToSource(parent)); executed: return d->model->rowCount(mapToSource(parent));Execution Count:127 | 127 |
| 327 | } | - |
| 328 | | - |
| 329 | /*! | - |
| 330 | \reimp | - |
| 331 | */ | - |
| 332 | QVariant QIdentityProxyModel::headerData(int section, Qt::Orientation orientation, int role) const | - |
| 333 | { | - |
| 334 | Q_D(const QIdentityProxyModel); never executed (the execution status of this line is deduced): const QIdentityProxyModelPrivate * const d = d_func(); | - |
| 335 | return d->model->headerData(section, orientation, role); never executed: return d->model->headerData(section, orientation, role); | 0 |
| 336 | } | - |
| 337 | | - |
| 338 | /*! | - |
| 339 | \reimp | - |
| 340 | */ | - |
| 341 | void QIdentityProxyModel::setSourceModel(QAbstractItemModel* newSourceModel) | - |
| 342 | { | - |
| 343 | beginResetModel(); executed (the execution status of this line is deduced): beginResetModel(); | - |
| 344 | | - |
| 345 | if (sourceModel()) { evaluated: sourceModel()| yes Evaluation Count:5 | yes Evaluation Count:3 |
| 3-5 |
| 346 | disconnect(sourceModel(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""rowsAboutToBeInserted(QModelIndex,int,int)", | - |
| 347 | this, SLOT(_q_sourceRowsAboutToBeInserted(QModelIndex,int,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceRowsAboutToBeInserted(QModelIndex,int,int)"); | - |
| 348 | disconnect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""rowsInserted(QModelIndex,int,int)", | - |
| 349 | this, SLOT(_q_sourceRowsInserted(QModelIndex,int,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceRowsInserted(QModelIndex,int,int)"); | - |
| 350 | disconnect(sourceModel(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""rowsAboutToBeRemoved(QModelIndex,int,int)", | - |
| 351 | this, SLOT(_q_sourceRowsAboutToBeRemoved(QModelIndex,int,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceRowsAboutToBeRemoved(QModelIndex,int,int)"); | - |
| 352 | disconnect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""rowsRemoved(QModelIndex,int,int)", | - |
| 353 | this, SLOT(_q_sourceRowsRemoved(QModelIndex,int,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceRowsRemoved(QModelIndex,int,int)"); | - |
| 354 | disconnect(sourceModel(), SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 355 | this, SLOT(_q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 356 | disconnect(sourceModel(), SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""rowsMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 357 | this, SLOT(_q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 358 | disconnect(sourceModel(), SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""columnsAboutToBeInserted(QModelIndex,int,int)", | - |
| 359 | this, SLOT(_q_sourceColumnsAboutToBeInserted(QModelIndex,int,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceColumnsAboutToBeInserted(QModelIndex,int,int)"); | - |
| 360 | disconnect(sourceModel(), SIGNAL(columnsInserted(QModelIndex,int,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""columnsInserted(QModelIndex,int,int)", | - |
| 361 | this, SLOT(_q_sourceColumnsInserted(QModelIndex,int,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceColumnsInserted(QModelIndex,int,int)"); | - |
| 362 | disconnect(sourceModel(), SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""columnsAboutToBeRemoved(QModelIndex,int,int)", | - |
| 363 | this, SLOT(_q_sourceColumnsAboutToBeRemoved(QModelIndex,int,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceColumnsAboutToBeRemoved(QModelIndex,int,int)"); | - |
| 364 | disconnect(sourceModel(), SIGNAL(columnsRemoved(QModelIndex,int,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""columnsRemoved(QModelIndex,int,int)", | - |
| 365 | this, SLOT(_q_sourceColumnsRemoved(QModelIndex,int,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceColumnsRemoved(QModelIndex,int,int)"); | - |
| 366 | disconnect(sourceModel(), SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 367 | this, SLOT(_q_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 368 | disconnect(sourceModel(), SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""columnsMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 369 | this, SLOT(_q_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 370 | disconnect(sourceModel(), SIGNAL(modelAboutToBeReset()), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""modelAboutToBeReset()", | - |
| 371 | this, SLOT(_q_sourceModelAboutToBeReset())); executed (the execution status of this line is deduced): this, "1""_q_sourceModelAboutToBeReset()"); | - |
| 372 | disconnect(sourceModel(), SIGNAL(modelReset()), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""modelReset()", | - |
| 373 | this, SLOT(_q_sourceModelReset())); executed (the execution status of this line is deduced): this, "1""_q_sourceModelReset()"); | - |
| 374 | disconnect(sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""dataChanged(QModelIndex,QModelIndex,QVector<int>)", | - |
| 375 | this, SLOT(_q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>))); executed (the execution status of this line is deduced): this, "1""_q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>)"); | - |
| 376 | disconnect(sourceModel(), SIGNAL(headerDataChanged(Qt::Orientation,int,int)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""headerDataChanged(Qt::Orientation,int,int)", | - |
| 377 | this, SLOT(_q_sourceHeaderDataChanged(Qt::Orientation,int,int))); executed (the execution status of this line is deduced): this, "1""_q_sourceHeaderDataChanged(Qt::Orientation,int,int)"); | - |
| 378 | disconnect(sourceModel(), SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""layoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)", | - |
| 379 | this, SLOT(_q_sourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint))); executed (the execution status of this line is deduced): this, "1""_q_sourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)"); | - |
| 380 | disconnect(sourceModel(), SIGNAL(layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)), executed (the execution status of this line is deduced): disconnect(sourceModel(), "2""layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)", | - |
| 381 | this, SLOT(_q_sourceLayoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint))); executed (the execution status of this line is deduced): this, "1""_q_sourceLayoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)"); | - |
| 382 | } executed: }Execution Count:5 | 5 |
| 383 | | - |
| 384 | QAbstractProxyModel::setSourceModel(newSourceModel); executed (the execution status of this line is deduced): QAbstractProxyModel::setSourceModel(newSourceModel); | - |
| 385 | | - |
| 386 | if (sourceModel()) { evaluated: sourceModel()| yes Evaluation Count:5 | yes Evaluation Count:3 |
| 3-5 |
| 387 | connect(sourceModel(), SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""rowsAboutToBeInserted(QModelIndex,int,int)", | - |
| 388 | SLOT(_q_sourceRowsAboutToBeInserted(QModelIndex,int,int))); executed (the execution status of this line is deduced): "1""_q_sourceRowsAboutToBeInserted(QModelIndex,int,int)"); | - |
| 389 | connect(sourceModel(), SIGNAL(rowsInserted(QModelIndex,int,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""rowsInserted(QModelIndex,int,int)", | - |
| 390 | SLOT(_q_sourceRowsInserted(QModelIndex,int,int))); executed (the execution status of this line is deduced): "1""_q_sourceRowsInserted(QModelIndex,int,int)"); | - |
| 391 | connect(sourceModel(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""rowsAboutToBeRemoved(QModelIndex,int,int)", | - |
| 392 | SLOT(_q_sourceRowsAboutToBeRemoved(QModelIndex,int,int))); executed (the execution status of this line is deduced): "1""_q_sourceRowsAboutToBeRemoved(QModelIndex,int,int)"); | - |
| 393 | connect(sourceModel(), SIGNAL(rowsRemoved(QModelIndex,int,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""rowsRemoved(QModelIndex,int,int)", | - |
| 394 | SLOT(_q_sourceRowsRemoved(QModelIndex,int,int))); executed (the execution status of this line is deduced): "1""_q_sourceRowsRemoved(QModelIndex,int,int)"); | - |
| 395 | connect(sourceModel(), SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 396 | SLOT(_q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); executed (the execution status of this line is deduced): "1""_q_sourceRowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 397 | connect(sourceModel(), SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""rowsMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 398 | SLOT(_q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int))); executed (the execution status of this line is deduced): "1""_q_sourceRowsMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 399 | connect(sourceModel(), SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""columnsAboutToBeInserted(QModelIndex,int,int)", | - |
| 400 | SLOT(_q_sourceColumnsAboutToBeInserted(QModelIndex,int,int))); executed (the execution status of this line is deduced): "1""_q_sourceColumnsAboutToBeInserted(QModelIndex,int,int)"); | - |
| 401 | connect(sourceModel(), SIGNAL(columnsInserted(QModelIndex,int,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""columnsInserted(QModelIndex,int,int)", | - |
| 402 | SLOT(_q_sourceColumnsInserted(QModelIndex,int,int))); executed (the execution status of this line is deduced): "1""_q_sourceColumnsInserted(QModelIndex,int,int)"); | - |
| 403 | connect(sourceModel(), SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""columnsAboutToBeRemoved(QModelIndex,int,int)", | - |
| 404 | SLOT(_q_sourceColumnsAboutToBeRemoved(QModelIndex,int,int))); executed (the execution status of this line is deduced): "1""_q_sourceColumnsAboutToBeRemoved(QModelIndex,int,int)"); | - |
| 405 | connect(sourceModel(), SIGNAL(columnsRemoved(QModelIndex,int,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""columnsRemoved(QModelIndex,int,int)", | - |
| 406 | SLOT(_q_sourceColumnsRemoved(QModelIndex,int,int))); executed (the execution status of this line is deduced): "1""_q_sourceColumnsRemoved(QModelIndex,int,int)"); | - |
| 407 | connect(sourceModel(), SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 408 | SLOT(_q_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); executed (the execution status of this line is deduced): "1""_q_sourceColumnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 409 | connect(sourceModel(), SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""columnsMoved(QModelIndex,int,int,QModelIndex,int)", | - |
| 410 | SLOT(_q_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int))); executed (the execution status of this line is deduced): "1""_q_sourceColumnsMoved(QModelIndex,int,int,QModelIndex,int)"); | - |
| 411 | connect(sourceModel(), SIGNAL(modelAboutToBeReset()), executed (the execution status of this line is deduced): connect(sourceModel(), "2""modelAboutToBeReset()", | - |
| 412 | SLOT(_q_sourceModelAboutToBeReset())); executed (the execution status of this line is deduced): "1""_q_sourceModelAboutToBeReset()"); | - |
| 413 | connect(sourceModel(), SIGNAL(modelReset()), executed (the execution status of this line is deduced): connect(sourceModel(), "2""modelReset()", | - |
| 414 | SLOT(_q_sourceModelReset())); executed (the execution status of this line is deduced): "1""_q_sourceModelReset()"); | - |
| 415 | connect(sourceModel(), SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""dataChanged(QModelIndex,QModelIndex,QVector<int>)", | - |
| 416 | SLOT(_q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>))); executed (the execution status of this line is deduced): "1""_q_sourceDataChanged(QModelIndex,QModelIndex,QVector<int>)"); | - |
| 417 | connect(sourceModel(), SIGNAL(headerDataChanged(Qt::Orientation,int,int)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""headerDataChanged(Qt::Orientation,int,int)", | - |
| 418 | SLOT(_q_sourceHeaderDataChanged(Qt::Orientation,int,int))); executed (the execution status of this line is deduced): "1""_q_sourceHeaderDataChanged(Qt::Orientation,int,int)"); | - |
| 419 | connect(sourceModel(), SIGNAL(layoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""layoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)", | - |
| 420 | SLOT(_q_sourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint))); executed (the execution status of this line is deduced): "1""_q_sourceLayoutAboutToBeChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)"); | - |
| 421 | connect(sourceModel(), SIGNAL(layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)), executed (the execution status of this line is deduced): connect(sourceModel(), "2""layoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)", | - |
| 422 | SLOT(_q_sourceLayoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint))); executed (the execution status of this line is deduced): "1""_q_sourceLayoutChanged(QList<QPersistentModelIndex>,QAbstractItemModel::LayoutChangeHint)"); | - |
| 423 | } executed: }Execution Count:5 | 5 |
| 424 | | - |
| 425 | endResetModel(); executed (the execution status of this line is deduced): endResetModel(); | - |
| 426 | } executed: }Execution Count:8 | 8 |
| 427 | | - |
| 428 | void QIdentityProxyModelPrivate::_q_sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end) | - |
| 429 | { | - |
| 430 | Q_ASSERT(parent.isValid() ? parent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 431 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 432 | q->beginInsertColumns(q->mapFromSource(parent), start, end); executed (the execution status of this line is deduced): q->beginInsertColumns(q->mapFromSource(parent), start, end); | - |
| 433 | } executed: }Execution Count:6 | 6 |
| 434 | | - |
| 435 | void QIdentityProxyModelPrivate::_q_sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest) | - |
| 436 | { | - |
| 437 | Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 438 | Q_ASSERT(destParent.isValid() ? destParent.model() == model : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 439 | Q_Q(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 440 | q->beginMoveColumns(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destParent), dest); never executed (the execution status of this line is deduced): q->beginMoveColumns(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destParent), dest); | - |
| 441 | } | 0 |
| 442 | | - |
| 443 | void QIdentityProxyModelPrivate::_q_sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end) | - |
| 444 | { | - |
| 445 | Q_ASSERT(parent.isValid() ? parent.model() == model : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 446 | Q_Q(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 447 | q->beginRemoveColumns(q->mapFromSource(parent), start, end); never executed (the execution status of this line is deduced): q->beginRemoveColumns(q->mapFromSource(parent), start, end); | - |
| 448 | } | 0 |
| 449 | | - |
| 450 | void QIdentityProxyModelPrivate::_q_sourceColumnsInserted(const QModelIndex &parent, int start, int end) | - |
| 451 | { | - |
| 452 | Q_ASSERT(parent.isValid() ? parent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 453 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 454 | Q_UNUSED(parent) executed (the execution status of this line is deduced): (void)parent; | - |
| 455 | Q_UNUSED(start) executed (the execution status of this line is deduced): (void)start; | - |
| 456 | Q_UNUSED(end) executed (the execution status of this line is deduced): (void)end; | - |
| 457 | q->endInsertColumns(); executed (the execution status of this line is deduced): q->endInsertColumns(); | - |
| 458 | } executed: }Execution Count:6 | 6 |
| 459 | | - |
| 460 | void QIdentityProxyModelPrivate::_q_sourceColumnsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest) | - |
| 461 | { | - |
| 462 | Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 463 | Q_ASSERT(destParent.isValid() ? destParent.model() == model : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 464 | Q_Q(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 465 | Q_UNUSED(sourceParent) never executed (the execution status of this line is deduced): (void)sourceParent; | - |
| 466 | Q_UNUSED(sourceStart) never executed (the execution status of this line is deduced): (void)sourceStart; | - |
| 467 | Q_UNUSED(sourceEnd) never executed (the execution status of this line is deduced): (void)sourceEnd; | - |
| 468 | Q_UNUSED(destParent) never executed (the execution status of this line is deduced): (void)destParent; | - |
| 469 | Q_UNUSED(dest) never executed (the execution status of this line is deduced): (void)dest; | - |
| 470 | q->endMoveColumns(); never executed (the execution status of this line is deduced): q->endMoveColumns(); | - |
| 471 | } | 0 |
| 472 | | - |
| 473 | void QIdentityProxyModelPrivate::_q_sourceColumnsRemoved(const QModelIndex &parent, int start, int end) | - |
| 474 | { | - |
| 475 | Q_ASSERT(parent.isValid() ? parent.model() == model : true); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 476 | Q_Q(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 477 | Q_UNUSED(parent) never executed (the execution status of this line is deduced): (void)parent; | - |
| 478 | Q_UNUSED(start) never executed (the execution status of this line is deduced): (void)start; | - |
| 479 | Q_UNUSED(end) never executed (the execution status of this line is deduced): (void)end; | - |
| 480 | q->endRemoveColumns(); never executed (the execution status of this line is deduced): q->endRemoveColumns(); | - |
| 481 | } | 0 |
| 482 | | - |
| 483 | void QIdentityProxyModelPrivate::_q_sourceDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles) | - |
| 484 | { | - |
| 485 | Q_ASSERT(topLeft.isValid() ? topLeft.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 486 | Q_ASSERT(bottomRight.isValid() ? bottomRight.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 487 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 488 | q->dataChanged(q->mapFromSource(topLeft), q->mapFromSource(bottomRight), roles); executed (the execution status of this line is deduced): q->dataChanged(q->mapFromSource(topLeft), q->mapFromSource(bottomRight), roles); | - |
| 489 | } executed: }Execution Count:1 | 1 |
| 490 | | - |
| 491 | void QIdentityProxyModelPrivate::_q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last) | - |
| 492 | { | - |
| 493 | Q_Q(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 494 | q->headerDataChanged(orientation, first, last); never executed (the execution status of this line is deduced): q->headerDataChanged(orientation, first, last); | - |
| 495 | } | 0 |
| 496 | | - |
| 497 | void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint) | - |
| 498 | { | - |
| 499 | Q_Q(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 500 | | - |
| 501 | foreach(const QPersistentModelIndex &proxyPersistentIndex, q->persistentIndexList()) { never executed (the execution status of this line is deduced): 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;})) { | - |
| 502 | proxyIndexes << proxyPersistentIndex; never executed (the execution status of this line is deduced): proxyIndexes << proxyPersistentIndex; | - |
| 503 | Q_ASSERT(proxyPersistentIndex.isValid()); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 504 | const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex); never executed (the execution status of this line is deduced): const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex); | - |
| 505 | Q_ASSERT(srcPersistentIndex.isValid()); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 506 | layoutChangePersistentIndexes << srcPersistentIndex; never executed (the execution status of this line is deduced): layoutChangePersistentIndexes << srcPersistentIndex; | - |
| 507 | } | 0 |
| 508 | | - |
| 509 | QList<QPersistentModelIndex> parents; never executed (the execution status of this line is deduced): QList<QPersistentModelIndex> parents; | - |
| 510 | parents.reserve(sourceParents.size()); never executed (the execution status of this line is deduced): parents.reserve(sourceParents.size()); | - |
| 511 | foreach (const QPersistentModelIndex &parent, sourceParents) { never executed (the execution status of this line is deduced): 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;})) { | - |
| 512 | if (!parent.isValid()) { never evaluated: !parent.isValid() | 0 |
| 513 | parents << QPersistentModelIndex(); never executed (the execution status of this line is deduced): parents << QPersistentModelIndex(); | - |
| 514 | continue; never executed: continue; | 0 |
| 515 | } | - |
| 516 | const QModelIndex mappedParent = q->mapFromSource(parent); never executed (the execution status of this line is deduced): const QModelIndex mappedParent = q->mapFromSource(parent); | - |
| 517 | Q_ASSERT(mappedParent.isValid()); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 518 | parents << mappedParent; never executed (the execution status of this line is deduced): parents << mappedParent; | - |
| 519 | } | 0 |
| 520 | | - |
| 521 | q->layoutAboutToBeChanged(parents, hint); never executed (the execution status of this line is deduced): q->layoutAboutToBeChanged(parents, hint); | - |
| 522 | } | 0 |
| 523 | | - |
| 524 | void QIdentityProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint) | - |
| 525 | { | - |
| 526 | Q_Q(QIdentityProxyModel); never executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 527 | | - |
| 528 | for (int i = 0; i < proxyIndexes.size(); ++i) { never evaluated: i < proxyIndexes.size() | 0 |
| 529 | q->changePersistentIndex(proxyIndexes.at(i), q->mapFromSource(layoutChangePersistentIndexes.at(i))); never executed (the execution status of this line is deduced): q->changePersistentIndex(proxyIndexes.at(i), q->mapFromSource(layoutChangePersistentIndexes.at(i))); | - |
| 530 | } | 0 |
| 531 | | - |
| 532 | layoutChangePersistentIndexes.clear(); never executed (the execution status of this line is deduced): layoutChangePersistentIndexes.clear(); | - |
| 533 | proxyIndexes.clear(); never executed (the execution status of this line is deduced): proxyIndexes.clear(); | - |
| 534 | | - |
| 535 | QList<QPersistentModelIndex> parents; never executed (the execution status of this line is deduced): QList<QPersistentModelIndex> parents; | - |
| 536 | parents.reserve(sourceParents.size()); never executed (the execution status of this line is deduced): parents.reserve(sourceParents.size()); | - |
| 537 | foreach (const QPersistentModelIndex &parent, sourceParents) { never executed (the execution status of this line is deduced): 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;})) { | - |
| 538 | if (!parent.isValid()) { never evaluated: !parent.isValid() | 0 |
| 539 | parents << QPersistentModelIndex(); never executed (the execution status of this line is deduced): parents << QPersistentModelIndex(); | - |
| 540 | continue; never executed: continue; | 0 |
| 541 | } | - |
| 542 | const QModelIndex mappedParent = q->mapFromSource(parent); never executed (the execution status of this line is deduced): const QModelIndex mappedParent = q->mapFromSource(parent); | - |
| 543 | Q_ASSERT(mappedParent.isValid()); never executed (the execution status of this line is deduced): qt_noop(); | - |
| 544 | parents << mappedParent; never executed (the execution status of this line is deduced): parents << mappedParent; | - |
| 545 | } | 0 |
| 546 | | - |
| 547 | q->layoutChanged(parents, hint); never executed (the execution status of this line is deduced): q->layoutChanged(parents, hint); | - |
| 548 | } | 0 |
| 549 | | - |
| 550 | void QIdentityProxyModelPrivate::_q_sourceModelAboutToBeReset() | - |
| 551 | { | - |
| 552 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 553 | q->beginResetModel(); executed (the execution status of this line is deduced): q->beginResetModel(); | - |
| 554 | } executed: }Execution Count:3 | 3 |
| 555 | | - |
| 556 | void QIdentityProxyModelPrivate::_q_sourceModelReset() | - |
| 557 | { | - |
| 558 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 559 | q->endResetModel(); executed (the execution status of this line is deduced): q->endResetModel(); | - |
| 560 | } executed: }Execution Count:3 | 3 |
| 561 | | - |
| 562 | void QIdentityProxyModelPrivate::_q_sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end) | - |
| 563 | { | - |
| 564 | Q_ASSERT(parent.isValid() ? parent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 565 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 566 | q->beginInsertRows(q->mapFromSource(parent), start, end); executed (the execution status of this line is deduced): q->beginInsertRows(q->mapFromSource(parent), start, end); | - |
| 567 | } executed: }Execution Count:5 | 5 |
| 568 | | - |
| 569 | void QIdentityProxyModelPrivate::_q_sourceRowsAboutToBeMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest) | - |
| 570 | { | - |
| 571 | Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 572 | Q_ASSERT(destParent.isValid() ? destParent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 573 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 574 | q->beginMoveRows(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destParent), dest); executed (the execution status of this line is deduced): q->beginMoveRows(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destParent), dest); | - |
| 575 | } executed: }Execution Count:1 | 1 |
| 576 | | - |
| 577 | void QIdentityProxyModelPrivate::_q_sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end) | - |
| 578 | { | - |
| 579 | Q_ASSERT(parent.isValid() ? parent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 580 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 581 | q->beginRemoveRows(q->mapFromSource(parent), start, end); executed (the execution status of this line is deduced): q->beginRemoveRows(q->mapFromSource(parent), start, end); | - |
| 582 | } executed: }Execution Count:1 | 1 |
| 583 | | - |
| 584 | void QIdentityProxyModelPrivate::_q_sourceRowsInserted(const QModelIndex &parent, int start, int end) | - |
| 585 | { | - |
| 586 | Q_ASSERT(parent.isValid() ? parent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 587 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 588 | Q_UNUSED(parent) executed (the execution status of this line is deduced): (void)parent; | - |
| 589 | Q_UNUSED(start) executed (the execution status of this line is deduced): (void)start; | - |
| 590 | Q_UNUSED(end) executed (the execution status of this line is deduced): (void)end; | - |
| 591 | q->endInsertRows(); executed (the execution status of this line is deduced): q->endInsertRows(); | - |
| 592 | } executed: }Execution Count:5 | 5 |
| 593 | | - |
| 594 | void QIdentityProxyModelPrivate::_q_sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart, int sourceEnd, const QModelIndex &destParent, int dest) | - |
| 595 | { | - |
| 596 | Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 597 | Q_ASSERT(destParent.isValid() ? destParent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 598 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 599 | Q_UNUSED(sourceParent) executed (the execution status of this line is deduced): (void)sourceParent; | - |
| 600 | Q_UNUSED(sourceStart) executed (the execution status of this line is deduced): (void)sourceStart; | - |
| 601 | Q_UNUSED(sourceEnd) executed (the execution status of this line is deduced): (void)sourceEnd; | - |
| 602 | Q_UNUSED(destParent) executed (the execution status of this line is deduced): (void)destParent; | - |
| 603 | Q_UNUSED(dest) executed (the execution status of this line is deduced): (void)dest; | - |
| 604 | q->endMoveRows(); executed (the execution status of this line is deduced): q->endMoveRows(); | - |
| 605 | } executed: }Execution Count:1 | 1 |
| 606 | | - |
| 607 | void QIdentityProxyModelPrivate::_q_sourceRowsRemoved(const QModelIndex &parent, int start, int end) | - |
| 608 | { | - |
| 609 | Q_ASSERT(parent.isValid() ? parent.model() == model : true); executed (the execution status of this line is deduced): qt_noop(); | - |
| 610 | Q_Q(QIdentityProxyModel); executed (the execution status of this line is deduced): QIdentityProxyModel * const q = q_func(); | - |
| 611 | Q_UNUSED(parent) executed (the execution status of this line is deduced): (void)parent; | - |
| 612 | Q_UNUSED(start) executed (the execution status of this line is deduced): (void)start; | - |
| 613 | Q_UNUSED(end) executed (the execution status of this line is deduced): (void)end; | - |
| 614 | q->endRemoveRows(); executed (the execution status of this line is deduced): q->endRemoveRows(); | - |
| 615 | } executed: }Execution Count:1 | 1 |
| 616 | | - |
| 617 | QT_END_NAMESPACE | - |
| 618 | | - |
| 619 | #include "moc_qidentityproxymodel.cpp" | - |
| 620 | | - |
| 621 | #endif // QT_NO_IDENTITYPROXYMODEL | - |
| 622 | | - |
| | |