summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2022-03-04 15:56:34 +0100
committerSona Kurazyan <sona.kurazyan@qt.io>2022-03-12 01:05:45 +0100
commit65859635830b1476ce5c3e22f86438a08d4894cf (patch)
tree0f98ffe6b2859a864d4835480d0d02b6b0319e1e /tests/auto/widgets
parent28d25144280503cf9131b6f9325d1d7f168af8d9 (diff)
Deprecate {QString, QByteArray}::count()
And remove their uses. [ChangeLog][QtCore][Deprecation Notice] Deprecated QString::count() and QByteArray::count() that take no parameters, to avoid confusion with the algorithm overloads of the same name. They can be replaced by size() or length() methods. Change-Id: I6541e3235ab58cf750d89568d66d3b1d9bbd4a04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/widgets')
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp2
-rw-r--r--tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp2
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
index 877c61fb64..e1833a3716 100644
--- a/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog/tst_qfiledialog.cpp
@@ -530,7 +530,7 @@ void tst_QFiledialog::completer()
}
// press 'keys' for the input
- for (int i = 0; i < input.count(); ++i)
+ for (int i = 0; i < input.size(); ++i)
QTest::keyPress(lineEdit, input[i].toLatin1());
QStringList expectedFiles;
diff --git a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
index 8261bd85d6..3c6c80a1e3 100644
--- a/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
+++ b/tests/auto/widgets/dialogs/qfiledialog2/tst_qfiledialog2.cpp
@@ -825,7 +825,7 @@ void tst_QFileDialog2::task203703_returnProperSeparator()
QVERIFY(button);
QTest::keyClick(button, Qt::Key_Return);
QString result = fd.selectedFiles().first();
- QVERIFY(result.at(result.count() - 1) != '/');
+ QVERIFY(result.at(result.size() - 1) != '/');
QVERIFY(!result.contains('\\'));
current.rmdir("aaaaaaaaaaaaaaaaaa");
}
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index b9675b1c0d..ea0d5e8871 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -4019,7 +4019,7 @@ void tst_QWidget::restoreVersion1Geometry()
QVERIFY(f.exists());
f.open(QIODevice::ReadOnly);
const QByteArray savedGeometry = f.readAll();
- QCOMPARE(savedGeometry.count(), 46);
+ QCOMPARE(savedGeometry.size(), 46);
f.close();
QWidget widget;