[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepim] /: Use qstringliteral
From:       Montel Laurent <montel () kde ! org>
Date:       2015-07-31 20:40:27
Message-ID: E1ZLH6R-0007dT-Kx () scm ! kde ! org
[Download RAW message or body]

Git commit ae93b4fce14797cf125fa110164b51fa624437ed by Montel Laurent.
Committed on 31/07/2015 at 20:40.
Pushed by mlaurent into branch 'master'.

Use qstringliteral

M  +9    -9    korgac/alarmdialog.cpp
M  +1    -1    korgac/koalarmclient.cpp
M  +5    -5    korganizer/actionmanager.cpp
M  +2    -2    korganizer/calendarview.cpp
M  +1    -1    korganizer/interfaces/korganizer/part.h
M  +2    -2    korganizer/job/htmlexportjob.cpp
M  +10   -10   korganizer/kcmdesignerfields.cpp

http://commits.kde.org/kdepim/ae93b4fce14797cf125fa110164b51fa624437ed

diff --git a/korgac/alarmdialog.cpp b/korgac/alarmdialog.cpp
index 5163e05..a567b25 100644
--- a/korgac/alarmdialog.cpp
+++ b/korgac/alarmdialog.cpp
@@ -139,7 +139,7 @@ AlarmDialog::AlarmDialog(const Akonadi::ETMCalendar::Ptr \
&calendar, QWidget *par  
     connect(calendar.data(), SIGNAL(calendarChanged()), \
SLOT(slotCalendarChanged()));  
-    KIconLoader::global()->addAppDir(QLatin1String("korgac"));
+    KIconLoader::global()->addAppDir(QStringLiteral("korgac"));
 
     KSharedConfig::Ptr config = KSharedConfig::openConfig();
     KConfigGroup generalConfig(config, "General");
@@ -933,8 +933,8 @@ void AlarmDialog::keyPressEvent(QKeyEvent *e)
 
 bool AlarmDialog::openIncidenceEditorThroughKOrganizer(const Incidence::Ptr \
&incidence)  {
-    if (!QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String("org.kde.korganizer"))) \
                {
-        if (KToolInvocation::startServiceByDesktopName(QLatin1String("korganizer"), \
QString())) { +    if \
(!QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.korganizer"))) \
{ +        if (KToolInvocation::startServiceByDesktopName(QStringLiteral("korganizer"), \
QString())) {  KMessageBox::error(
                 this,
                 i18nc("@info",
@@ -943,7 +943,7 @@ bool AlarmDialog::openIncidenceEditorThroughKOrganizer(const \
Incidence::Ptr &inc  }
     }
     org::kde::korganizer::Korganizer korganizer(
-        QLatin1String("org.kde.korganizer"), QStringLiteral("/Korganizer"), \
QDBusConnection::sessionBus()); +        QStringLiteral("org.kde.korganizer"), \
QStringLiteral("/Korganizer"), QDBusConnection::sessionBus());  
     qCDebug(KOALARMCLIENT_LOG) << "editing incidence " << incidence->summary();
     if (!korganizer.editIncidence(incidence->uid())) {
@@ -956,11 +956,11 @@ bool AlarmDialog::openIncidenceEditorThroughKOrganizer(const \
Incidence::Ptr &inc  
     // get desktop # where korganizer (or kontact) runs
     QString object =
-        QDBusConnection::sessionBus().interface()->isServiceRegistered(QLatin1String("org.kde.kontact")) \
                ?
-        QLatin1String("kontact/MainWindow_1") : \
                QLatin1String("korganizer/MainWindow_1");
-    QDBusInterface korganizerObj(QLatin1String("org.kde.korganizer"), \
QLatin1Char('/') + object); +        \
QDBusConnection::sessionBus().interface()->isServiceRegistered(QStringLiteral("org.kde.kontact")) \
? +        QStringLiteral("kontact/MainWindow_1") : \
QStringLiteral("korganizer/MainWindow_1"); +    QDBusInterface \
korganizerObj(QStringLiteral("org.kde.korganizer"), QLatin1Char('/') + object);  #if \
                KDEPIM_HAVE_X11
-    QDBusReply<int> reply = korganizerObj.call(QLatin1String("winId"));
+    QDBusReply<int> reply = korganizerObj.call(QStringLiteral("winId"));
     if (reply.isValid()) {
         int window = reply;
         int desktop = KWindowSystem::windowInfo(window, NET::WMDesktop).desktop();
@@ -973,7 +973,7 @@ bool AlarmDialog::openIncidenceEditorThroughKOrganizer(const \
Incidence::Ptr &inc  }
 #elif defined(Q_OS_WIN)
     // WId is a typedef to a void* on windows
-    QDBusReply<qlonglong> reply = korganizerObj.call(QLatin1String("winId"));
+    QDBusReply<qlonglong> reply = korganizerObj.call(QStringLiteral("winId"));
     if (reply.isValid()) {
         qlonglong window = reply;
         KWindowSystem::minimizeWindow(winId(), false);
diff --git a/korgac/koalarmclient.cpp b/korgac/koalarmclient.cpp
index 70526d2..2e5af74 100644
--- a/korgac/koalarmclient.cpp
+++ b/korgac/koalarmclient.cpp
@@ -51,7 +51,7 @@ KOAlarmClient::KOAlarmClient(QObject *parent)
     : QObject(parent), mDocker(0), mDialog(0)
 {
     new KOrgacAdaptor(this);
-    KDBusConnectionPool::threadConnection().registerObject(QLatin1String("/ac"), \
this); +    KDBusConnectionPool::threadConnection().registerObject(QStringLiteral("/ac"), \
this);  qCDebug(KOALARMCLIENT_LOG);
 
     if (dockerEnabled()) {
diff --git a/korganizer/actionmanager.cpp b/korganizer/actionmanager.cpp
index b864bc6..ab69e89 100644
--- a/korganizer/actionmanager.cpp
+++ b/korganizer/actionmanager.cpp
@@ -105,7 +105,7 @@ ActionManager::ActionManager(KXMLGUIClient *client, CalendarView \
*widget,  mCollectionSelectionModelStateSaver(Q_NULLPTR)
 {
     new KOrgCalendarAdaptor(this);
-    QDBusConnection::sessionBus().registerObject(QLatin1String("/Calendar"), this);
+    QDBusConnection::sessionBus().registerObject(QStringLiteral("/Calendar"), this);
 
     mGUIClient = client;
     mACollection = mGUIClient->actionCollection();
@@ -266,7 +266,7 @@ void ActionManager::initActions()
         a = mACollection->addAction(KStandardAction::PrintPreview, mCalendarView, \
                SLOT(print()));
         mACollection->addAction(QStringLiteral("korganizer_print_preview"), a);
         a->setEnabled(
-            !KMimeTypeTrader::self()->query(QLatin1String("application/pdf"), \
QStringLiteral("KParts/ReadOnlyPart")).isEmpty()); +            \
!KMimeTypeTrader::self()->query(QStringLiteral("application/pdf"), \
QStringLiteral("KParts/ReadOnlyPart")).isEmpty());  } else {
         KStandardAction::open(this, SLOT(file_open()), mACollection);
         KStandardAction::print(mCalendarView, SLOT(print()), mACollection);
@@ -1001,7 +1001,7 @@ bool ActionManager::saveURL()
 
 void ActionManager::exportHTML()
 {
-    HTMLExportSettings *settings = new \
HTMLExportSettings(QLatin1String("KOrganizer")); +    HTMLExportSettings *settings = \
new HTMLExportSettings(QStringLiteral("KOrganizer"));  \
                mSettingsToFree.insert(settings);
     // Manually read in the config, because parametrized kconfigxt objects don't
     // seem to load the config theirselves
@@ -1067,8 +1067,8 @@ void ActionManager::exportHTML(KOrg::HTMLExportSettings \
*settings, bool autoMode  \
                settings->setEMail(CalendarSupport::KCalPrefs::instance()->email());
     settings->setName(CalendarSupport::KCalPrefs::instance()->fullName());
 
-    settings->setCreditName(QLatin1String("KOrganizer"));
-    settings->setCreditURL(QLatin1String("http://korganizer.kde.org"));
+    settings->setCreditName(QStringLiteral("KOrganizer"));
+    settings->setCreditURL(QStringLiteral("http://korganizer.kde.org"));
 
     KOrg::HtmlExportJob *exportJob = new KOrg::HtmlExportJob(calendar(), settings, \
autoMode, mMainWindow, view());  
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 3403343..1405878 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -612,7 +612,7 @@ void CalendarView::updateConfig(const QByteArray &receiver)
                                             i18n("Keep Absolute Times?"),
                                             KGuiItem(i18n("Keep Times")),
                                             KGuiItem(i18n("Move Times")),
-                                            \
QLatin1String("calendarKeepAbsoluteTimes")); +                                        \
QStringLiteral("calendarKeepAbsoluteTimes"));  if (rc == KMessageBox::Yes) {
             // keep the absolute time - note the new viewing time zone in the \
calendar  mCalendar->setViewTimeSpec(newTimeSpec);
@@ -1822,7 +1822,7 @@ void CalendarView::printPreview()
 
 void CalendarView::exportWeb()
 {
-    KOrg::HTMLExportSettings *settings = new \
KOrg::HTMLExportSettings(QLatin1String("KOrganizer")); +    KOrg::HTMLExportSettings \
*settings = new KOrg::HTMLExportSettings(QStringLiteral("KOrganizer"));  \
                Q_ASSERT(settings);
     // Manually read in the config, because parameterized kconfigxt objects don't
     // seem to load the config theirselves
diff --git a/korganizer/interfaces/korganizer/part.h \
b/korganizer/interfaces/korganizer/part.h index 6048a06..49990f5 100644
--- a/korganizer/interfaces/korganizer/part.h
+++ b/korganizer/interfaces/korganizer/part.h
@@ -42,7 +42,7 @@ public:
 
     static QString serviceType()
     {
-        return QLatin1String("KOrganizer/Part");
+        return QStringLiteral("KOrganizer/Part");
     }
 
     typedef QList<Part *> List;
diff --git a/korganizer/job/htmlexportjob.cpp b/korganizer/job/htmlexportjob.cpp
index 412423d..b7fc8dc 100644
--- a/korganizer/job/htmlexportjob.cpp
+++ b/korganizer/job/htmlexportjob.cpp
@@ -313,8 +313,8 @@ void HtmlExportJob::createMonthView(QTextStream *ts)
     while (start < toDate()) {
         // Write header
         QDate hDate(start.year(), start.month(), 1);
-        QString hMon = hDate.toString(QLatin1String("MMMM"));
-        QString hYear = hDate.toString(QLatin1String("yyyy"));
+        QString hMon = hDate.toString(QStringLiteral("MMMM"));
+        QString hYear = hDate.toString(QStringLiteral("yyyy"));
         *ts << "<h2>"
             << i18nc("@title month and year", "%1 %2", hMon, hYear)
             << "</h2>" << endl;
diff --git a/korganizer/kcmdesignerfields.cpp b/korganizer/kcmdesignerfields.cpp
index 1b3ccb1..4462ead 100644
--- a/korganizer/kcmdesignerfields.cpp
+++ b/korganizer/kcmdesignerfields.cpp
@@ -73,16 +73,16 @@ public:
             mPreview = QPixmap::fromImage(img);
 
             QMap<QString, QString> allowedTypes;
-            allowedTypes.insert(QLatin1String("QLineEdit"), i18n("Text"));
-            allowedTypes.insert(QLatin1String("QTextEdit"), i18n("Text"));
-            allowedTypes.insert(QLatin1String("QSpinBox"), i18n("Numeric Value"));
-            allowedTypes.insert(QLatin1String("QCheckBox"), i18n("Boolean"));
-            allowedTypes.insert(QLatin1String("QComboBox"), i18n("Selection"));
-            allowedTypes.insert(QLatin1String("QDateTimeEdit"), i18n("Date & \
                Time"));
-            allowedTypes.insert(QLatin1String("KLineEdit"), i18n("Text"));
-            allowedTypes.insert(QLatin1String("KTextEdit"), i18n("Text"));
-            allowedTypes.insert(QLatin1String("KDateTimeWidget"), i18n("Date & \
                Time"));
-            allowedTypes.insert(QLatin1String("KDatePicker"), i18n("Date"));
+            allowedTypes.insert(QStringLiteral("QLineEdit"), i18n("Text"));
+            allowedTypes.insert(QStringLiteral("QTextEdit"), i18n("Text"));
+            allowedTypes.insert(QStringLiteral("QSpinBox"), i18n("Numeric Value"));
+            allowedTypes.insert(QStringLiteral("QCheckBox"), i18n("Boolean"));
+            allowedTypes.insert(QStringLiteral("QComboBox"), i18n("Selection"));
+            allowedTypes.insert(QStringLiteral("QDateTimeEdit"), i18n("Date & \
Time")); +            allowedTypes.insert(QStringLiteral("KLineEdit"), i18n("Text"));
+            allowedTypes.insert(QStringLiteral("KTextEdit"), i18n("Text"));
+            allowedTypes.insert(QStringLiteral("KDateTimeWidget"), i18n("Date & \
Time")); +            allowedTypes.insert(QStringLiteral("KDatePicker"), \
i18n("Date"));  
             QList<QWidget *> list = wdg->findChildren<QWidget *>();
             QWidget *it;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic