]> cloud.milkyroute.net Git - dolphin.git/commit
Reimplement handling of Shift while showing menu without KModifierKeyInfo
authorDavid Faure <faure@kde.org>
Sat, 4 May 2013 18:31:02 +0000 (20:31 +0200)
committerDavid Faure <faure@kde.org>
Sun, 5 May 2013 20:42:49 +0000 (22:42 +0200)
commit57e65aab7f6f54524168c6812fac7e7dbb700ab9
tree003f656f1e6d91abd5b7893c4c536877e880ab4f
parent926ed302d6b64c200d56817b62eeecb5abd5fd4f
Reimplement handling of Shift while showing menu without KModifierKeyInfo

Finding out whether shift is pressed initially can be done
with qApp->keyboardModifiers(), and finding out that the user is pressing
or release shift can be done with keyPressEvent/keyReleaseEvent.

This required to inherit from KMenu rather than having the KMenu
as a member.

KModifierKeyInfo is only implemented on X11, so this makes the code
more portable. If similar solutions can be found for other users of
KModifierKeyInfo, it will be deprecated in KF5.

REVIEW: 110303
src/dolphincontextmenu.cpp
src/dolphincontextmenu.h
src/dolphinmainwindow.cpp