Verified Commit 27a64b96 authored by Xuetian Weng's avatar Xuetian Weng

Reparse the key repeat rate config when we try to load it.

Right now due to the fact that it is a shared config, we may load the
old value from memory.

BUG: 418175
FIXED-IN: 5.21
parent 9cd9a286
......@@ -72,7 +72,9 @@ int set_repeat_mode(bool enabled)
void init_keyboard_hardware()
{
KConfigGroup config(KSharedConfig::openConfig( QStringLiteral("kcminputrc") ), "Keyboard");
auto inputConfig = KSharedConfig::openConfig( QStringLiteral("kcminputrc") );
inputConfig->reparseConfiguration();
KConfigGroup config(inputConfig, "Keyboard");
QString keyRepeatStr = config.readEntry("KeyRepeat", "accent");
......@@ -90,4 +92,5 @@ void init_keyboard_hardware()
KModifierKeyInfo keyInfo;
keyInfo.setKeyLocked(Qt::Key_NumLock, numlockState == STATE_ON);
}
XFlush(QX11Info::display());
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment