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

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

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

Use QStringLiter

M  +2    -2    akregator/src/feediconmanager.cpp
M  +2    -2    akregator/src/mainwindow.cpp
M  +1    -1    grantleeeditor/contactprintthemeeditor/themeeditorpage.cpp
M  +1    -1    grantleeeditor/contactthemeeditor/contacteditorpage.cpp
M  +1    -1    grantleeeditor/headerthemeeditor/themeeditorpage.cpp
M  +8    -8    libkleo/tests/test_cryptoconfig.cpp

http://commits.kde.org/kdepim/16b5d2d9aff486e423fc2617b70140aec9714257

diff --git a/akregator/src/feediconmanager.cpp b/akregator/src/feediconmanager.cpp
index 327107d..3f9ccb8 100644
--- a/akregator/src/feediconmanager.cpp
+++ b/akregator/src/feediconmanager.cpp
@@ -88,7 +88,7 @@ FeedIconManager *FeedIconManager::Private::m_instance = 0;
 
 QString FeedIconManager::Private::iconLocation(const QUrl &url) const
 {
-    QDBusReply<QString> reply = m_favIconsModule->call(QLatin1String("iconForUrl"), \
url.url()); +    QDBusReply<QString> reply = \
m_favIconsModule->call(QStringLiteral("iconForUrl"), url.url());  return \
reply.isValid() ? reply.value() : QString();  }
 
@@ -99,7 +99,7 @@ void FeedIconManager::Private::loadIcon(const QString &url_)
     QString iconFile = iconLocation(url);
 
     if (iconFile.isEmpty()) { // cache miss
-        const QDBusReply<void> reply = \
m_favIconsModule->call(QLatin1String("downloadHostIcon"), url.url()); +        const \
QDBusReply<void> reply = m_favIconsModule->call(QStringLiteral("downloadHostIcon"), \
url.url());  if (!reply.isValid()) {
             qCWarning(AKREGATOR_LOG) << "Couldn't reach favicon service. Request \
favicon for " << url << " failed";  }
diff --git a/akregator/src/mainwindow.cpp b/akregator/src/mainwindow.cpp
index 19e7075..bbbcd0e 100644
--- a/akregator/src/mainwindow.cpp
+++ b/akregator/src/mainwindow.cpp
@@ -66,7 +66,7 @@ MainWindow::MainWindow(QWidget *parent, Qt::WindowFlags f)
     setPluginLoadingMode(DoNotLoadPlugins);
 
     // set the shell's ui resource file
-    setXMLFile(QLatin1String("akregator_shell.rc"));
+    setXMLFile(QStringLiteral("akregator_shell.rc"));
 
     KStandardAction::keyBindings(this, SLOT(optionsConfigureKeys()), \
                actionCollection()); // options_configure_keybinding
     KStandardAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), \
actionCollection()); // options_configure_toolbars @@ -100,7 +100,7 @@ bool \
MainWindow::loadPart()  // this routine will find and load our Part.  it finds the \
Part by  // name which is a bad idea usually.. but it's alright in this
     // case since our Part is made for this Shell
-    KPluginLoader loader(QLatin1String("akregatorpart"));
+    KPluginLoader loader(QStringLiteral("akregatorpart"));
     KPluginFactory *const factory = loader.factory();
     if (!factory) {
         KMessageBox::error(this, i18n("Could not find the Akregator part; please \
                check your installation.\n%1", loader.errorString()));
diff --git a/grantleeeditor/contactprintthemeeditor/themeeditorpage.cpp \
b/grantleeeditor/contactprintthemeeditor/themeeditorpage.cpp index c350bed..3526e23 \
                100644
--- a/grantleeeditor/contactprintthemeeditor/themeeditorpage.cpp
+++ b/grantleeeditor/contactprintthemeeditor/themeeditorpage.cpp
@@ -183,7 +183,7 @@ void ThemeEditorPage::uploadTheme()
         zip->close();
         //qCDebug(CONTACTPRINTTHEMEEDITOR_LOG)<< "zipFilename"<<zipFileName;
 
-        QPointer<KNS3::UploadDialog> dialog = new \
KNS3::UploadDialog(QLatin1String("messageviewer_header_themes.knsrc"), this); +       \
QPointer<KNS3::UploadDialog> dialog = new \
KNS3::UploadDialog(QStringLiteral("messageviewer_header_themes.knsrc"), this);  \
dialog->setUploadFile(QUrl::fromLocalFile(zipFileName));  \
                dialog->setUploadName(themename);
         dialog->setPreviewImageFile(0, QUrl::fromLocalFile(previewFileName));
diff --git a/grantleeeditor/contactthemeeditor/contacteditorpage.cpp \
b/grantleeeditor/contactthemeeditor/contacteditorpage.cpp index 86633b9..0c511ea \
                100644
--- a/grantleeeditor/contactthemeeditor/contacteditorpage.cpp
+++ b/grantleeeditor/contactthemeeditor/contacteditorpage.cpp
@@ -190,7 +190,7 @@ void ContactEditorPage::uploadTheme()
         zip->close();
         //qCDebug(CONTACTTHEMEEDITOR_LOG)<< "zipFilename"<<zipFileName;
 
-        QPointer<KNS3::UploadDialog> dialog = new \
KNS3::UploadDialog(QLatin1String("kaddressbook_themes.knsrc"), this); +        \
QPointer<KNS3::UploadDialog> dialog = new \
KNS3::UploadDialog(QStringLiteral("kaddressbook_themes.knsrc"), this);  \
dialog->setUploadFile(QUrl::fromLocalFile(zipFileName));  \
                dialog->setUploadName(themename);
         dialog->setPreviewImageFile(0, QUrl::fromLocalFile(previewContactFileName));
diff --git a/grantleeeditor/headerthemeeditor/themeeditorpage.cpp \
b/grantleeeditor/headerthemeeditor/themeeditorpage.cpp index 44425c4..029e28f 100644
--- a/grantleeeditor/headerthemeeditor/themeeditorpage.cpp
+++ b/grantleeeditor/headerthemeeditor/themeeditorpage.cpp
@@ -208,7 +208,7 @@ void ThemeEditorPage::uploadTheme()
         zip->close();
         //qCDebug(HEADERTHEMEEDITOR_LOG)<< "zipFilename"<<zipFileName;
 
-        QPointer<KNS3::UploadDialog> dialog = new \
KNS3::UploadDialog(QLatin1String("messageviewer_header_themes.knsrc"), this); +       \
QPointer<KNS3::UploadDialog> dialog = new \
KNS3::UploadDialog(QStringLiteral("messageviewer_header_themes.knsrc"), this);  \
dialog->setUploadFile(QUrl::fromLocalFile(zipFileName));  \
                dialog->setUploadName(themename);
         dialog->setPreviewImageFile(0, QUrl::fromLocalFile(previewFileName));
diff --git a/libkleo/tests/test_cryptoconfig.cpp \
b/libkleo/tests/test_cryptoconfig.cpp index 3a3a43a..0025198 100644
--- a/libkleo/tests/test_cryptoconfig.cpp
+++ b/libkleo/tests/test_cryptoconfig.cpp
@@ -175,8 +175,8 @@ int main(int argc, char **argv)
 
     {
         // Static querying of a single boolean option
-        static const char *s_groupName = "Monitor";
-        static const char *s_entryName = "quiet";
+        static const char s_groupName[] = "Monitor";
+        static const char s_entryName[] = "quiet";
         Kleo::CryptoConfigEntry *entry = config->entry("dirmngr", s_groupName, \
s_entryName);  if (entry) {
             assert(entry->argType() == Kleo::CryptoConfigEntry::ArgType_None);
@@ -225,8 +225,8 @@ int main(int argc, char **argv)
 
     {
         // Static querying and setting of a single int option
-        static const char *s_groupName = "LDAP";
-        static const char *s_entryName = "ldaptimeout";
+        static const char s_groupName[] = "LDAP";
+        static const char s_entryName[] = "ldaptimeout";
         Kleo::CryptoConfigEntry *entry = config->entry("dirmngr", s_groupName, \
s_entryName);  if (entry) {
             assert(entry->argType() == Kleo::CryptoConfigEntry::ArgType_UInt);
@@ -278,8 +278,8 @@ int main(int argc, char **argv)
 
     {
         // Static querying and setting of a single string option
-        static const char *s_groupName = "Debug";
-        static const char *s_entryName = "log-file";
+        static const char s_groupName[] = "Debug";
+        static const char s_entryName[] = "log-file";
         Kleo::CryptoConfigEntry *entry = config->entry("dirmngr", s_groupName, \
s_entryName);  if (entry) {
             assert(entry->argType() == Kleo::CryptoConfigEntry::ArgType_Path);
@@ -326,8 +326,8 @@ int main(int argc, char **argv)
 
     {
         // Static querying and setting of the LDAP URL list option
-        static const char *s_groupName = "LDAP";
-        static const char *s_entryName = "LDAP Server";
+        static const char s_groupName[] = "LDAP";
+        static const char s_entryName[] = "LDAP Server";
         Kleo::CryptoConfigEntry *entry = config->entry("dirmngr", s_groupName, \
s_entryName);  if (entry) {
             assert(entry->argType() == Kleo::CryptoConfigEntry::ArgType_LDAPURL);


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

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