[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kipi-plugins] gpssync/borrowed: use moc file
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2011-12-31 17:36:39
Message-ID: 20111231173639.EA53CA60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 1566b09150052fd4bc346718e3bcd4cdaed1a211 by Gilles Caulier.
Committed on 31/12/2011 at 18:36.
Pushed by cgilles into branch 'master'.
use moc file
M +2 -5 gpssync/borrowed/modeltest.cpp
M +18 -11 gpssync/borrowed/modeltest.h
http://commits.kde.org/kipi-plugins/1566b09150052fd4bc346718e3bcd4cdaed1a211
diff --git a/gpssync/borrowed/modeltest.cpp b/gpssync/borrowed/modeltest.cpp
index e41a12a..7d711b5 100644
--- a/gpssync/borrowed/modeltest.cpp
+++ b/gpssync/borrowed/modeltest.cpp
@@ -39,12 +39,11 @@
**
****************************************************************************/
+#include "modeltest.moc"
#include <QtGui/QtGui>
-
-#include "modeltest.h"
-
#include <QtTest/QtTest>
+
#undef Q_ASSERT
#define Q_ASSERT QVERIFY
@@ -562,5 +561,3 @@ void ModelTest::rowsRemoved ( const QModelIndex & parent, int start, int end )
Q_ASSERT ( c.last == model->data ( model->index ( start - 1, 0, c.parent ) ) );
Q_ASSERT ( c.next == model->data ( model->index ( start, 0, c.parent ) ) );
}
-
-
diff --git a/gpssync/borrowed/modeltest.h b/gpssync/borrowed/modeltest.h
index e4ef478..ec23592 100644
--- a/gpssync/borrowed/modeltest.h
+++ b/gpssync/borrowed/modeltest.h
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#ifndef MODELTEST_H
#define MODELTEST_H
@@ -52,9 +51,11 @@ class ModelTest : public QObject
Q_OBJECT
public:
+
ModelTest( QAbstractItemModel *model, QObject *parent = 0 );
private Q_SLOTS:
+
void nonDestructiveBasicTest();
void rowCount();
void columnCount();
@@ -64,6 +65,7 @@ private Q_SLOTS:
void data();
protected Q_SLOTS:
+
void runAllTests();
void layoutAboutToBeChanged();
void layoutChanged();
@@ -73,22 +75,27 @@ protected Q_SLOTS:
void rowsRemoved( const QModelIndex & parent, int start, int end );
private:
+
void checkChildren( const QModelIndex &parent, int currentDepth = 0 );
- QAbstractItemModel *model;
+private:
- struct Changing {
- QModelIndex parent;
- int oldSize;
- QVariant last;
- QVariant next;
+ struct Changing
+ {
+ QModelIndex parent;
+ int oldSize;
+ QVariant last;
+ QVariant next;
};
- QStack<Changing> insert;
- QStack<Changing> remove;
- bool fetchingMore;
+ QAbstractItemModel* model;
+
+ QStack<Changing> insert;
+ QStack<Changing> remove;
+
+ bool fetchingMore;
QList<QPersistentModelIndex> changing;
};
-#endif
+#endif // MODELTEST_H
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic