summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-03-29 13:44:00 (GMT)
committerGareth Stockwell <ext-gareth.stockwell@nokia.com>2010-03-29 13:44:00 (GMT)
commit32a182c25104e6e49fc965a168957acff52a2b53 (patch)
tree03e0984b025dbef8bdf60d319341b887baa1ceba /src/gui
parent8013f91a429c17503a15bcf6bfcd9196a828641f (diff)
downloadQt-32a182c25104e6e49fc965a168957acff52a2b53.zip
Qt-32a182c25104e6e49fc965a168957acff52a2b53.tar.gz
Qt-32a182c25104e6e49fc965a168957acff52a2b53.tar.bz2
Fixed bitfield-related crash on Symbian WINSCW
When running on WINSCW, the nativePaintMode variable was becoming corrupted. The point at which this corruption occurs is unclear, but it can be reproduced as follows: 1. Launch qmediaplayer 2. In the Phonon::MMF::DsaVideoOutput constructor, the nativePaintMode flag is set to QWExtra::ZeroFill 3. Open a video clip 4. During start of playback, QSymbianControl::Draw is called on the native control corresponding to the DsaVideoOutput object. This checks the value of nativePaintMode; it does not match any of the valid NativePaintMode values, so an assertion fails. This crash does not occur on target, suggesting that the cause may be an error in the WINSCW compiler. Although the C++ standard allows bitfields to have boolean, integral or enumeration type, the latter is not permitted by C99. Neither increasing the number of bits allocated to nativePaintMode, nor changing it position in the list of platform-specific bitfields has any effect. After making nativePaintMode into a normal field rather than a bitfield, the crash no longer happens. Note that, since bitfields must be kept together, nativePaintMode is moved to the end of the structure.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwidget_p.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 1bbc057..555647c 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -233,6 +233,15 @@ struct QWExtra {
uint activated : 1; // RWindowBase::Activated has been called
/**
+ * If this bit is set, each native widget receives the signals from the
+ * Symbian control immediately before and immediately after draw ops are
+ * sent to the window server for this control:
+ * void beginNativePaintEvent(const QRect &paintRect);
+ * void endNativePaintEvent(const QRect &paintRect);
+ */
+ uint receiveNativePaintEvents : 1;
+
+ /**
* Defines the behaviour of QSymbianControl::Draw.
*/
enum NativePaintMode {
@@ -257,16 +266,7 @@ struct QWExtra {
Default = Blit
};
- NativePaintMode nativePaintMode : 2;
-
- /**
- * If this bit is set, each native widget receives the signals from the
- * Symbian control immediately before and immediately after draw ops are
- * sent to the window server for this control:
- * void beginNativePaintEvent(const QRect &paintRect);
- * void endNativePaintEvent(const QRect &paintRect);
- */
- uint receiveNativePaintEvents : 1;
+ NativePaintMode nativePaintMode;
#endif
};