1 /****************************************************************************
3 ** Copyright (C) 2007 Trolltech ASA. All rights reserved.
5 ** This file is part of the Qt Concurrent project on Trolltech Labs.
7 ** This file may be used under the terms of the GNU General Public
8 ** License version 2.0 as published by the Free Software Foundation
9 ** and appearing in the file LICENSE.GPL included in the packaging of
10 ** this file. Please review the following information to ensure GNU
11 ** General Public Licensing requirements will be met:
12 ** http://www.trolltech.com/products/qt/opensource.html
14 ** If you are unsure which license is appropriate for your use, please
15 ** review the following information:
16 ** http://www.trolltech.com/products/qt/licensing.html or contact the
17 ** sales department at sales@trolltech.com.
19 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
20 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
22 ****************************************************************************/
27 #include <QtCore/QObject>
28 #include <QtCore/QAbstractItemModel>
29 #include <QtCore/QStack>
31 class ModelTest
: public QObject
36 ModelTest(QAbstractItemModel
*model
, QObject
*parent
= Q_NULLPTR
);
39 void nonDestructiveBasicTest();
49 void layoutAboutToBeChanged();
51 void rowsAboutToBeInserted(const QModelIndex
&parent
, int start
, int end
);
52 void rowsInserted(const QModelIndex
&parent
, int start
, int end
);
53 void rowsAboutToBeRemoved(const QModelIndex
&parent
, int start
, int end
);
54 void rowsRemoved(const QModelIndex
&parent
, int start
, int end
);
57 void checkChildren(const QModelIndex
&parent
, int currentDepth
= 0);
59 QAbstractItemModel
*model
;
67 QStack
<Changing
> insert
;
68 QStack
<Changing
> remove
;
72 QList
<QPersistentModelIndex
> changing
;