summaryrefslogtreecommitdiff
path: root/packages/qt/qt-x11-free/gcc4_1-HACK.patch
blob: 818bced4eef876c40457a989576f1da78d37cfe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- qt-x11-free-3.3.6/src/tools/qstring.h~gcc4_1.patch
+++ qt-x11-free-3.3.6/src/tools/qstring.h
@@ -60,7 +60,7 @@
 #endif
 #endif
 
-
+#define Q_NO_PACKED_REFERENCE
 /*****************************************************************************
   QString class
  *****************************************************************************/
@@ -194,9 +194,9 @@
     char latin1() const { return ucs > 0xff ? 0 : (char) ucs; }
     ushort unicode() const { return ucs; }
 #ifdef Q_NO_PACKED_REFERENCE
-    ushort &unicode() { return *(&ucs); }
+    ushort &unicode() { return *((ushort*)&ucs); }
 #else
-    ushort &unicode() { return ucs; }
+    ushort &unicode() { return (ushort)ucs; }
 #endif
 #ifndef QT_NO_CAST_ASCII
     // like all ifdef'd code this is undocumented