Commit e098ea6b authored by Laurent Montel's avatar Laurent Montel 😁

Use QStringLiteral

parent 5200917b
......@@ -287,7 +287,7 @@ void ActionManager::initActions()
mImportAction->setWhatsThis(
i18n("Select this menu entry if you would like to merge the contents "
"of another iCalendar into your current calendar."));
mACollection->addAction(QLatin1String("import_icalendar"), mImportAction);
mACollection->addAction(QStringLiteral("import_icalendar"), mImportAction);
connect(mImportAction, &QAction::triggered, this, &ActionManager::file_import);
QAction *importAction = new QAction(i18n("&Import From UNIX Ical Tool"), this);
......@@ -295,23 +295,23 @@ void ActionManager::initActions()
importAction->setWhatsThis(
i18n("Select this menu entry if you would like to import the contents "
"of a non-iCalendar formatted file into your current calendar."));
mACollection->addAction(QLatin1String("import_ical"), importAction);
mACollection->addAction(QStringLiteral("import_ical"), importAction);
connect(importAction, &QAction::triggered, this, &ActionManager::file_icalimport);
action = new QAction(i18n("Get &Hot New Stuff..."), this);
mACollection->addAction(QLatin1String("downloadnewstuff"), action);
mACollection->addAction(QStringLiteral("downloadnewstuff"), action);
connect(action, &QAction::triggered, this, &ActionManager::downloadNewStuff);
action = new QAction(i18n("Export &Web Page..."), this);
mACollection->addAction(QLatin1String("export_web"), action);
mACollection->addAction(QStringLiteral("export_web"), action);
connect(action, &QAction::triggered, mCalendarView, &CalendarView::exportWeb);
action = new QAction(i18n("Export as &iCalendar..."), this);
mACollection->addAction(QLatin1String("export_icalendar"), action);
mACollection->addAction(QStringLiteral("export_icalendar"), action);
connect(action, &QAction::triggered, mCalendarView, &CalendarView::exportICalendar);
action = new QAction(i18n("Export as &vCalendar..."), this);
mACollection->addAction(QLatin1String("export_vcalendar"), action);
mACollection->addAction(QStringLiteral("export_vcalendar"), action);
connect(action, &QAction::triggered, mCalendarView, &CalendarView::exportVCalendar);
//Laurent: 2009-03-24 comment it until upload will implement
......@@ -371,56 +371,56 @@ void ActionManager::initActions()
/************************** VIEW MENU *********************************/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VIEWS ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
action = new QAction(QIcon::fromTheme(QLatin1String("view-calendar-upcoming-events")), i18n("What's &Next"), this);
mACollection->addAction(QLatin1String("view_whatsnext"), action);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-upcoming-events")), i18n("What's &Next"), this);
mACollection->addAction(QStringLiteral("view_whatsnext"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showWhatsNextView()));
action = new QAction(QIcon::fromTheme(QLatin1String("view-calendar-month")), i18n("&Month"), this);
mACollection->addAction(QLatin1String("view_month"), action);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-month")), i18n("&Month"), this);
mACollection->addAction(QStringLiteral("view_month"), action);
connect(action, SIGNAL(triggered(bool)),
mCalendarView->viewManager(), SLOT(showMonthView()));
action = new QAction(QIcon::fromTheme(QLatin1String("view-calendar-agenda")), i18n("&Agenda"), this);
mACollection->addAction(QLatin1String("view_agenda"), action);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-agenda")), i18n("&Agenda"), this);
mACollection->addAction(QStringLiteral("view_agenda"), action);
connect(action, SIGNAL(triggered(bool)),
mCalendarView->viewManager(), SLOT(showAgendaView()));
action = new QAction(QIcon::fromTheme(QLatin1String("view-calendar-list")), i18n("&Event List"), this);
mACollection->addAction(QLatin1String("view_list"), action);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-list")), i18n("&Event List"), this);
mACollection->addAction(QStringLiteral("view_list"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showListView()));
action = new QAction(QIcon::fromTheme(QLatin1String("view-calendar-tasks")), i18n("&To-do List"), this);
mACollection->addAction(QLatin1String("view_todo"), action);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-tasks")), i18n("&To-do List"), this);
mACollection->addAction(QStringLiteral("view_todo"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showTodoView()));
action = new QAction(QIcon::fromTheme(QLatin1String("view-calendar-journal")), i18n("&Journal"), this);
mACollection->addAction(QLatin1String("view_journal"), action);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-journal")), i18n("&Journal"), this);
mACollection->addAction(QStringLiteral("view_journal"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showJournalView()));
action = new QAction(QIcon::fromTheme(QLatin1String("view-calendar-timeline")), i18n("Time&line"), this);
mACollection->addAction(QLatin1String("view_timeline"), action);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-timeline")), i18n("Time&line"), this);
mACollection->addAction(QStringLiteral("view_timeline"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showTimeLineView()));
action = new QAction(QIcon::fromTheme(QLatin1String("view-calendar-time-spent")), i18n("Time&spent"), this);
mACollection->addAction(QLatin1String("view_timespent"), action);
action = new QAction(QIcon::fromTheme(QStringLiteral("view-calendar-time-spent")), i18n("Time&spent"), this);
mACollection->addAction(QStringLiteral("view_timespent"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView->viewManager(),
SLOT(showTimeSpentView()));
//~~~~~~~~~~~~~~~~~~~~~~~~~~~ REFRESH ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
action = new QAction(i18n("&Refresh"), this);
mACollection->addAction(QLatin1String("update"), action);
mACollection->addAction(QStringLiteral("update"), action);
connect(action, SIGNAL(triggered(bool)), mCalendarView, SLOT(updateView()));
//~~~~~~~~~~~~~~~~~~~~~~~~~~~ FILTER ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mFilterAction = new KSelectAction(i18n("F&ilter"), this);
mFilterAction->setToolBarMode(KSelectAction::MenuMode);
mACollection->addAction(QLatin1String("filter_select"), mFilterAction);
mACollection->addAction(QStringLiteral("filter_select"), mFilterAction);
mFilterAction->setEditable(false);
connect(mFilterAction, SIGNAL(triggered(int)),
mCalendarView, SLOT(filterActivated(int)));
......
......@@ -43,7 +43,7 @@ KOrganizerIfaceImpl::KOrganizerIfaceImpl(ActionManager *actionManager,
setObjectName(QLatin1String(name));
new KorganizerAdaptor(this);
QDBusConnection::sessionBus().registerObject(
QLatin1String("/Korganizer"), this, QDBusConnection::ExportAdaptors);
QStringLiteral("/Korganizer"), this, QDBusConnection::ExportAdaptors);
}
KOrganizerIfaceImpl::~KOrganizerIfaceImpl()
......
......@@ -314,9 +314,9 @@ void TodoSummaryWidget::viewTodo(const QString &uid)
Akonadi::Item::Id id = mCalendar->item(uid).id();
if (id != -1) {
mPlugin->core()->selectPlugin(QLatin1String("kontact_todoplugin")); //ensure loaded
mPlugin->core()->selectPlugin(QStringLiteral("kontact_todoplugin")); //ensure loaded
OrgKdeKorganizerKorganizerInterface korganizer(
QLatin1String("org.kde.korganizer"), QLatin1String("/Korganizer"), QDBusConnection::sessionBus());
QStringLiteral("org.kde.korganizer"), QStringLiteral("/Korganizer"), QDBusConnection::sessionBus());
korganizer.editIncidence(QString::number(id));
}
......@@ -359,7 +359,7 @@ void TodoSummaryWidget::popupMenu(const QString &uid)
if (!todo->isCompleted()) {
doneIt = popup.addAction(i18n("&Mark To-do Completed"));
doneIt->setIcon(KIconLoader::global()->loadIcon(QLatin1String("task-complete"), KIconLoader::Small));
doneIt->setIcon(KIconLoader::global()->loadIcon(QStringLiteral("task-complete"), KIconLoader::Small));
doneIt->setEnabled(mCalendar->hasRight(item, Akonadi::Collection::CanChangeItem));
}
// TODO: add icons to the menu actions
......
......@@ -32,11 +32,11 @@ using namespace EventViews::CalendarDecoration;
Hebrew::Hebrew()
{
KConfig config(QLatin1String("korganizerrc"), KConfig::NoGlobals);
KConfig config(QStringLiteral("korganizerrc"), KConfig::NoGlobals);
KConfigGroup group(&config, "Hebrew Calendar Plugin");
areWeInIsrael = group.readEntry(
"UseIsraelSettings", (KLocale::global()->country() == QLatin1String(".il")));
"UseIsraelSettings", (KLocale::global()->country() == QStringLiteral(".il")));
showParsha = group.readEntry("ShowParsha", true);
showChol = group.readEntry("ShowChol_HaMoed", true);
showOmer = group.readEntry("ShowOmer", true);
......
......@@ -96,7 +96,7 @@ KOPrefsDialogMain::KOPrefsDialogMain(QWidget *parent)
// Personal Settings
QWidget *personalFrame = new QWidget(this);
QVBoxLayout *personalLayout = new QVBoxLayout(personalFrame);
tabWidget->addTab(personalFrame, QIcon::fromTheme(QLatin1String("preferences-desktop-personal")),
tabWidget->addTab(personalFrame, QIcon::fromTheme(QStringLiteral("preferences-desktop-personal")),
i18nc("@title:tab personal settings", "Personal"));
KPIM::KPrefsWidBool *emailControlCenter =
......@@ -162,7 +162,7 @@ KOPrefsDialogMain::KOPrefsDialogMain(QWidget *parent)
// System Tray Settings
QFrame *systrayFrame = new QFrame(this);
QVBoxLayout *systrayLayout = new QVBoxLayout(systrayFrame);
tabWidget->addTab(systrayFrame, QIcon::fromTheme(QLatin1String("preferences-other")),
tabWidget->addTab(systrayFrame, QIcon::fromTheme(QStringLiteral("preferences-other")),
i18nc("@title:tab systray settings", "System Tray"));
QGroupBox *systrayGroupBox =
......@@ -543,7 +543,7 @@ public:
// Tab: Views->General
QFrame *generalFrame = new QFrame(this);
tabWidget->addTab(generalFrame, QIcon::fromTheme(QLatin1String("view-choose")),
tabWidget->addTab(generalFrame, QIcon::fromTheme(QStringLiteral("view-choose")),
i18nc("@title:tab general settings", "General"));
QBoxLayout *generalLayout = new QVBoxLayout(generalFrame);
......@@ -1214,7 +1214,7 @@ KOPrefsDialogPlugins::KOPrefsDialogPlugins(QWidget *parent)
QBoxLayout *buttonRowLayout = new QHBoxLayout(buttonRow);
mConfigureButton = new QPushButton(buttonRow);
KGuiItem::assign(mConfigureButton, KGuiItem(i18nc("@action:button", "Configure &Plugin..."),
QLatin1String("configure"), QString(),
QStringLiteral("configure"), QString(),
i18nc("@info:whatsthis",
"This button allows you to configure"
" the plugin that you have selected in the list above")));
......@@ -1479,7 +1479,7 @@ QString KOPrefsDesignerFields::localUiDir()
QString KOPrefsDesignerFields::uiPath()
{
return QLatin1String("korganizer/designer/event/");
return QStringLiteral("korganizer/designer/event/");
}
void KOPrefsDesignerFields::writeActivePages(const QStringList &activePages)
......@@ -1495,6 +1495,6 @@ QStringList KOPrefsDesignerFields::readActivePages()
QString KOPrefsDesignerFields::applicationName()
{
return QLatin1String("KORGANIZER");
return QStringLiteral("KORGANIZER");
}
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