mirror of
https://invent.kde.org/system/dolphin
synced 2024-11-05 18:47:12 +00:00
When populating the "Show Remote Encoding" menu, put the check mark besides
the correct saved remote encoding charset.
BUG: 186289
FIXED-IN: 4.8.0
REVIEW: 103730
(cherry picked from commit 8f231bd081
)
This commit is contained in:
parent
0b0b2cba93
commit
d13504b5a7
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue