normalise signal/slot signatures [QtCore tests]
Normalise all signal/slot signatures in tests/*/corelib, except in tst_QObject, where they might be test data. Change-Id: Id4e101f285b1676bb583b0afae06d235e599e24b Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
8e82a8e11f
commit
a438267c84
@ -120,7 +120,7 @@ void tst_QFileSystemWatcher::basicTest()
|
|||||||
watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
|
watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
|
||||||
QVERIFY(watcher.addPath(testFile.fileName()));
|
QVERIFY(watcher.addPath(testFile.fileName()));
|
||||||
|
|
||||||
QSignalSpy changedSpy(&watcher, SIGNAL(fileChanged(const QString &)));
|
QSignalSpy changedSpy(&watcher, SIGNAL(fileChanged(QString)));
|
||||||
QVERIFY(changedSpy.isValid());
|
QVERIFY(changedSpy.isValid());
|
||||||
QEventLoop eventLoop;
|
QEventLoop eventLoop;
|
||||||
QTimer timer;
|
QTimer timer;
|
||||||
@ -253,7 +253,7 @@ void tst_QFileSystemWatcher::watchDirectory()
|
|||||||
watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
|
watcher.setObjectName(QLatin1String("_qt_autotest_force_engine_") + backend);
|
||||||
QVERIFY(watcher.addPath(testDir.absolutePath()));
|
QVERIFY(watcher.addPath(testDir.absolutePath()));
|
||||||
|
|
||||||
QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(const QString &)));
|
QSignalSpy changedSpy(&watcher, SIGNAL(directoryChanged(QString)));
|
||||||
QVERIFY(changedSpy.isValid());
|
QVERIFY(changedSpy.isValid());
|
||||||
QEventLoop eventLoop;
|
QEventLoop eventLoop;
|
||||||
QTimer timer;
|
QTimer timer;
|
||||||
@ -410,8 +410,8 @@ void tst_QFileSystemWatcher::watchFileAndItsDirectory()
|
|||||||
QVERIFY(watcher.addPath(testDir.absolutePath()));
|
QVERIFY(watcher.addPath(testDir.absolutePath()));
|
||||||
QVERIFY(watcher.addPath(testFileName));
|
QVERIFY(watcher.addPath(testFileName));
|
||||||
|
|
||||||
QSignalSpy fileChangedSpy(&watcher, SIGNAL(fileChanged(const QString &)));
|
QSignalSpy fileChangedSpy(&watcher, SIGNAL(fileChanged(QString)));
|
||||||
QSignalSpy dirChangedSpy(&watcher, SIGNAL(directoryChanged(const QString &)));
|
QSignalSpy dirChangedSpy(&watcher, SIGNAL(directoryChanged(QString)));
|
||||||
QVERIFY(fileChangedSpy.isValid());
|
QVERIFY(fileChangedSpy.isValid());
|
||||||
QVERIFY(dirChangedSpy.isValid());
|
QVERIFY(dirChangedSpy.isValid());
|
||||||
QEventLoop eventLoop;
|
QEventLoop eventLoop;
|
||||||
|
@ -810,8 +810,8 @@ void tst_QAbstractItemModel::removeRows()
|
|||||||
{
|
{
|
||||||
QtTestModel model(10, 10);
|
QtTestModel model(10, 10);
|
||||||
|
|
||||||
QSignalSpy rowsAboutToBeRemovedSpy(&model, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int )));
|
QSignalSpy rowsAboutToBeRemovedSpy(&model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
|
||||||
QSignalSpy rowsRemovedSpy(&model, SIGNAL(rowsRemoved( const QModelIndex &, int, int )));
|
QSignalSpy rowsRemovedSpy(&model, SIGNAL(rowsRemoved(QModelIndex,int,int)));
|
||||||
|
|
||||||
QVERIFY(rowsAboutToBeRemovedSpy.isValid());
|
QVERIFY(rowsAboutToBeRemovedSpy.isValid());
|
||||||
QVERIFY(rowsRemovedSpy.isValid());
|
QVERIFY(rowsRemovedSpy.isValid());
|
||||||
@ -825,8 +825,8 @@ void tst_QAbstractItemModel::removeColumns()
|
|||||||
{
|
{
|
||||||
QtTestModel model(10, 10);
|
QtTestModel model(10, 10);
|
||||||
|
|
||||||
QSignalSpy columnsAboutToBeRemovedSpy(&model, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int )));
|
QSignalSpy columnsAboutToBeRemovedSpy(&model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)));
|
||||||
QSignalSpy columnsRemovedSpy(&model, SIGNAL(columnsRemoved( const QModelIndex &, int, int )));
|
QSignalSpy columnsRemovedSpy(&model, SIGNAL(columnsRemoved(QModelIndex,int,int)));
|
||||||
|
|
||||||
QVERIFY(columnsAboutToBeRemovedSpy.isValid());
|
QVERIFY(columnsAboutToBeRemovedSpy.isValid());
|
||||||
QVERIFY(columnsRemovedSpy.isValid());
|
QVERIFY(columnsRemovedSpy.isValid());
|
||||||
@ -840,8 +840,8 @@ void tst_QAbstractItemModel::insertRows()
|
|||||||
{
|
{
|
||||||
QtTestModel model(10, 10);
|
QtTestModel model(10, 10);
|
||||||
|
|
||||||
QSignalSpy rowsAboutToBeInsertedSpy(&model, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int )));
|
QSignalSpy rowsAboutToBeInsertedSpy(&model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
|
||||||
QSignalSpy rowsInsertedSpy(&model, SIGNAL(rowsInserted( const QModelIndex &, int, int )));
|
QSignalSpy rowsInsertedSpy(&model, SIGNAL(rowsInserted(QModelIndex,int,int)));
|
||||||
|
|
||||||
QVERIFY(rowsAboutToBeInsertedSpy.isValid());
|
QVERIFY(rowsAboutToBeInsertedSpy.isValid());
|
||||||
QVERIFY(rowsInsertedSpy.isValid());
|
QVERIFY(rowsInsertedSpy.isValid());
|
||||||
@ -855,8 +855,8 @@ void tst_QAbstractItemModel::insertColumns()
|
|||||||
{
|
{
|
||||||
QtTestModel model(10, 10);
|
QtTestModel model(10, 10);
|
||||||
|
|
||||||
QSignalSpy columnsAboutToBeInsertedSpy(&model, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int )));
|
QSignalSpy columnsAboutToBeInsertedSpy(&model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)));
|
||||||
QSignalSpy columnsInsertedSpy(&model, SIGNAL(columnsInserted( const QModelIndex &, int, int )));
|
QSignalSpy columnsInsertedSpy(&model, SIGNAL(columnsInserted(QModelIndex,int,int)));
|
||||||
|
|
||||||
QVERIFY(columnsAboutToBeInsertedSpy.isValid());
|
QVERIFY(columnsAboutToBeInsertedSpy.isValid());
|
||||||
QVERIFY(columnsInsertedSpy.isValid());
|
QVERIFY(columnsInsertedSpy.isValid());
|
||||||
@ -870,8 +870,8 @@ void tst_QAbstractItemModel::moveRows()
|
|||||||
{
|
{
|
||||||
QtTestModel model(10, 10);
|
QtTestModel model(10, 10);
|
||||||
|
|
||||||
QSignalSpy rowsAboutToBeMovedSpy(&model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int , int, const QModelIndex &, int)));
|
QSignalSpy rowsAboutToBeMovedSpy(&model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
QSignalSpy rowsMovedSpy(&model, SIGNAL(rowsMoved(const QModelIndex &, int , int, const QModelIndex &, int)));
|
QSignalSpy rowsMovedSpy(&model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
|
|
||||||
QVERIFY(rowsAboutToBeMovedSpy.isValid());
|
QVERIFY(rowsAboutToBeMovedSpy.isValid());
|
||||||
QVERIFY(rowsMovedSpy.isValid());
|
QVERIFY(rowsMovedSpy.isValid());
|
||||||
@ -885,8 +885,8 @@ void tst_QAbstractItemModel::moveColumns()
|
|||||||
{
|
{
|
||||||
QtTestModel model(10, 10);
|
QtTestModel model(10, 10);
|
||||||
|
|
||||||
QSignalSpy columnsAboutToBeMovedSpy(&model, SIGNAL(columnsAboutToBeMoved(const QModelIndex &, int , int, const QModelIndex &, int)));
|
QSignalSpy columnsAboutToBeMovedSpy(&model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
QSignalSpy columnsMovedSpy(&model, SIGNAL(columnsMoved(const QModelIndex &, int , int, const QModelIndex &, int)));
|
QSignalSpy columnsMovedSpy(&model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
|
|
||||||
QVERIFY(columnsAboutToBeMovedSpy.isValid());
|
QVERIFY(columnsAboutToBeMovedSpy.isValid());
|
||||||
QVERIFY(columnsMovedSpy.isValid());
|
QVERIFY(columnsMovedSpy.isValid());
|
||||||
@ -1022,8 +1022,8 @@ void tst_QAbstractItemModel::testMoveSameParentDown()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
|
|
||||||
QVERIFY(beforeSpy.isValid());
|
QVERIFY(beforeSpy.isValid());
|
||||||
QVERIFY(afterSpy.isValid());
|
QVERIFY(afterSpy.isValid());
|
||||||
@ -1137,8 +1137,8 @@ void tst_QAbstractItemModel::testMoveSameParentUp()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
|
|
||||||
QVERIFY(beforeSpy.isValid());
|
QVERIFY(beforeSpy.isValid());
|
||||||
QVERIFY(afterSpy.isValid());
|
QVERIFY(afterSpy.isValid());
|
||||||
@ -1286,8 +1286,8 @@ void tst_QAbstractItemModel::testMoveToGrandParent()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
|
|
||||||
QVERIFY(beforeSpy.isValid());
|
QVERIFY(beforeSpy.isValid());
|
||||||
QVERIFY(afterSpy.isValid());
|
QVERIFY(afterSpy.isValid());
|
||||||
@ -1426,8 +1426,8 @@ void tst_QAbstractItemModel::testMoveToSibling()
|
|||||||
persistentList << QPersistentModelIndex(idx);
|
persistentList << QPersistentModelIndex(idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
|
|
||||||
QVERIFY(beforeSpy.isValid());
|
QVERIFY(beforeSpy.isValid());
|
||||||
QVERIFY(afterSpy.isValid());
|
QVERIFY(afterSpy.isValid());
|
||||||
@ -1576,8 +1576,8 @@ void tst_QAbstractItemModel::testMoveToUncle()
|
|||||||
persistentList << QPersistentModelIndex(idx);
|
persistentList << QPersistentModelIndex(idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
|
|
||||||
QVERIFY(beforeSpy.isValid());
|
QVERIFY(beforeSpy.isValid());
|
||||||
QVERIFY(afterSpy.isValid());
|
QVERIFY(afterSpy.isValid());
|
||||||
@ -1683,8 +1683,8 @@ void tst_QAbstractItemModel::testMoveToDescendants()
|
|||||||
persistentList << QPersistentModelIndex(idx);
|
persistentList << QPersistentModelIndex(idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
|
|
||||||
QVERIFY(beforeSpy.isValid());
|
QVERIFY(beforeSpy.isValid());
|
||||||
QVERIFY(afterSpy.isValid());
|
QVERIFY(afterSpy.isValid());
|
||||||
@ -1747,8 +1747,8 @@ void tst_QAbstractItemModel::testMoveWithinOwnRange()
|
|||||||
QFETCH(int, endRow);
|
QFETCH(int, endRow);
|
||||||
QFETCH(int, destRow);
|
QFETCH(int, destRow);
|
||||||
|
|
||||||
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy beforeSpy(m_model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int)));
|
QSignalSpy afterSpy(m_model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)));
|
||||||
|
|
||||||
QVERIFY(beforeSpy.isValid());
|
QVERIFY(beforeSpy.isValid());
|
||||||
QVERIFY(afterSpy.isValid());
|
QVERIFY(afterSpy.isValid());
|
||||||
|
@ -597,7 +597,7 @@ void tst_QItemModel::setData()
|
|||||||
QFETCH(QString, modelType);
|
QFETCH(QString, modelType);
|
||||||
currentModel = testModels->createModel(modelType);
|
currentModel = testModels->createModel(modelType);
|
||||||
QVERIFY(currentModel);
|
QVERIFY(currentModel);
|
||||||
QSignalSpy spy(currentModel, SIGNAL(dataChanged(const QModelIndex &, const QModelIndex &)));
|
QSignalSpy spy(currentModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)));
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
QCOMPARE(currentModel->setData(QModelIndex(), QVariant()), false);
|
QCOMPARE(currentModel->setData(QModelIndex(), QVariant()), false);
|
||||||
QCOMPARE(spy.count(), 0);
|
QCOMPARE(spy.count(), 0);
|
||||||
@ -838,10 +838,10 @@ void tst_QItemModel::remove()
|
|||||||
|
|
||||||
// When a row or column is removed there should be two signals.
|
// When a row or column is removed there should be two signals.
|
||||||
// Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot
|
// Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot
|
||||||
QSignalSpy columnsAboutToBeRemovedSpy(currentModel, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int )));
|
QSignalSpy columnsAboutToBeRemovedSpy(currentModel, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)));
|
||||||
QSignalSpy rowsAboutToBeRemovedSpy(currentModel, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int )));
|
QSignalSpy rowsAboutToBeRemovedSpy(currentModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)));
|
||||||
QSignalSpy columnsRemovedSpy(currentModel, SIGNAL(columnsRemoved( const QModelIndex &, int, int )));
|
QSignalSpy columnsRemovedSpy(currentModel, SIGNAL(columnsRemoved(QModelIndex,int,int)));
|
||||||
QSignalSpy rowsRemovedSpy(currentModel, SIGNAL(rowsRemoved( const QModelIndex &, int, int )));
|
QSignalSpy rowsRemovedSpy(currentModel, SIGNAL(rowsRemoved(QModelIndex,int,int)));
|
||||||
QSignalSpy modelResetSpy(currentModel, SIGNAL(modelReset()));
|
QSignalSpy modelResetSpy(currentModel, SIGNAL(modelReset()));
|
||||||
QSignalSpy modelLayoutChangedSpy(currentModel, SIGNAL(layoutChanged()));
|
QSignalSpy modelLayoutChangedSpy(currentModel, SIGNAL(layoutChanged()));
|
||||||
|
|
||||||
@ -860,10 +860,10 @@ void tst_QItemModel::remove()
|
|||||||
//
|
//
|
||||||
// test removeRow()
|
// test removeRow()
|
||||||
//
|
//
|
||||||
connect(currentModel, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int )),
|
connect(currentModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_rowsAboutToRemove(const QModelIndex &)));
|
this, SLOT(slot_rowsAboutToRemove(QModelIndex)));
|
||||||
connect(currentModel, SIGNAL(rowsRemoved( const QModelIndex &, int , int )),
|
connect(currentModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_rowsRemoved(const QModelIndex &)));
|
this, SLOT(slot_rowsRemoved(QModelIndex)));
|
||||||
int beforeRemoveRowCount = currentModel->rowCount(parentOfRemoved);
|
int beforeRemoveRowCount = currentModel->rowCount(parentOfRemoved);
|
||||||
QPersistentModelIndex dyingIndex = currentModel->index(start + count + 1, 0, parentOfRemoved);
|
QPersistentModelIndex dyingIndex = currentModel->index(start + count + 1, 0, parentOfRemoved);
|
||||||
QCOMPARE(currentModel->removeRows(start, count, parentOfRemoved), shouldSucceed);
|
QCOMPARE(currentModel->removeRows(start, count, parentOfRemoved), shouldSucceed);
|
||||||
@ -921,20 +921,20 @@ void tst_QItemModel::remove()
|
|||||||
QCOMPARE(currentModel->rowCount(parentOfRemoved), beforeRemoveRowCount);
|
QCOMPARE(currentModel->rowCount(parentOfRemoved), beforeRemoveRowCount);
|
||||||
|
|
||||||
}
|
}
|
||||||
disconnect(currentModel, SIGNAL(rowsAboutToBeRemoved( const QModelIndex &, int , int )),
|
disconnect(currentModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_rowsAboutToRemove(const QModelIndex &)));
|
this, SLOT(slot_rowsAboutToRemove(QModelIndex)));
|
||||||
disconnect(currentModel, SIGNAL(rowsRemoved( const QModelIndex &, int , int )),
|
disconnect(currentModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_rowsRemoved(const QModelIndex &)));
|
this, SLOT(slot_rowsRemoved(QModelIndex)));
|
||||||
modelResetSpy.clear();
|
modelResetSpy.clear();
|
||||||
QCOMPARE(modelResetSpy.count(), 0);
|
QCOMPARE(modelResetSpy.count(), 0);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Test remove column
|
// Test remove column
|
||||||
//
|
//
|
||||||
connect(currentModel, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int )),
|
connect(currentModel, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_columnsAboutToRemove(const QModelIndex &)));
|
this, SLOT(slot_columnsAboutToRemove(QModelIndex)));
|
||||||
connect(currentModel, SIGNAL(columnsRemoved( const QModelIndex &, int , int )),
|
connect(currentModel, SIGNAL(columnsRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_columnsRemoved(const QModelIndex &)));
|
this, SLOT(slot_columnsRemoved(QModelIndex)));
|
||||||
int beforeRemoveColumnCount = currentModel->columnCount(parentOfRemoved);
|
int beforeRemoveColumnCount = currentModel->columnCount(parentOfRemoved);
|
||||||
|
|
||||||
// Some models don't let you remove the column, only row
|
// Some models don't let you remove the column, only row
|
||||||
@ -966,10 +966,10 @@ void tst_QItemModel::remove()
|
|||||||
else
|
else
|
||||||
QCOMPARE(currentModel->rowCount(parentOfRemoved), beforeRemoveRowCount);
|
QCOMPARE(currentModel->rowCount(parentOfRemoved), beforeRemoveRowCount);
|
||||||
}
|
}
|
||||||
disconnect(currentModel, SIGNAL(columnsAboutToBeRemoved( const QModelIndex &, int , int )),
|
disconnect(currentModel, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_columnsAboutToRemove(const QModelIndex &)));
|
this, SLOT(slot_columnsAboutToRemove(QModelIndex)));
|
||||||
disconnect(currentModel, SIGNAL(columnsRemoved( const QModelIndex &, int , int )),
|
disconnect(currentModel, SIGNAL(columnsRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_columnsRemoved(const QModelIndex &)));
|
this, SLOT(slot_columnsRemoved(QModelIndex)));
|
||||||
|
|
||||||
if (columnsAboutToBeRemovedSpy.count() > 0){
|
if (columnsAboutToBeRemovedSpy.count() > 0){
|
||||||
QList<QVariant> arguments = columnsAboutToBeRemovedSpy.at(0);
|
QList<QVariant> arguments = columnsAboutToBeRemovedSpy.at(0);
|
||||||
@ -1180,10 +1180,10 @@ void tst_QItemModel::insert()
|
|||||||
|
|
||||||
// When a row or column is inserted there should be two signals.
|
// When a row or column is inserted there should be two signals.
|
||||||
// Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot
|
// Watch to make sure they are emitted and get the row/column count when they do get emitted by connecting them to a slot
|
||||||
QSignalSpy columnsAboutToBeInsertedSpy(currentModel, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int )));
|
QSignalSpy columnsAboutToBeInsertedSpy(currentModel, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)));
|
||||||
QSignalSpy rowsAboutToBeInsertedSpy(currentModel, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int )));
|
QSignalSpy rowsAboutToBeInsertedSpy(currentModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
|
||||||
QSignalSpy columnsInsertedSpy(currentModel, SIGNAL(columnsInserted( const QModelIndex &, int, int )));
|
QSignalSpy columnsInsertedSpy(currentModel, SIGNAL(columnsInserted(QModelIndex,int,int)));
|
||||||
QSignalSpy rowsInsertedSpy(currentModel, SIGNAL(rowsInserted( const QModelIndex &, int, int )));
|
QSignalSpy rowsInsertedSpy(currentModel, SIGNAL(rowsInserted(QModelIndex,int,int)));
|
||||||
QSignalSpy modelResetSpy(currentModel, SIGNAL(modelReset()));
|
QSignalSpy modelResetSpy(currentModel, SIGNAL(modelReset()));
|
||||||
QSignalSpy modelLayoutChangedSpy(currentModel, SIGNAL(layoutChanged()));
|
QSignalSpy modelLayoutChangedSpy(currentModel, SIGNAL(layoutChanged()));
|
||||||
|
|
||||||
@ -1202,10 +1202,10 @@ void tst_QItemModel::insert()
|
|||||||
//
|
//
|
||||||
// test insertRow()
|
// test insertRow()
|
||||||
//
|
//
|
||||||
connect(currentModel, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int )),
|
connect(currentModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_rowsAboutToInserted(const QModelIndex &)));
|
this, SLOT(slot_rowsAboutToInserted(QModelIndex)));
|
||||||
connect(currentModel, SIGNAL(rowsInserted( const QModelIndex &, int , int )),
|
connect(currentModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_rowsInserted(const QModelIndex &)));
|
this, SLOT(slot_rowsInserted(QModelIndex)));
|
||||||
int beforeInsertRowCount = currentModel->rowCount(parentOfInserted);
|
int beforeInsertRowCount = currentModel->rowCount(parentOfInserted);
|
||||||
QCOMPARE(currentModel->insertRows(start, count, parentOfInserted), shouldSucceed);
|
QCOMPARE(currentModel->insertRows(start, count, parentOfInserted), shouldSucceed);
|
||||||
currentModel->submit();
|
currentModel->submit();
|
||||||
@ -1259,19 +1259,19 @@ void tst_QItemModel::insert()
|
|||||||
QCOMPARE(currentModel->rowCount(parentOfInserted), beforeInsertRowCount);
|
QCOMPARE(currentModel->rowCount(parentOfInserted), beforeInsertRowCount);
|
||||||
|
|
||||||
}
|
}
|
||||||
disconnect(currentModel, SIGNAL(rowsAboutToBeInserted( const QModelIndex &, int , int )),
|
disconnect(currentModel, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_rowsAboutToInserted(const QModelIndex &)));
|
this, SLOT(slot_rowsAboutToInserted(QModelIndex)));
|
||||||
disconnect(currentModel, SIGNAL(rowsInserted( const QModelIndex &, int , int )),
|
disconnect(currentModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_rowsInserted(const QModelIndex &)));
|
this, SLOT(slot_rowsInserted(QModelIndex)));
|
||||||
modelResetSpy.clear();
|
modelResetSpy.clear();
|
||||||
|
|
||||||
//
|
//
|
||||||
// Test insertColumn()
|
// Test insertColumn()
|
||||||
//
|
//
|
||||||
connect(currentModel, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int )),
|
connect(currentModel, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_columnsAboutToInserted(const QModelIndex &)));
|
this, SLOT(slot_columnsAboutToInserted(QModelIndex)));
|
||||||
connect(currentModel, SIGNAL(columnsInserted( const QModelIndex &, int , int )),
|
connect(currentModel, SIGNAL(columnsInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_columnsInserted(const QModelIndex &)));
|
this, SLOT(slot_columnsInserted(QModelIndex)));
|
||||||
int beforeInsertColumnCount = currentModel->columnCount(parentOfInserted);
|
int beforeInsertColumnCount = currentModel->columnCount(parentOfInserted);
|
||||||
|
|
||||||
// Some models don't let you insert the column, only row
|
// Some models don't let you insert the column, only row
|
||||||
@ -1303,10 +1303,10 @@ void tst_QItemModel::insert()
|
|||||||
else
|
else
|
||||||
QCOMPARE(currentModel->rowCount(parentOfInserted), beforeInsertRowCount);
|
QCOMPARE(currentModel->rowCount(parentOfInserted), beforeInsertRowCount);
|
||||||
}
|
}
|
||||||
disconnect(currentModel, SIGNAL(columnsAboutToBeInserted( const QModelIndex &, int , int )),
|
disconnect(currentModel, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_columnsAboutToInserted(const QModelIndex &)));
|
this, SLOT(slot_columnsAboutToInserted(QModelIndex)));
|
||||||
disconnect(currentModel, SIGNAL(columnsInserted( const QModelIndex &, int , int )),
|
disconnect(currentModel, SIGNAL(columnsInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(slot_columnsInserted(const QModelIndex &)));
|
this, SLOT(slot_columnsInserted(QModelIndex)));
|
||||||
|
|
||||||
if (columnsAboutToBeInsertedSpy.count() > 0){
|
if (columnsAboutToBeInsertedSpy.count() > 0){
|
||||||
QList<QVariant> arguments = columnsAboutToBeInsertedSpy.at(0);
|
QList<QVariant> arguments = columnsAboutToBeInsertedSpy.at(0);
|
||||||
|
@ -2231,7 +2231,7 @@ void tst_QItemSelectionModel::childrenDeselectionSignal()
|
|||||||
QItemSelectionModel selectionModel(&model);
|
QItemSelectionModel selectionModel(&model);
|
||||||
selectionModel.select(sel, QItemSelectionModel::SelectCurrent);
|
selectionModel.select(sel, QItemSelectionModel::SelectCurrent);
|
||||||
|
|
||||||
QSignalSpy deselectSpy(&selectionModel, SIGNAL(selectionChanged(const QItemSelection& , const QItemSelection&)));
|
QSignalSpy deselectSpy(&selectionModel, SIGNAL(selectionChanged(QItemSelection,QItemSelection)));
|
||||||
QVERIFY(deselectSpy.isValid());
|
QVERIFY(deselectSpy.isValid());
|
||||||
model.removeRows(0, 1, root);
|
model.removeRows(0, 1, root);
|
||||||
QVERIFY(deselectSpy.count() == 1);
|
QVERIFY(deselectSpy.count() == 1);
|
||||||
|
@ -2164,8 +2164,8 @@ void tst_QSortFilterProxyModel::insertIntoChildrenlessItem()
|
|||||||
QSortFilterProxyModel proxy;
|
QSortFilterProxyModel proxy;
|
||||||
proxy.setSourceModel(&model);
|
proxy.setSourceModel(&model);
|
||||||
|
|
||||||
QSignalSpy colsInsertedSpy(&proxy, SIGNAL(columnsInserted(const QModelIndex&, int, int)));
|
QSignalSpy colsInsertedSpy(&proxy, SIGNAL(columnsInserted(QModelIndex,int,int)));
|
||||||
QSignalSpy rowsInsertedSpy(&proxy, SIGNAL(rowsInserted(const QModelIndex&, int, int)));
|
QSignalSpy rowsInsertedSpy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int)));
|
||||||
|
|
||||||
QVERIFY(colsInsertedSpy.isValid());
|
QVERIFY(colsInsertedSpy.isValid());
|
||||||
QVERIFY(rowsInsertedSpy.isValid());
|
QVERIFY(rowsInsertedSpy.isValid());
|
||||||
@ -2244,7 +2244,7 @@ void tst_QSortFilterProxyModel::insertRowIntoFilteredParent()
|
|||||||
EvenOddFilterModel proxy;
|
EvenOddFilterModel proxy;
|
||||||
proxy.setSourceModel(&model);
|
proxy.setSourceModel(&model);
|
||||||
|
|
||||||
QSignalSpy spy(&proxy, SIGNAL(rowsInserted(const QModelIndex&, int, int)));
|
QSignalSpy spy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int)));
|
||||||
QVERIFY(spy.isValid());
|
QVERIFY(spy.isValid());
|
||||||
|
|
||||||
QStandardItem *itemA = new QStandardItem();
|
QStandardItem *itemA = new QStandardItem();
|
||||||
@ -2273,8 +2273,8 @@ void tst_QSortFilterProxyModel::filterOutParentAndFilterInChild()
|
|||||||
QStandardItem *itemC = new QStandardItem("C");
|
QStandardItem *itemC = new QStandardItem("C");
|
||||||
itemA->appendRow(itemC); // filtered
|
itemA->appendRow(itemC); // filtered
|
||||||
|
|
||||||
QSignalSpy removedSpy(&proxy, SIGNAL(rowsRemoved(const QModelIndex&, int, int)));
|
QSignalSpy removedSpy(&proxy, SIGNAL(rowsRemoved(QModelIndex,int,int)));
|
||||||
QSignalSpy insertedSpy(&proxy, SIGNAL(rowsInserted(const QModelIndex&, int, int)));
|
QSignalSpy insertedSpy(&proxy, SIGNAL(rowsInserted(QModelIndex,int,int)));
|
||||||
|
|
||||||
QVERIFY(removedSpy.isValid());
|
QVERIFY(removedSpy.isValid());
|
||||||
QVERIFY(insertedSpy.isValid());
|
QVERIFY(insertedSpy.isValid());
|
||||||
|
@ -144,11 +144,11 @@ void tst_QStringListModel::rowsAboutToBeRemoved_rowsRemoved()
|
|||||||
|
|
||||||
QStringListModel *model = new QStringListModel(input);
|
QStringListModel *model = new QStringListModel(input);
|
||||||
QModelListener *pListener = new QModelListener(&aboutto, &res, model);
|
QModelListener *pListener = new QModelListener(&aboutto, &res, model);
|
||||||
pListener->connect(model, SIGNAL( rowsAboutToBeRemoved(const QModelIndex & , int , int )),
|
pListener->connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
|
||||||
pListener, SLOT( rowsAboutToBeRemovedOrInserted(const QModelIndex & , int , int )) );
|
pListener, SLOT(rowsAboutToBeRemovedOrInserted(QModelIndex,int,int)) );
|
||||||
|
|
||||||
pListener->connect(model, SIGNAL( rowsRemoved(const QModelIndex & , int , int )),
|
pListener->connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||||
pListener, SLOT( rowsRemovedOrInserted(const QModelIndex & , int , int )) );
|
pListener, SLOT(rowsRemovedOrInserted(QModelIndex,int,int)) );
|
||||||
|
|
||||||
model->removeRows(row,count);
|
model->removeRows(row,count);
|
||||||
// At this point, control goes to our connected slots inn this order:
|
// At this point, control goes to our connected slots inn this order:
|
||||||
@ -208,11 +208,11 @@ void tst_QStringListModel::rowsAboutToBeInserted_rowsInserted()
|
|||||||
|
|
||||||
QStringListModel *model = new QStringListModel(input);
|
QStringListModel *model = new QStringListModel(input);
|
||||||
QModelListener *pListener = new QModelListener(&aboutto, &res, model);
|
QModelListener *pListener = new QModelListener(&aboutto, &res, model);
|
||||||
connect(model, SIGNAL( rowsAboutToBeInserted(const QModelIndex & , int , int )),
|
connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
|
||||||
pListener, SLOT( rowsAboutToBeRemovedOrInserted(const QModelIndex & , int , int )) );
|
pListener, SLOT(rowsAboutToBeRemovedOrInserted(QModelIndex,int,int)) );
|
||||||
|
|
||||||
connect(model, SIGNAL( rowsInserted(const QModelIndex & , int , int )),
|
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||||
pListener, SLOT( rowsRemovedOrInserted(const QModelIndex & , int , int )) );
|
pListener, SLOT(rowsRemovedOrInserted(QModelIndex,int,int)) );
|
||||||
|
|
||||||
model->insertRows(row,count);
|
model->insertRows(row,count);
|
||||||
// At this point, control goes to our connected slots inn this order:
|
// At this point, control goes to our connected slots inn this order:
|
||||||
|
@ -102,7 +102,7 @@ void tst_QSignalMapper::mapped()
|
|||||||
mapper.setMapping(&src3, "three");
|
mapper.setMapping(&src3, "three");
|
||||||
|
|
||||||
connect(&mapper, SIGNAL(mapped(int)), &target, SLOT(myslot(int)));
|
connect(&mapper, SIGNAL(mapped(int)), &target, SLOT(myslot(int)));
|
||||||
connect(&mapper, SIGNAL(mapped(const QString &)), &target, SLOT(myslot(const QString &)));
|
connect(&mapper, SIGNAL(mapped(QString)), &target, SLOT(myslot(QString)));
|
||||||
|
|
||||||
src1.emit_mysignal(20);
|
src1.emit_mysignal(20);
|
||||||
QVERIFY(target.id == 1);
|
QVERIFY(target.id == 1);
|
||||||
|
@ -2337,9 +2337,9 @@ void tst_QStateMachine::signalTransitions()
|
|||||||
QVERIFY(t0 != 0);
|
QVERIFY(t0 != 0);
|
||||||
QCOMPARE(t0->signal(), QByteArray(SIGNAL(signalWithNoArg())));
|
QCOMPARE(t0->signal(), QByteArray(SIGNAL(signalWithNoArg())));
|
||||||
|
|
||||||
QSignalTransition *t1 = s0->addTransition(&emitter, SIGNAL( signalWithStringArg( const QString & ) ), s1);
|
QSignalTransition *t1 = s0->addTransition(&emitter, SIGNAL(signalWithStringArg(QString)), s1);
|
||||||
QVERIFY(t1 != 0);
|
QVERIFY(t1 != 0);
|
||||||
QCOMPARE(t1->signal(), QByteArray(SIGNAL( signalWithStringArg( const QString & ) )));
|
QCOMPARE(t1->signal(), QByteArray(SIGNAL(signalWithStringArg(QString))));
|
||||||
|
|
||||||
QSignalSpy startedSpy(&machine, SIGNAL(started()));
|
QSignalSpy startedSpy(&machine, SIGNAL(started()));
|
||||||
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
|
QSignalSpy finishedSpy(&machine, SIGNAL(finished()));
|
||||||
|
@ -528,10 +528,10 @@ void tst_QFutureWatcher::progressText()
|
|||||||
QObject::connect(&watcher, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
QObject::connect(&watcher, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
|
||||||
#ifdef PRINT
|
#ifdef PRINT
|
||||||
QObject::connect(&watcher, SIGNAL(progressValueChanged(int)), &o, SLOT(printProgress(int)));
|
QObject::connect(&watcher, SIGNAL(progressValueChanged(int)), &o, SLOT(printProgress(int)));
|
||||||
QObject::connect(&watcher, SIGNAL(progressTextChanged(const QString &)), &o, SLOT(printText(const QString &)));
|
QObject::connect(&watcher, SIGNAL(progressTextChanged(QString)), &o, SLOT(printText(QString)));
|
||||||
#endif
|
#endif
|
||||||
QObject::connect(&watcher, SIGNAL(progressValueChanged(int)), &o, SLOT(registerProgress(int)));
|
QObject::connect(&watcher, SIGNAL(progressValueChanged(int)), &o, SLOT(registerProgress(int)));
|
||||||
QObject::connect(&watcher, SIGNAL(progressTextChanged(const QString &)), &o, SLOT(registerText(const QString &)));
|
QObject::connect(&watcher, SIGNAL(progressTextChanged(QString)), &o, SLOT(registerText(QString)));
|
||||||
|
|
||||||
watcher.setFuture(f);
|
watcher.setFuture(f);
|
||||||
QTestEventLoop::instance().enterLoop(5);
|
QTestEventLoop::instance().enterLoop(5);
|
||||||
|
@ -56,28 +56,28 @@ ModelTest::ModelTest ( QAbstractItemModel *_model, QObject *parent ) : QObject (
|
|||||||
if (!model)
|
if (!model)
|
||||||
qFatal("%s: model must not be null", Q_FUNC_INFO);
|
qFatal("%s: model must not be null", Q_FUNC_INFO);
|
||||||
|
|
||||||
connect ( model, SIGNAL ( columnsAboutToBeInserted ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(columnsAboutToBeInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
connect ( model, SIGNAL ( columnsAboutToBeRemoved ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
connect ( model, SIGNAL ( columnsInserted ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(columnsInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
connect ( model, SIGNAL ( columnsRemoved ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
connect ( model, SIGNAL ( dataChanged ( const QModelIndex &, const QModelIndex & ) ),
|
connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
|
connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
connect(model, SIGNAL(layoutAboutToBeChanged()), this, SLOT(runAllTests()) );
|
connect(model, SIGNAL(layoutAboutToBeChanged()), this, SLOT(runAllTests()) );
|
||||||
connect(model, SIGNAL(layoutChanged()), this, SLOT(runAllTests()) );
|
connect(model, SIGNAL(layoutChanged()), this, SLOT(runAllTests()) );
|
||||||
connect(model, SIGNAL(modelReset()), this, SLOT(runAllTests()) );
|
connect(model, SIGNAL(modelReset()), this, SLOT(runAllTests()) );
|
||||||
connect ( model, SIGNAL ( rowsAboutToBeInserted ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
connect ( model, SIGNAL ( rowsAboutToBeRemoved ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
connect ( model, SIGNAL ( rowsInserted ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
connect ( model, SIGNAL ( rowsRemoved ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT(runAllTests()) );
|
this, SLOT(runAllTests()) );
|
||||||
|
|
||||||
// Special checks for changes
|
// Special checks for changes
|
||||||
@ -86,16 +86,16 @@ ModelTest::ModelTest ( QAbstractItemModel *_model, QObject *parent ) : QObject (
|
|||||||
connect(model, SIGNAL(layoutChanged()),
|
connect(model, SIGNAL(layoutChanged()),
|
||||||
this, SLOT(layoutChanged()) );
|
this, SLOT(layoutChanged()) );
|
||||||
|
|
||||||
connect ( model, SIGNAL ( rowsAboutToBeInserted ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)),
|
||||||
this, SLOT ( rowsAboutToBeInserted ( const QModelIndex &, int, int ) ) );
|
this, SLOT(rowsAboutToBeInserted(QModelIndex,int,int)) );
|
||||||
connect ( model, SIGNAL ( rowsAboutToBeRemoved ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT ( rowsAboutToBeRemoved ( const QModelIndex &, int, int ) ) );
|
this, SLOT(rowsAboutToBeRemoved(QModelIndex,int,int)) );
|
||||||
connect ( model, SIGNAL ( rowsInserted ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)),
|
||||||
this, SLOT ( rowsInserted ( const QModelIndex &, int, int ) ) );
|
this, SLOT(rowsInserted(QModelIndex,int,int)) );
|
||||||
connect ( model, SIGNAL ( rowsRemoved ( const QModelIndex &, int, int ) ),
|
connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)),
|
||||||
this, SLOT ( rowsRemoved ( const QModelIndex &, int, int ) ) );
|
this, SLOT(rowsRemoved(QModelIndex,int,int)) );
|
||||||
connect ( model, SIGNAL ( dataChanged ( const QModelIndex &, const QModelIndex & ) ),
|
connect(model, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
|
||||||
this, SLOT ( dataChanged ( const QModelIndex &, const QModelIndex & ) ) );
|
this, SLOT(dataChanged(QModelIndex,QModelIndex)) );
|
||||||
connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
|
connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)),
|
||||||
this, SLOT(headerDataChanged(Qt::Orientation,int,int)) );
|
this, SLOT(headerDataChanged(Qt::Orientation,int,int)) );
|
||||||
|
|
||||||
|
@ -198,8 +198,8 @@ void QObjectBenchmark::connect_disconnect_benchmark()
|
|||||||
case 1: {
|
case 1: {
|
||||||
QTreeView obj;
|
QTreeView obj;
|
||||||
QBENCHMARK {
|
QBENCHMARK {
|
||||||
QObject::connect (&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( )));
|
QObject::connect (&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( ))); // sic: non-normalised
|
||||||
QObject::disconnect(&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( )));
|
QObject::disconnect(&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( ))); // sic: non-normalised
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case 2: {
|
case 2: {
|
||||||
@ -218,7 +218,7 @@ void QObjectBenchmark::connect_disconnect_benchmark()
|
|||||||
case 4: {
|
case 4: {
|
||||||
QTreeView obj;
|
QTreeView obj;
|
||||||
QBENCHMARK {
|
QBENCHMARK {
|
||||||
QObject::disconnect(QObject::connect(&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( ))));
|
QObject::disconnect(QObject::connect(&obj, SIGNAL(viewportEntered( )), &obj, SLOT(expandAll( )))); // sic: non-normalised
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
case 5: {
|
case 5: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user