]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinremoteencoding.cpp
[KStandardItemListWidget] Update icon when palette changes
[dolphin.git] / src / views / dolphinremoteencoding.cpp
index fbf21c08f1c03edcb7ee31cd73d43032606b7727..116168a4b121d33d21c8f753bd18fda77e475c9a 100644 (file)
@@ -26,7 +26,7 @@
 #include "dolphinremoteencoding.h"
 #include "dolphinviewactionhandler.h"
 
-#include <KDebug>
+#include "dolphindebug.h"
 #include <KActionMenu>
 #include <KActionCollection>
 #include <QIcon>
@@ -39,7 +39,7 @@
 #include <KIO/Scheduler>
 #include <KConfigGroup>
 
-#define DATA_KEY        QLatin1String("Charset")
+#define DATA_KEY        QStringLiteral("Charset")
 
 DolphinRemoteEncoding::DolphinRemoteEncoding(QObject* parent, DolphinViewActionHandler* actionHandler)
    :QObject(parent),
@@ -47,8 +47,8 @@ DolphinRemoteEncoding::DolphinRemoteEncoding(QObject* parent, DolphinViewActionH
     m_loaded(false),
     m_idDefault(0)
 {
-    m_menu = new KActionMenu(QIcon::fromTheme("character-set"), i18n("Select Remote Charset"), this);
-    m_actionHandler->actionCollection()->addAction("change_remote_encoding", m_menu);
+    m_menu = new KActionMenu(QIcon::fromTheme(QStringLiteral("character-set")), i18n("Select Remote Charset"), this);
+    m_actionHandler->actionCollection()->addAction(QStringLiteral("change_remote_encoding"), m_menu);
     connect(m_menu->menu(), &QMenu::aboutToShow,
           this, &DolphinRemoteEncoding::slotAboutToShow);
 
@@ -141,10 +141,10 @@ void DolphinRemoteEncoding::updateMenu()
             }
         }
 
-        kDebug() << "URL=" << m_currentURL << " charset=" << charset;
+        qCDebug(DolphinDebug) << "URL=" << m_currentURL << " charset=" << charset;
 
         if (!isFound) {
-            kWarning() << "could not find entry for charset=" << charset ;
+            qCWarning(DolphinDebug) << "could not find entry for charset=" << charset ;
         } else {
             m_menu->menu()->actions().at(id)->setChecked(true);
         }
@@ -206,12 +206,12 @@ void DolphinRemoteEncoding::slotDefault()
                 break;
             }
 
-            domains << partList.join(".");
+            domains << partList.join(QLatin1Char('.'));
             partList.erase(partList.begin());
         }
 
         for (QStringList::const_iterator it = domains.constBegin(); it != domains.constEnd();++it) {
-            kDebug() << "Domain to remove: " << *it;
+            qCDebug(DolphinDebug) << "Domain to remove: " << *it;
             if (config.hasGroup(*it)) {
                 config.deleteGroup(*it);
             } else if (config.group("").hasKey(*it)) {