fix: [2/2] Keyboard Layout applet: layout Name doesn't fit if variant is set

Variants are now stored separate from layouts in their own config entry.

P-D commit:
fix: [1/2] Keyboard Layout applet: layout Name doesn't fit if variant is set
This commit is contained in:
Andrey Butirsky 2020-11-21 23:54:49 +03:00
parent cea2781318
commit 283dff9174

View file

@ -175,13 +175,14 @@ xkb_keymap *Xkb::loadKeymapFromConfig()
const KConfigGroup config = m_config->group("Layout");
const QByteArray model = config.readEntry("Model", "pc104").toLocal8Bit();
const QByteArray layout = config.readEntry("LayoutList", "").toLocal8Bit();
const QByteArray variant = config.readEntry("VariantList").toLatin1();
const QByteArray options = config.readEntry("Options", "").toLocal8Bit();
xkb_rule_names ruleNames = {
.rules = nullptr,
.model = model.constData(),
.layout = layout.constData(),
.variant = nullptr,
.variant = variant.constData(),
.options = options.constData()
};
applyEnvironmentRules(ruleNames);