Keyboard: avoid multiple connects
When selecting keyboard layout, pause, then select another, the QTimer wasn't being disconnected from the previously selected language, so the second selection would fire the timeout, and then call *two* slots .. and then three, ... Disconnect when the timer fires, too.
This commit is contained in:
parent
d29acf4a06
commit
3ae12f2573
@ -323,6 +323,7 @@ KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWi
|
||||
QProcess::execute( QString( "setxkbmap -layout \"%1\" -variant \"%2\"" )
|
||||
.arg( layout, variant ).toUtf8() );
|
||||
cDebug() << "xkbmap selection changed to: " << layout << "-" << variant;
|
||||
m_setxkbmapTimer.disconnect( this );
|
||||
} );
|
||||
m_setxkbmapTimer.start( QApplication::keyboardInputInterval() );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user