Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.0
-
None
-
None
-
Symbian S60 5th Edition Emulator
-
19ebb3f5b2f599018594e9f0dd3b9de81f584262
Description
QAction::softKeyRole returns a wrong value when QAction::NegativeSoftKey is set.
This only happens with the emulator binaries provided in the qt-symbian-opensource-4.7.0-rc1-s60.exe, the target build does not have this problem.
Example code:
QAction* action = new QAction(this);
action->setSoftKeyRole(QAction::NegativeSoftKey);
QAction::SoftKeyRole role = action->softKeyRole(); // returns -2
if(action->softKeyRole() != QAction::NegativeSoftKey)
As a consequence it's not possible to bind an action to the right softkey.
In the disassembly the code looks wrong:
0x013b4a43 <QAction::softKeyRole>: mov eax,dword ptr [eax+0x9c]
0x013b4a49 <QAction::softKeyRole+6>: sal eax,0x11
0x013b4a4c <QAction::softKeyRole+9>: sar eax,0x1e
}
0x013b4a4f <QAction::softKeyRole+12>: leave
0x013b4a50 <QAction::softKeyRole+13>: ret near
Why is this a "shift arithetically right" instead of a logical shift? Compiler/build issue?