diff options
| author | Méven Car <[email protected]> | 2025-11-10 09:08:55 +0100 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2025-11-10 09:12:57 +0000 |
| commit | d5071f31fcbdb634641b65ad6280d7c23d13f601 (patch) | |
| tree | 44b11fe6494671a2e25a0ad3a9f750adc5b06059 /src/views | |
| parent | 3858afbfa4f2f60cc33f39a471d36a1e1a3514c7 (diff) | |
remoteencoding: updateMenu: check if a charset is found
Rather than its description, which for an empty charset is:
"Other encoding ()", that can't be empty and will always enter the
branch.
Diffstat (limited to 'src/views')
| -rw-r--r-- | src/views/dolphinremoteencoding.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/views/dolphinremoteencoding.cpp b/src/views/dolphinremoteencoding.cpp index 33c5868d6..2887ee22d 100644 --- a/src/views/dolphinremoteencoding.cpp +++ b/src/views/dolphinremoteencoding.cpp @@ -114,8 +114,9 @@ void DolphinRemoteEncoding::updateMenu() m_menu->menu()->actions().at(i)->setChecked(false); } - const QString charset = KCharsets::charsets()->descriptionForEncoding(KProtocolManager::charsetFor(m_currentURL)); - if (!charset.isEmpty()) { + const QString charsetFor = KProtocolManager::charsetFor(m_currentURL); + if (!charsetFor.isEmpty()) { + const QString charset = KCharsets::charsets()->descriptionForEncoding(charsetFor); int id = 0; bool isFound = false; for (int i = 0; i < m_encodingDescriptions.size(); i++) { |
