summaryrefslogtreecommitdiffstats
path: root/tests/auto/sql
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2012-10-16 11:18:11 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-19 13:02:17 +0200
commit848c88c7a2dd1b664690257ff413e738e5e4eeba (patch)
tree55910391c9af2ab98822bcd0ac71aadba92f56ef /tests/auto/sql
parent6444d36e5dca5eaf737000d357307138456cdb8e (diff)
normalise signal/slot signatures [QtSql tests]
Change-Id: I06573bc2ad58378dd835565cd07d711bfc760411 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Diffstat (limited to 'tests/auto/sql')
-rw-r--r--tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp4
-rw-r--r--tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp14
-rw-r--r--tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp6
3 files changed, 12 insertions, 12 deletions
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
index 768de20937..8fae3f73aa 100644
--- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
+++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp
@@ -2048,7 +2048,7 @@ void tst_QSqlDatabase::eventNotificationIBase()
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("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.
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
@@ -2072,7 +2072,7 @@ void tst_QSqlDatabase::eventNotificationPSQL()
QString payload = "payload";
QSqlDriver &driver=*(db.driver());
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));
QCoreApplication::processEvents();
QCOMPARE(spy.count(), 1);
diff --git a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
index 5fedf0ddbb..194c0a94a0 100644
--- a/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
+++ b/tests/auto/sql/models/qsqlquerymodel/tst_qsqlquerymodel.cpp
@@ -235,7 +235,7 @@ void tst_QSqlQueryModel::removeColumn()
DBTestModel model;
model.setQuery(QSqlQuery("select * from " + qTableName("test", __FILE__), db));
model.fetchMore();
- QSignalSpy spy(&model, SIGNAL(columnsAboutToBeRemoved(QModelIndex, int, int)));
+ QSignalSpy spy(&model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)));
QCOMPARE(model.columnCount(), 3);
QVERIFY(model.removeColumn(0));
@@ -323,7 +323,7 @@ void tst_QSqlQueryModel::insertColumn()
const QString nameColumn(isToUpper ? "NAME" : "name");
const QString titleColumn(isToUpper ? "TITLE" : "title");
- QSignalSpy spy(&model, SIGNAL(columnsInserted(QModelIndex, int, int)));
+ QSignalSpy spy(&model, SIGNAL(columnsInserted(QModelIndex,int,int)));
QCOMPARE(model.data(model.index(0, 0)).toInt(), 1);
QCOMPARE(model.data(model.index(0, 1)).toString(), QString("harry"));
@@ -455,7 +455,7 @@ void tst_QSqlQueryModel::setHeaderData()
model.setQuery(QSqlQuery("select * from " + qTableName("test", __FILE__), db));
qRegisterMetaType<Qt::Orientation>("Qt::Orientation");
- QSignalSpy spy(&model, SIGNAL(headerDataChanged(Qt::Orientation, int, int)));
+ QSignalSpy spy(&model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)));
QVERIFY(model.setHeaderData(2, Qt::Horizontal, "bar"));
QCOMPARE(model.headerData(2, Qt::Horizontal).toString(), QString("bar"));
QCOMPARE(spy.count(), 1);
@@ -491,7 +491,7 @@ void tst_QSqlQueryModel::fetchMore()
// If the driver doesn't return the query size fetchMore() causes the
// model to grow and new signals are emitted
- QSignalSpy rowsInsertedSpy(&model, SIGNAL(rowsInserted(QModelIndex, int, int)));
+ QSignalSpy rowsInsertedSpy(&model, SIGNAL(rowsInserted(QModelIndex,int,int)));
if (!db.driver()->hasFeature(QSqlDriver::QuerySize)) {
model.fetchMore();
int newRowCount = model.rowCount();
@@ -524,7 +524,7 @@ void tst_QSqlQueryModel::withSortFilterProxyModel()
QSignalSpy modelAboutToBeResetSpy(&model, SIGNAL(modelAboutToBeReset()));
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));
view.scrollToBottom();
@@ -576,8 +576,8 @@ void tst_QSqlQueryModel::setQueryWithNoRowsInResultSet()
CHECK_DATABASE(db);
QSqlQueryModel model;
- QSignalSpy modelRowsAboutToBeInsertedSpy(&model, SIGNAL(rowsAboutToBeInserted(const QModelIndex &, int, int)));
- QSignalSpy modelRowsInsertedSpy(&model, SIGNAL(rowsInserted(const QModelIndex &, int, int)));
+ QSignalSpy modelRowsAboutToBeInsertedSpy(&model, SIGNAL(rowsAboutToBeInserted(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!
QSqlQuery query(db);
diff --git a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
index 843ef7be42..0e9420fcbe 100644
--- a/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/sql/models/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -941,7 +941,7 @@ void tst_QSqlTableModel::removeRow()
// headerDataChanged must be emitted by the model since the row won't vanish until select
qRegisterMetaType<Qt::Orientation>("Qt::Orientation");
- QSignalSpy headerDataChangedSpy(&model, SIGNAL(headerDataChanged(Qt::Orientation, int, int)));
+ QSignalSpy headerDataChangedSpy(&model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)));
QVERIFY(model.removeRow(1));
QCOMPARE(headerDataChangedSpy.count(), 1);
@@ -1028,7 +1028,7 @@ void tst_QSqlTableModel::removeRows()
QVERIFY(!model.removeRows(1, 0, model.index(2, 0))); // can't pass a valid modelindex
qRegisterMetaType<Qt::Orientation>("Qt::Orientation");
- QSignalSpy headerDataChangedSpy(&model, SIGNAL(headerDataChanged(Qt::Orientation, int, int)));
+ QSignalSpy headerDataChangedSpy(&model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)));
QVERIFY(model.removeRows(0, 2, QModelIndex()));
QCOMPARE(headerDataChangedSpy.count(), 2);
QCOMPARE(headerDataChangedSpy.at(0).at(1).toInt(), 1);
@@ -1677,7 +1677,7 @@ void tst_QSqlTableModel::insertRecordsInLoop()
QSignalSpy modelAboutToBeResetSpy(&model, SIGNAL(modelAboutToBeReset()));
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++) {
QVERIFY(model.insertRecord(model.rowCount(), record));
QCOMPARE(spyRowsInserted.at(i).at(1).toInt(), i+3); // The table already contains three rows