Commit 3484641c authored by Laurent Montel's avatar Laurent Montel 😁

Use QStringLiteral

parent 485970b7
......@@ -747,10 +747,10 @@ void Akregator::Feed::markAsFetchedNow()
QIcon Akregator::Feed::icon() const
{
if (fetchErrorOccurred()) {
return QIcon::fromTheme(QLatin1String("dialog-error"));
return QIcon::fromTheme(QStringLiteral("dialog-error"));
}
return !d->favicon.isNull() ? d->favicon : QIcon::fromTheme(QLatin1String("text-html"));
return !d->favicon.isNull() ? d->favicon : QIcon::fromTheme(QStringLiteral("text-html"));
}
void Akregator::Feed::deleteExpiredArticles(ArticleDeleteJob *deleteJob)
......
......@@ -298,9 +298,9 @@ void TimeLabels::contextMenuEvent(QContextMenuEvent *event)
QMenu popup(this);
QAction *editTimeZones =
popup.addAction(QIcon::fromTheme(QLatin1String("document-properties")), i18n("&Add Timezones..."));
popup.addAction(QIcon::fromTheme(QStringLiteral("document-properties")), i18n("&Add Timezones..."));
QAction *removeTimeZone =
popup.addAction(QIcon::fromTheme(QLatin1String("edit-delete")),
popup.addAction(QIcon::fromTheme(QStringLiteral("edit-delete")),
i18n("&Remove Timezone %1", i18n(mSpec.timeZone().name().toUtf8())));
if (!mSpec.isValid() ||
!mTimeLabelsZone->preferences()->timeScaleTimezones().count() ||
......
......@@ -77,7 +77,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
switch (type) {
case ComposerView::Bold: {
if (!action_text_bold) {
action_text_bold = new KToggleAction(QIcon::fromTheme(QLatin1String("format-text-bold")), i18nc("@action boldify selected text", "&Bold"), q);
action_text_bold = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-bold")), i18nc("@action boldify selected text", "&Bold"), q);
QFont bold;
bold.setBold(true);
action_text_bold->setFont(bold);
......@@ -89,7 +89,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::Italic: {
if (!action_text_italic) {
action_text_italic = new KToggleAction(QIcon::fromTheme(QLatin1String("format-text-italic")), i18nc("@action italicize selected text", "&Italic"), q);
action_text_italic = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-italic")), i18nc("@action italicize selected text", "&Italic"), q);
QFont italic;
italic.setItalic(true);
action_text_italic->setFont(italic);
......@@ -101,7 +101,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::Underline: {
if (!action_text_underline) {
action_text_underline = new KToggleAction(QIcon::fromTheme(QLatin1String("format-text-underline")), i18nc("@action underline selected text", "&Underline"), q);
action_text_underline = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline")), i18nc("@action underline selected text", "&Underline"), q);
QFont underline;
underline.setUnderline(true);
action_text_underline->setFont(underline);
......@@ -113,7 +113,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::StrikeOut: {
if (!action_text_strikeout) {
action_text_strikeout = new KToggleAction(QIcon::fromTheme(QLatin1String("format-text-strikethrough")), i18nc("@action", "&Strike Out"), q);
action_text_strikeout = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-strikethrough")), i18nc("@action", "&Strike Out"), q);
action_text_strikeout->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_L));
FORWARD_ACTION(action_text_strikeout, QWebPage::ToggleStrikethrough);
htmlEditorActionList.append(action_text_strikeout);
......@@ -122,7 +122,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::AlignLeft: {
if (!action_align_left) {
action_align_left = new KToggleAction(QIcon::fromTheme(QLatin1String("format-justify-left")), i18nc("@action", "Align &Left"), q);
action_align_left = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-justify-left")), i18nc("@action", "Align &Left"), q);
action_align_left->setIconText(i18nc("@label left justify", "Left"));
htmlEditorActionList.append((action_align_left));
FORWARD_ACTION(action_align_left, QWebPage::AlignLeft);
......@@ -131,7 +131,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::AlignCenter: {
if (!action_align_center) {
action_align_center = new KToggleAction(QIcon::fromTheme(QLatin1String("format-justify-center")), i18nc("@action", "Align &Center"), q);
action_align_center = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-justify-center")), i18nc("@action", "Align &Center"), q);
action_align_center->setIconText(i18nc("@label center justify", "Center"));
htmlEditorActionList.append((action_align_center));
FORWARD_ACTION(action_align_center, QWebPage::AlignCenter);
......@@ -140,7 +140,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::AlignRight: {
if (!action_align_right) {
action_align_right = new KToggleAction(QIcon::fromTheme(QLatin1String("format-justify-right")), i18nc("@action", "Align &Right"), q);
action_align_right = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-justify-right")), i18nc("@action", "Align &Right"), q);
action_align_right->setIconText(i18nc("@label right justify", "Right"));
htmlEditorActionList.append((action_align_right));
FORWARD_ACTION(action_align_right, QWebPage::AlignRight);
......@@ -149,7 +149,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::AlignJustify: {
if (!action_align_justify) {
action_align_justify = new KToggleAction(QIcon::fromTheme(QLatin1String("format-justify-fill")), i18nc("@action", "&Justify"), q);
action_align_justify = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-justify-fill")), i18nc("@action", "&Justify"), q);
action_align_justify->setIconText(i18nc("@label justify fill", "Justify"));
htmlEditorActionList.append((action_align_justify));
FORWARD_ACTION(action_align_justify, QWebPage::AlignJustified);
......@@ -158,7 +158,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::DirectionLtr: {
if (!action_direction_ltr) {
action_direction_ltr = new KToggleAction(QIcon::fromTheme(QLatin1String("format-text-direction-ltr")), i18nc("@action", "Left-to-Right"), q);
action_direction_ltr = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-direction-ltr")), i18nc("@action", "Left-to-Right"), q);
action_direction_ltr->setIconText(i18nc("@label left-to-right", "Left-to-Right"));
htmlEditorActionList.append(action_direction_ltr);
FORWARD_ACTION(action_direction_ltr, QWebPage::SetTextDirectionLeftToRight);
......@@ -167,7 +167,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::DirectionRtl: {
if (!action_direction_rtl) {
action_direction_rtl = new KToggleAction(QIcon::fromTheme(QLatin1String("format-text-direction-rtl")), i18nc("@action", "Right-to-Left"), q);
action_direction_rtl = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-direction-rtl")), i18nc("@action", "Right-to-Left"), q);
action_direction_rtl->setIconText(i18nc("@label right-to-left", "Right-to-Left"));
htmlEditorActionList.append(action_direction_rtl);
FORWARD_ACTION(action_direction_rtl, QWebPage::SetTextDirectionRightToLeft);
......@@ -176,7 +176,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::SubScript: {
if (!action_text_subscript) {
action_text_subscript = new KToggleAction(QIcon::fromTheme(QLatin1String("format-text-subscript")), i18nc("@action", "Subscript"), q);
action_text_subscript = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-subscript")), i18nc("@action", "Subscript"), q);
htmlEditorActionList.append((action_text_subscript));
FORWARD_ACTION(action_text_subscript, QWebPage::ToggleSubscript);
}
......@@ -184,7 +184,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::SuperScript: {
if (!action_text_superscript) {
action_text_superscript = new KToggleAction(QIcon::fromTheme(QLatin1String("format-text-superscript")), i18nc("@action", "Superscript"), q);
action_text_superscript = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-superscript")), i18nc("@action", "Superscript"), q);
htmlEditorActionList.append((action_text_superscript));
FORWARD_ACTION(action_text_superscript, QWebPage::ToggleSuperscript);
}
......@@ -192,7 +192,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::HorizontalRule: {
if (!action_insert_horizontal_rule) {
action_insert_horizontal_rule = new QAction(QIcon::fromTheme(QLatin1String("insert-horizontal-rule")), i18nc("@action", "Insert Rule Line"), q);
action_insert_horizontal_rule = new QAction(QIcon::fromTheme(QStringLiteral("insert-horizontal-rule")), i18nc("@action", "Insert Rule Line"), q);
htmlEditorActionList.append((action_insert_horizontal_rule));
q->connect(action_insert_horizontal_rule, SIGNAL(triggered(bool)), SLOT(_k_slotInsertHorizontalRule()));
}
......@@ -200,7 +200,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::ListIndent: {
if (!action_list_indent) {
action_list_indent = new QAction(QIcon::fromTheme(QLatin1String("format-indent-more")), i18nc("@action", "Increase Indent"), q);
action_list_indent = new QAction(QIcon::fromTheme(QStringLiteral("format-indent-more")), i18nc("@action", "Increase Indent"), q);
htmlEditorActionList.append((action_list_indent));
FORWARD_ACTION(action_list_indent, QWebPage::Indent);
}
......@@ -208,7 +208,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::ListDedent: {
if (!action_list_dedent) {
action_list_dedent = new QAction(QIcon::fromTheme(QLatin1String("format-indent-less")), i18nc("@action", "Decrease Indent"), q);
action_list_dedent = new QAction(QIcon::fromTheme(QStringLiteral("format-indent-less")), i18nc("@action", "Decrease Indent"), q);
htmlEditorActionList.append(action_list_dedent);
FORWARD_ACTION(action_list_dedent, QWebPage::Outdent);
}
......@@ -216,7 +216,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::OrderedList: {
if (!action_ordered_list) {
action_ordered_list = new KToggleAction(QIcon::fromTheme(QLatin1String("format-list-ordered")), i18n("Ordered Style"), q);
action_ordered_list = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-list-ordered")), i18n("Ordered Style"), q);
htmlEditorActionList.append(action_ordered_list);
FORWARD_ACTION(action_ordered_list, QWebPage::InsertOrderedList);
}
......@@ -224,7 +224,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::UnorderedList: {
if (!action_unordered_list) {
action_unordered_list = new KToggleAction(QIcon::fromTheme(QLatin1String("format-list-unordered")), i18n("Unordered List"), q);
action_unordered_list = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-list-unordered")), i18n("Unordered List"), q);
htmlEditorActionList.append(action_unordered_list);
FORWARD_ACTION(action_unordered_list, QWebPage::InsertUnorderedList);
}
......@@ -232,7 +232,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::FormatType: {
if (!action_format_type) {
action_format_type = new KSelectAction(QIcon::fromTheme(QLatin1String("format-list-unordered")), i18nc("@title:menu", "List Style"), q);
action_format_type = new KSelectAction(QIcon::fromTheme(QStringLiteral("format-list-unordered")), i18nc("@title:menu", "List Style"), q);
QAction *act = action_format_type->addAction(i18n("Paragraph"));
act->setData(QVariant::fromValue(ComposerViewPrivate::Paragraph));
act = action_format_type->addAction(i18n("Heading 1"));
......@@ -295,7 +295,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::InsertImage: {
if (!action_insert_image) {
action_insert_image = new QAction(QIcon::fromTheme(QLatin1String("insert-image")), i18n("Add Image"), q);
action_insert_image = new QAction(QIcon::fromTheme(QStringLiteral("insert-image")), i18n("Add Image"), q);
q->connect(action_insert_image, SIGNAL(triggered(bool)), SLOT(_k_slotAddImage()));
}
break;
......@@ -309,7 +309,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::InsertTable: {
if (!action_insert_table) {
action_insert_table = new QAction(QIcon::fromTheme(QLatin1String("insert-table")), i18n("Table..."), q);
action_insert_table = new QAction(QIcon::fromTheme(QStringLiteral("insert-table")), i18n("Table..."), q);
htmlEditorActionList.append(action_insert_table);
q->connect(action_insert_table, SIGNAL(triggered(bool)), SLOT(_k_slotInsertTable()));
}
......@@ -317,7 +317,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::InsertLink: {
if (!action_insert_link) {
action_insert_link = new QAction(QIcon::fromTheme(QLatin1String("insert-link")), i18nc("@action", "Link"), q);
action_insert_link = new QAction(QIcon::fromTheme(QStringLiteral("insert-link")), i18nc("@action", "Link"), q);
htmlEditorActionList.append(action_insert_link);
q->connect(action_insert_link, SIGNAL(triggered(bool)), q, SLOT(_k_insertLink()));
}
......@@ -325,7 +325,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::TextForegroundColor: {
if (!action_text_foreground_color) {
action_text_foreground_color = new QAction(QIcon::fromTheme(QLatin1String("format-stroke-color")), i18nc("@action", "Text &Color..."), q);
action_text_foreground_color = new QAction(QIcon::fromTheme(QStringLiteral("format-stroke-color")), i18nc("@action", "Text &Color..."), q);
action_text_foreground_color->setIconText(i18nc("@label stroke color", "Color"));
htmlEditorActionList.append((action_text_foreground_color));
q->connect(action_text_foreground_color, SIGNAL(triggered()), q, SLOT(_k_setTextForegroundColor()));
......@@ -334,7 +334,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::TextBackgroundColor: {
if (!action_text_background_color) {
action_text_background_color = new QAction(QIcon::fromTheme(QLatin1String("format-fill-color")), i18nc("@action", "Text &Highlight..."), q);
action_text_background_color = new QAction(QIcon::fromTheme(QStringLiteral("format-fill-color")), i18nc("@action", "Text &Highlight..."), q);
htmlEditorActionList.append((action_text_background_color));
q->connect(action_text_background_color, SIGNAL(triggered()), q, SLOT(_k_setTextBackgroundColor()));
}
......@@ -342,14 +342,14 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::FormatReset: {
if (!action_format_reset) {
action_format_reset = new QAction(QIcon::fromTheme(QLatin1String("draw-eraser")), i18n("Reset Font Settings"), q);
action_format_reset = new QAction(QIcon::fromTheme(QStringLiteral("draw-eraser")), i18n("Reset Font Settings"), q);
FORWARD_ACTION(action_format_reset, QWebPage::RemoveFormat);
}
break;
}
case ComposerView::SpellCheck: {
if (!action_spell_check) {
action_spell_check = new QAction(QIcon::fromTheme(QLatin1String("tools-check-spelling")), i18n("Check Spelling..."), q);
action_spell_check = new QAction(QIcon::fromTheme(QStringLiteral("tools-check-spelling")), i18n("Check Spelling..."), q);
htmlEditorActionList.append(action_spell_check);
q->connect(action_spell_check, SIGNAL(triggered(bool)), q, SLOT(_k_slotSpellCheck()));
}
......@@ -365,7 +365,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::BlockQuote: {
if (!action_block_quote) {
action_block_quote = new QAction(QIcon::fromTheme(QLatin1String("format-text-blockquote")), i18n("Blockquote"), q);
action_block_quote = new QAction(QIcon::fromTheme(QStringLiteral("format-text-blockquote")), i18n("Blockquote"), q);
htmlEditorActionList.append(action_block_quote);
q->connect(action_block_quote, SIGNAL(triggered()), q, SLOT(_k_slotToggleBlockQuote()));
}
......@@ -373,7 +373,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::Find: {
if (!action_find) {
action_find = new QAction(QIcon::fromTheme(QLatin1String("edit-find")), i18n("&Find..."), q);
action_find = new QAction(QIcon::fromTheme(QStringLiteral("edit-find")), i18n("&Find..."), q);
action_find->setShortcut(KStandardShortcut::find().first());
htmlEditorActionList.append(action_find);
q->connect(action_find, SIGNAL(triggered()), q, SLOT(_k_slotFind()));
......@@ -382,7 +382,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::Replace: {
if (!action_replace) {
action_replace = new QAction(QIcon::fromTheme(QLatin1String("edit-replace")), i18n("&Replace..."), q);
action_replace = new QAction(QIcon::fromTheme(QStringLiteral("edit-replace")), i18n("&Replace..."), q);
htmlEditorActionList.append(action_replace);
action_replace->setShortcut(KStandardShortcut::replace().first());
q->connect(action_replace, SIGNAL(triggered()), q, SLOT(_k_slotReplace()));
......@@ -391,7 +391,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::SaveAs: {
if (!action_save_as) {
action_save_as = new QAction(QIcon::fromTheme(QLatin1String("file_save_as")), i18n("Save &As..."), q);
action_save_as = new QAction(QIcon::fromTheme(QStringLiteral("file_save_as")), i18n("Save &As..."), q);
htmlEditorActionList.append(action_save_as);
action_replace->setShortcut(KStandardShortcut::save().first());
q->connect(action_save_as, SIGNAL(triggered()), q, SLOT(_k_slotSaveAs()));
......@@ -400,7 +400,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::Print: {
if (!action_print) {
action_print = new QAction(QIcon::fromTheme(QLatin1String("file_print")), i18n("&Print..."), q);
action_print = new QAction(QIcon::fromTheme(QStringLiteral("file_print")), i18n("&Print..."), q);
htmlEditorActionList.append(action_print);
action_replace->setShortcut(KStandardShortcut::print().first());
q->connect(action_print, SIGNAL(triggered()), q, SLOT(_k_slotPrint()));
......@@ -409,7 +409,7 @@ void ComposerViewPrivate::createAction(ComposerView::ComposerViewAction type)
}
case ComposerView::PrintPreview: {
if (!action_print_preview) {
action_print_preview = new QAction(QIcon::fromTheme(QLatin1String("file_print_preview")), i18n("Print Previe&w"), q);
action_print_preview = new QAction(QIcon::fromTheme(QStringLiteral("file_print_preview")), i18n("Print Previe&w"), q);
htmlEditorActionList.append(action_print_preview);
q->connect(action_print_preview, SIGNAL(triggered()), q, SLOT(_k_slotPrintPreview()));
}
......
......@@ -227,25 +227,25 @@ ComposerTableActionMenu::ComposerTableActionMenu(const QWebElement &element, QOb
KActionMenu *insertMenu = new KActionMenu(i18n("Insert"), this);
addAction(insertMenu);
d->action_insert_table = new QAction(QIcon::fromTheme(QLatin1String("insert-table")), i18nc("@item:inmenu Insert", "Table..."), this);
d->action_insert_table = new QAction(QIcon::fromTheme(QStringLiteral("insert-table")), i18nc("@item:inmenu Insert", "Table..."), this);
insertMenu->addAction(d->action_insert_table);
connect(d->action_insert_table, &QAction::triggered, this, &ComposerTableActionMenu::insertNewTable);
insertMenu->addSeparator();
d->action_insert_row_below = new QAction(QIcon::fromTheme(QLatin1String("edit-table-insert-row-below")), i18nc("@item:inmenu Insert", "Row Below"), this);
d->action_insert_row_below = new QAction(QIcon::fromTheme(QStringLiteral("edit-table-insert-row-below")), i18nc("@item:inmenu Insert", "Row Below"), this);
insertMenu->addAction(d->action_insert_row_below);
connect(d->action_insert_row_below, SIGNAL(triggered(bool)), SLOT(_k_slotInsertRowBelow()));
d->action_insert_row_above = new QAction(QIcon::fromTheme(QLatin1String("edit-table-insert-row-above")), i18nc("@item:inmenu Insert", "Row Above"), this);
d->action_insert_row_above = new QAction(QIcon::fromTheme(QStringLiteral("edit-table-insert-row-above")), i18nc("@item:inmenu Insert", "Row Above"), this);
insertMenu->addAction(d->action_insert_row_above);
connect(d->action_insert_row_above, SIGNAL(triggered(bool)), SLOT(_k_slotInsertRowAbove()));
insertMenu->addSeparator();
d->action_insert_column_before = new QAction(QIcon::fromTheme(QLatin1String("edit-table-insert-column-left")), i18nc("@item:inmenu Insert", "Column Before"), this);
d->action_insert_column_before = new QAction(QIcon::fromTheme(QStringLiteral("edit-table-insert-column-left")), i18nc("@item:inmenu Insert", "Column Before"), this);
insertMenu->addAction(d->action_insert_column_before);
connect(d->action_insert_column_before, SIGNAL(triggered(bool)), SLOT(_k_slotInsertColumnBefore()));
d->action_insert_column_after = new QAction(QIcon::fromTheme(QLatin1String("edit-table-insert-column-right")), i18nc("@item:inmenu Insert", "Column After"), this);
d->action_insert_column_after = new QAction(QIcon::fromTheme(QStringLiteral("edit-table-insert-column-right")), i18nc("@item:inmenu Insert", "Column After"), this);
insertMenu->addAction(d->action_insert_column_after);
connect(d->action_insert_column_after, SIGNAL(triggered(bool)), SLOT(_k_slotInsertColumnAfter()));
......@@ -283,11 +283,11 @@ ComposerTableActionMenu::ComposerTableActionMenu(const QWebElement &element, QOb
addSeparator();
d->action_merge_cell = new QAction(QIcon::fromTheme(QLatin1String("edit-table-cell-merge")), i18n("Join With Cell to the Right"), this);
d->action_merge_cell = new QAction(QIcon::fromTheme(QStringLiteral("edit-table-cell-merge")), i18n("Join With Cell to the Right"), this);
connect(d->action_merge_cell, SIGNAL(triggered(bool)), SLOT(_k_slotMergeCellToTheRight()));
addAction(d->action_merge_cell);
d->action_split_cell = new QAction(QIcon::fromTheme(QLatin1String("edit-table-cell-split")), i18n("Split cells"), this);
d->action_split_cell = new QAction(QIcon::fromTheme(QStringLiteral("edit-table-cell-split")), i18n("Split cells"), this);
connect(d->action_split_cell, SIGNAL(triggered(bool)), SLOT(_k_slotSplitCell()));
addAction(d->action_split_cell);
......
......@@ -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);
......
......@@ -714,8 +714,8 @@ public:
KDAB_SET_OBJECT_NAME(m_unselectPB);
KDAB_SET_OBJECT_NAME(m_selectedKTV);
m_selectPB.setIcon(QIcon::fromTheme(QLatin1String("arrow-down")));
m_unselectPB.setIcon(QIcon::fromTheme(QLatin1String("arrow-up")));
m_selectPB.setIcon(QIcon::fromTheme(QStringLiteral("arrow-down")));
m_unselectPB.setIcon(QIcon::fromTheme(QStringLiteral("arrow-up")));
m_selectPB.setEnabled(false);
m_unselectPB.setEnabled(false);
......
......@@ -102,7 +102,7 @@ void KWatchGnuPGMainWindow::slotClear()
void KWatchGnuPGMainWindow::createActions()
{
QAction *action = actionCollection()->addAction(QLatin1String("clear_log"));
action->setIcon(QIcon::fromTheme(QLatin1String("edit-clear-history")));
action->setIcon(QIcon::fromTheme(QStringLiteral("edit-clear-history")));
action->setText(i18n("C&lear History"));
connect(action, &QAction::triggered, this, &KWatchGnuPGMainWindow::slotClear);
actionCollection()->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_L));
......
......@@ -397,7 +397,7 @@ void MainWindow::Private::setupActions()
connect(focusToClickSearchAction, SIGNAL(triggered(bool)), q, SLOT(slotFocusQuickSearch()));
clipboadMenu = new ClipboardMenu(q);
clipboadMenu->setMainWindow(q);
clipboadMenu->clipboardMenu()->setIcon(QIcon::fromTheme(QLatin1String("edit-paste")));
clipboadMenu->clipboardMenu()->setIcon(QIcon::fromTheme(QStringLiteral("edit-paste")));
clipboadMenu->clipboardMenu()->setDelayed(false);
coll->addAction(QLatin1String("clipboard_menu"), clipboadMenu->clipboardMenu());
......
......@@ -747,7 +747,7 @@ public:
ui()
{
ui.setupUi(this);
ui.dragQueen->setPixmap(QIcon::fromTheme(QLatin1String("kleopatra")).pixmap(64, 64));
ui.dragQueen->setPixmap(QIcon::fromTheme(QStringLiteral("kleopatra")).pixmap(64, 64));
registerField(QLatin1String("error"), ui.errorTB, "plainText");
registerField(QLatin1String("result"), ui.resultTB, "plainText");
registerField(QLatin1String("url"), ui.dragQueen, "url");
......
......@@ -41,11 +41,11 @@ static const int s_delegatePaddingSize = 7;
struct Icons {
Icons()
: readyPixmap(QIcon::fromTheme(QLatin1String("user-online")).pixmap(QSize(16, 16)))
, syncPixmap(QIcon::fromTheme(QLatin1String("network-connect")).pixmap(QSize(16, 16)))
, errorPixmap(QIcon::fromTheme(QLatin1String("dialog-error")).pixmap(QSize(16, 16)))
, offlinePixmap(QIcon::fromTheme(QLatin1String("network-disconnect")).pixmap(QSize(16, 16)))
, checkMailIcon(QIcon::fromTheme(QLatin1String("mail-receive")))
: readyPixmap(QIcon::fromTheme(QStringLiteral("user-online")).pixmap(QSize(16, 16)))
, syncPixmap(QIcon::fromTheme(QStringLiteral("network-connect")).pixmap(QSize(16, 16)))
, errorPixmap(QIcon::fromTheme(QStringLiteral("dialog-error")).pixmap(QSize(16, 16)))
, offlinePixmap(QIcon::fromTheme(QStringLiteral("network-disconnect")).pixmap(QSize(16, 16)))
, checkMailIcon(QIcon::fromTheme(QStringLiteral("mail-receive")))
{
}
QPixmap readyPixmap, syncPixmap, errorPixmap, offlinePixmap;
......
......@@ -1049,12 +1049,12 @@ AppearancePageMessageTagTab::AppearancePageMessageTagTab(QWidget *parent)
mTagAddButton = new QPushButton(mTagsGroupBox);
mTagAddButton->setToolTip(i18n("Add new tag"));
mTagAddButton->setIcon(QIcon::fromTheme(QLatin1String("list-add")));
mTagAddButton->setIcon(QIcon::fromTheme(QStringLiteral("list-add")));
addremovegrid->addWidget(mTagAddButton);
mTagRemoveButton = new QPushButton(mTagsGroupBox);
mTagRemoveButton->setToolTip(i18n("Remove selected tag"));
mTagRemoveButton->setIcon(QIcon::fromTheme(QLatin1String("list-remove")));
mTagRemoveButton->setIcon(QIcon::fromTheme(QStringLiteral("list-remove")));
addremovegrid->addWidget(mTagRemoveButton);
//Up and down buttons
......@@ -1063,13 +1063,13 @@ AppearancePageMessageTagTab::AppearancePageMessageTagTab(QWidget *parent)
mTagUpButton = new QPushButton(mTagsGroupBox);
mTagUpButton->setToolTip(i18n("Increase tag priority"));
mTagUpButton->setIcon(QIcon::fromTheme(QLatin1String("arrow-up")));
mTagUpButton->setIcon(QIcon::fromTheme(QStringLiteral("arrow-up")));
mTagUpButton->setAutoRepeat(true);
updowngrid->addWidget(mTagUpButton);
mTagDownButton = new QPushButton(mTagsGroupBox);
mTagDownButton->setToolTip(i18n("Decrease tag priority"));
mTagDownButton->setIcon(QIcon::fromTheme(QLatin1String("arrow-down")));
mTagDownButton->setIcon(QIcon::fromTheme(QStringLiteral("arrow-down")));
mTagDownButton->setAutoRepeat(true);
updowngrid->addWidget(mTagDownButton);
......
......@@ -1095,29 +1095,29 @@ void KMComposeWin::setupActions(void)
if (MessageComposer::MessageComposerSettings::self()->sendImmediate()) {
//default = send now, alternative = queue
QAction *action = new QAction(QIcon::fromTheme(QLatin1String("mail-send")), i18n("&Send Mail"), this);
QAction *action = new QAction(QIcon::fromTheme(QStringLiteral("mail-send")), i18n("&Send Mail"), this);
actionCollection()->addAction(QLatin1String("send_mail_default"), action);
connect(action, &QAction::triggered, this, &KMComposeWin::slotSendNow);
action = new QAction(QIcon::fromTheme(QLatin1String("mail-send")), i18n("Send Mail Using Shortcut"), this);
action = new QAction(QIcon::fromTheme(QStringLiteral("mail-send")), i18n("Send Mail Using Shortcut"), this);
actionCollection()->addAction(QLatin1String("send_mail"), action);
actionCollection()->setDefaultShortcut(action, QKeySequence(Qt::CTRL + Qt::Key_Return));