]> cloud.milkyroute.net Git - dolphin.git/commitdiff
When populating the "Show Remote Encoding" menu, put the check mark besides
authorDawit Alemayehu <adawit@kde.org>
Wed, 18 Jan 2012 18:30:54 +0000 (13:30 -0500)
committerDawit Alemayehu <adawit@kde.org>
Wed, 18 Jan 2012 23:05:15 +0000 (18:05 -0500)
the correct saved remote encoding charset.

BUG: 186289
FIXED-IN: 4.8.0
REVIEW: 103730
(cherry picked from commit 8f231bd08134f7b1870a9c1747429c1b05174d62)

src/views/dolphinremoteencoding.cpp

index 8644f5cc2da9c5d72bb41d5509bef55ffa096c60..375b3fd46aac7fbcc12792d47356223a14c60296 100644 (file)
@@ -132,14 +132,14 @@ void DolphinRemoteEncoding::updateMenu()
         m_menu->menu()->actions().at(i)->setChecked(false);
     }
 
-    QString charset = KIO::SlaveConfig::self()->configData(m_currentURL.protocol(),
-                                                           m_currentURL.host(), DATA_KEY);
+    QString charset = KGlobal::charsets()->descriptionForEncoding(KIO::SlaveConfig::self()->configData(m_currentURL.protocol(),
+                                                                  m_currentURL.host(), DATA_KEY));
 
     if (!charset.isEmpty()) {
         int id = 0;
         bool isFound = false;
         for (int i = 0; i < m_encodingDescriptions.size(); i++) {
-            if (m_encodingDescriptions.at(i).contains(charset)) {
+            if (m_encodingDescriptions.at(i) == charset) {
                 isFound = true;
                 id = i;
                 break;