Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
4.7.3
-
None
-
Windows 7 32bit
Description
Problem is appear in following situation:
We have class variable:
QKeySequence mCommenting;
And it's value is configured by user in options (shortcut editor).
Then we have
void Editor::keyPressEvent(QKeyEvent* aEvent)
{
if(QKeySequence(aEvent->key() + aEvent->modifiers()) == mCommenting)
}
It works but it is weird. I expected that this should be like that:
if((aEvent->key() == mCommenting.key()) && (aEvent->modifiers() == mCommenting.modifiers()))