]> cloud.milkyroute.net Git - dolphin.git/commit
Properly check Shift toggling in DolphinRemoveAction
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Wed, 21 Sep 2016 16:13:29 +0000 (18:13 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Wed, 21 Sep 2016 16:13:29 +0000 (18:13 +0200)
commit3775ef19eaca057985b92cfa3716d3c3a1d22f0f
treec57c3530fe4e9454b827f7340019ebbe511fffa8
parente93e6d4cc5231c5ee209f1ac9df70bbb253ce786
Properly check Shift toggling in DolphinRemoveAction

Documentation of QGuiApplication::keyboardModifiers() says that "It should
be noted this may not reflect the actual keys held on the input device at
the time of calling but rather the modifiers as last reported in one of
the above events".

Since this method is called in DolphinContextMenu's keyPressEvent()
and keyReleaseEvent(), the first time that keyboardModifiers() is
called it doesn't report that shift has been pressed.

Replacing this method with queryKeyboardModifiers() does the job
because the latter doesn't care about the event queue.

BUG: 354301
FIXED-IN: 16.08.2
REVIEW: 128972
src/dolphinremoveaction.cpp