[Kmymoney-devel] Why Enter does not enter
Alvaro Soliverez
asoliverez at gmail.com
Mon Nov 2 03:16:06 CET 2009
Hello all,
I found why that is.
During the port, the KeyButtonMask, which is used to check when a key is
part of the modifiers (Alt, Shift, etc) was ported to KeyboardModifierMask.
Unfortunately, that mask now contains the KeypadModifier, which informs
whether a keypad key was pressed.
That results in this piece of code in transactioneditor never returning true
when the keypad Enter is pressed:
line 164:
if(o->isWidgetType()
&& (e->type() == QEvent::KeyPress)
&& m_editWidgets.values().contains(dynamic_cast<QWidget*>(o))) {
QKeyEvent* k = dynamic_cast<QKeyEvent*>(e);
if((k->modifiers() & Qt::KeyboardModifierMask) == 0) {
I tried this and it works, but I want to check if there is a nicer way:
if((k->modifiers() & Qt::KeyboardModifierMask) == 0
|| (k->modifiers() & Qt::KeypadModifier) != 0) {
Regards,
Alvaro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kmymoney-devel/attachments/20091101/7463ed13/attachment.htm
More information about the KMyMoney-devel
mailing list