summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qt-2.3.7.patch/qte237-gcc34.patch461
1 files changed, 461 insertions, 0 deletions
diff --git a/qt/qt-2.3.7.patch/qte237-gcc34.patch b/qt/qt-2.3.7.patch/qte237-gcc34.patch
new file mode 100644
index 0000000..5abdd7f
--- a/dev/null
+++ b/qt/qt-2.3.7.patch/qte237-gcc34.patch
@@ -0,0 +1,461 @@
1diff -ur qt-2.3.7_clean/include/qcstring.h qt-2.3.7/include/qcstring.h
2 --- qt-2.3.7_clean/include/qcstring.h2004-06-04 02:17:53.000000000 +0200
3 +++ qt-2.3.7/include/qcstring.h2004-06-04 02:24:25.000000000 +0200
4@@ -119,7 +119,7 @@
5 // We want to keep source compatibility for 2.x
6 // ### TODO for 4.0: completely remove these and the cstr* functions
7
8-#if !defined(QT_GENUINE_STR)
9+#if 0
10
11 #undefstrlen
12 #define strlen qstrlen
13diff -ur qt-2.3.7_clean/include/qglobal.h qt-2.3.7/include/qglobal.h
14 --- qt-2.3.7_clean/include/qglobal.h2004-06-04 02:17:53.000000000 +0200
15 +++ qt-2.3.7/include/qglobal.h2004-06-04 02:29:41.000000000 +0200
16@@ -207,8 +207,16 @@
17 #if __GNUC__ == 2 && __GNUC_MINOR__ == 96
18 #define Q_FP_CCAST_BROKEN
19 #endif
20+/* ARM gcc pads structs to 32 bits, even when they contain a single
21+ char, or short. We tell gcc to pack QChars to 16 bits, to avoid
22+ QString bloat. However, gcc 3.4 doesn't allow us to create references to
23+ members of a packed struct. (Pointers are OK, because then you
24+ supposedly know what you are doing.) */
25 #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
26 #define Q_PACKED __attribute__ ((packed))
27+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
28+# define Q_NO_PACKED_REFERENCE
29+# endif
30 #endif
31 #elif defined(__xlC__)
32 #define _CC_XLC_
33diff -ur qt-2.3.7_clean/include/qsortedlist.h qt-2.3.7/include/qsortedlist.h
34 --- qt-2.3.7_clean/include/qsortedlist.h2004-06-04 02:17:53.000000000 +0200
35 +++ qt-2.3.7/include/qsortedlist.h2004-06-04 02:24:25.000000000 +0200
36@@ -48,7 +48,7 @@
37 public:
38 QSortedList() {}
39 QSortedList( const QSortedList<type> &l ) : QList<type>(l) {}
40- ~QSortedList() { clear(); }
41+ ~QSortedList() { this->clear(); }
42 QSortedList<type> &operator=(const QSortedList<type> &l)
43 { return (QSortedList<type>&)QList<type>::operator=(l); }
44
45diff -ur qt-2.3.7_clean/include/qstring.h qt-2.3.7/include/qstring.h
46 --- qt-2.3.7_clean/include/qstring.h2004-06-04 02:17:53.000000000 +0200
47 +++ qt-2.3.7/include/qstring.h2004-06-04 02:54:16.000000000 +0200
48@@ -163,8 +163,16 @@
49 bool isLetterOrNumber() const;
50 bool isDigit() const;
51
52+
53+#ifdef Q_NO_PACKED_REFERENCE
54+ uchar& cell() { return *(&cl); }
55+ uchar& row() { return *(&rw); }
56+#else
57 uchar& cell() { return cl; }
58- uchar& row() { return rw; }
59+ uchar& row() { return rw; }
60+#endif
61+
62+
63 uchar cell() const { return cl; }
64 uchar row() const { return rw; }
65
66diff -ur qt-2.3.7_clean/src/kernel/qgfxtransformed_qws.cpp qt-2.3.7/src/kernel/qgfxtransformed_qws.cpp
67 --- qt-2.3.7_clean/src/kernel/qgfxtransformed_qws.cpp2004-06-04 02:17:53.000000000 +0200
68 +++ qt-2.3.7/src/kernel/qgfxtransformed_qws.cpp2004-06-04 02:24:25.000000000 +0200
69@@ -671,11 +671,11 @@
70 inline int tx( int x, int y ) {
71 switch ( qt_trans_screen->transformation() ) {
72 case QTransformedScreen::Rot90:
73 - return y - xoffs + yoffs;
74 + return y - this->xoffs + this->yoffs;
75 case QTransformedScreen::Rot180:
76 - return (width - x - 1) - xoffs - xoffs;
77 + return (this->width - x - 1) - this->xoffs - this->xoffs;
78 case QTransformedScreen::Rot270:
79 - return (height - y - 1) - xoffs - yoffs;
80 + return (this->height - y - 1) - this->xoffs - this->yoffs;
81 default:
82 return x;
83 }
84@@ -683,11 +683,11 @@
85 inline int ty( int x, int y ) {
86 switch ( qt_trans_screen->transformation() ) {
87 case QTransformedScreen::Rot90:
88 - return (width - x - 1) - yoffs - xoffs;
89 + return (this->width - x - 1) - this->yoffs - this->xoffs;
90 case QTransformedScreen::Rot180:
91 - return (height - y - 1) - yoffs - yoffs;
92 + return (this->height - y - 1) - this->yoffs - this->yoffs;
93 case QTransformedScreen::Rot270:
94 - return x - yoffs + xoffs;
95 + return x - this->yoffs + this->xoffs;
96 default:
97 return y;
98 }
99@@ -715,23 +715,23 @@
100 template <const int depth, const int type>
101 void QGfxTransformedRaster<depth,type>::setSourceWidgetOffset(int x, int y)
102 {
103- if ( srcbits == buffer ) {
104+ if ( this->srcbits == this->buffer ) {
105 switch ( qt_trans_screen->transformation() ) {
106 case QTransformedScreen::Rot90:
107 - srcwidgetoffs = QPoint( y, width - x - srcwidth );
108 + this->srcwidgetoffs = QPoint( y, this->width - x - this->srcwidth );
109 break;
110 case QTransformedScreen::Rot180:
111 - srcwidgetoffs = QPoint( width - x - srcwidth, height - y - srcheight );
112 + this->srcwidgetoffs = QPoint( this->width - x - this->srcwidth, this->height - y - this->srcheight );
113 break;
114 case QTransformedScreen::Rot270:
115 - srcwidgetoffs = QPoint( height - y - srcheight, x );
116 + this->srcwidgetoffs = QPoint( this->height - y - this->srcheight, x );
117 break;
118 default:
119 - srcwidgetoffs = QPoint( x, y );
120 + this->srcwidgetoffs = QPoint( x, y );
121 break;
122 }
123 } else
124 -srcwidgetoffs = QPoint( x, y );
125 +this->srcwidgetoffs = QPoint( x, y );
126 }
127
128 template <const int depth, const int type>
129@@ -739,8 +739,8 @@
130 {
131 QT_TRANS_GFX_BASE<depth,type>::setSource(i);
132 QSize s = qt_screen->mapToDevice( QSize(i->width(), i->height()) );
133- srcwidth = s.width();
134- srcheight = s.height();
135+ this->srcwidth = s.width();
136+ this->srcheight = s.height();
137 }
138
139 template <const int depth, const int type>
140@@ -782,7 +782,7 @@
141 if ( w == 0 || h == 0 )
142 return;
143 QRect r( x, y, w, h );
144- if ( cbrush.style() == SolidPattern ) {
145+ if ( this->cbrush.style() == Qt::SolidPattern ) {
146 r.setCoords( tx(x,y), ty(x,y), tx(x+w-1,y+h-1), ty(x+w-1,y+h-1) );
147 r = r.normalize();
148 }
149@@ -797,7 +797,7 @@
150 // solution. The brush offset logic is complicated enough, so we don't
151 // fastpath patternedbrush.
152
153- if ( inDraw || cpen.style()==NoPen || patternedbrush ) {
154+ if ( inDraw || this->cpen.style()==Qt::NoPen || this->patternedbrush ) {
155 //slowpath
156 QT_TRANS_GFX_BASE<depth,type>::drawPolygon( a, w, idx, num );
157 } else {
158@@ -819,29 +819,29 @@
159 template <const int depth, const int type>
160 void QGfxTransformedRaster<depth,type>::processSpans( int n, QPoint* point, int* width )
161 {
162- if ( inDraw || patternedbrush && srcwidth != 0 && srcheight != 0 ) {
163+ if ( inDraw || this->patternedbrush && this->srcwidth != 0 && this->srcheight != 0 ) {
164 //in the patternedbrush case, we let blt do the transformation
165 // so we leave inDraw false.
166 - QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width );
167 +QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width );
168 } else {
169 inDraw = TRUE;
170 while (n--) {
171 if ( *width > 0 ) {
172 - int x=tx(point->x(),point->y())+xoffs;
173 - int y=ty(point->x(),point->y())+yoffs;
174 + int x=tx(point->x(),point->y())+this->xoffs;
175 + int y=ty(point->x(),point->y())+this->yoffs;
176
177 switch( qt_trans_screen->transformation() ) {
178 case QTransformedScreen::Rot90:
179 - vline( x, y-(*width-1), y );
180 + this->vline( x, y-(*width-1), y );
181 break;
182 case QTransformedScreen::Rot180:
183 - hline( x - (*width-1), x, y );
184 + this->hline( x - (*width-1), x, y );
185 break;
186 case QTransformedScreen::Rot270:
187 - vline( x, y, y+*width-1 );
188 + this->vline( x, y, y+*width-1 );
189 break;
190 default:
191 - hline( x, x+*width-1, y );
192 + this->hline( x, x+*width-1, y );
193 break;
194 }
195 }
196@@ -896,14 +896,14 @@
197 switch ( qt_trans_screen->transformation() ) {
198 case QTransformedScreen::Rot90:
199 rsx = sy;
200 - rsy = srcwidth - sx - w;
201 + rsy = this->srcwidth - sx - w;
202 break;
203 case QTransformedScreen::Rot180:
204 - rsx = srcwidth - sx - w;
205 - rsy = srcheight - sy - h;
206 + rsx = this->srcwidth - sx - w;
207 + rsy = this->srcheight - sy - h;
208 break;
209 case QTransformedScreen::Rot270:
210 - rsx = srcheight - sy - h;
211 + rsx = this->srcheight - sy - h;
212 rsy = sx;
213 break;
214 default:
215@@ -941,39 +941,39 @@
216 r.setCoords( tx(rx,ry), ty(rx,ry), tx(rx+w-1,ry+h-1), ty(rx+w-1,ry+h-1) );
217 r = r.normalize();
218
219- QPoint oldBrushOffs = brushoffs;
220+ QPoint oldBrushOffs = this->brushoffs;
221 int brx, bry;
222 switch ( qt_trans_screen->transformation() ) {
223 case QTransformedScreen::Rot90:
224 - brx = brushoffs.y();
225 - bry = srcwidth - brushoffs.x() - w;
226 + brx = this->brushoffs.y();
227 + bry = this->srcwidth - this->brushoffs.x() - w;
228 break;
229 case QTransformedScreen::Rot180:
230 - brx = srcwidth - brushoffs.x() - w;
231 - bry = srcheight - brushoffs.y() - h;
232 + brx = this->srcwidth - this->brushoffs.x() - w;
233 + bry = this->srcheight - this->brushoffs.y() - h;
234 break;
235 case QTransformedScreen::Rot270:
236 - brx = srcheight - brushoffs.y() - h;
237 - bry = brushoffs.x();
238 + brx = this->srcheight - this->brushoffs.y() - h;
239 + bry = this->brushoffs.x();
240 break;
241 default:
242 - brx = brushoffs.x();
243 - bry = brushoffs.y();
244 + brx = this->brushoffs.x();
245 + bry = this->brushoffs.y();
246 break;
247 }
248- brushoffs = QPoint( brx, bry );
249+ this->brushoffs = QPoint( brx, bry );
250
251- int oldsw = srcwidth;
252- int oldsh = srcheight;
253- QSize s = qt_screen->mapToDevice( QSize(srcwidth,srcheight) );
254- srcwidth = s.width();
255- srcheight = s.height();
256+ int oldsw = this->srcwidth;
257+ int oldsh = this->srcheight;
258+ QSize s = qt_screen->mapToDevice( QSize(this->srcwidth,this->srcheight) );
259+ this->srcwidth = s.width();
260+ this->srcheight = s.height();
261
262 QT_TRANS_GFX_BASE<depth,type>::tiledBlt( r.x(), r.y(), r.width(), r.height() );
263
264- srcwidth = oldsw;
265- srcheight = oldsh;
266- brushoffs = oldBrushOffs;
267+ this->srcwidth = oldsw;
268+ this->srcheight = oldsh;
269+ this->brushoffs = oldBrushOffs;
270 inDraw = FALSE;
271 }
272
273diff -ur qt-2.3.7_clean/src/kernel/qgfxvfb_qws.cpp qt-2.3.7/src/kernel/qgfxvfb_qws.cpp
274 --- qt-2.3.7_clean/src/kernel/qgfxvfb_qws.cpp2004-06-04 02:17:53.000000000 +0200
275 +++ qt-2.3.7/src/kernel/qgfxvfb_qws.cpp2004-06-04 02:24:25.000000000 +0200
276@@ -31,7 +31,6 @@
277 **********************************************************************/
278
279 #include "qgfxraster_qws.h"
280-
281 #ifndef QT_NO_QWS_VFB
282
283 #include <sys/ipc.h>
284@@ -140,8 +139,8 @@
285 void QGfxVFb<depth,type>::drawPoint( int x, int y )
286 {
287 QWSDisplay::grab( TRUE );
288- if ( is_screen_gfx )
289 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, 1, 1 ) );
290+ if ( this->is_screen_gfx )
291 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, 1, 1 ) );
292 QGfxRaster<depth,type>::drawPoint( x, y );
293 QWSDisplay::ungrab();
294 }
295@@ -150,8 +149,8 @@
296 void QGfxVFb<depth,type>::drawPoints( const QPointArray &pa,int x,int y )
297 {
298 QWSDisplay::grab( TRUE );
299- if ( is_screen_gfx )
300 -qvfb_screen->setDirty( clipbounds );
301+ if ( this->is_screen_gfx )
302 +qvfb_screen->setDirty( this->clipbounds );
303 QGfxRaster<depth,type>::drawPoints( pa, x, y );
304 QWSDisplay::ungrab();
305 }
306@@ -160,9 +159,9 @@
307 void QGfxVFb<depth,type>::drawLine( int x1,int y1,int x2,int y2 )
308 {
309 QWSDisplay::grab( TRUE );
310- if ( is_screen_gfx ) {
311+ if ( this->is_screen_gfx ) {
312 QRect r;
313 -r.setCoords( x1+xoffs, y1+yoffs, x2+xoffs, y2+yoffs );
314 +r.setCoords( x1+this->xoffs, y1+this->yoffs, x2+this->xoffs, y2+this->yoffs );
315 qvfb_screen->setDirty( r.normalize() );
316 }
317 QGfxRaster<depth,type>::drawLine( x1, y1, x2, y2 );
318@@ -173,8 +172,8 @@
319 void QGfxVFb<depth,type>::fillRect( int x,int y,int w,int h )
320 {
321 QWSDisplay::grab( TRUE );
322- if ( is_screen_gfx )
323 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) );
324+ if ( this->is_screen_gfx )
325 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) );
326 QGfxRaster<depth,type>::fillRect( x, y, w, h );
327 QWSDisplay::ungrab();
328 }
329@@ -183,8 +182,8 @@
330 void QGfxVFb<depth,type>::drawPolyline( const QPointArray &pa,int x,int y )
331 {
332 QWSDisplay::grab( TRUE );
333- if ( is_screen_gfx )
334 -qvfb_screen->setDirty( clipbounds );
335+ if ( this->is_screen_gfx )
336 +qvfb_screen->setDirty( this->clipbounds );
337 QGfxRaster<depth,type>::drawPolyline( pa, x, y );
338 QWSDisplay::ungrab();
339 }
340@@ -193,8 +192,8 @@
341 void QGfxVFb<depth,type>::drawPolygon( const QPointArray &pa,bool w,int x,int y )
342 {
343 QWSDisplay::grab( TRUE );
344- if ( is_screen_gfx )
345 -qvfb_screen->setDirty( clipbounds );
346+ if ( this->is_screen_gfx )
347 +qvfb_screen->setDirty( this->clipbounds );
348 QGfxRaster<depth,type>::drawPolygon( pa, w, x, y );
349 QWSDisplay::ungrab();
350 }
351@@ -203,8 +202,8 @@
352 void QGfxVFb<depth,type>::blt( int x,int y,int w,int h, int sx, int sy )
353 {
354 QWSDisplay::grab( TRUE );
355- if ( is_screen_gfx )
356 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) );
357+ if ( this->is_screen_gfx )
358 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) );
359 QGfxRaster<depth,type>::blt( x, y, w, h, sx, sy );
360 QWSDisplay::ungrab();
361 }
362@@ -215,8 +214,8 @@
363 QWSDisplay::grab( TRUE );
364 int dy = sy - y;
365 int dx = sx - x;
366- if ( is_screen_gfx )
367 -qvfb_screen->setDirty( QRect(QMIN(x,sx) + xoffs, QMIN(y,sy) + yoffs,
368+ if ( this->is_screen_gfx )
369 +qvfb_screen->setDirty( QRect(QMIN(x,sx) + this->xoffs, QMIN(y,sy) + this->yoffs,
370 w+abs(dx), h+abs(dy)) );
371 QGfxRaster<depth,type>::scroll( x, y, w, h, sx, sy );
372 QWSDisplay::ungrab();
373@@ -227,8 +226,8 @@
374 void QGfxVFb<depth,type>::stretchBlt( int x,int y,int w,int h,int sx,int sy )
375 {
376 QWSDisplay::grab( TRUE );
377- if ( is_screen_gfx )
378 -qvfb_screen->setDirty( QRect( x + xoffs, y + yoffs, w, h) );
379+ if ( this->is_screen_gfx )
380 +qvfb_screen->setDirty( QRect( x + this->xoffs, y + this->yoffs, w, h) );
381 QGfxRaster<depth,type>::stretchBlt( x, y, w, h, sx, sy );
382 QWSDisplay::ungrab();
383 }
384@@ -238,8 +237,8 @@
385 void QGfxVFb<depth,type>::tiledBlt( int x,int y,int w,int h )
386 {
387 QWSDisplay::grab( TRUE );
388- if ( is_screen_gfx )
389 -qvfb_screen->setDirty( QRect(x + xoffs, y + yoffs, w, h) );
390+ if ( this->is_screen_gfx )
391 +qvfb_screen->setDirty( QRect(x + this->xoffs, y + this->yoffs, w, h) );
392 QGfxRaster<depth,type>::tiledBlt( x, y, w, h );
393 QWSDisplay::ungrab();
394 }
395diff -ur qt-2.3.7_clean/src/tools/qcstring.h qt-2.3.7/src/tools/qcstring.h
396 --- qt-2.3.7_clean/src/tools/qcstring.h2004-06-04 02:17:53.000000000 +0200
397 +++ qt-2.3.7/src/tools/qcstring.h2004-06-04 02:24:25.000000000 +0200
398@@ -119,7 +119,7 @@
399 // We want to keep source compatibility for 2.x
400 // ### TODO for 4.0: completely remove these and the cstr* functions
401
402-#if !defined(QT_GENUINE_STR)
403+#if 0
404
405 #undefstrlen
406 #define strlen qstrlen
407diff -ur qt-2.3.7_clean/src/tools/qglobal.h qt-2.3.7/src/tools/qglobal.h
408 --- qt-2.3.7_clean/src/tools/qglobal.h2004-06-04 02:17:53.000000000 +0200
409 +++ qt-2.3.7/src/tools/qglobal.h2004-06-04 02:29:41.000000000 +0200
410@@ -207,8 +207,16 @@
411 #if __GNUC__ == 2 && __GNUC_MINOR__ == 96
412 #define Q_FP_CCAST_BROKEN
413 #endif
414+/* ARM gcc pads structs to 32 bits, even when they contain a single
415+ char, or short. We tell gcc to pack QChars to 16 bits, to avoid
416+ QString bloat. However, gcc 3.4 doesn't allow us to create references to
417+ members of a packed struct. (Pointers are OK, because then you
418+ supposedly know what you are doing.) */
419 #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
420 #define Q_PACKED __attribute__ ((packed))
421+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
422+# define Q_NO_PACKED_REFERENCE
423+# endif
424 #endif
425 #elif defined(__xlC__)
426 #define _CC_XLC_
427Nur in qt-2.3.7/src/tools: qglobal.h~.
428diff -ur qt-2.3.7_clean/src/tools/qsortedlist.h qt-2.3.7/src/tools/qsortedlist.h
429 --- qt-2.3.7_clean/src/tools/qsortedlist.h2004-06-04 02:17:53.000000000 +0200
430 +++ qt-2.3.7/src/tools/qsortedlist.h2004-06-04 02:24:25.000000000 +0200
431@@ -48,7 +48,7 @@
432 public:
433 QSortedList() {}
434 QSortedList( const QSortedList<type> &l ) : QList<type>(l) {}
435- ~QSortedList() { clear(); }
436+ ~QSortedList() { this->clear(); }
437 QSortedList<type> &operator=(const QSortedList<type> &l)
438 { return (QSortedList<type>&)QList<type>::operator=(l); }
439
440diff -ur qt-2.3.7_clean/src/tools/qstring.h qt-2.3.7/src/tools/qstring.h
441 --- qt-2.3.7_clean/src/tools/qstring.h2004-06-04 02:17:53.000000000 +0200
442 +++ qt-2.3.7/src/tools/qstring.h2004-06-04 02:54:16.000000000 +0200
443@@ -163,8 +163,16 @@
444 bool isLetterOrNumber() const;
445 bool isDigit() const;
446
447+
448+#ifdef Q_NO_PACKED_REFERENCE
449+ uchar& cell() { return *(&cl); }
450+ uchar& row() { return *(&rw); }
451+#else
452 uchar& cell() { return cl; }
453- uchar& row() { return rw; }
454+ uchar& row() { return rw; }
455+#endif
456+
457+
458 uchar cell() const { return cl; }
459 uchar row() const { return rw; }
460
461Nur in qt-2.3.7/src/tools: qstring.h~.