Commit e29635de authored by Xuetian Weng's avatar Xuetian Weng Committed by Nate Graham
Browse files

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
(cherry picked from commit 27a64b96)
parent 2e0697c7
......@@ -76,7 +76,9 @@ int set_repeat_mode(TriState keyboardRepeatMode)
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("KeyboardRepeating", TriStateHelper::getString(STATE_ON));
TriState keyRepeat = STATE_UNCHANGED;
......@@ -100,4 +102,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