Commit 17f73c4e authored by Laurent Montel's avatar Laurent Montel 😁

Use QStringLiteral

parent 359afa5a
......@@ -197,7 +197,7 @@ KToggleAction* createAlarmEnableAction(QObject* parent)
*/
QAction* createStopPlayAction(QObject* parent)
{
QAction* action = new QAction(QIcon::fromTheme(QLatin1String("media-playback-stop")), i18nc("@action", "Stop Play"), parent);
QAction* action = new QAction(QIcon::fromTheme(QStringLiteral("media-playback-stop")), i18nc("@action", "Stop Play"), parent);
action->setEnabled(MessageWin::isAudioPlaying());
QObject::connect(action, SIGNAL(triggered(bool)), theApp(), SLOT(stopAudio()));
// The following line ensures that all instances are kept in the same state
......
......@@ -458,17 +458,17 @@ void MainWindow::initActions()
actions->addAction(QLatin1String("createTemplate"), mActionCreateTemplate);
connect(mActionCreateTemplate, &QAction::triggered, this, &MainWindow::slotNewTemplate);
mActionCopy = new QAction(QIcon::fromTheme(QLatin1String("edit-copy")), i18nc("@action", "&Copy..."), this);
mActionCopy = new QAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18nc("@action", "&Copy..."), this);
actions->addAction(QLatin1String("copy"), mActionCopy);
actions->setDefaultShortcut(mActionCopy, QKeySequence(Qt::SHIFT + Qt::Key_Insert));
connect(mActionCopy, &QAction::triggered, this, &MainWindow::slotCopy);
mActionModify = new QAction(QIcon::fromTheme(QLatin1String("document-properties")), i18nc("@action", "&Edit..."), this);
mActionModify = new QAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18nc("@action", "&Edit..."), this);
actions->addAction(QLatin1String("modify"), mActionModify);
actions->setDefaultShortcut(mActionModify, QKeySequence(Qt::CTRL + Qt::Key_E));
connect(mActionModify, &QAction::triggered, this, &MainWindow::slotModify);
mActionDelete = new QAction(QIcon::fromTheme(QLatin1String("edit-delete")), i18nc("@action", "&Delete"), this);
mActionDelete = new QAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18nc("@action", "&Delete"), this);
actions->addAction(QLatin1String("delete"), mActionDelete);
actions->setDefaultShortcut(mActionDelete, QKeySequence::Delete);
connect(mActionDelete, &QAction::triggered, this, &MainWindow::slotDeleteIf);
......@@ -515,7 +515,7 @@ void MainWindow::initActions()
actions->addAction(QLatin1String("showInSystemTray"), mActionToggleTrayIcon);
connect(mActionToggleTrayIcon, &KToggleAction::triggered, this, &MainWindow::slotToggleTrayIcon);
mActionToggleResourceSel = new KToggleAction(QIcon::fromTheme(QLatin1String("view-choose")), i18nc("@action", "Show &Calendars"), this);
mActionToggleResourceSel = new KToggleAction(QIcon::fromTheme(QStringLiteral("view-choose")), i18nc("@action", "Show &Calendars"), this);
actions->addAction(QLatin1String("showResources"), mActionToggleResourceSel);
connect(mActionToggleResourceSel, &KToggleAction::triggered, this, &MainWindow::slotToggleResourceSelector);
......@@ -541,7 +541,7 @@ void MainWindow::initActions()
actions->addAction(QLatin1String("export"), mActionExport);
connect(mActionExport, &QAction::triggered, this, &MainWindow::slotExportAlarms);
action = new QAction(QIcon::fromTheme(QLatin1String("view-refresh")), i18nc("@action", "&Refresh Alarms"), this);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), i18nc("@action", "&Refresh Alarms"), this);
actions->addAction(QLatin1String("refreshAlarms"), action);
connect(action, &QAction::triggered, this, &MainWindow::slotRefreshAlarms);
......@@ -561,12 +561,12 @@ void MainWindow::initActions()
redoTextStripped = KLocalizedString::removeAcceleratorMarker(redoText);
delete act;
}
mActionUndo = new KToolBarPopupAction(QIcon::fromTheme(QLatin1String("edit-undo")), undoText, this);
mActionUndo = new KToolBarPopupAction(QIcon::fromTheme(QStringLiteral("edit-undo")), undoText, this);
actions->addAction(QLatin1String("edit_undo"), mActionUndo);
mActionUndo->setShortcuts(undoShortcut);
connect(mActionUndo, &KToolBarPopupAction::triggered, this, &MainWindow::slotUndo);
mActionRedo = new KToolBarPopupAction(QIcon::fromTheme(QLatin1String("edit-redo")), redoText, this);
mActionRedo = new KToolBarPopupAction(QIcon::fromTheme(QStringLiteral("edit-redo")), redoText, this);
actions->addAction(QLatin1String("edit_redo"), mActionRedo);
mActionRedo->setShortcuts(redoShortcut);
connect(mActionRedo, &KToolBarPopupAction::triggered, this, &MainWindow::slotRedo);
......
......@@ -355,31 +355,31 @@ void ResourceSelector::selectionChanged()
*/
void ResourceSelector::initActions(KActionCollection* actions)
{
mActionReload = new QAction(QIcon::fromTheme(QLatin1String("view-refresh")), i18nc("@action Reload calendar", "Re&load"), this);
mActionReload = new QAction(QIcon::fromTheme(QStringLiteral("view-refresh")), i18nc("@action Reload calendar", "Re&load"), this);
actions->addAction(QLatin1String("resReload"), mActionReload);
connect(mActionReload, &QAction::triggered, this, &ResourceSelector::reloadResource);
mActionShowDetails = new QAction(QIcon::fromTheme(QLatin1String("help-about")), i18nc("@action", "Show &Details"), this);
mActionShowDetails = new QAction(QIcon::fromTheme(QStringLiteral("help-about")), i18nc("@action", "Show &Details"), this);
actions->addAction(QLatin1String("resDetails"), mActionShowDetails);
connect(mActionShowDetails, &QAction::triggered, this, &ResourceSelector::showInfo);
mActionSetColour = new QAction(QIcon::fromTheme(QLatin1String("color-picker")), i18nc("@action", "Set &Color..."), this);
mActionSetColour = new QAction(QIcon::fromTheme(QStringLiteral("color-picker")), i18nc("@action", "Set &Color..."), this);
actions->addAction(QLatin1String("resSetColour"), mActionSetColour);
connect(mActionSetColour, &QAction::triggered, this, &ResourceSelector::setColour);
mActionClearColour = new QAction(i18nc("@action", "Clear C&olor"), this);
actions->addAction(QLatin1String("resClearColour"), mActionClearColour);
connect(mActionClearColour, &QAction::triggered, this, &ResourceSelector::clearColour);
mActionEdit = new QAction(QIcon::fromTheme(QLatin1String("document-properties")), i18nc("@action", "&Edit..."), this);
mActionEdit = new QAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18nc("@action", "&Edit..."), this);
actions->addAction(QLatin1String("resEdit"), mActionEdit);
connect(mActionEdit, &QAction::triggered, this, &ResourceSelector::editResource);
mActionUpdate = new QAction(i18nc("@action", "&Update Calendar Format"), this);
actions->addAction(QLatin1String("resUpdate"), mActionUpdate);
connect(mActionUpdate, &QAction::triggered, this, &ResourceSelector::updateResource);
mActionRemove = new QAction(QIcon::fromTheme(QLatin1String("edit-delete")), i18nc("@action", "&Remove"), this);
mActionRemove = new QAction(QIcon::fromTheme(QStringLiteral("edit-delete")), i18nc("@action", "&Remove"), this);
actions->addAction(QLatin1String("resRemove"), mActionRemove);
connect(mActionRemove, &QAction::triggered, this, &ResourceSelector::removeResource);
mActionSetDefault = new KToggleAction(this);
actions->addAction(QLatin1String("resDefault"), mActionSetDefault);
connect(mActionSetDefault, &KToggleAction::triggered, this, &ResourceSelector::setStandard);
QAction* action = new QAction(QIcon::fromTheme(QLatin1String("document-new")), i18nc("@action", "&Add..."), this);
QAction* action = new QAction(QIcon::fromTheme(QStringLiteral("document-new")), i18nc("@action", "&Add..."), this);
actions->addAction(QLatin1String("resAdd"), action);
connect(action, &QAction::triggered, this, &ResourceSelector::addResource);
mActionImport = new QAction(i18nc("@action", "Im&port..."), this);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment