From 7b07dd78cd433b88c121d8d33b01ec3013f155b6 Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sat, 12 Sep 2015 12:35:49 -0400 Subject: [PATCH] s/QLatin1String/QStringLiteral/ --- src/BookmarkHandler.cpp | 2 +- src/Filter.cpp | 4 ++-- src/IncrementalSearchBar.cpp | 12 ++++++------ src/ViewManager.cpp | 2 +- src/ZModemDialog.cpp | 2 +- src/autotests/DBusTest.cpp | 12 ++++++------ src/main.cpp | 6 +++--- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/BookmarkHandler.cpp b/src/BookmarkHandler.cpp index d23417f15..e748c1372 100644 --- a/src/BookmarkHandler.cpp +++ b/src/BookmarkHandler.cpp @@ -50,7 +50,7 @@ BookmarkHandler::BookmarkHandler(KActionCollection* collection, _toplevel(toplevel), _activeView(0) { - setObjectName(QLatin1String("BookmarkHandler")); + setObjectName(QStringLiteral("BookmarkHandler")); _file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("konsole/bookmarks.xml")); diff --git a/src/Filter.cpp b/src/Filter.cpp index 3a3d464c8..00f7b3e97 100644 --- a/src/Filter.cpp +++ b/src/Filter.cpp @@ -472,8 +472,8 @@ QList UrlFilter::HotSpot::actions() // object names are set here so that the hotspot performs the // correct action when activated() is called with the triggered // action passed as a parameter. - openAction->setObjectName(QLatin1String("open-action")); - copyAction->setObjectName(QLatin1String("copy-action")); + openAction->setObjectName(QStringLiteral("open-action")); + copyAction->setObjectName(QStringLiteral("copy-action")); QObject::connect(openAction , &QAction::triggered , _urlObject , &Konsole::FilterObject::activated); QObject::connect(copyAction , &QAction::triggered , _urlObject , &Konsole::FilterObject::activated); diff --git a/src/IncrementalSearchBar.cpp b/src/IncrementalSearchBar.cpp index 130b23768..8af58e984 100644 --- a/src/IncrementalSearchBar.cpp +++ b/src/IncrementalSearchBar.cpp @@ -49,7 +49,7 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget* aParent) QHBoxLayout* barLayout = new QHBoxLayout(this); QToolButton* closeButton = new QToolButton(this); - closeButton->setObjectName(QLatin1String("close-button")); + closeButton->setObjectName(QStringLiteral("close-button")); closeButton->setToolTip(i18nc("@info:tooltip", "Close the search bar")); closeButton->setAutoRaise(true); closeButton->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close"))); @@ -59,7 +59,7 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget* aParent) _searchEdit = new QLineEdit(this); _searchEdit->setClearButtonEnabled(true); _searchEdit->installEventFilter(this); - _searchEdit->setObjectName(QLatin1String("search-edit")); + _searchEdit->setObjectName(QStringLiteral("search-edit")); _searchEdit->setToolTip(i18nc("@info:tooltip", "Enter the text to search for here")); // text box may be a minimum of 6 characters wide and a maximum of 10 characters wide @@ -77,14 +77,14 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget* aParent) connect(_searchEdit , &QLineEdit::textChanged , _searchTimer , static_cast(&QTimer::start)); _findNextButton = new QToolButton(this); - _findNextButton->setObjectName(QLatin1String("find-next-button")); + _findNextButton->setObjectName(QStringLiteral("find-next-button")); _findNextButton->setText(i18nc("@action:button Go to the next phrase", "Next")); _findNextButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); _findNextButton->setToolTip(i18nc("@info:tooltip", "Find the next match for the current search phrase")); connect(_findNextButton , &QToolButton::clicked , this , &Konsole::IncrementalSearchBar::findNextClicked); _findPreviousButton = new QToolButton(this); - _findPreviousButton->setObjectName(QLatin1String("find-previous-button")); + _findPreviousButton->setObjectName(QStringLiteral("find-previous-button")); _findPreviousButton->setText(i18nc("@action:button Go to the previous phrase", "Previous")); _findPreviousButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); _findPreviousButton->setToolTip(i18nc("@info:tooltip", "Find the previous match for the current search phrase")); @@ -92,11 +92,11 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget* aParent) _searchFromButton = new QToolButton(this); - _searchFromButton->setObjectName(QLatin1String("search-from-button")); + _searchFromButton->setObjectName(QStringLiteral("search-from-button")); connect(_searchFromButton , &QToolButton::clicked , this , &Konsole::IncrementalSearchBar::searchFromClicked); QToolButton* optionsButton = new QToolButton(this); - optionsButton->setObjectName(QLatin1String("find-options-button")); + optionsButton->setObjectName(QStringLiteral("find-options-button")); optionsButton->setText(i18nc("@action:button Display options menu", "Options")); optionsButton->setCheckable(false); optionsButton->setPopupMode(QToolButton::InstantPopup); diff --git a/src/ViewManager.cpp b/src/ViewManager.cpp index 66f429b88..7210effb3 100644 --- a/src/ViewManager.cpp +++ b/src/ViewManager.cpp @@ -97,7 +97,7 @@ ViewManager::ViewManager(QObject* parent , KActionCollection* collection) //prepare DBus communication new WindowAdaptor(this); // TODO: remove this obsolete and bad name - QDBusConnection::sessionBus().registerObject(QLatin1String("/Konsole"), this); + QDBusConnection::sessionBus().registerObject(QStringLiteral("/Konsole"), this); _managerId = ++lastManagerId; QDBusConnection::sessionBus().registerObject(QLatin1String("/Windows/") + QString::number(_managerId), this); diff --git a/src/ZModemDialog.cpp b/src/ZModemDialog.cpp index d63b4ad9e..05848d530 100644 --- a/src/ZModemDialog.cpp +++ b/src/ZModemDialog.cpp @@ -33,7 +33,7 @@ using Konsole::ZModemDialog; ZModemDialog::ZModemDialog(QWidget* aParent, bool modal, const QString& caption) : QDialog(aParent) { - setObjectName(QLatin1String("zmodem_progress")); + setObjectName(QStringLiteral("zmodem_progress")); setModal(modal); setWindowTitle(caption); diff --git a/src/autotests/DBusTest.cpp b/src/autotests/DBusTest.cpp index 0141622a0..606168961 100644 --- a/src/autotests/DBusTest.cpp +++ b/src/autotests/DBusTest.cpp @@ -77,8 +77,8 @@ void DBusTest::initTestCase() "This test will only work in a Konsole window with a new PID. A new Konsole PID can't be found."); QDBusInterface iface(_interfaceName, - QLatin1String("/Konsole"), - QLatin1String("org.kde.konsole.Konsole")); + QStringLiteral("/Konsole"), + QStringLiteral("org.kde.konsole.Konsole")); QVERIFY(iface.isValid()); } @@ -90,8 +90,8 @@ void DBusTest::cleanupTestCase() // they will get a popup dialog when we try to close this. QDBusInterface iface(_interfaceName, - QLatin1String("/konsole/MainWindow_1"), - QLatin1String("org.qtproject.Qt.QWidget")); + QStringLiteral("/konsole/MainWindow_1"), + QStringLiteral("org.qtproject.Qt.QWidget")); QVERIFY2(iface.isValid(), "Unable to get a dbus interface to Konsole!"); QDBusReply instanceReply = iface.call("close"); @@ -108,8 +108,8 @@ void DBusTest::testSessions() QDBusReply listReply; QDBusInterface iface(_interfaceName, - QLatin1String("/Sessions/1"), - QLatin1String("org.kde.konsole.Session")); + QStringLiteral("/Sessions/1"), + QStringLiteral("org.kde.konsole.Session")); QVERIFY(iface.isValid()); //****************** Test is/set MonitorActivity diff --git a/src/main.cpp b/src/main.cpp index 88bba155e..7c5d95303 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -54,9 +54,9 @@ void restoreSession(Application& app); // *** extern "C" int KDE_EXPORT kdemain(int argc, char** argv) { - Kdelibs4ConfigMigrator migrate(QLatin1String("konsole")); - migrate.setConfigFiles(QStringList() << QStringLiteral("konsolerc") << QLatin1String("konsole.notifyrc")); - migrate.setUiFiles(QStringList() << QStringLiteral("sessionui.rc") << QLatin1String("partui.rc") << QLatin1String("konsoleui.rc")); + Kdelibs4ConfigMigrator migrate(QStringLiteral("konsole")); + migrate.setConfigFiles(QStringList() << QStringLiteral("konsolerc") << QStringLiteral("konsole.notifyrc")); + migrate.setUiFiles(QStringList() << QStringLiteral("sessionui.rc") << QStringLiteral("partui.rc") << QStringLiteral("konsoleui.rc")); if (migrate.migrate()) { Kdelibs4Migration dataMigrator;