diff options
author | Janne Anttila <janne.anttila@digia.com> | 2010-08-25 06:08:15 (GMT) |
---|---|---|
committer | Janne Anttila <janne.anttila@digia.com> | 2010-08-25 08:03:44 (GMT) |
commit | 19ebb3f5b2f599018594e9f0dd3b9de81f584262 (patch) | |
tree | a6964f788843957422b69d1851e9cb3530b9fb41 /src/gui/kernel/qaction_p.h | |
parent | 5f43bdbbf48a0b78b4d52a9015ad6e86d9ffb706 (diff) | |
download | Qt-19ebb3f5b2f599018594e9f0dd3b9de81f584262.zip Qt-19ebb3f5b2f599018594e9f0dd3b9de81f584262.tar.gz Qt-19ebb3f5b2f599018594e9f0dd3b9de81f584262.tar.bz2 |
Remove enums from bitfield, since all compilers do not support them.
Without this change, the softkey functionality is broken in Symbian
emulator. What happens is that QAction::NegativeSoftkey enum turns
out to negative value (-2) in
QSoftKeyManagerPrivateS60::highestPrioritySoftkey comparision:
if (action->softKeyRole() == role)
In essence comparision gets executed as if (-2 == 2), which is false
and negative softkey will never get displayed. There has been similar
problems in XmlPatterns with MSVC in the past [1].
Apparently also Nokia X86 compiler does not support enums in bitfield,
actually even C++ standard support is unclear - see [2]. In HW
builds the problem does not occur since RVCT has extended support for
enums in bitfield [3].
[1] http://qt.gitorious.org/qt/qt/blobs/4.7/src/xmlpatterns/acceltree/qacceltree_p.h#line212
[2] http://www.velocityreviews.com/forums/t317473-bitfield-and-enum-is-this-legal.html
[3] http://www.keil.com/support/man/docs/armccref/armccref_ciaiabid.htm
Reviewed-By: Thierry Bastian
Reviewed-By: Janne Koskinen
Diffstat (limited to 'src/gui/kernel/qaction_p.h')
-rw-r--r-- | src/gui/kernel/qaction_p.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/kernel/qaction_p.h b/src/gui/kernel/qaction_p.h index 899b01b..5764318 100644 --- a/src/gui/kernel/qaction_p.h +++ b/src/gui/kernel/qaction_p.h @@ -112,12 +112,12 @@ public: //for soft keys management uint forceEnabledInSoftkeys : 1; uint menuActionSoftkeys : 1; - - QAction::MenuRole menuRole : 3; - QAction::SoftKeyRole softKeyRole : 2; - QAction::Priority priority : 14; int iconVisibleInMenu : 3; // Only has values -1, 0, and 1 + QAction::MenuRole menuRole; + QAction::SoftKeyRole softKeyRole; + QAction::Priority priority; + QList<QWidget *> widgets; #ifndef QT_NO_GRAPHICSVIEW QList<QGraphicsWidget *> graphicsWidgets; |