normalise signal/slot signatures [QtSql tests]

Change-Id: I06573bc2ad58378dd835565cd07d711bfc760411
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This commit is contained in:
Marc Mutz 2012-10-16 11:18:11 +02:00 committed by The Qt Project
parent 6444d36e5d
commit 848c88c7a2
3 changed files with 12 additions and 12 deletions

View File

@ -2048,7 +2048,7 @@ void tst_QSqlDatabase::eventNotificationIBase()
q.exec(QString("DROP PROCEDURE %1").arg(procedureName)); q.exec(QString("DROP PROCEDURE %1").arg(procedureName));
q.exec(QString("CREATE PROCEDURE %1\nAS BEGIN\nPOST_EVENT '%1';\nEND;").arg(procedureName)); q.exec(QString("CREATE PROCEDURE %1\nAS BEGIN\nPOST_EVENT '%1';\nEND;").arg(procedureName));
q.exec(QString("EXECUTE PROCEDURE %1").arg(procedureName)); q.exec(QString("EXECUTE PROCEDURE %1").arg(procedureName));
QSignalSpy spy(driver, SIGNAL(notification(const QString&))); QSignalSpy spy(driver, SIGNAL(notification(QString)));
db.commit(); // No notifications are posted until the transaction is committed. db.commit(); // No notifications are posted until the transaction is committed.
QTest::qWait(300); // Interbase needs some time to post the notification and call the driver callback. QTest::qWait(300); // Interbase needs some time to post the notification and call the driver callback.
// This happends from another thread, and we have to process events in order for the // This happends from another thread, and we have to process events in order for the
@ -2072,7 +2072,7 @@ void tst_QSqlDatabase::eventNotificationPSQL()
QString payload = "payload"; QString payload = "payload";
QSqlDriver &driver=*(db.driver()); QSqlDriver &driver=*(db.driver());
QVERIFY_SQL(driver, subscribeToNotification(procedureName)); QVERIFY_SQL(driver, subscribeToNotification(procedureName));
QSignalSpy spy(db.driver(), SIGNAL(notification(const QString&,QSqlDriver::NotificationSource,const QVariant&))); QSignalSpy spy(db.driver(), SIGNAL(notification(QString,QSqlDriver::NotificationSource,QVariant)));
query.exec(QString("NOTIFY \"%1\", '%2'").arg(procedureName).arg(payload)); query.exec(QString("NOTIFY \"%1\", '%2'").arg(procedureName).arg(payload));
QCoreApplication::processEvents(); QCoreApplication::processEvents();
QCOMPARE(spy.count(), 1); QCOMPARE(spy.count(), 1);

View File

@ -524,7 +524,7 @@ void tst_QSqlQueryModel::withSortFilterProxyModel()
QSignalSpy modelAboutToBeResetSpy(&model, SIGNAL(modelAboutToBeReset())); QSignalSpy modelAboutToBeResetSpy(&model, SIGNAL(modelAboutToBeReset()));
QSignalSpy modelResetSpy(&model, SIGNAL(modelReset())); QSignalSpy modelResetSpy(&model, SIGNAL(modelReset()));
QSignalSpy modelRowsInsertedSpy(&model, SIGNAL(rowsInserted(const QModelIndex &, int, int))); QSignalSpy modelRowsInsertedSpy(&model, SIGNAL(rowsInserted(QModelIndex,int,int)));
model.setQuery(QSqlQuery("SELECT * FROM " + qTableName("test3", __FILE__), db)); model.setQuery(QSqlQuery("SELECT * FROM " + qTableName("test3", __FILE__), db));
view.scrollToBottom(); view.scrollToBottom();
@ -576,8 +576,8 @@ void tst_QSqlQueryModel::setQueryWithNoRowsInResultSet()
CHECK_DATABASE(db); CHECK_DATABASE(db);
QSqlQueryModel model; QSqlQueryModel model;
QSignalSpy modelRowsAboutToBeInsertedSpy(&model, SIGNAL(rowsAboutToBeInserted(const QModelIndex &, int, int))); QSignalSpy modelRowsAboutToBeInsertedSpy(&model, SIGNAL(rowsAboutToBeInserted(QModelIndex,int,int)));
QSignalSpy modelRowsInsertedSpy(&model, SIGNAL(rowsInserted(const QModelIndex &, int, int))); QSignalSpy modelRowsInsertedSpy(&model, SIGNAL(rowsInserted(QModelIndex,int,int)));
// The query's result set will be empty so no signals should be emitted! // The query's result set will be empty so no signals should be emitted!
QSqlQuery query(db); QSqlQuery query(db);

View File

@ -1677,7 +1677,7 @@ void tst_QSqlTableModel::insertRecordsInLoop()
QSignalSpy modelAboutToBeResetSpy(&model, SIGNAL(modelAboutToBeReset())); QSignalSpy modelAboutToBeResetSpy(&model, SIGNAL(modelAboutToBeReset()));
QSignalSpy modelResetSpy(&model, SIGNAL(modelReset())); QSignalSpy modelResetSpy(&model, SIGNAL(modelReset()));
QSignalSpy spyRowsInserted(&model, SIGNAL(rowsInserted(const QModelIndex &, int, int))); QSignalSpy spyRowsInserted(&model, SIGNAL(rowsInserted(QModelIndex,int,int)));
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {
QVERIFY(model.insertRecord(model.rowCount(), record)); QVERIFY(model.insertRecord(model.rowCount(), record));
QCOMPARE(spyRowsInserted.at(i).at(1).toInt(), i+3); // The table already contains three rows QCOMPARE(spyRowsInserted.at(i).at(1).toInt(), i+3); // The table already contains three rows