Grab the keyboard when KeySequenceItem is recording
ClosedPublic

Authored by davidre on Thu, Oct 17, 1:59 PM.

Details

Summary

Otherwise assigning a key combination which is currently bound to a global
shortcut action will trigger the global shortcut.

Test Plan

Try to assign a global shortcut to KKeySequenceItem. The global shortcut is
not triggered - instead the steal shortcut prompt is displayed.

Diff Detail

Repository
R296 KDeclarative
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidre created this revision.Thu, Oct 17, 1:59 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptThu, Oct 17, 1:59 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
davidre requested review of this revision.Thu, Oct 17, 1:59 PM

Alternatively you could make the KeySequenceHelper itself a QQuickItem so it gets assigned a window.

src/qmlcontrols/kquickcontrols/private/keysequencehelper.cpp
117

Typically store items created by QtQuick in a QPointer so we can detect when they are garbage collected

src/qmlcontrols/kquickcontrols/private/keysequencehelper.h
63

this needs a NOTIFY argument, corresponding signal and emit in the setter

davidre updated this revision to Diff 68143.Thu, Oct 17, 2:12 PM
  • Make helper a qquickitem instead
davidre updated this revision to Diff 68144.Thu, Oct 17, 2:14 PM

Whitespace

davidedmundson accepted this revision.Mon, Oct 28, 4:46 PM
This revision is now accepted and ready to land.Mon, Oct 28, 4:46 PM
apol added a subscriber: apol.Mon, Oct 28, 4:50 PM

+1 Makes sense to me.

apol accepted this revision.Mon, Oct 28, 4:50 PM
This revision was automatically updated to reflect the committed changes.