summaryrefslogtreecommitdiffstats
path: root/kxkb/extension.cpp
diff options
context:
space:
mode:
authorAlexander Golubev <[email protected]>2024-02-07 14:15:49 +0300
committerTDE Gitea <[email protected]>2024-02-08 09:51:25 +0000
commitd0c145d5a3bc3dfa286bc25912b34b902660cc1f (patch)
treede600113b1599269f15acbcde9554387333c6d04 /kxkb/extension.cpp
parent9c6929dc2cb86b9a7661d1aca1b889ad6314fbe2 (diff)
downloadtdebase-d0c145d5a3bc3dfa286bc25912b34b902660cc1f.tar.gz
tdebase-d0c145d5a3bc3dfa286bc25912b34b902660cc1f.zip
kxkb: handle resetOld correctly in cases if all opions already set
Closes: https://mirror.git.trinitydesktop.org/gitea/TDE/tdebase/issues/391 Signed-off-by: Alexander Golubev <[email protected]>
Diffstat (limited to 'kxkb/extension.cpp')
-rw-r--r--kxkb/extension.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/kxkb/extension.cpp b/kxkb/extension.cpp
index df61e2fa2..870ee7eb4 100644
--- a/kxkb/extension.cpp
+++ b/kxkb/extension.cpp
@@ -112,11 +112,9 @@ bool XKBExtension::setXkbOptions(const XkbOptions options)
}
if (!options.options.isEmpty()) {
- p << "-option";
-
if (options.resetOld)
{
- p << options.options;
+ p << "-option" << options.options;
}
else
{
@@ -132,7 +130,9 @@ bool XKBExtension::setXkbOptions(const XkbOptions options)
newOptions << option;
}
}
- p << newOptions.join(",");
+ if (!newOptions.isEmpty()) {
+ p << "-option" << newOptions.join(",");
+ }
}
}