Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qidentityproxymodel.cpp
Go to the documentation of this file.
1// Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
8#include <private/qabstractproxymodel_p.h>
9
10QT_BEGIN_NAMESPACE
11
12QIdentityProxyModelPrivate::QIdentityProxyModelPrivate()
13 = default;
14
15QIdentityProxyModelPrivate::~QIdentityProxyModelPrivate()
16 = default;
17
18/*!
19 \since 4.8
20 \class QIdentityProxyModel
21 \inmodule QtCore
22 \brief The QIdentityProxyModel class proxies its source model unmodified.
23
24 \ingroup model-view
25
26 QIdentityProxyModel can be used to forward the structure of a source model exactly, with no sorting, filtering or other transformation.
27 This is similar in concept to an identity matrix where A.I = A.
28
29 Because it does no sorting or filtering, this class is most suitable to proxy models which transform the data() of the source model.
30 For example, a proxy model could be created to define the font used, or the background colour, or the tooltip etc. This removes the
31 need to implement all data handling in the same class that creates the structure of the model, and can also be used to create
32 re-usable components.
33
34 This also provides a way to change the data in the case where a source model is supplied by a third party which cannot be modified.
35
36 \snippet code/src_gui_itemviews_qidentityproxymodel.cpp 0
37
38 \sa QAbstractProxyModel, {Model/View Programming}, QAbstractItemModel
39
40*/
41
42/*!
43 Constructs an identity model with the given \a parent.
44*/
45QIdentityProxyModel::QIdentityProxyModel(QObject* parent)
46 : QAbstractProxyModel(*new QIdentityProxyModelPrivate, parent)
47{
48
49}
50
51/*!
52 \internal
53 */
54QIdentityProxyModel::QIdentityProxyModel(QIdentityProxyModelPrivate &dd, QObject* parent)
55 : QAbstractProxyModel(dd, parent)
56{
57
58}
59
60/*!
61 Destroys this identity model.
62*/
63QIdentityProxyModel::~QIdentityProxyModel()
64{
65}
66
67/*!
68 \reimp
69 */
70int QIdentityProxyModel::columnCount(const QModelIndex& parent) const
71{
72 Q_ASSERT(parent.isValid() ? parent.model() == this : true);
73 Q_D(const QIdentityProxyModel);
74 return d->model->columnCount(mapToSource(parent));
75}
76
77/*!
78 \reimp
79 */
80bool QIdentityProxyModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column, const QModelIndex& parent)
81{
82 Q_ASSERT(parent.isValid() ? parent.model() == this : true);
83 Q_D(QIdentityProxyModel);
84 return d->model->dropMimeData(data, action, row, column, mapToSource(parent));
85}
86
87/*!
88 \reimp
89 */
90QModelIndex QIdentityProxyModel::index(int row, int column, const QModelIndex& parent) const
91{
92 Q_ASSERT(parent.isValid() ? parent.model() == this : true);
93 Q_D(const QIdentityProxyModel);
94 const QModelIndex sourceParent = mapToSource(parent);
95 const QModelIndex sourceIndex = d->model->index(row, column, sourceParent);
96 return mapFromSource(sourceIndex);
97}
98
99/*!
100 \reimp
101 */
102QModelIndex QIdentityProxyModel::sibling(int row, int column, const QModelIndex &idx) const
103{
104 Q_D(const QIdentityProxyModel);
105 return mapFromSource(d->model->sibling(row, column, mapToSource(idx)));
106}
107
108/*!
109 \reimp
110 */
111bool QIdentityProxyModel::insertColumns(int column, int count, const QModelIndex& parent)
112{
113 Q_ASSERT(parent.isValid() ? parent.model() == this : true);
114 Q_D(QIdentityProxyModel);
115 return d->model->insertColumns(column, count, mapToSource(parent));
116}
117
118/*!
119 \reimp
120 */
121bool QIdentityProxyModel::insertRows(int row, int count, const QModelIndex& parent)
122{
123 Q_ASSERT(parent.isValid() ? parent.model() == this : true);
124 Q_D(QIdentityProxyModel);
125 return d->model->insertRows(row, count, mapToSource(parent));
126}
127
128/*!
129 \reimp
130 */
131QModelIndex QIdentityProxyModel::mapFromSource(const QModelIndex& sourceIndex) const
132{
133 Q_D(const QIdentityProxyModel);
134 if (!d->model || !sourceIndex.isValid())
135 return QModelIndex();
136
137 Q_ASSERT(sourceIndex.model() == d->model);
138 return createIndex(sourceIndex.row(), sourceIndex.column(), sourceIndex.internalPointer());
139}
140
141/*!
142 \reimp
143 */
144QItemSelection QIdentityProxyModel::mapSelectionFromSource(const QItemSelection& selection) const
145{
146 Q_D(const QIdentityProxyModel);
147 QItemSelection proxySelection;
148
149 if (!d->model)
150 return proxySelection;
151
152 QItemSelection::const_iterator it = selection.constBegin();
153 const QItemSelection::const_iterator end = selection.constEnd();
154 proxySelection.reserve(selection.size());
155 for ( ; it != end; ++it) {
156 Q_ASSERT(it->model() == d->model);
157 const QItemSelectionRange range(mapFromSource(it->topLeft()), mapFromSource(it->bottomRight()));
158 proxySelection.append(range);
159 }
160
161 return proxySelection;
162}
163
164/*!
165 \reimp
166 */
167QItemSelection QIdentityProxyModel::mapSelectionToSource(const QItemSelection& selection) const
168{
169 Q_D(const QIdentityProxyModel);
170 QItemSelection sourceSelection;
171
172 if (!d->model)
173 return sourceSelection;
174
175 QItemSelection::const_iterator it = selection.constBegin();
176 const QItemSelection::const_iterator end = selection.constEnd();
177 sourceSelection.reserve(selection.size());
178 for ( ; it != end; ++it) {
179 Q_ASSERT(it->model() == this);
180 const QItemSelectionRange range(mapToSource(it->topLeft()), mapToSource(it->bottomRight()));
181 sourceSelection.append(range);
182 }
183
184 return sourceSelection;
185}
186
187/*!
188 \reimp
189 */
190QModelIndex QIdentityProxyModel::mapToSource(const QModelIndex& proxyIndex) const
191{
192 Q_D(const QIdentityProxyModel);
193 if (!d->model || !proxyIndex.isValid())
194 return QModelIndex();
195 Q_ASSERT(proxyIndex.model() == this);
196 return createSourceIndex(proxyIndex.row(), proxyIndex.column(), proxyIndex.internalPointer());
197}
198
199/*!
200 \reimp
201 */
202QModelIndexList QIdentityProxyModel::match(const QModelIndex& start, int role, const QVariant& value, int hits, Qt::MatchFlags flags) const
203{
204 return QAbstractProxyModel::match(start, role, value, hits, flags);
205}
206
207/*!
208 \reimp
209 */
210QModelIndex QIdentityProxyModel::parent(const QModelIndex& child) const
211{
212 Q_ASSERT(child.isValid() ? child.model() == this : true);
213 const QModelIndex sourceIndex = mapToSource(child);
214 const QModelIndex sourceParent = sourceIndex.parent();
215 return mapFromSource(sourceParent);
216}
217
218/*!
219 \reimp
220 */
221bool QIdentityProxyModel::removeColumns(int column, int count, const QModelIndex& parent)
222{
223 Q_ASSERT(parent.isValid() ? parent.model() == this : true);
224 Q_D(QIdentityProxyModel);
225 return d->model->removeColumns(column, count, mapToSource(parent));
226}
227
228/*!
229 \reimp
230 */
231bool QIdentityProxyModel::removeRows(int row, int count, const QModelIndex& parent)
232{
233 Q_ASSERT(parent.isValid() ? parent.model() == this : true);
234 Q_D(QIdentityProxyModel);
235 return d->model->removeRows(row, count, mapToSource(parent));
236}
237
238/*!
239 \reimp
240 \since 5.15
241 */
242bool QIdentityProxyModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)
243{
244 Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == this : true);
245 Q_ASSERT(destinationParent.isValid() ? destinationParent.model() == this : true);
246 Q_D(QIdentityProxyModel);
247 return d->model->moveRows(mapToSource(sourceParent), sourceRow, count, mapToSource(destinationParent), destinationChild);
248}
249
250/*!
251 \reimp
252 \since 5.15
253 */
254bool QIdentityProxyModel::moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destinationParent, int destinationChild)
255{
256 Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == this : true);
257 Q_ASSERT(destinationParent.isValid() ? destinationParent.model() == this : true);
258 Q_D(QIdentityProxyModel);
259 return d->model->moveColumns(mapToSource(sourceParent), sourceColumn, count, mapToSource(destinationParent), destinationChild);
260}
261
262/*!
263 \reimp
264 */
265int QIdentityProxyModel::rowCount(const QModelIndex& parent) const
266{
267 Q_ASSERT(parent.isValid() ? parent.model() == this : true);
268 Q_D(const QIdentityProxyModel);
269 return d->model->rowCount(mapToSource(parent));
270}
271
272/*!
273 \reimp
274 */
275QVariant QIdentityProxyModel::headerData(int section, Qt::Orientation orientation, int role) const
276{
277 Q_D(const QIdentityProxyModel);
278 return d->model->headerData(section, orientation, role);
279}
280
281/*!
282 \reimp
283 */
284void QIdentityProxyModel::setSourceModel(QAbstractItemModel* newSourceModel)
285{
286 Q_D(QIdentityProxyModel);
287
288 if (newSourceModel == d->model)
289 return;
290
291 beginResetModel();
292
293 // Call QObject::disconnect() unconditionally, if there is an existing source
294 // model, it's disconnected, and if there isn't, then calling disconnect() on
295 // a default-constructed Connection does nothing
296 for (auto &c : d->m_sourceModelConnections)
297 QObject::disconnect(c);
298
299 QAbstractProxyModel::setSourceModel(newSourceModel);
300
301 if (sourceModel()) {
302 auto *m = sourceModel();
303 using C = QMetaObject::Connection;
304 d->m_sourceModelConnections = std::array{
305 QObjectPrivate::connect(m, &QAbstractItemModel::rowsAboutToBeInserted, d,
306 &QIdentityProxyModelPrivate::sourceRowsAboutToBeInserted),
307 QObjectPrivate::connect(m, &QAbstractItemModel::rowsInserted, d,
308 &QIdentityProxyModelPrivate::sourceRowsInserted),
309 QObjectPrivate::connect(m, &QAbstractItemModel::rowsAboutToBeRemoved, d,
310 &QIdentityProxyModelPrivate::sourceRowsAboutToBeRemoved),
311 QObjectPrivate::connect(m, &QAbstractItemModel::rowsRemoved, d,
312 &QIdentityProxyModelPrivate::sourceRowsRemoved),
313 QObjectPrivate::connect(m, &QAbstractItemModel::rowsAboutToBeMoved, d,
314 &QIdentityProxyModelPrivate::sourceRowsAboutToBeMoved),
315 QObjectPrivate::connect(m, &QAbstractItemModel::rowsMoved, d,
316 &QIdentityProxyModelPrivate::sourceRowsMoved),
317 QObjectPrivate::connect(m, &QAbstractItemModel::columnsAboutToBeInserted, d,
318 &QIdentityProxyModelPrivate::sourceColumnsAboutToBeInserted),
319 QObjectPrivate::connect(m, &QAbstractItemModel::columnsInserted, d,
320 &QIdentityProxyModelPrivate::sourceColumnsInserted),
321 QObjectPrivate::connect(m, &QAbstractItemModel::columnsAboutToBeRemoved, d,
322 &QIdentityProxyModelPrivate::sourceColumnsAboutToBeRemoved),
323 QObjectPrivate::connect(m, &QAbstractItemModel::columnsRemoved, d,
324 &QIdentityProxyModelPrivate::sourceColumnsRemoved),
325 QObjectPrivate::connect(m, &QAbstractItemModel::columnsAboutToBeMoved, d,
326 &QIdentityProxyModelPrivate::sourceColumnsAboutToBeMoved),
327 QObjectPrivate::connect(m, &QAbstractItemModel::columnsMoved, d,
328 &QIdentityProxyModelPrivate::sourceColumnsMoved),
329 QObjectPrivate::connect(m, &QAbstractItemModel::modelAboutToBeReset, d,
330 &QIdentityProxyModelPrivate::sourceModelAboutToBeReset),
331 QObjectPrivate::connect(m, &QAbstractItemModel::modelReset, d,
332 &QIdentityProxyModelPrivate::sourceModelReset),
333 QObjectPrivate::connect(m, &QAbstractItemModel::headerDataChanged, d,
334 &QIdentityProxyModelPrivate::sourceHeaderDataChanged),
335 !d->m_handleDataChanges ? C{} :
336 QObjectPrivate::connect(m, &QAbstractItemModel::dataChanged, d,
337 &QIdentityProxyModelPrivate::sourceDataChanged),
338 !d->m_handleLayoutChanges ? C{} :
339 QObjectPrivate::connect(m, &QAbstractItemModel::layoutAboutToBeChanged, d,
340 &QIdentityProxyModelPrivate::sourceLayoutAboutToBeChanged),
341 !d->m_handleLayoutChanges ? C{} :
342 QObjectPrivate::connect(m, &QAbstractItemModel::layoutChanged, d,
343 &QIdentityProxyModelPrivate::sourceLayoutChanged),
344 };
345 }
346
347 endResetModel();
348}
349
350/*!
351 \since 6.8
352
353 If \a b is \c true, this proxy model will handle the source model layout
354 changes (by connecting to \c QAbstractItemModel::layoutAboutToBeChanged
355 and \c QAbstractItemModel::layoutChanged signals).
356
357 The default is for this proxy model to handle the source model layout
358 changes.
359
360 In sub-classes of QIdentityProxyModel, it may be useful to set this to
361 \c false if you need to specially handle the source model layout changes.
362
363 \note Calling this method will only have an effect after calling setSourceModel().
364*/
365void QIdentityProxyModel::setHandleSourceLayoutChanges(bool b)
366{
367 d_func()->m_handleLayoutChanges = b;
368}
369
370/*!
371 \since 6.8
372
373 Returns \c true if this proxy model handles the source model layout
374 changes, otherwise returns \c false.
375*/
376bool QIdentityProxyModel::handleSourceLayoutChanges() const
377{
378 return d_func()->m_handleLayoutChanges;
379}
380
381/*!
382 \since 6.8
383
384 If \a b is \c true, this proxy model will handle the source model data
385 changes (by connecting to \c QAbstractItemModel::dataChanged signal).
386
387 The default is for this proxy model to handle the source model data
388 changes.
389
390 In sub-classes of QIdentityProxyModel, it may be useful to set this to
391 \c false if you need to specially handle the source model data changes.
392
393 \note Calling this method will only have an effect after calling setSourceModel().
394*/
395void QIdentityProxyModel::setHandleSourceDataChanges(bool b)
396{
397 d_func()->m_handleDataChanges = b;
398}
399
400/*!
401 \since 6.8
402
403 Returns \c true if this proxy model handles the source model data
404 changes, otherwise returns \c false.
405*/
406bool QIdentityProxyModel::handleSourceDataChanges() const
407{
408 return d_func()->m_handleDataChanges;
409}
410
411void QIdentityProxyModelPrivate::sourceColumnsAboutToBeInserted(const QModelIndex &parent, int start, int end)
412{
413 Q_ASSERT(parent.isValid() ? parent.model() == model : true);
414 Q_Q(QIdentityProxyModel);
415 q->beginInsertColumns(q->mapFromSource(parent), start, end);
416}
417
418void QIdentityProxyModelPrivate::sourceColumnsAboutToBeMoved(const QModelIndex &sourceParent,
419 int sourceStart, int sourceEnd,
420 const QModelIndex &destParent,
421 int dest)
422{
423 Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);
424 Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);
425 Q_Q(QIdentityProxyModel);
426 q->beginMoveColumns(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destParent), dest);
427}
428
429void QIdentityProxyModelPrivate::sourceColumnsAboutToBeRemoved(const QModelIndex &parent, int start, int end)
430{
431 Q_ASSERT(parent.isValid() ? parent.model() == model : true);
432 Q_Q(QIdentityProxyModel);
433 q->beginRemoveColumns(q->mapFromSource(parent), start, end);
434}
435
436void QIdentityProxyModelPrivate::sourceColumnsInserted(const QModelIndex &parent, int start, int end)
437{
438 Q_ASSERT(parent.isValid() ? parent.model() == model : true);
439 Q_Q(QIdentityProxyModel);
440 Q_UNUSED(parent);
441 Q_UNUSED(start);
442 Q_UNUSED(end);
443 q->endInsertColumns();
444}
445
446void QIdentityProxyModelPrivate::sourceColumnsMoved(const QModelIndex &sourceParent,
447 int sourceStart, int sourceEnd,
448 const QModelIndex &destParent, int dest)
449{
450 Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);
451 Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);
452 Q_Q(QIdentityProxyModel);
453 Q_UNUSED(sourceParent);
454 Q_UNUSED(sourceStart);
455 Q_UNUSED(sourceEnd);
456 Q_UNUSED(destParent);
457 Q_UNUSED(dest);
458 q->endMoveColumns();
459}
460
461void QIdentityProxyModelPrivate::sourceColumnsRemoved(const QModelIndex &parent, int start, int end)
462{
463 Q_ASSERT(parent.isValid() ? parent.model() == model : true);
464 Q_Q(QIdentityProxyModel);
465 Q_UNUSED(parent);
466 Q_UNUSED(start);
467 Q_UNUSED(end);
468 q->endRemoveColumns();
469}
470
471void QIdentityProxyModelPrivate::sourceDataChanged(const QModelIndex &topLeft,
472 const QModelIndex &bottomRight,
473 const QList<int> &roles)
474{
475 Q_ASSERT(topLeft.isValid() ? topLeft.model() == model : true);
476 Q_ASSERT(bottomRight.isValid() ? bottomRight.model() == model : true);
477 Q_Q(QIdentityProxyModel);
478 emit q->dataChanged(q->mapFromSource(topLeft), q->mapFromSource(bottomRight), roles);
479}
480
481void QIdentityProxyModelPrivate::sourceHeaderDataChanged(Qt::Orientation orientation, int first,
482 int last)
483{
484 Q_Q(QIdentityProxyModel);
485 emit q->headerDataChanged(orientation, first, last);
486}
487
488void QIdentityProxyModelPrivate::sourceLayoutAboutToBeChanged(
489 const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
490{
491 Q_Q(QIdentityProxyModel);
492
493 QList<QPersistentModelIndex> parents;
494 parents.reserve(sourceParents.size());
495 for (const QPersistentModelIndex &parent : sourceParents) {
496 if (!parent.isValid()) {
497 parents << QPersistentModelIndex();
498 continue;
499 }
500 const QModelIndex mappedParent = q->mapFromSource(parent);
501 Q_ASSERT(mappedParent.isValid());
502 parents << mappedParent;
503 }
504
505 emit q->layoutAboutToBeChanged(parents, hint);
506
507 const auto proxyPersistentIndexes = q->persistentIndexList();
508 for (const QModelIndex &proxyPersistentIndex : proxyPersistentIndexes) {
509 proxyIndexes << proxyPersistentIndex;
510 Q_ASSERT(proxyPersistentIndex.isValid());
511 const QPersistentModelIndex srcPersistentIndex = q->mapToSource(proxyPersistentIndex);
512 Q_ASSERT(srcPersistentIndex.isValid());
513 layoutChangePersistentIndexes << srcPersistentIndex;
514 }
515}
516
517void QIdentityProxyModelPrivate::sourceLayoutChanged(
518 const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
519{
520 Q_Q(QIdentityProxyModel);
521
522 for (int i = 0; i < proxyIndexes.size(); ++i) {
523 q->changePersistentIndex(proxyIndexes.at(i), q->mapFromSource(layoutChangePersistentIndexes.at(i)));
524 }
525
526 layoutChangePersistentIndexes.clear();
527 proxyIndexes.clear();
528
529 QList<QPersistentModelIndex> parents;
530 parents.reserve(sourceParents.size());
531 for (const QPersistentModelIndex &parent : sourceParents) {
532 if (!parent.isValid()) {
533 parents << QPersistentModelIndex();
534 continue;
535 }
536 const QModelIndex mappedParent = q->mapFromSource(parent);
537 Q_ASSERT(mappedParent.isValid());
538 parents << mappedParent;
539 }
540
541 emit q->layoutChanged(parents, hint);
542}
543
544void QIdentityProxyModelPrivate::sourceModelAboutToBeReset()
545{
546 Q_Q(QIdentityProxyModel);
547 q->beginResetModel();
548}
549
550void QIdentityProxyModelPrivate::sourceModelReset()
551{
552 Q_Q(QIdentityProxyModel);
553 q->endResetModel();
554}
555
556void QIdentityProxyModelPrivate::sourceRowsAboutToBeInserted(const QModelIndex &parent, int start,
557 int end)
558{
559 Q_ASSERT(parent.isValid() ? parent.model() == model : true);
560 Q_Q(QIdentityProxyModel);
561 q->beginInsertRows(q->mapFromSource(parent), start, end);
562}
563
564void QIdentityProxyModelPrivate::sourceRowsAboutToBeMoved(const QModelIndex &sourceParent,
565 int sourceStart, int sourceEnd,
566 const QModelIndex &destParent, int dest)
567{
568 Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);
569 Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);
570 Q_Q(QIdentityProxyModel);
571 q->beginMoveRows(q->mapFromSource(sourceParent), sourceStart, sourceEnd, q->mapFromSource(destParent), dest);
572}
573
574void QIdentityProxyModelPrivate::sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start,
575 int end)
576{
577 Q_ASSERT(parent.isValid() ? parent.model() == model : true);
578 Q_Q(QIdentityProxyModel);
579 q->beginRemoveRows(q->mapFromSource(parent), start, end);
580}
581
582void QIdentityProxyModelPrivate::sourceRowsInserted(const QModelIndex &parent, int start, int end)
583{
584 Q_ASSERT(parent.isValid() ? parent.model() == model : true);
585 Q_Q(QIdentityProxyModel);
586 Q_UNUSED(parent);
587 Q_UNUSED(start);
588 Q_UNUSED(end);
589 q->endInsertRows();
590}
591
592void QIdentityProxyModelPrivate::sourceRowsMoved(const QModelIndex &sourceParent, int sourceStart,
593 int sourceEnd, const QModelIndex &destParent,
594 int dest)
595{
596 Q_ASSERT(sourceParent.isValid() ? sourceParent.model() == model : true);
597 Q_ASSERT(destParent.isValid() ? destParent.model() == model : true);
598 Q_Q(QIdentityProxyModel);
599 Q_UNUSED(sourceParent);
600 Q_UNUSED(sourceStart);
601 Q_UNUSED(sourceEnd);
602 Q_UNUSED(destParent);
603 Q_UNUSED(dest);
604 q->endMoveRows();
605}
606
607void QIdentityProxyModelPrivate::sourceRowsRemoved(const QModelIndex &parent, int start, int end)
608{
609 Q_ASSERT(parent.isValid() ? parent.model() == model : true);
610 Q_Q(QIdentityProxyModel);
611 Q_UNUSED(parent);
612 Q_UNUSED(start);
613 Q_UNUSED(end);
614 q->endRemoveRows();
615}
616
617QT_END_NAMESPACE
618
619#include "moc_qidentityproxymodel.cpp"