summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp')
-rw-r--r--tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
index e8ac9aa5d2..fdeb6d100d 100644
--- a/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
+++ b/tests/auto/widgets/util/qcompleter/tst_qcompleter.cpp
@@ -61,7 +61,7 @@ public:
protected:
QStringList splitPath(const QString &path) const {
- return csv ? path.split(",") : QCompleter::splitPath(path);
+ return csv ? path.split(QLatin1Char(',')) : QCompleter::splitPath(path);
}
private:
@@ -367,7 +367,7 @@ void tst_QCompleter::csMatchingOnCsSortedModel_data()
QTest::addColumn<QString>("completion");
QTest::addColumn<QString>("completionText");
-#define ROWNAME(name) (qPrintable(QString("%1 %2").arg(name).arg(i)))
+#define ROWNAME(name) ((QByteArray(name) + ' ' + QByteArray::number(i)).constData())
for (int i = 0; i < 2; i++) {
if (i == 1)
@@ -1164,7 +1164,7 @@ void tst_QCompleter::dynamicSortOrder()
completer.setModelSorting(QCompleter::CaseSensitivelySortedModel);
QStandardItem *root = model.invisibleRootItem();
for (int i = 0; i < 20; i++) {
- root->appendRow(new QStandardItem(QString("%1").arg(i)));
+ root->appendRow(new QStandardItem(QString::number(i)));
}
root->appendRow(new QStandardItem("13"));
root->sortChildren(0, Qt::AscendingOrder);
@@ -1256,7 +1256,7 @@ void tst_QCompleter::task189564_omitNonSelectableItems()
QStringList strings;
for (int i = 0; i < n; ++i)
- strings << QString("%1%2").arg(prefix).arg(i);
+ strings << prefix + QString::number(i);
const QString omitString(strings.at(n / 2));
task189564_StringListModel model(omitString);
model.setStringList(strings);
@@ -1553,9 +1553,9 @@ void tst_QCompleter::task247560_keyboardNavigation()
QStandardItemModel model;
for (int i = 0; i < 5; i++) {
- for (int j = 0; j < 5; j++) {
- model.setItem(i, j, new QStandardItem(QString("row %1 column %2").arg(i).arg(j)));
- }
+ const QString prefix = QLatin1String("row ") + QString::number(i) + QLatin1String(" column ");
+ for (int j = 0; j < 5; j++)
+ model.setItem(i, j, new QStandardItem(prefix + QString::number(j)));
}