mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
Use new setObjectName StringView overload
This commit is contained in:
@@ -510,7 +510,7 @@ void Application::startBackgroundMode(MainWindow *window)
|
||||
#ifndef Q_OS_WIN
|
||||
KActionCollection *collection = window->actionCollection();
|
||||
QAction *action = collection->addAction(QStringLiteral("toggle-background-window"));
|
||||
action->setObjectName(QStringLiteral("Konsole Background Mode"));
|
||||
action->setObjectName(QLatin1StringView("Konsole Background Mode"));
|
||||
action->setText(i18nc("@item", "Toggle Background Window"));
|
||||
KGlobalAccel::self()->setGlobalShortcut(action, QKeySequence(Konsole::ACCEL | Qt::Key_F12));
|
||||
connect(action, &QAction::triggered, this, &Application::toggleBackgroundInstance);
|
||||
|
||||
@@ -34,7 +34,7 @@ BookmarkHandler::BookmarkHandler(KActionCollection *collection, QMenu *menu, boo
|
||||
, _activeView(nullptr)
|
||||
, _views(QList<ViewProperties *>())
|
||||
{
|
||||
setObjectName(QStringLiteral("BookmarkHandler"));
|
||||
setObjectName(QLatin1StringView("BookmarkHandler"));
|
||||
|
||||
_file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("konsole/bookmarks.xml"));
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ ZModemDialog::ZModemDialog(QWidget *aParent, bool modal, const QString &caption)
|
||||
, _textEdit(nullptr)
|
||||
, mButtonBox(nullptr)
|
||||
{
|
||||
setObjectName(QStringLiteral("zmodem_progress"));
|
||||
setObjectName(QLatin1StringView("zmodem_progress"));
|
||||
setModal(modal);
|
||||
setWindowTitle(caption);
|
||||
|
||||
|
||||
@@ -101,8 +101,8 @@ QList<QAction *> UrlFilterHotSpot::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(QStringLiteral("open-action"));
|
||||
copyAction->setObjectName(QStringLiteral("copy-action"));
|
||||
openAction->setObjectName(QLatin1StringView("open-action"));
|
||||
copyAction->setObjectName(QLatin1StringView("copy-action"));
|
||||
|
||||
QObject::connect(openAction, &QAction::triggered, this, [this, openAction] {
|
||||
activate(openAction);
|
||||
|
||||
@@ -44,7 +44,7 @@ void QuickCommandsPlugin::createWidgetsForMainWindow(Konsole::MainWindow *mainWi
|
||||
qcWidget->setModel(&priv->model);
|
||||
qcDockWidget->setWindowTitle(i18n("Quick Commands"));
|
||||
qcDockWidget->setWidget(qcWidget);
|
||||
qcDockWidget->setObjectName(QStringLiteral("QuickCommandsDock"));
|
||||
qcDockWidget->setObjectName(QLatin1StringView("QuickCommandsDock"));
|
||||
qcDockWidget->setVisible(false);
|
||||
qcDockWidget->setAllowedAreas(Qt::DockWidgetArea::LeftDockWidgetArea | Qt::DockWidgetArea::RightDockWidgetArea);
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ void SSHManagerPlugin::createWidgetsForMainWindow(Konsole::MainWindow *mainWindo
|
||||
managerWidget->setModel(&d->model);
|
||||
sshDockWidget->setWidget(managerWidget);
|
||||
sshDockWidget->setWindowTitle(i18n("SSH Manager"));
|
||||
sshDockWidget->setObjectName(QStringLiteral("SSHManagerDock"));
|
||||
sshDockWidget->setObjectName(QLatin1StringView("SSHManagerDock"));
|
||||
sshDockWidget->setVisible(false);
|
||||
sshDockWidget->setAllowedAreas(Qt::DockWidgetArea::LeftDockWidgetArea | Qt::DockWidgetArea::RightDockWidgetArea);
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget *parent)
|
||||
_searchEdit->setClearButtonEnabled(true);
|
||||
_searchEdit->installEventFilter(this);
|
||||
_searchEdit->setPlaceholderText(i18nc("@label:textbox", "Find..."));
|
||||
_searchEdit->setObjectName(QStringLiteral("search-edit"));
|
||||
_searchEdit->setObjectName(QLatin1StringView("search-edit"));
|
||||
_searchEdit->setToolTip(i18nc("@info:tooltip", "Enter the text to search for here"));
|
||||
_searchEdit->setCursor(Qt::IBeamCursor);
|
||||
_searchEdit->setStyleSheet(QString());
|
||||
@@ -71,7 +71,7 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget *parent)
|
||||
connect(_searchEdit, &QLineEdit::textChanged, _searchTimer, static_cast<void (QTimer::*)()>(&QTimer::start));
|
||||
|
||||
_findNextButton = new QToolButton(this);
|
||||
_findNextButton->setObjectName(QStringLiteral("find-next-button"));
|
||||
_findNextButton->setObjectName(QLatin1StringView("find-next-button"));
|
||||
_findNextButton->setText(i18nc("@action:button Go to the next phrase", "Next"));
|
||||
_findNextButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
_findNextButton->setAutoRaise(true);
|
||||
@@ -81,7 +81,7 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget *parent)
|
||||
|
||||
_findPreviousButton = new QToolButton(this);
|
||||
_findPreviousButton->setAutoRaise(true);
|
||||
_findPreviousButton->setObjectName(QStringLiteral("find-previous-button"));
|
||||
_findPreviousButton->setObjectName(QLatin1StringView("find-previous-button"));
|
||||
_findPreviousButton->setText(i18nc("@action:button Go to the previous phrase", "Previous"));
|
||||
_findPreviousButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
_findPreviousButton->setToolTip(i18nc("@info:tooltip", "Find the previous match for the current search phrase"));
|
||||
@@ -90,12 +90,12 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget *parent)
|
||||
|
||||
_searchFromButton = new QToolButton(this);
|
||||
_searchFromButton->setAutoRaise(true);
|
||||
_searchFromButton->setObjectName(QStringLiteral("search-from-button"));
|
||||
_searchFromButton->setObjectName(QLatin1StringView("search-from-button"));
|
||||
_searchFromButton->installEventFilter(this);
|
||||
connect(_searchFromButton, &QToolButton::clicked, this, &Konsole::IncrementalSearchBar::searchFromClicked);
|
||||
|
||||
auto optionsButton = new QToolButton(this);
|
||||
optionsButton->setObjectName(QStringLiteral("find-options-button"));
|
||||
optionsButton->setObjectName(QLatin1StringView("find-options-button"));
|
||||
optionsButton->setCheckable(false);
|
||||
optionsButton->setPopupMode(QToolButton::InstantPopup);
|
||||
optionsButton->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||
@@ -105,7 +105,7 @@ IncrementalSearchBar::IncrementalSearchBar(QWidget *parent)
|
||||
optionsButton->installEventFilter(this);
|
||||
|
||||
auto closeButton = new QToolButton(this);
|
||||
closeButton->setObjectName(QStringLiteral("close-button"));
|
||||
closeButton->setObjectName(QLatin1StringView("close-button"));
|
||||
closeButton->setToolTip(i18nc("@info:tooltip", "Close the search bar"));
|
||||
closeButton->setAutoRaise(true);
|
||||
closeButton->setIcon(QIcon::fromTheme(QStringLiteral("dialog-close")));
|
||||
|
||||
@@ -99,7 +99,7 @@ TerminalHeaderBar::TerminalHeaderBar(QWidget *parent)
|
||||
m_closeBtn = new QToolButton(this);
|
||||
m_closeBtn->setIcon(QIcon::fromTheme(QStringLiteral("tab-close")));
|
||||
m_closeBtn->setToolTip(i18nc("@info:tooltip", "Close terminal"));
|
||||
m_closeBtn->setObjectName(QStringLiteral("close-terminal-button"));
|
||||
m_closeBtn->setObjectName(QLatin1StringView("close-terminal-button"));
|
||||
m_closeBtn->setAutoRaise(true);
|
||||
|
||||
m_boxLayout->addWidget(m_closeBtn);
|
||||
|
||||
@@ -94,18 +94,18 @@ TabbedViewContainer::TabbedViewContainer(ViewManager *connectedViewManager, QWid
|
||||
auto detachAction = _contextPopupMenu->addAction(QIcon::fromTheme(QStringLiteral("tab-detach")), i18nc("@action:inmenu", "&Detach Tab"), this, [this] {
|
||||
Q_EMIT detachTab(_contextMenuTabIndex);
|
||||
});
|
||||
detachAction->setObjectName(QStringLiteral("tab-detach"));
|
||||
detachAction->setObjectName(QLatin1StringView("tab-detach"));
|
||||
|
||||
auto editAction =
|
||||
_contextPopupMenu->addAction(QIcon::fromTheme(QStringLiteral("edit-rename")), i18nc("@action:inmenu", "&Configure or Rename Tab..."), this, [this] {
|
||||
renameTab(_contextMenuTabIndex);
|
||||
});
|
||||
editAction->setObjectName(QStringLiteral("edit-rename"));
|
||||
editAction->setObjectName(QLatin1StringView("edit-rename"));
|
||||
|
||||
auto closeAction = _contextPopupMenu->addAction(QIcon::fromTheme(QStringLiteral("tab-close")), i18nc("@action:inmenu", "Close Tab"), this, [this] {
|
||||
closeTerminalTab(_contextMenuTabIndex);
|
||||
});
|
||||
closeAction->setObjectName(QStringLiteral("tab-close"));
|
||||
closeAction->setObjectName(QLatin1StringView("tab-close"));
|
||||
|
||||
auto profileMenu = new QMenu(this);
|
||||
auto profileList = new ProfileList(false, profileMenu);
|
||||
|
||||
Reference in New Issue
Block a user