addAction(collection->action(KStandardAction::name(KStandardAction::Cut)));
addAction(collection->action(KStandardAction::name(KStandardAction::Copy)));
if (ContextMenuSettings::showCopyLocation()) {
- QAction *copyPathAction = collection->action(QString("copy_location"));
+ QAction *copyPathAction = collection->action(QStringLiteral("copy_location"));
copyPathAction->setEnabled(m_selectedItems.size() == 1);
addAction(copyPathAction);
}
QAction *addToPlacesAction = col->action(QStringLiteral("add_to_places"));
QAction *copyToOtherViewAction = col->action(QStringLiteral("copy_to_inactive_split_view"));
QAction *moveToOtherViewAction = col->action(QStringLiteral("move_to_inactive_split_view"));
- QAction *copyLocation = col->action(QString("copy_location"));
+ QAction *copyLocation = col->action(QStringLiteral("copy_location"));
if (list.isEmpty()) {
stateChanged(QStringLiteral("has_no_selection"));
}
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();
}
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());
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()
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());
}
<< 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];
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());