┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinremoteencoding.cpp
diff options
context:
space:
mode:
authorMéven Car <[email protected]>2025-11-10 09:08:55 +0100
committerMéven Car <[email protected]>2025-11-10 09:12:57 +0000
commitd5071f31fcbdb634641b65ad6280d7c23d13f601 (patch)
tree44b11fe6494671a2e25a0ad3a9f750adc5b06059 /src/views/dolphinremoteencoding.cpp
parent3858afbfa4f2f60cc33f39a471d36a1e1a3514c7 (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/dolphinremoteencoding.cpp')
-rw-r--r--src/views/dolphinremoteencoding.cpp5
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++) {