summaryrefslogtreecommitdiff
path: root/src/modeltest.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modeltest.h')
-rw-r--r--src/modeltest.h62
1 files changed, 30 insertions, 32 deletions
diff --git a/src/modeltest.h b/src/modeltest.h
index 68090f3f..b0197a1a 100644
--- a/src/modeltest.h
+++ b/src/modeltest.h
@@ -39,56 +39,54 @@
**
****************************************************************************/
-
#ifndef MODELTEST_H
#define MODELTEST_H
-#include <QtCore/QObject>
#include <QtCore/QAbstractItemModel>
+#include <QtCore/QObject>
#include <QtCore/QStack>
-class ModelTest : public QObject
-{
- Q_OBJECT
+class ModelTest : public QObject {
+ Q_OBJECT
public:
- ModelTest( QAbstractItemModel *model, QObject *parent = 0 );
+ ModelTest(QAbstractItemModel* model, QObject* parent = 0);
private Q_SLOTS:
- void nonDestructiveBasicTest();
- void rowCount();
- void columnCount();
- void hasIndex();
- void index();
- void parent();
- void data();
+ void nonDestructiveBasicTest();
+ void rowCount();
+ void columnCount();
+ void hasIndex();
+ void index();
+ void parent();
+ void data();
protected Q_SLOTS:
- void runAllTests();
- void layoutAboutToBeChanged();
- void layoutChanged();
- void rowsAboutToBeInserted( const QModelIndex &parent, int start, int end );
- void rowsInserted( const QModelIndex & parent, int start, int end );
- void rowsAboutToBeRemoved( const QModelIndex &parent, int start, int end );
- void rowsRemoved( const QModelIndex & parent, int start, int end );
+ void runAllTests();
+ void layoutAboutToBeChanged();
+ void layoutChanged();
+ void rowsAboutToBeInserted(const QModelIndex& parent, int start, int end);
+ void rowsInserted(const QModelIndex& parent, int start, int end);
+ void rowsAboutToBeRemoved(const QModelIndex& parent, int start, int end);
+ void rowsRemoved(const QModelIndex& parent, int start, int end);
private:
- void checkChildren( const QModelIndex &parent, int currentDepth = 0 );
+ void checkChildren(const QModelIndex& parent, int currentDepth = 0);
- QAbstractItemModel *model;
+ QAbstractItemModel* model;
- struct Changing {
- QModelIndex parent;
- int oldSize;
- QVariant last;
- QVariant next;
- };
- QStack<Changing> insert;
- QStack<Changing> remove;
+ struct Changing {
+ QModelIndex parent;
+ int oldSize;
+ QVariant last;
+ QVariant next;
+ };
+ QStack<Changing> insert;
+ QStack<Changing> remove;
- bool fetchingMore;
+ bool fetchingMore;
- QList<QPersistentModelIndex> changing;
+ QList<QPersistentModelIndex> changing;
};
#endif