┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/dolphinmainwindowtest.cpp2
-rw-r--r--src/tests/dolphinsearchboxtest.cpp2
-rw-r--r--src/tests/kfileitemmodeltest.cpp10
-rw-r--r--src/tests/kitemlistcontrollertest.cpp17
4 files changed, 16 insertions, 15 deletions
diff --git a/src/tests/dolphinmainwindowtest.cpp b/src/tests/dolphinmainwindowtest.cpp
index 61a72ad51..8fd5be7cb 100644
--- a/src/tests/dolphinmainwindowtest.cpp
+++ b/src/tests/dolphinmainwindowtest.cpp
@@ -749,7 +749,7 @@ void DolphinMainWindowTest::testAccessibilityAncestorTree()
}
while (accessibleInterface != accessibleInterfaceOfMainWindow) {
QVERIFY2(accessibleInterface,
- qPrintable(QString("%1's accessibleInterface or one of its accessible children doesn't have the main window as an ancestor.")
+ qPrintable(QStringLiteral("%1's accessibleInterface or one of its accessible children doesn't have the main window as an ancestor.")
.arg(currentlyFocusedObject->metaObject()->className())));
accessibleInterface = accessibleInterface->parent();
}
diff --git a/src/tests/dolphinsearchboxtest.cpp b/src/tests/dolphinsearchboxtest.cpp
index f21a75121..bda60909d 100644
--- a/src/tests/dolphinsearchboxtest.cpp
+++ b/src/tests/dolphinsearchboxtest.cpp
@@ -52,7 +52,7 @@ void DolphinSearchBoxTest::testTextClearing()
m_searchBox->setText("xyz");
m_searchBox->setVisible(false, WithoutAnimation);
m_searchBox->setVisible(true, WithoutAnimation);
- QCOMPARE(m_searchBox->text(), QString("xyz"));
+ QCOMPARE(m_searchBox->text(), QStringLiteral("xyz"));
QTest::keyClick(m_searchBox, Qt::Key_Escape);
QVERIFY(m_searchBox->text().isEmpty());
diff --git a/src/tests/kfileitemmodeltest.cpp b/src/tests/kfileitemmodeltest.cpp
index fad825dc0..7af5690ff 100644
--- a/src/tests/kfileitemmodeltest.cpp
+++ b/src/tests/kfileitemmodeltest.cpp
@@ -157,9 +157,9 @@ void KFileItemModelTest::testDefaultSortRole()
QVERIFY(itemsInsertedSpy.wait());
QCOMPARE(m_model->count(), 3);
- QCOMPARE(m_model->data(0).value("text").toString(), QString("a.txt"));
- QCOMPARE(m_model->data(1).value("text").toString(), QString("b.txt"));
- QCOMPARE(m_model->data(2).value("text").toString(), QString("c.txt"));
+ QCOMPARE(m_model->data(0).value("text").toString(), QStringLiteral("a.txt"));
+ QCOMPARE(m_model->data(1).value("text").toString(), QStringLiteral("b.txt"));
+ QCOMPARE(m_model->data(2).value("text").toString(), QStringLiteral("c.txt"));
}
void KFileItemModelTest::testDefaultGroupedSorting()
@@ -262,8 +262,8 @@ void KFileItemModelTest::testSetData()
QCOMPARE(itemsChangedSpy.count(), 1);
values = m_model->data(0);
- QCOMPARE(values.value("customRole1").toString(), QString("Test1"));
- QCOMPARE(values.value("customRole2").toString(), QString("Test2"));
+ QCOMPARE(values.value("customRole1").toString(), QStringLiteral("Test1"));
+ QCOMPARE(values.value("customRole2").toString(), QStringLiteral("Test2"));
QVERIFY(m_model->isConsistent());
}
diff --git a/src/tests/kitemlistcontrollertest.cpp b/src/tests/kitemlistcontrollertest.cpp
index 18ad1186d..de40331e6 100644
--- a/src/tests/kitemlistcontrollertest.cpp
+++ b/src/tests/kitemlistcontrollertest.cpp
@@ -478,7 +478,7 @@ void KItemListControllerTest::testKeyboardNavigation_data()
<< qMakePair(KeyPress(Qt::Key_Home), ViewState(0, KItemSet() << 0));
}
- const QString testName = layoutNames[layout] + ", " + QString("%1 columns, ").arg(columnCount)
+ const QString testName = layoutNames[layout] + ", " + QStringLiteral("%1 columns, ").arg(columnCount)
+ selectionBehaviorNames[selectionBehavior] + ", " + groupingEnabledNames[groupingEnabled] + ", "
+ layoutDirectionNames[layoutDirection];
@@ -543,13 +543,14 @@ void KItemListControllerTest::testKeyboardNavigation()
QTest::keyClick(m_container, key, modifier);
- QVERIFY2(m_selectionManager->currentItem() == current,
- qPrintable(QString("currentItem() returns index %1 but %2 would be expected. Before this, key \"%3\" was pressed. This test case is defined "
- "in row %4 of the testList from KItemListControllerTest::testKeyboardNavigation_data().")
- .arg(m_selectionManager->currentItem())
- .arg(current)
- .arg(QKeySequence(key).toString())
- .arg(rowCount)));
+ QVERIFY2(
+ m_selectionManager->currentItem() == current,
+ qPrintable(QStringLiteral("currentItem() returns index %1 but %2 would be expected. Before this, key \"%3\" was pressed. This test case is defined "
+ "in row %4 of the testList from KItemListControllerTest::testKeyboardNavigation_data().")
+ .arg(m_selectionManager->currentItem())
+ .arg(current)
+ .arg(QKeySequence(key).toString())
+ .arg(rowCount)));
switch (selectionBehavior) {
case KItemListController::NoSelection:
QVERIFY(m_selectionManager->selectedItems().isEmpty());