diff options
Diffstat (limited to 'tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp')
-rw-r--r-- | tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp index 2e143aff21..c1d8faa418 100644 --- a/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp +++ b/tests/auto/sql/kernel/qsqldatabase/tst_qsqldatabase.cpp @@ -210,7 +210,7 @@ struct FieldDef { rt.replace(QRegularExpression("\\s"), QString("_")); int i = rt.indexOf(QLatin1Char('(')); if (i == -1) - i = rt.length(); + i = rt.size(); if (i > 20) i = 20; return "t_" + rt.left(i); @@ -1904,13 +1904,13 @@ void tst_QSqlDatabase::odbc_testqGetString() QVERIFY_SQL(q, exec("SELECT id, vcvalue FROM " + testqGetString + " ORDER BY id")); QVERIFY_SQL(q, next()); QCOMPARE(q.value(0).toInt(), 1); - QCOMPARE(q.value(1).toString().length(), 65536); + QCOMPARE(q.value(1).toString().size(), 65536); QVERIFY_SQL(q, next()); QCOMPARE(q.value(0).toInt(), 2); - QCOMPARE(q.value(1).toString().length(), 65537); + QCOMPARE(q.value(1).toString().size(), 65537); QVERIFY_SQL(q, next()); QCOMPARE(q.value(0).toInt(), 3); - QCOMPARE(q.value(1).toString().length(), 65538); + QCOMPARE(q.value(1).toString().size(), 65538); } @@ -2189,7 +2189,7 @@ void tst_QSqlDatabase::eventNotificationIBase() // 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 // event handler in the driver to be executed and emit the notification signal. - QTRY_COMPARE(spy.count(), 1); + QTRY_COMPARE(spy.size(), 1); QList<QVariant> arguments = spy.takeFirst(); QCOMPARE(arguments.at(0).toString(), procedureName); QVERIFY_SQL(*driver, unsubscribeFromNotification(procedureName)); @@ -2211,7 +2211,7 @@ void tst_QSqlDatabase::eventNotificationPSQL() QVERIFY_SQL(*driver, subscribeToNotification(procedureName)); QSignalSpy spy(driver, QOverload<const QString &, QSqlDriver::NotificationSource, const QVariant &>::of(&QSqlDriver::notification)); query.exec(QString("NOTIFY \"%1\", '%2'").arg(procedureName).arg(payload)); - QTRY_COMPARE(spy.count(), 1); + QTRY_COMPARE(spy.size(), 1); QList<QVariant> arguments = spy.takeFirst(); QCOMPARE(arguments.at(0).toString(), procedureName); QCOMPARE(qvariant_cast<QSqlDriver::NotificationSource>(arguments.at(1)), QSqlDriver::SelfSource); @@ -2237,12 +2237,12 @@ void tst_QSqlDatabase::eventNotificationSQLite() QVERIFY_SQL(q, exec("CREATE TABLE " + tableName + " (id INTEGER, realVal REAL)")); driver->subscribeToNotification(noEscapeTableName); QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id, realVal) VALUES (1, 2.3)")); - QTRY_COMPARE(spy.count(), 1); + QTRY_COMPARE(spy.size(), 1); QList<QVariant> arguments = spy.takeFirst(); QCOMPARE(arguments.at(0).toString(), noEscapeTableName); driver->unsubscribeFromNotification(noEscapeTableName); QVERIFY_SQL(q, exec("INSERT INTO " + tableName + " (id, realVal) VALUES (1, 2.3)")); - QTRY_COMPARE(spy.count(), 0); + QTRY_COMPARE(spy.size(), 0); } void tst_QSqlDatabase::sqlite_bindAndFetchUInt() |