Skip to content

keysequence: Fix race between recording and currentKeySequence

ivan tkachenko requested to merge work/ratijas/sequence-4 into master

It used to trigger an assert/warning in appendToSequence because of a race condition when currentKeySequenceChanged() signal is already propagating, so that a new value of currentKeySequence() is being queried from e.g. QML side, but the recording still technically hasn't finished, so m_isRecording is true, and thus an additional check is needed to prevent an attempt to construct a key sequence of enormously large length.

Related to (amends in its own way) commit 92185ac6


Also fixing a warning message on the way; and replacing magic constant 4 with a enum copied from private Qt headers.

Merge request reports