summaryrefslogtreecommitdiff
path: root/qt
Unidiff
Diffstat (limited to 'qt') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/README.qt-patches6
-rw-r--r--qt/qt-2.3.7.patch/qte237-adjustsizes.patch64
-rw-r--r--qt/qt-2.3.7.patch/qte237-all.patch1261
-rw-r--r--qt/qt-2.3.7.patch/qte237-allowoverride.patch229
-rw-r--r--qt/qt-2.3.7.patch/qte237-g++-aslinker.patch161
-rw-r--r--qt/qt-2.3.7.patch/qte237-gcc34.patch21
-rw-r--r--qt/qt-2.3.7.patch/qte237-hancomwordcrash.patch14
-rw-r--r--qt/qt-2.3.7.patch/qte237-iconviewspeed.patch149
-rw-r--r--qt/qt-2.3.7.patch/qte237-keyboard.patch43
-rw-r--r--qt/qt-2.3.7.patch/qte237-lefthand.patch7
-rw-r--r--qt/qt-2.3.8.patch/qte238-adjustsizes.patch64
-rw-r--r--qt/qt-2.3.8.patch/qte238-all.patch801
-rw-r--r--qt/qt-2.3.8.patch/qte238-allowoverride.patch231
-rw-r--r--qt/qt-2.3.8.patch/qte238-gcc34.patch440
-rw-r--r--qt/qt-2.3.8.patch/qte238-hancomwordcrash.patch15
-rw-r--r--qt/qt-2.3.8.patch/qte238-iconviewspeed.patch145
-rw-r--r--qt/qt-2.3.8.patch/qte238-keyboard.patch47
17 files changed, 3459 insertions, 239 deletions
diff --git a/qt/README.qt-patches b/qt/README.qt-patches
new file mode 100644
index 0000000..e079ba7
--- a/dev/null
+++ b/qt/README.qt-patches
@@ -0,0 +1,6 @@
1The Qt patches are patches generally useful for all platforms.
2For specefic Device patches like Keyboard and Mousedrivers see
3
4http://openembedded.bkbits.net:8080/packages/src/qte/qte-2.3.7?nav=index.html|src/.|src/qte
5
6
diff --git a/qt/qt-2.3.7.patch/qte237-adjustsizes.patch b/qt/qt-2.3.7.patch/qte237-adjustsizes.patch
new file mode 100644
index 0000000..ac1e31a
--- a/dev/null
+++ b/qt/qt-2.3.7.patch/qte237-adjustsizes.patch
@@ -0,0 +1,64 @@
1Qt was not created for 240x320 and we adjust some default values to be more
2sane for the usage on handhelds
3
4
5
6
7diff -ur qt-2.3.7-old/src/widgets/qcommonstyle.cpp qt-2.3.7/src/widgets/qcommonstyle.cpp
8 --- qt-2.3.7-old/src/widgets/qcommonstyle.cpp2004-07-23 15:22:56.000000000 +0200
9 +++ qt-2.3.7/src/widgets/qcommonstyle.cpp2004-07-23 15:38:13.000000000 +0200
10@@ -566,7 +566,7 @@
11 bool enabled, bool active )
12 {
13 #ifndef QT_NO_MENUBAR
14-#ifndef QT_NO_STYLE_SGI
15+#if 1 // #ifndef QT_NO_STYLE_SGI
16 if (draw_menu_bar_impl != 0) {
17 QDrawMenuBarItemImpl impl = draw_menu_bar_impl;
18 (this->*impl)(p, x, y, w, h, mi, g, enabled, active);
19diff -ur qt-2.3.7-old/src/widgets/qlistview.cpp qt-2.3.7/src/widgets/qlistview.cpp
20 --- qt-2.3.7-old/src/widgets/qlistview.cpp2004-07-23 15:22:56.000000000 +0200
21 +++ qt-2.3.7/src/widgets/qlistview.cpp2004-07-23 15:38:13.000000000 +0200
22@@ -4968,9 +4968,9 @@
23 l = l->childItem ? l->childItem : l->siblingItem;
24
25 if ( l && l->height() )
26 -s.setHeight( s.height() + 10 * l->height() );
27- else
28 -s.setHeight( s.height() + 140 );
29 +s.setHeight( s.height() + 4 /*10*/ * l->height() );
30+ else // ^v much too big for handhelds
31 +s.setHeight( s.height() + 30 /*140*/ );
32
33 if ( s.width() > s.height() * 3 )
34 s.setHeight( s.width() / 3 );
35diff -ur qt-2.3.7-old/src/widgets/qtoolbutton.cpp qt-2.3.7/src/widgets/qtoolbutton.cpp
36 --- qt-2.3.7-old/src/widgets/qtoolbutton.cpp2004-07-23 15:22:56.000000000 +0200
37 +++ qt-2.3.7/src/widgets/qtoolbutton.cpp2004-07-23 15:38:13.000000000 +0200
38@@ -230,7 +230,7 @@
39 else
40 QToolTip::add( this, textLabel );
41 }
42 -#endif
43+#endif
44 }
45
46
47@@ -324,12 +324,12 @@
48 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal);
49 w = pm.width();
50 h = pm.height();
51 -if ( w < 32 )
52 - w = 32;
53 -if ( h < 32 )
54 - h = 32;
55 +if ( w < 24 )
56 + w = 24;
57 +if ( h < 24 )
58 + h = 24;
59 } else {
60 -w = h = 16;
61 +w = h = 14;
62 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal);
63 w = pm.width();
64 h = pm.height();
diff --git a/qt/qt-2.3.7.patch/qte237-all.patch b/qt/qt-2.3.7.patch/qte237-all.patch
index 596db2f..e3351a3 100644
--- a/qt/qt-2.3.7.patch/qte237-all.patch
+++ b/qt/qt-2.3.7.patch/qte237-all.patch
@@ -1,39 +1,492 @@
1 1
2#
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
4#
5 2
6 --- qt-2.3.7/src/kernel/qapplication.cpp~qte237-all2003-07-17 03:20:25.000000000 +0200 3Included patches:
7 +++ qt-2.3.7/src/kernel/qapplication.cpp2004-04-15 21:06:51.232857014 +0200 4
5qte237-allowoverride.patch
6qte237-g++-aslinker.patch
7qte237-iconviewspeed.patch
8qte237-adjustsizes.patch
9qte237-encoding.patch
10qte237-keyboard.patch
11qte237-gcc34.patch
12qte237-lefthand.patch
13
14
15
16
17
18
19
20
21
22diff -ur qt-2.3.7-old/configs/linux-generic-g++-shared qt-2.3.7/configs/linux-generic-g++-shared
23 --- qt-2.3.7-old/configs/linux-generic-g++-shared2004-07-23 15:22:56.000000000 +0200
24 +++ qt-2.3.7/configs/linux-generic-g++-shared2004-07-23 15:23:12.000000000 +0200
25@@ -36,7 +36,7 @@
26 SYSCONF_LIBS_YACC=
27
28 # Linking applications
29 -SYSCONF_LINK = gcc
30 +SYSCONF_LINK = g++
31 SYSCONF_LFLAGS =
32 SYSCONF_LIBS =
33
34diff -ur qt-2.3.7-old/configs/linux-generic-g++-shared-debug qt-2.3.7/configs/linux-generic-g++-shared-debug
35 --- qt-2.3.7-old/configs/linux-generic-g++-shared-debug2004-07-23 15:22:56.000000000 +0200
36 +++ qt-2.3.7/configs/linux-generic-g++-shared-debug2004-07-23 15:23:12.000000000 +0200
37@@ -36,7 +36,7 @@
38 SYSCONF_LIBS_YACC=
39
40 # Linking applications
41 -SYSCONF_LINK = gcc
42 +SYSCONF_LINK = g++
43 SYSCONF_LFLAGS =
44 SYSCONF_LIBS =
45
46diff -ur qt-2.3.7-old/configs/linux-generic-g++-static qt-2.3.7/configs/linux-generic-g++-static
47 --- qt-2.3.7-old/configs/linux-generic-g++-static2004-07-23 15:22:56.000000000 +0200
48 +++ qt-2.3.7/configs/linux-generic-g++-static2004-07-23 15:23:12.000000000 +0200
49@@ -36,7 +36,7 @@
50 SYSCONF_LIBS_YACC=
51
52 # Linking applications
53 -SYSCONF_LINK = gcc
54 +SYSCONF_LINK = g++
55 SYSCONF_LFLAGS =
56 SYSCONF_LIBS =
57
58diff -ur qt-2.3.7-old/configs/linux-generic-g++-static-debug qt-2.3.7/configs/linux-generic-g++-static-debug
59 --- qt-2.3.7-old/configs/linux-generic-g++-static-debug2004-07-23 15:22:56.000000000 +0200
60 +++ qt-2.3.7/configs/linux-generic-g++-static-debug2004-07-23 15:23:12.000000000 +0200
61@@ -36,7 +36,7 @@
62 SYSCONF_LIBS_YACC=
63
64 # Linking applications
65 -SYSCONF_LINK = gcc
66 +SYSCONF_LINK = g++
67 SYSCONF_LFLAGS =
68 SYSCONF_LIBS =
69
70diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-shared qt-2.3.7/configs/linux-generic_rtti-g++-shared
71 --- qt-2.3.7-old/configs/linux-generic_rtti-g++-shared2004-07-23 15:22:56.000000000 +0200
72 +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared2004-07-23 15:23:12.000000000 +0200
73@@ -36,7 +36,7 @@
74 SYSCONF_LIBS_YACC=
75
76 # Linking applications
77 -SYSCONF_LINK = gcc
78 +SYSCONF_LINK = g++
79 SYSCONF_LFLAGS =
80 SYSCONF_LIBS =
81
82diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-shared-debug qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug
83 --- qt-2.3.7-old/configs/linux-generic_rtti-g++-shared-debug2004-07-23 15:22:56.000000000 +0200
84 +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug2004-07-23 15:23:12.000000000 +0200
85@@ -36,7 +36,7 @@
86 SYSCONF_LIBS_YACC=
87
88 # Linking applications
89 -SYSCONF_LINK = gcc
90 +SYSCONF_LINK = g++
91 SYSCONF_LFLAGS =
92 SYSCONF_LIBS =
93
94diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-static qt-2.3.7/configs/linux-generic_rtti-g++-static
95 --- qt-2.3.7-old/configs/linux-generic_rtti-g++-static2004-07-23 15:22:56.000000000 +0200
96 +++ qt-2.3.7/configs/linux-generic_rtti-g++-static2004-07-23 15:23:12.000000000 +0200
97@@ -36,7 +36,7 @@
98 SYSCONF_LIBS_YACC=
99
100 # Linking applications
101 -SYSCONF_LINK = gcc
102 +SYSCONF_LINK = g++
103 SYSCONF_LFLAGS =
104 SYSCONF_LIBS =
105
106diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-static-debug qt-2.3.7/configs/linux-generic_rtti-g++-static-debug
107 --- qt-2.3.7-old/configs/linux-generic_rtti-g++-static-debug2004-07-23 15:22:56.000000000 +0200
108 +++ qt-2.3.7/configs/linux-generic_rtti-g++-static-debug2004-07-23 15:23:12.000000000 +0200
109@@ -36,7 +36,7 @@
110 SYSCONF_LIBS_YACC=
111
112 # Linking applications
113 -SYSCONF_LINK = gcc
114 +SYSCONF_LINK = g++
115 SYSCONF_LFLAGS =
116 SYSCONF_LIBS =
117
118diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-shared qt-2.3.7/configs/linux-x86rtti-g++-shared
119 --- qt-2.3.7-old/configs/linux-x86rtti-g++-shared2004-07-23 15:22:56.000000000 +0200
120 +++ qt-2.3.7/configs/linux-x86rtti-g++-shared2004-07-23 15:23:12.000000000 +0200
121@@ -36,7 +36,7 @@
122 SYSCONF_LIBS_YACC=
123
124 # Linking applications
125 -SYSCONF_LINK = gcc
126 +SYSCONF_LINK = g++
127 SYSCONF_LFLAGS =
128 SYSCONF_LIBS = -lm
129
130diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-shared-debug qt-2.3.7/configs/linux-x86rtti-g++-shared-debug
131 --- qt-2.3.7-old/configs/linux-x86rtti-g++-shared-debug2004-07-23 15:22:56.000000000 +0200
132 +++ qt-2.3.7/configs/linux-x86rtti-g++-shared-debug2004-07-23 15:23:12.000000000 +0200
133@@ -36,7 +36,7 @@
134 SYSCONF_LIBS_YACC=
135
136 # Linking applications
137 -SYSCONF_LINK = gcc
138 +SYSCONF_LINK = g++
139 SYSCONF_LFLAGS =
140 SYSCONF_LIBS = -lm
141
142diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-static qt-2.3.7/configs/linux-x86rtti-g++-static
143 --- qt-2.3.7-old/configs/linux-x86rtti-g++-static2004-07-23 15:22:56.000000000 +0200
144 +++ qt-2.3.7/configs/linux-x86rtti-g++-static2004-07-23 15:23:12.000000000 +0200
145@@ -36,7 +36,7 @@
146 SYSCONF_LIBS_YACC=
147
148 # Linking applications
149 -SYSCONF_LINK = gcc
150 +SYSCONF_LINK = g++
151 SYSCONF_LFLAGS =
152 SYSCONF_LIBS = -lm
153
154diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-static-debug qt-2.3.7/configs/linux-x86rtti-g++-static-debug
155 --- qt-2.3.7-old/configs/linux-x86rtti-g++-static-debug2004-07-23 15:22:56.000000000 +0200
156 +++ qt-2.3.7/configs/linux-x86rtti-g++-static-debug2004-07-23 15:23:12.000000000 +0200
157@@ -36,7 +36,7 @@
158 SYSCONF_LIBS_YACC=
159
160 # Linking applications
161 -SYSCONF_LINK = gcc
162 +SYSCONF_LINK = g++
163 SYSCONF_LFLAGS =
164 SYSCONF_LIBS = -lm
165
166diff -ur qt-2.3.7-old/include/qapplication.h qt-2.3.7/include/qapplication.h
167 --- qt-2.3.7-old/include/qapplication.h2004-07-23 15:22:56.000000000 +0200
168 +++ qt-2.3.7/include/qapplication.h2004-07-23 15:25:42.000000000 +0200
169@@ -61,6 +61,10 @@
170 class QSemaphore;
171 #endif
172
173+#if !defined( QT_WEAK_SYMBOL )
174+#define QT_WEAK_SYMBOL
175+#endif
176+
177 // REMOVE IN 3.0 (just here for moc source compatibility)
178 #define QNonBaseApplication QApplication
179
180@@ -85,7 +89,10 @@
181
182 #ifndef QT_NO_STYLE
183 static QStyle &style();
184 - static void setStyle( QStyle* );
185 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL;
186+private:
187 +static void setStyle_NonWeak( QStyle* );
188+public:
189 #endif
190 #if 1/* OBSOLETE */
191 enum ColorMode { NormalColors, CustomColors };
192@@ -106,11 +113,19 @@
193 #ifndef QT_NO_PALETTE
194 static QPalette palette( const QWidget* = 0 );
195 static void setPalette( const QPalette &, bool informWidgets=FALSE,
196 + const char* className = 0 ) QT_WEAK_SYMBOL;
197+private:
198 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE,
199 const char* className = 0 );
200+public:
201 #endif
202 static QFont font( const QWidget* = 0 );
203 static void setFont( const QFont &, bool informWidgets=FALSE,
204 + const char* className = 0 ) QT_WEAK_SYMBOL;
205+private:
206 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE,
207 const char* className = 0 );
208 +public:
209 static QFontMetrics fontMetrics();
210
211 QWidget *mainWidget() const;
212@@ -207,7 +222,10 @@
213 void qwsSetCustomColors( QRgb *colortable, int start, int numColors );
214 #ifndef QT_NO_QWS_MANAGER
215 static QWSDecoration &qwsDecoration();
216- static void qwsSetDecoration( QWSDecoration *);
217+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL;
218+private:
219+ static void qwsSetDecoration_NonWeak( QWSDecoration *);
220+public:
221 #endif
222 #endif
223
224diff -ur qt-2.3.7-old/include/qcstring.h qt-2.3.7/include/qcstring.h
225 --- qt-2.3.7-old/include/qcstring.h2004-07-23 15:22:56.000000000 +0200
226 +++ qt-2.3.7/include/qcstring.h2004-07-23 15:42:01.000000000 +0200
227@@ -119,7 +119,7 @@
228 // We want to keep source compatibility for 2.x
229 // ### TODO for 4.0: completely remove these and the cstr* functions
230
231-#if !defined(QT_GENUINE_STR)
232+#if 0
233
234 #undefstrlen
235 #define strlen qstrlen
236diff -ur qt-2.3.7-old/include/qfontdatabase.h qt-2.3.7/include/qfontdatabase.h
237 --- qt-2.3.7-old/include/qfontdatabase.h2004-07-23 15:22:56.000000000 +0200
238 +++ qt-2.3.7/include/qfontdatabase.h2004-07-23 15:25:42.000000000 +0200
239@@ -59,6 +59,10 @@
240 class QDiskFont;
241 #endif
242
243+#if !defined( QT_WEAK_SYMBOL )
244+#define QT_WEAK_SYMBOL
245+#endif
246+
247 class QFontDatabasePrivate;
248
249 class Q_EXPORT QFontDatabase
250@@ -67,9 +71,16 @@
251 QFontDatabase();
252
253 QStringList families( bool onlyForLocale = TRUE ) const;
254+
255+
256 QValueList<int> pointSizes( const QString &family,
257 const QString &style = QString::null,
258 - const QString &charSet = QString::null );
259 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL;
260+private:
261+ QValueList<int> pointSizes_NonWeak( const QString &family,
262 + const QString &style,
263 + const QString &charSet );
264+public:
265 QStringList styles( const QString &family,
266 const QString &charSet = QString::null ) const;
267 QStringList charSets( const QString &familyName,
268diff -ur qt-2.3.7-old/include/qglobal.h qt-2.3.7/include/qglobal.h
269 --- qt-2.3.7-old/include/qglobal.h2004-07-23 15:22:56.000000000 +0200
270 +++ qt-2.3.7/include/qglobal.h2004-07-23 15:42:01.000000000 +0200
271@@ -207,8 +207,16 @@
272 #if __GNUC__ == 2 && __GNUC_MINOR__ == 96
273 #define Q_FP_CCAST_BROKEN
274 #endif
275+/* ARM gcc pads structs to 32 bits, even when they contain a single
276+ char, or short. We tell gcc to pack QChars to 16 bits, to avoid
277+ QString bloat. However, gcc 3.4 doesn't allow us to create references to
278+ members of a packed struct. (Pointers are OK, because then you
279+ supposedly know what you are doing.) */
280 #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
281 #define Q_PACKED __attribute__ ((packed))
282+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
283+# define Q_NO_PACKED_REFERENCE
284+# endif
285 #endif
286 #elif defined(__xlC__)
287 #define _CC_XLC_
288diff -ur qt-2.3.7-old/include/qiconview.h qt-2.3.7/include/qiconview.h
289 --- qt-2.3.7-old/include/qiconview.h2004-07-23 15:22:56.000000000 +0200
290 +++ qt-2.3.7/include/qiconview.h2004-07-23 15:45:34.000000000 +0200
291@@ -444,6 +444,7 @@
292 virtual void contentsDropEvent( QDropEvent *e );
293 #endif
294
295+ void bufferedPaintEvent( QPaintEvent* );
296 virtual void resizeEvent( QResizeEvent* e );
297 virtual void keyPressEvent( QKeyEvent *e );
298 virtual void focusInEvent( QFocusEvent *e );
299diff -ur qt-2.3.7-old/include/qsortedlist.h qt-2.3.7/include/qsortedlist.h
300 --- qt-2.3.7-old/include/qsortedlist.h2004-07-23 15:22:56.000000000 +0200
301 +++ qt-2.3.7/include/qsortedlist.h2004-07-23 15:42:01.000000000 +0200
302@@ -48,7 +48,7 @@
303 public:
304 QSortedList() {}
305 QSortedList( const QSortedList<type> &l ) : QList<type>(l) {}
306- ~QSortedList() { clear(); }
307+ ~QSortedList() { this->clear(); }
308 QSortedList<type> &operator=(const QSortedList<type> &l)
309 { return (QSortedList<type>&)QList<type>::operator=(l); }
310
311diff -ur qt-2.3.7-old/include/qstring.h qt-2.3.7/include/qstring.h
312 --- qt-2.3.7-old/include/qstring.h2004-07-23 15:22:56.000000000 +0200
313 +++ qt-2.3.7/include/qstring.h2004-07-23 15:42:01.000000000 +0200
314@@ -163,8 +163,16 @@
315 bool isLetterOrNumber() const;
316 bool isDigit() const;
317
318+
319+#ifdef Q_NO_PACKED_REFERENCE
320+ uchar& cell() { return *(&cl); }
321+ uchar& row() { return *(&rw); }
322+#else
323 uchar& cell() { return cl; }
324- uchar& row() { return rw; }
325+ uchar& row() { return rw; }
326+#endif
327+
328+
329 uchar cell() const { return cl; }
330 uchar row() const { return rw; }
331
332diff -ur qt-2.3.7-old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp
333 --- qt-2.3.7-old/src/iconview/qiconview.cpp2004-07-23 15:22:56.000000000 +0200
334 +++ qt-2.3.7/src/iconview/qiconview.cpp2004-07-23 15:45:34.000000000 +0200
335@@ -1,5 +1,5 @@
336 /****************************************************************************
337-** $Id$
338+** $Id$
339 **
340 ** Implementation of QIconView widget class
341 **
342@@ -220,6 +220,7 @@
343 QIconView::SelectionMode selectionMode;
344 QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor;
345 QRect *rubber;
346+ QPixmap *backBuffer;
347 QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer,
348 *fullRedrawTimer;
349 int rastX, rastY, spacing;
350@@ -2263,6 +2264,7 @@
351 d->currentItem = 0;
352 d->highlightedItem = 0;
353 d->rubber = 0;
354+ d->backBuffer = 0;
355 d->scrollTimer = 0;
356 d->startDragItem = 0;
357 d->tmpCurrentItem = 0;
358@@ -2411,6 +2413,8 @@
359 delete item;
360 item = tmp;
361 }
362+ delete d->backBuffer;
363+ d->backBuffer = 0;
364 delete d->fm;
365 d->fm = 0;
366 #ifndef QT_NO_TOOLTIP
367@@ -2877,6 +2881,48 @@
368 }
369
370 /*!
371+ This function grabs all paintevents that otherwise would have been
372+ processed by the QScrollView::viewportPaintEvent(). Here we use a
373+ doublebuffer to reduce 'on-paint' flickering on QIconView
374+ (and of course its childs).
375+
376+ \sa QScrollView::viewportPaintEvent(), QIconView::drawContents()
377+*/
378+
379+void QIconView::bufferedPaintEvent( QPaintEvent* pe )
380+{
381+ QWidget* vp = viewport();
382+ QRect r = pe->rect() & vp->rect();
383+ int ex = r.x() + contentsX();
384+ int ey = r.y() + contentsY();
385+ int ew = r.width();
386+ int eh = r.height();
387+
388+ if ( !d->backBuffer )
389 +d->backBuffer = new QPixmap(vp->size());
390+ if ( d->backBuffer->size() != vp->size() ) {
391 +//Resize function (with hysteesis). Uses a good compromise between memory
392 +//consumption and speed (number) of resizes.
393+ float newWidth = (float)vp->width();
394 +float newHeight = (float)vp->height();
395 +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() )
396 +{
397 + newWidth *= 1.1892;
398 + newHeight *= 1.1892;
399 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
400 +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() )
401 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
402+ }
403+
404+ QPainter p;
405+ p.begin(d->backBuffer, vp);
406+ drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh);
407+ p.end();
408+ bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh);
409+}
410+
411+/*!
412+
413 \reimp
414 */
415
416@@ -4855,7 +4901,7 @@
417 if ( !d->rubber )
418 drawDragShapes( d->oldDragPos );
419 }
420 - viewportPaintEvent( (QPaintEvent*)e );
421+ bufferedPaintEvent ((QPaintEvent*)e );
422 if ( d->dragging ) {
423 if ( !d->rubber )
424 drawDragShapes( d->oldDragPos );
425@@ -5286,11 +5332,19 @@
426 return;
427
428 if ( item->d->container1 && d->firstContainer ) {
429 -item->d->container1->items.removeRef( item );
430+ //Special-case checking of the last item, since this may be
431+ //called a few times for the same item.
432+ if (item->d->container1->items.last() == item)
433+ item->d->container1->items.removeLast();
434+ else
435+ item->d->container1->items.removeRef( item );
436 }
437 item->d->container1 = 0;
438 if ( item->d->container2 && d->firstContainer ) {
439 -item->d->container2->items.removeRef( item );
440+ if (item->d->container2->items.last() == item)
441+ item->d->container2->items.removeLast();
442+ else
443+ item->d->container2->items.removeRef( item );
444 }
445 item->d->container2 = 0;
446
447diff -ur qt-2.3.7-old/src/iconview/qiconview.h qt-2.3.7/src/iconview/qiconview.h
448 --- qt-2.3.7-old/src/iconview/qiconview.h2004-07-23 15:22:56.000000000 +0200
449 +++ qt-2.3.7/src/iconview/qiconview.h2004-07-23 15:45:34.000000000 +0200
450@@ -444,6 +444,7 @@
451 virtual void contentsDropEvent( QDropEvent *e );
452 #endif
453
454+ void bufferedPaintEvent( QPaintEvent* );
455 virtual void resizeEvent( QResizeEvent* e );
456 virtual void keyPressEvent( QKeyEvent *e );
457 virtual void focusInEvent( QFocusEvent *e );
458diff -ur qt-2.3.7-old/src/kernel/qapplication.cpp qt-2.3.7/src/kernel/qapplication.cpp
459 --- qt-2.3.7-old/src/kernel/qapplication.cpp2004-07-23 15:22:56.000000000 +0200
460 +++ qt-2.3.7/src/kernel/qapplication.cpp2004-07-23 15:25:42.000000000 +0200
8@@ -35,6 +35,8 @@ 461@@ -35,6 +35,8 @@
9 ** 462 **
10 **********************************************************************/ 463 **********************************************************************/
11 464
12 +#define QT_WEAK_SYMBOL__attribute__(( weak )) 465 +#define QT_WEAK_SYMBOL__attribute__(( weak ))
13+ 466+
14 #include "qobjectlist.h" 467 #include "qobjectlist.h"
15 #include "qobjectdict.h" 468 #include "qobjectdict.h"
16 #include "qapplication.h" 469 #include "qapplication.h"
17@@ -933,11 +935,16 @@ 470@@ -933,11 +935,16 @@
18 #ifndef QT_NO_STYLE 471 #ifndef QT_NO_STYLE
19 void QApplication::setStyle( QStyle *style ) 472 void QApplication::setStyle( QStyle *style )
20 { 473 {
21 +setStyle_NonWeak ( style ); 474 +setStyle_NonWeak ( style );
22+} 475+}
23+ 476+
24+void QApplication::setStyle_NonWeak( QStyle *style ) 477+void QApplication::setStyle_NonWeak( QStyle *style )
25+{ 478+{
26 QStyle* old = app_style; 479 QStyle* old = app_style;
27- app_style = style; 480- app_style = style;
28 481
29 if ( startingUp() ) { 482 if ( startingUp() ) {
30 delete old; 483 delete old;
31 +app_style = style; 484 +app_style = style;
32 return; 485 return;
33 } 486 }
34 487
35@@ -958,6 +965,8 @@ 488@@ -958,6 +965,8 @@
36 old->unPolish( qApp ); 489 old->unPolish( qApp );
37 } 490 }
38 491
39+ app_style = style; 492+ app_style = style;
@@ -58,408 +511,844 @@
58 QPalette pal = palette; 511 QPalette pal = palette;
59 #ifndef QT_NO_STYLE 512 #ifndef QT_NO_STYLE
60- if ( !startingUp() ) 513- if ( !startingUp() )
61+ if ( !startingUp() ) { 514+ if ( !startingUp() ) {
62 qApp->style().polish( pal );// NB: non-const reference 515 qApp->style().polish( pal );// NB: non-const reference
63 +if ( className ) { 516 +if ( className ) {
64 + // if we just polished a class specific palette (this normally 517 + // if we just polished a class specific palette (this normally
65 + // only called by qt_fix_tooltips - see below), we better re- 518 + // only called by qt_fix_tooltips - see below), we better re-
66 + // polish the global palette. Some styles like liquid can get 519 + // polish the global palette. Some styles like liquid can get
67 + // confused, because they can not detect if the polished palette 520 + // confused, because they can not detect if the polished palette
68 + // is the global one or only a class specific one. 521 + // is the global one or only a class specific one.
69 + // (liquid uses this palette to calculate blending pixmaps) 522 + // (liquid uses this palette to calculate blending pixmaps)
70 + QPalette p = qApp-> palette ( ); 523 + QPalette p = qApp-> palette ( );
71 + qApp->style().polish ( p ); 524 + qApp->style().polish ( p );
72 +} 525 +}
73+ } 526+ }
74 #endif 527 #endif
75 bool all = FALSE; 528 bool all = FALSE;
76 if ( !className ) { 529 if ( !className ) {
77@@ -1275,6 +1301,12 @@ 530@@ -1275,6 +1301,12 @@
78 void QApplication::setFont( const QFont &font, bool informWidgets, 531 void QApplication::setFont( const QFont &font, bool informWidgets,
79 const char* className ) 532 const char* className )
80 { 533 {
81 +setFont_NonWeak ( font, informWidgets, className ); 534 +setFont_NonWeak ( font, informWidgets, className );
82+} 535+}
83+ 536+
84+void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets, 537+void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets,
85 + const char* className ) 538 + const char* className )
86+{ 539+{
87 bool all = FALSE; 540 bool all = FALSE;
88 if ( !className ) { 541 if ( !className ) {
89 if ( !app_font ) { 542 if ( !app_font ) {
90 --- qt-2.3.7/src/kernel/qapplication.h~qte237-all2003-07-17 03:20:25.000000000 +0200 543diff -ur qt-2.3.7-old/src/kernel/qapplication.h qt-2.3.7/src/kernel/qapplication.h
91 +++ qt-2.3.7/src/kernel/qapplication.h2004-04-15 21:06:51.232857014 +0200 544 --- qt-2.3.7-old/src/kernel/qapplication.h2004-07-23 15:22:56.000000000 +0200
545 +++ qt-2.3.7/src/kernel/qapplication.h2004-07-23 15:25:42.000000000 +0200
92@@ -61,6 +61,10 @@ 546@@ -61,6 +61,10 @@
93 class QSemaphore; 547 class QSemaphore;
94 #endif 548 #endif
95 549
96+#if !defined( QT_WEAK_SYMBOL ) 550+#if !defined( QT_WEAK_SYMBOL )
97+#define QT_WEAK_SYMBOL 551+#define QT_WEAK_SYMBOL
98+#endif 552+#endif
99+ 553+
100 // REMOVE IN 3.0 (just here for moc source compatibility) 554 // REMOVE IN 3.0 (just here for moc source compatibility)
101 #define QNonBaseApplication QApplication 555 #define QNonBaseApplication QApplication
102 556
103@@ -85,7 +89,10 @@ 557@@ -85,7 +89,10 @@
104 558
105 #ifndef QT_NO_STYLE 559 #ifndef QT_NO_STYLE
106 static QStyle &style(); 560 static QStyle &style();
107 - static void setStyle( QStyle* ); 561 - static void setStyle( QStyle* );
108 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL; 562 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL;
109+private: 563+private:
110 +static void setStyle_NonWeak( QStyle* ); 564 +static void setStyle_NonWeak( QStyle* );
111+public: 565+public:
112 #endif 566 #endif
113 #if 1/* OBSOLETE */ 567 #if 1/* OBSOLETE */
114 enum ColorMode { NormalColors, CustomColors }; 568 enum ColorMode { NormalColors, CustomColors };
115@@ -106,11 +113,19 @@ 569@@ -106,11 +113,19 @@
116 #ifndef QT_NO_PALETTE 570 #ifndef QT_NO_PALETTE
117 static QPalette palette( const QWidget* = 0 ); 571 static QPalette palette( const QWidget* = 0 );
118 static void setPalette( const QPalette &, bool informWidgets=FALSE, 572 static void setPalette( const QPalette &, bool informWidgets=FALSE,
119 + const char* className = 0 ) QT_WEAK_SYMBOL; 573 + const char* className = 0 ) QT_WEAK_SYMBOL;
120+private: 574+private:
121 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, 575 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE,
122 const char* className = 0 ); 576 const char* className = 0 );
123+public: 577+public:
124 #endif 578 #endif
125 static QFont font( const QWidget* = 0 ); 579 static QFont font( const QWidget* = 0 );
126 static void setFont( const QFont &, bool informWidgets=FALSE, 580 static void setFont( const QFont &, bool informWidgets=FALSE,
127 + const char* className = 0 ) QT_WEAK_SYMBOL; 581 + const char* className = 0 ) QT_WEAK_SYMBOL;
128+private: 582+private:
129 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, 583 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE,
130 const char* className = 0 ); 584 const char* className = 0 );
131 +public: 585 +public:
132 static QFontMetrics fontMetrics(); 586 static QFontMetrics fontMetrics();
133 587
134 QWidget *mainWidget() const; 588 QWidget *mainWidget() const;
135@@ -207,7 +222,10 @@ 589@@ -207,7 +222,10 @@
136 void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); 590 void qwsSetCustomColors( QRgb *colortable, int start, int numColors );
137 #ifndef QT_NO_QWS_MANAGER 591 #ifndef QT_NO_QWS_MANAGER
138 static QWSDecoration &qwsDecoration(); 592 static QWSDecoration &qwsDecoration();
139- static void qwsSetDecoration( QWSDecoration *); 593- static void qwsSetDecoration( QWSDecoration *);
140+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; 594+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL;
141+private: 595+private:
142+ static void qwsSetDecoration_NonWeak( QWSDecoration *); 596+ static void qwsSetDecoration_NonWeak( QWSDecoration *);
143+public: 597+public:
144 #endif 598 #endif
145 #endif 599 #endif
146 600
147 --- qt-2.3.7/src/kernel/qapplication_qws.cpp~qte237-all2003-07-17 03:20:25.000000000 +0200 601diff -ur qt-2.3.7-old/src/kernel/qapplication_qws.cpp qt-2.3.7/src/kernel/qapplication_qws.cpp
148 +++ qt-2.3.7/src/kernel/qapplication_qws.cpp2004-04-15 21:06:51.234856703 +0200 602 --- qt-2.3.7-old/src/kernel/qapplication_qws.cpp2004-07-23 15:22:56.000000000 +0200
603 +++ qt-2.3.7/src/kernel/qapplication_qws.cpp2004-07-23 15:25:42.000000000 +0200
149@@ -2804,6 +2804,11 @@ 604@@ -2804,6 +2804,11 @@
150 */ 605 */
151 void QApplication::qwsSetDecoration( QWSDecoration *d ) 606 void QApplication::qwsSetDecoration( QWSDecoration *d )
152 { 607 {
153 +qwsSetDecoration_NonWeak ( d ); 608 +qwsSetDecoration_NonWeak ( d );
154+} 609+}
155+ 610+
156+void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d ) 611+void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d )
157+{ 612+{
158 if ( d ) { 613 if ( d ) {
159 delete qws_decoration; 614 delete qws_decoration;
160 qws_decoration = d; 615 qws_decoration = d;
161 --- qt-2.3.7/src/kernel/qfontdatabase.cpp~qte237-all2003-07-17 03:20:25.000000000 +0200 616diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.cpp qt-2.3.7/src/kernel/qfontdatabase.cpp
162 +++ qt-2.3.7/src/kernel/qfontdatabase.cpp2004-04-15 21:06:51.235856547 +0200 617 --- qt-2.3.7-old/src/kernel/qfontdatabase.cpp2004-07-23 15:22:56.000000000 +0200
618 +++ qt-2.3.7/src/kernel/qfontdatabase.cpp2004-07-23 15:25:42.000000000 +0200
163@@ -35,6 +35,8 @@ 619@@ -35,6 +35,8 @@
164 ** 620 **
165 **********************************************************************/ 621 **********************************************************************/
166 622
167+#define QT_WEAK_SYMBOL __attribute__(( weak )) 623+#define QT_WEAK_SYMBOL __attribute__(( weak ))
168+ 624+
169 #include "qfontdatabase.h" 625 #include "qfontdatabase.h"
170 626
171 #ifndef QT_NO_FONTDATABASE 627 #ifndef QT_NO_FONTDATABASE
172@@ -2424,6 +2426,13 @@ 628@@ -2424,6 +2426,13 @@
173 const QString &style, 629 const QString &style,
174 const QString &charSet ) 630 const QString &charSet )
175 { 631 {
176 +return pointSizes_NonWeak ( family, style, charSet ); 632 +return pointSizes_NonWeak ( family, style, charSet );
177+} 633+}
178+ 634+
179+QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family, 635+QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family,
180+ const QString &style, 636+ const QString &style,
181+ const QString &charSet ) 637+ const QString &charSet )
182+{ 638+{
183 QString cs( charSet ); 639 QString cs( charSet );
184 if ( charSet.isEmpty() ) { 640 if ( charSet.isEmpty() ) {
185 QStringList lst = charSets( family ); 641 QStringList lst = charSets( family );
186 --- qt-2.3.7/src/kernel/qfontdatabase.h~qte237-all2003-07-17 03:20:25.000000000 +0200 642diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.h qt-2.3.7/src/kernel/qfontdatabase.h
187 +++ qt-2.3.7/src/kernel/qfontdatabase.h2004-04-15 21:06:51.236856392 +0200 643 --- qt-2.3.7-old/src/kernel/qfontdatabase.h2004-07-23 15:22:56.000000000 +0200
644 +++ qt-2.3.7/src/kernel/qfontdatabase.h2004-07-23 15:25:42.000000000 +0200
188@@ -59,6 +59,10 @@ 645@@ -59,6 +59,10 @@
189 class QDiskFont; 646 class QDiskFont;
190 #endif 647 #endif
191 648
192+#if !defined( QT_WEAK_SYMBOL ) 649+#if !defined( QT_WEAK_SYMBOL )
193+#define QT_WEAK_SYMBOL 650+#define QT_WEAK_SYMBOL
194+#endif 651+#endif
195+ 652+
196 class QFontDatabasePrivate; 653 class QFontDatabasePrivate;
197 654
198 class Q_EXPORT QFontDatabase 655 class Q_EXPORT QFontDatabase
199@@ -67,9 +71,16 @@ 656@@ -67,9 +71,16 @@
200 QFontDatabase(); 657 QFontDatabase();
201 658
202 QStringList families( bool onlyForLocale = TRUE ) const; 659 QStringList families( bool onlyForLocale = TRUE ) const;
203+ 660+
204+ 661+
205 QValueList<int> pointSizes( const QString &family, 662 QValueList<int> pointSizes( const QString &family,
206 const QString &style = QString::null, 663 const QString &style = QString::null,
207 - const QString &charSet = QString::null ); 664 - const QString &charSet = QString::null );
208 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL; 665 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL;
209+private: 666+private:
210+ QValueList<int> pointSizes_NonWeak( const QString &family, 667+ QValueList<int> pointSizes_NonWeak( const QString &family,
211 + const QString &style, 668 + const QString &style,
212 + const QString &charSet ); 669 + const QString &charSet );
213+public: 670+public:
214 QStringList styles( const QString &family, 671 QStringList styles( const QString &family,
215 const QString &charSet = QString::null ) const; 672 const QString &charSet = QString::null ) const;
216 QStringList charSets( const QString &familyName, 673 QStringList charSets( const QString &familyName,
217 --- qt-2.3.7/src/kernel/qgfxraster_qws.cpp~qte237-all2003-07-17 03:20:25.000000000 +0200 674diff -ur qt-2.3.7-old/src/kernel/qgfxtransformed_qws.cpp qt-2.3.7/src/kernel/qgfxtransformed_qws.cpp
218 +++ qt-2.3.7/src/kernel/qgfxraster_qws.cpp2004-04-15 21:06:51.238856081 +0200 675 --- qt-2.3.7-old/src/kernel/qgfxtransformed_qws.cpp2004-07-23 15:22:56.000000000 +0200
219@@ -4237,7 +4237,7 @@ 676 +++ qt-2.3.7/src/kernel/qgfxtransformed_qws.cpp2004-07-23 15:42:01.000000000 +0200
220 setAlphaType(IgnoreAlpha); 677@@ -671,11 +671,11 @@
221 if ( w <= 0 || h <= 0 || !ncliprect ) return; 678 inline int tx( int x, int y ) {
222 GFX_START(QRect(rx+xoffs, ry+yoffs, w+1, h+1)) 679 switch ( qt_trans_screen->transformation() ) {
223-#ifdef QWS_EXPERIMENTAL_FASTPATH 680 case QTransformedScreen::Rot90:
224+#if 0 // def QWS_EXPERIMENTAL_FASTPATH !! this is crashing HancomWord on OZ !! 681 - return y - xoffs + yoffs;
225 // ### fix for 8bpp 682 + return y - this->xoffs + this->yoffs;
226 // This seems to be reliable now, at least for 16bpp 683 case QTransformedScreen::Rot180:
227 684 - return (width - x - 1) - xoffs - xoffs;
228 --- qt-2.3.7/src/kernel/qwindowsystem_qws.cpp~qte237-all2003-07-17 03:20:26.000000000 +0200 685 + return (this->width - x - 1) - this->xoffs - this->xoffs;
229 +++ qt-2.3.7/src/kernel/qwindowsystem_qws.cpp2004-04-15 21:06:51.240855770 +0200 686 case QTransformedScreen::Rot270:
687 - return (height - y - 1) - xoffs - yoffs;
688 + return (this->height - y - 1) - this->xoffs - this->yoffs;
689 default:
690 return x;
691 }
692@@ -683,11 +683,11 @@
693 inline int ty( int x, int y ) {
694 switch ( qt_trans_screen->transformation() ) {
695 case QTransformedScreen::Rot90:
696 - return (width - x - 1) - yoffs - xoffs;
697 + return (this->width - x - 1) - this->yoffs - this->xoffs;
698 case QTransformedScreen::Rot180:
699 - return (height - y - 1) - yoffs - yoffs;
700 + return (this->height - y - 1) - this->yoffs - this->yoffs;
701 case QTransformedScreen::Rot270:
702 - return x - yoffs + xoffs;
703 + return x - this->yoffs + this->xoffs;
704 default:
705 return y;
706 }
707@@ -715,23 +715,23 @@
708 template <const int depth, const int type>
709 void QGfxTransformedRaster<depth,type>::setSourceWidgetOffset(int x, int y)
710 {
711- if ( srcbits == buffer ) {
712+ if ( this->srcbits == this->buffer ) {
713 switch ( qt_trans_screen->transformation() ) {
714 case QTransformedScreen::Rot90:
715 - srcwidgetoffs = QPoint( y, width - x - srcwidth );
716 + this->srcwidgetoffs = QPoint( y, this->width - x - this->srcwidth );
717 break;
718 case QTransformedScreen::Rot180:
719 - srcwidgetoffs = QPoint( width - x - srcwidth, height - y - srcheight );
720 + this->srcwidgetoffs = QPoint( this->width - x - this->srcwidth, this->height - y - this->srcheight );
721 break;
722 case QTransformedScreen::Rot270:
723 - srcwidgetoffs = QPoint( height - y - srcheight, x );
724 + this->srcwidgetoffs = QPoint( this->height - y - this->srcheight, x );
725 break;
726 default:
727 - srcwidgetoffs = QPoint( x, y );
728 + this->srcwidgetoffs = QPoint( x, y );
729 break;
730 }
731 } else
732 -srcwidgetoffs = QPoint( x, y );
733 +this->srcwidgetoffs = QPoint( x, y );
734 }
735
736 template <const int depth, const int type>
737@@ -739,8 +739,8 @@
738 {
739 QT_TRANS_GFX_BASE<depth,type>::setSource(i);
740 QSize s = qt_screen->mapToDevice( QSize(i->width(), i->height()) );
741- srcwidth = s.width();
742- srcheight = s.height();
743+ this->srcwidth = s.width();
744+ this->srcheight = s.height();
745 }
746
747 template <const int depth, const int type>
748@@ -782,7 +782,7 @@
749 if ( w == 0 || h == 0 )
750 return;
751 QRect r( x, y, w, h );
752- if ( cbrush.style() == SolidPattern ) {
753+ if ( this->cbrush.style() == Qt::SolidPattern ) {
754 r.setCoords( tx(x,y), ty(x,y), tx(x+w-1,y+h-1), ty(x+w-1,y+h-1) );
755 r = r.normalize();
756 }
757@@ -797,7 +797,7 @@
758 // solution. The brush offset logic is complicated enough, so we don't
759 // fastpath patternedbrush.
760
761- if ( inDraw || cpen.style()==NoPen || patternedbrush ) {
762+ if ( inDraw || this->cpen.style()==Qt::NoPen || this->patternedbrush ) {
763 //slowpath
764 QT_TRANS_GFX_BASE<depth,type>::drawPolygon( a, w, idx, num );
765 } else {
766@@ -819,29 +819,29 @@
767 template <const int depth, const int type>
768 void QGfxTransformedRaster<depth,type>::processSpans( int n, QPoint* point, int* width )
769 {
770- if ( inDraw || patternedbrush && srcwidth != 0 && srcheight != 0 ) {
771+ if ( inDraw || this->patternedbrush && this->srcwidth != 0 && this->srcheight != 0 ) {
772 //in the patternedbrush case, we let blt do the transformation
773 // so we leave inDraw false.
774 - QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width );
775 +QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width );
776 } else {
777 inDraw = TRUE;
778 while (n--) {
779 if ( *width > 0 ) {
780 - int x=tx(point->x(),point->y())+xoffs;
781 - int y=ty(point->x(),point->y())+yoffs;
782 + int x=tx(point->x(),point->y())+this->xoffs;
783 + int y=ty(point->x(),point->y())+this->yoffs;
784
785 switch( qt_trans_screen->transformation() ) {
786 case QTransformedScreen::Rot90:
787 - vline( x, y-(*width-1), y );
788 + this->vline( x, y-(*width-1), y );
789 break;
790 case QTransformedScreen::Rot180:
791 - hline( x - (*width-1), x, y );
792 + this->hline( x - (*width-1), x, y );
793 break;
794 case QTransformedScreen::Rot270:
795 - vline( x, y, y+*width-1 );
796 + this->vline( x, y, y+*width-1 );
797 break;
798 default:
799 - hline( x, x+*width-1, y );
800 + this->hline( x, x+*width-1, y );
801 break;
802 }
803 }
804@@ -896,14 +896,14 @@
805 switch ( qt_trans_screen->transformation() ) {
806 case QTransformedScreen::Rot90:
807 rsx = sy;
808 - rsy = srcwidth - sx - w;
809 + rsy = this->srcwidth - sx - w;
810 break;
811 case QTransformedScreen::Rot180:
812 - rsx = srcwidth - sx - w;
813 - rsy = srcheight - sy - h;
814 + rsx = this->srcwidth - sx - w;
815 + rsy = this->srcheight - sy - h;
816 break;
817 case QTransformedScreen::Rot270:
818 - rsx = srcheight - sy - h;
819 + rsx = this->srcheight - sy - h;
820 rsy = sx;
821 break;
822 default:
823@@ -941,39 +941,39 @@
824 r.setCoords( tx(rx,ry), ty(rx,ry), tx(rx+w-1,ry+h-1), ty(rx+w-1,ry+h-1) );
825 r = r.normalize();
826
827- QPoint oldBrushOffs = brushoffs;
828+ QPoint oldBrushOffs = this->brushoffs;
829 int brx, bry;
830 switch ( qt_trans_screen->transformation() ) {
831 case QTransformedScreen::Rot90:
832 - brx = brushoffs.y();
833 - bry = srcwidth - brushoffs.x() - w;
834 + brx = this->brushoffs.y();
835 + bry = this->srcwidth - this->brushoffs.x() - w;
836 break;
837 case QTransformedScreen::Rot180:
838 - brx = srcwidth - brushoffs.x() - w;
839 - bry = srcheight - brushoffs.y() - h;
840 + brx = this->srcwidth - this->brushoffs.x() - w;
841 + bry = this->srcheight - this->brushoffs.y() - h;
842 break;
843 case QTransformedScreen::Rot270:
844 - brx = srcheight - brushoffs.y() - h;
845 - bry = brushoffs.x();
846 + brx = this->srcheight - this->brushoffs.y() - h;
847 + bry = this->brushoffs.x();
848 break;
849 default:
850 - brx = brushoffs.x();
851 - bry = brushoffs.y();
852 + brx = this->brushoffs.x();
853 + bry = this->brushoffs.y();
854 break;
855 }
856- brushoffs = QPoint( brx, bry );
857+ this->brushoffs = QPoint( brx, bry );
858
859- int oldsw = srcwidth;
860- int oldsh = srcheight;
861- QSize s = qt_screen->mapToDevice( QSize(srcwidth,srcheight) );
862- srcwidth = s.width();
863- srcheight = s.height();
864+ int oldsw = this->srcwidth;
865+ int oldsh = this->srcheight;
866+ QSize s = qt_screen->mapToDevice( QSize(this->srcwidth,this->srcheight) );
867+ this->srcwidth = s.width();
868+ this->srcheight = s.height();
869
870 QT_TRANS_GFX_BASE<depth,type>::tiledBlt( r.x(), r.y(), r.width(), r.height() );
871
872- srcwidth = oldsw;
873- srcheight = oldsh;
874- brushoffs = oldBrushOffs;
875+ this->srcwidth = oldsw;
876+ this->srcheight = oldsh;
877+ this->brushoffs = oldBrushOffs;
878 inDraw = FALSE;
879 }
880
881diff -ur qt-2.3.7-old/src/kernel/qgfxvfb_qws.cpp qt-2.3.7/src/kernel/qgfxvfb_qws.cpp
882 --- qt-2.3.7-old/src/kernel/qgfxvfb_qws.cpp2004-07-23 15:22:56.000000000 +0200
883 +++ qt-2.3.7/src/kernel/qgfxvfb_qws.cpp2004-07-23 15:42:01.000000000 +0200
884@@ -31,7 +31,6 @@
885 **********************************************************************/
886
887 #include "qgfxraster_qws.h"
888-
889 #ifndef QT_NO_QWS_VFB
890
891 #include <sys/ipc.h>
892@@ -140,8 +139,8 @@
893 void QGfxVFb<depth,type>::drawPoint( int x, int y )
894 {
895 QWSDisplay::grab( TRUE );
896- if ( is_screen_gfx )
897 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, 1, 1 ) );
898+ if ( this->is_screen_gfx )
899 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, 1, 1 ) );
900 QGfxRaster<depth,type>::drawPoint( x, y );
901 QWSDisplay::ungrab();
902 }
903@@ -150,8 +149,8 @@
904 void QGfxVFb<depth,type>::drawPoints( const QPointArray &pa,int x,int y )
905 {
906 QWSDisplay::grab( TRUE );
907- if ( is_screen_gfx )
908 -qvfb_screen->setDirty( clipbounds );
909+ if ( this->is_screen_gfx )
910 +qvfb_screen->setDirty( this->clipbounds );
911 QGfxRaster<depth,type>::drawPoints( pa, x, y );
912 QWSDisplay::ungrab();
913 }
914@@ -160,9 +159,9 @@
915 void QGfxVFb<depth,type>::drawLine( int x1,int y1,int x2,int y2 )
916 {
917 QWSDisplay::grab( TRUE );
918- if ( is_screen_gfx ) {
919+ if ( this->is_screen_gfx ) {
920 QRect r;
921 -r.setCoords( x1+xoffs, y1+yoffs, x2+xoffs, y2+yoffs );
922 +r.setCoords( x1+this->xoffs, y1+this->yoffs, x2+this->xoffs, y2+this->yoffs );
923 qvfb_screen->setDirty( r.normalize() );
924 }
925 QGfxRaster<depth,type>::drawLine( x1, y1, x2, y2 );
926@@ -173,8 +172,8 @@
927 void QGfxVFb<depth,type>::fillRect( int x,int y,int w,int h )
928 {
929 QWSDisplay::grab( TRUE );
930- if ( is_screen_gfx )
931 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) );
932+ if ( this->is_screen_gfx )
933 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) );
934 QGfxRaster<depth,type>::fillRect( x, y, w, h );
935 QWSDisplay::ungrab();
936 }
937@@ -183,8 +182,8 @@
938 void QGfxVFb<depth,type>::drawPolyline( const QPointArray &pa,int x,int y )
939 {
940 QWSDisplay::grab( TRUE );
941- if ( is_screen_gfx )
942 -qvfb_screen->setDirty( clipbounds );
943+ if ( this->is_screen_gfx )
944 +qvfb_screen->setDirty( this->clipbounds );
945 QGfxRaster<depth,type>::drawPolyline( pa, x, y );
946 QWSDisplay::ungrab();
947 }
948@@ -193,8 +192,8 @@
949 void QGfxVFb<depth,type>::drawPolygon( const QPointArray &pa,bool w,int x,int y )
950 {
951 QWSDisplay::grab( TRUE );
952- if ( is_screen_gfx )
953 -qvfb_screen->setDirty( clipbounds );
954+ if ( this->is_screen_gfx )
955 +qvfb_screen->setDirty( this->clipbounds );
956 QGfxRaster<depth,type>::drawPolygon( pa, w, x, y );
957 QWSDisplay::ungrab();
958 }
959@@ -203,8 +202,8 @@
960 void QGfxVFb<depth,type>::blt( int x,int y,int w,int h, int sx, int sy )
961 {
962 QWSDisplay::grab( TRUE );
963- if ( is_screen_gfx )
964 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) );
965+ if ( this->is_screen_gfx )
966 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) );
967 QGfxRaster<depth,type>::blt( x, y, w, h, sx, sy );
968 QWSDisplay::ungrab();
969 }
970@@ -215,8 +214,8 @@
971 QWSDisplay::grab( TRUE );
972 int dy = sy - y;
973 int dx = sx - x;
974- if ( is_screen_gfx )
975 -qvfb_screen->setDirty( QRect(QMIN(x,sx) + xoffs, QMIN(y,sy) + yoffs,
976+ if ( this->is_screen_gfx )
977 +qvfb_screen->setDirty( QRect(QMIN(x,sx) + this->xoffs, QMIN(y,sy) + this->yoffs,
978 w+abs(dx), h+abs(dy)) );
979 QGfxRaster<depth,type>::scroll( x, y, w, h, sx, sy );
980 QWSDisplay::ungrab();
981@@ -227,8 +226,8 @@
982 void QGfxVFb<depth,type>::stretchBlt( int x,int y,int w,int h,int sx,int sy )
983 {
984 QWSDisplay::grab( TRUE );
985- if ( is_screen_gfx )
986 -qvfb_screen->setDirty( QRect( x + xoffs, y + yoffs, w, h) );
987+ if ( this->is_screen_gfx )
988 +qvfb_screen->setDirty( QRect( x + this->xoffs, y + this->yoffs, w, h) );
989 QGfxRaster<depth,type>::stretchBlt( x, y, w, h, sx, sy );
990 QWSDisplay::ungrab();
991 }
992@@ -238,8 +237,8 @@
993 void QGfxVFb<depth,type>::tiledBlt( int x,int y,int w,int h )
994 {
995 QWSDisplay::grab( TRUE );
996- if ( is_screen_gfx )
997 -qvfb_screen->setDirty( QRect(x + xoffs, y + yoffs, w, h) );
998+ if ( this->is_screen_gfx )
999 +qvfb_screen->setDirty( QRect(x + this->xoffs, y + this->yoffs, w, h) );
1000 QGfxRaster<depth,type>::tiledBlt( x, y, w, h );
1001 QWSDisplay::ungrab();
1002 }
1003diff -ur qt-2.3.7-old/src/kernel/qkeyboard_qws.cpp qt-2.3.7/src/kernel/qkeyboard_qws.cpp
1004 --- qt-2.3.7-old/src/kernel/qkeyboard_qws.cpp2004-07-23 15:22:56.000000000 +0200
1005 +++ qt-2.3.7/src/kernel/qkeyboard_qws.cpp2004-07-23 15:33:46.000000000 +0200
1006@@ -238,7 +238,7 @@
1007 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 63
1008 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 64
1009 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 65
1010 - { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 66
1011+ { Qt::Key_F14, 0xffff , 0xffff , 0xffff }, // 66
1012 { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 67
1013 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 68
1014 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 69
1015diff -ur qt-2.3.7-old/src/kernel/qwindowsystem_qws.cpp qt-2.3.7/src/kernel/qwindowsystem_qws.cpp
1016 --- qt-2.3.7-old/src/kernel/qwindowsystem_qws.cpp2004-07-23 15:22:56.000000000 +0200
1017 +++ qt-2.3.7/src/kernel/qwindowsystem_qws.cpp2004-07-23 15:33:47.000000000 +0200
230@@ -844,6 +844,18 @@ 1018@@ -844,6 +844,18 @@
231 { 1019 {
232 } 1020 }
233 1021
234+static void catchSegvSignal( int ) 1022+static void catchSegvSignal( int )
235+{ 1023+{
236+#ifndef QT_NO_QWS_KEYBOARD 1024+#ifndef QT_NO_QWS_KEYBOARD
237+ if ( qwsServer ) 1025+ if ( qwsServer )
238 +qwsServer->closeKeyboard(); 1026 +qwsServer->closeKeyboard();
239+#endif 1027+#endif
240+ QWSServer::closedown(); 1028+ QWSServer::closedown();
241+ fprintf(stderr, "Segmentation fault.\n"); 1029+ fprintf(stderr, "Segmentation fault.\n");
242+ exit(1); 1030+ exit(1);
243+} 1031+}
244+ 1032+
245+ 1033+
246 /*! 1034 /*!
247 \class QWSServer qwindowsystem_qws.h 1035 \class QWSServer qwindowsystem_qws.h
248 \brief Server-specific functionality in Qt/Embedded 1036 \brief Server-specific functionality in Qt/Embedded
249@@ -936,6 +948,7 @@ 1037@@ -936,6 +948,7 @@
250 } 1038 }
251 1039
252 signal(SIGPIPE, ignoreSignal); //we get it when we read 1040 signal(SIGPIPE, ignoreSignal); //we get it when we read
253+ signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash 1041+ signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash
254 #endif 1042 #endif
255 focusw = 0; 1043 focusw = 0;
256 mouseGrabber = 0; 1044 mouseGrabber = 0;
257 --- qt-2.3.7/src/widgets/qcommonstyle.cpp~qte237-all2003-07-17 03:20:26.000000000 +0200 1045diff -ur qt-2.3.7-old/src/tools/qcstring.h qt-2.3.7/src/tools/qcstring.h
258 +++ qt-2.3.7/src/widgets/qcommonstyle.cpp2004-04-15 21:06:51.240855770 +0200 1046 --- qt-2.3.7-old/src/tools/qcstring.h2004-07-23 15:22:56.000000000 +0200
1047 +++ qt-2.3.7/src/tools/qcstring.h2004-07-23 15:42:01.000000000 +0200
1048@@ -119,7 +119,7 @@
1049 // We want to keep source compatibility for 2.x
1050 // ### TODO for 4.0: completely remove these and the cstr* functions
1051
1052-#if !defined(QT_GENUINE_STR)
1053+#if 0
1054
1055 #undefstrlen
1056 #define strlen qstrlen
1057diff -ur qt-2.3.7-old/src/tools/qglobal.h qt-2.3.7/src/tools/qglobal.h
1058 --- qt-2.3.7-old/src/tools/qglobal.h2004-07-23 15:22:56.000000000 +0200
1059 +++ qt-2.3.7/src/tools/qglobal.h2004-07-23 15:42:01.000000000 +0200
1060@@ -207,8 +207,16 @@
1061 #if __GNUC__ == 2 && __GNUC_MINOR__ == 96
1062 #define Q_FP_CCAST_BROKEN
1063 #endif
1064+/* ARM gcc pads structs to 32 bits, even when they contain a single
1065+ char, or short. We tell gcc to pack QChars to 16 bits, to avoid
1066+ QString bloat. However, gcc 3.4 doesn't allow us to create references to
1067+ members of a packed struct. (Pointers are OK, because then you
1068+ supposedly know what you are doing.) */
1069 #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
1070 #define Q_PACKED __attribute__ ((packed))
1071+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
1072+# define Q_NO_PACKED_REFERENCE
1073+# endif
1074 #endif
1075 #elif defined(__xlC__)
1076 #define _CC_XLC_
1077diff -ur qt-2.3.7-old/src/tools/qmodules.h qt-2.3.7/src/tools/qmodules.h
1078 --- qt-2.3.7-old/src/tools/qmodules.h2004-07-23 15:22:56.000000000 +0200
1079 +++ qt-2.3.7/src/tools/qmodules.h2004-07-23 16:03:09.000000000 +0200
1080@@ -1,14 +1,11 @@
1081-#ifndef QT_H
1082-#endif // QT_H
1083-
1084+// These modules are licensed to you
1085 #define QT_MODULE_TOOLS
1086 #define QT_MODULE_KERNEL
1087 #define QT_MODULE_WIDGETS
1088 #define QT_MODULE_DIALOGS
1089-
1090 #define QT_MODULE_ICONVIEW
1091 #define QT_MODULE_WORKSPACE
1092-#define QT_MODULE_TABLE
1093+#define QT_MODULE_NETWORK
1094 #define QT_MODULE_CANVAS
1095+#define QT_MODULE_TABLE
1096 #define QT_MODULE_XML
1097-#define QT_MODULE_NETWORK
1098diff -ur qt-2.3.7-old/src/tools/qsortedlist.h qt-2.3.7/src/tools/qsortedlist.h
1099 --- qt-2.3.7-old/src/tools/qsortedlist.h2004-07-23 15:22:56.000000000 +0200
1100 +++ qt-2.3.7/src/tools/qsortedlist.h2004-07-23 15:42:01.000000000 +0200
1101@@ -48,7 +48,7 @@
1102 public:
1103 QSortedList() {}
1104 QSortedList( const QSortedList<type> &l ) : QList<type>(l) {}
1105- ~QSortedList() { clear(); }
1106+ ~QSortedList() { this->clear(); }
1107 QSortedList<type> &operator=(const QSortedList<type> &l)
1108 { return (QSortedList<type>&)QList<type>::operator=(l); }
1109
1110diff -ur qt-2.3.7-old/src/tools/qstring.cpp qt-2.3.7/src/tools/qstring.cpp
1111 --- qt-2.3.7-old/src/tools/qstring.cpp2004-07-23 15:22:56.000000000 +0200
1112 +++ qt-2.3.7/src/tools/qstring.cpp2004-07-23 15:44:25.000000000 +0200
1113@@ -14469,7 +14469,11 @@
1114 return qt_winQString2MB( *this );
1115 #endif
1116 #ifdef _WS_QWS_
1117- return utf8(); // ##### if there is ANY 8 bit format supported?
1118+ QTextCodec* codec = QTextCodec::codecForLocale();
1119+ return codec
1120 + ? codec->fromUnicode(*this)
1121 + : utf8();
1122+ //return latin1(); // ##### if there is ANY 8 bit format supported?
1123 #endif
1124 #endif
1125 }
1126@@ -14515,7 +14519,12 @@
1127 return qt_winMB2QString( local8Bit );
1128 #endif
1129 #ifdef _WS_QWS_
1130- return fromUtf8(local8Bit,len);
1131+ QTextCodec* codec = QTextCodec::codecForLocale();
1132+ if( len < 0) len = qstrlen(local8Bit);
1133+ return codec
1134 + ? codec->toUnicode(local8Bit, len)
1135 + : QString::fromUtf8(local8Bit,len);
1136+// return fromLatin1(local8Bit,len);
1137 #endif
1138 #endif // QT_NO_TEXTCODEC
1139 }
1140diff -ur qt-2.3.7-old/src/tools/qstring.h qt-2.3.7/src/tools/qstring.h
1141 --- qt-2.3.7-old/src/tools/qstring.h2004-07-23 15:22:56.000000000 +0200
1142 +++ qt-2.3.7/src/tools/qstring.h2004-07-23 15:42:01.000000000 +0200
1143@@ -163,8 +163,16 @@
1144 bool isLetterOrNumber() const;
1145 bool isDigit() const;
1146
1147+
1148+#ifdef Q_NO_PACKED_REFERENCE
1149+ uchar& cell() { return *(&cl); }
1150+ uchar& row() { return *(&rw); }
1151+#else
1152 uchar& cell() { return cl; }
1153- uchar& row() { return rw; }
1154+ uchar& row() { return rw; }
1155+#endif
1156+
1157+
1158 uchar cell() const { return cl; }
1159 uchar row() const { return rw; }
1160
1161diff -ur qt-2.3.7-old/src/widgets/qcommonstyle.cpp qt-2.3.7/src/widgets/qcommonstyle.cpp
1162 --- qt-2.3.7-old/src/widgets/qcommonstyle.cpp2004-07-23 15:22:56.000000000 +0200
1163 +++ qt-2.3.7/src/widgets/qcommonstyle.cpp2004-07-23 15:38:13.000000000 +0200
259@@ -566,7 +566,7 @@ 1164@@ -566,7 +566,7 @@
260 bool enabled, bool active ) 1165 bool enabled, bool active )
261 { 1166 {
262 #ifndef QT_NO_MENUBAR 1167 #ifndef QT_NO_MENUBAR
263-#ifndef QT_NO_STYLE_SGI 1168-#ifndef QT_NO_STYLE_SGI
264+#if 1 // #ifndef QT_NO_STYLE_SGI 1169+#if 1 // #ifndef QT_NO_STYLE_SGI
265 if (draw_menu_bar_impl != 0) { 1170 if (draw_menu_bar_impl != 0) {
266 QDrawMenuBarItemImpl impl = draw_menu_bar_impl; 1171 QDrawMenuBarItemImpl impl = draw_menu_bar_impl;
267 (this->*impl)(p, x, y, w, h, mi, g, enabled, active); 1172 (this->*impl)(p, x, y, w, h, mi, g, enabled, active);
268 --- qt-2.3.7/src/widgets/qlistview.cpp~qte237-all2003-07-17 03:20:26.000000000 +0200 1173diff -ur qt-2.3.7-old/src/widgets/qlistview.cpp qt-2.3.7/src/widgets/qlistview.cpp
269 +++ qt-2.3.7/src/widgets/qlistview.cpp2004-04-15 21:06:51.243855303 +0200 1174 --- qt-2.3.7-old/src/widgets/qlistview.cpp2004-07-23 15:22:56.000000000 +0200
1175 +++ qt-2.3.7/src/widgets/qlistview.cpp2004-07-23 15:38:13.000000000 +0200
270@@ -4968,9 +4968,9 @@ 1176@@ -4968,9 +4968,9 @@
271 l = l->childItem ? l->childItem : l->siblingItem; 1177 l = l->childItem ? l->childItem : l->siblingItem;
272 1178
273 if ( l && l->height() ) 1179 if ( l && l->height() )
274 -s.setHeight( s.height() + 10 * l->height() ); 1180 -s.setHeight( s.height() + 10 * l->height() );
275- else 1181- else
276 -s.setHeight( s.height() + 140 ); 1182 -s.setHeight( s.height() + 140 );
277 +s.setHeight( s.height() + 4 /*10*/ * l->height() ); 1183 +s.setHeight( s.height() + 4 /*10*/ * l->height() );
278+ else // ^v much too big for handhelds 1184+ else // ^v much too big for handhelds
279 +s.setHeight( s.height() + 30 /*140*/ ); 1185 +s.setHeight( s.height() + 30 /*140*/ );
280 1186
281 if ( s.width() > s.height() * 3 ) 1187 if ( s.width() > s.height() * 3 )
282 s.setHeight( s.width() / 3 ); 1188 s.setHeight( s.width() / 3 );
283 --- qt-2.3.7/src/widgets/qtoolbutton.cpp~qte237-all2003-07-17 03:20:27.000000000 +0200 1189diff -ur qt-2.3.7-old/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp
284 +++ qt-2.3.7/src/widgets/qtoolbutton.cpp2004-04-15 21:06:51.243855303 +0200 1190 --- qt-2.3.7-old/src/widgets/qscrollview.cpp2004-07-23 19:25:18.000000000 +0200
1191 +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-07-23 19:23:10.000000000 +0200
1192@@ -526,15 +526,16 @@
1193 this, SLOT( doDragAutoScroll() ) );
1194 #endif
1195
1196- connect( &d->hbar, SIGNAL( valueChanged( int ) ),
1197 -this, SLOT( hslide( int ) ) );
1198- connect( &d->vbar, SIGNAL( valueChanged( int ) ),
1199 -this, SLOT( vslide( int ) ) );
1200+ connect( &d->hbar, SIGNAL( valueChanged(int) ),
1201 +this, SLOT( hslide(int) ) );
1202+ connect( &d->vbar, SIGNAL( valueChanged(int) ),
1203 +this, SLOT( vslide(int) ) );
1204 d->viewport.installEventFilter( this );
1205
1206 setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
1207 setLineWidth( style().defaultFrameWidth() );
1208 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
1209+
1210 }
1211
1212
1213@@ -683,6 +684,11 @@
1214 h-tmarg-bmarg - (showh ? hsbExt : 0) );
1215 }
1216
1217+/*
1218+ The surrounding environment (or application, if there is no
1219+ environment, may set this. Requires Qt >= 2.3.8.
1220+*/
1221+bool qt_left_hand_scrollbars = FALSE;
1222
1223 /*!
1224 Updates scrollbars - all possibilities considered. You should never
1225@@ -786,45 +792,50 @@
1226
1227 // Position the scrollbars, viewport, and corner widget.
1228 int bottom;
1229+ int xoffset = ( qt_left_hand_scrollbars && ( showv || cornerWidget() ) ) ? vsbExt : 0;
1230+ int xpos = qt_left_hand_scrollbars ? 0 : w-vsbExt;
1231+ xpos = (style() == WindowsStyle) && qt_left_hand_scrollbars ? xpos + fw : xpos - fw;
1232+ int ypos = tmarg;
1233+ ypos = (style() == WindowsStyle) ? ypos +fw : 0;
1234 if ( showh ) {
1235 int right = ( showv || cornerWidget() ) ? w-vsbExt : w;
1236 if ( style() == WindowsStyle )
1237- setHBarGeometry(d->hbar, fw, h-hsbExt-fw,
1238+ setHBarGeometry(d->hbar, fw + xoffset , h-hsbExt-fw,
1239 right-fw-fw, hsbExt );
1240 else
1241- setHBarGeometry(d->hbar, 0, h-hsbExt, right,
1242+ setHBarGeometry(d->hbar, 0+ xoffset, h-hsbExt, right,
1243 hsbExt );
1244 bottom=h-hsbExt;
1245 } else {
1246 bottom=h;
1247 }
1248 if ( showv ) {
1249 -clipper()->setGeometry( lmarg, tmarg,
1250 +clipper()->setGeometry( lmarg + xoffset, tmarg,
1251 w-vsbExt-lmarg-rmarg,
1252 bottom-tmarg-bmarg );
1253 d->viewportResized( w-vsbExt-lmarg-rmarg, bottom-tmarg-bmarg );
1254 if ( style() == WindowsStyle )
1255 - changeFrameRect(QRect(0, 0, w, h) );
1256 + changeFrameRect(QRect(xoffset, 0, w, h) );
1257 else
1258 - changeFrameRect(QRect(0, 0, w-vsbExt, bottom));
1259 + changeFrameRect(QRect(xoffset, 0, w-vsbExt, bottom));
1260 if (cornerWidget()) {
1261 if ( style() == WindowsStyle )
1262- setVBarGeometry( d->vbar, w-vsbExt-fw,
1263- fw, vsbExt,
1264- h-hsbExt-fw-fw );
1265+ setVBarGeometry( d->vbar, xpos,
1266+ ypos, vsbExt,
1267+ bottom-fw-ypos );
1268 else
1269- setVBarGeometry( d->vbar, w-vsbExt, 0,
1270+ setVBarGeometry( d->vbar, xpos, ypos,
1271 vsbExt,
1272- h-hsbExt );
1273+ bottom-ypos );
1274 }
1275 else {
1276 if ( style() == WindowsStyle )
1277- setVBarGeometry( d->vbar, w-vsbExt-fw,
1278- fw, vsbExt,
1279- bottom-fw-fw );
1280+ setVBarGeometry( d->vbar, xpos,
1281+ ypos, vsbExt,
1282+ bottom-fw-ypos );
1283 else
1284- setVBarGeometry( d->vbar, w-vsbExt, 0,
1285- vsbExt, bottom );
1286+ setVBarGeometry( d->vbar, xpos, ypos,
1287+ vsbExt, bottom-ypos );
1288 }
1289 } else {
1290 if ( style() == WindowsStyle )
1291@@ -837,12 +848,12 @@
1292 }
1293 if ( d->corner ) {
1294 if ( style() == WindowsStyle )
1295- d->corner->setGeometry( w-vsbExt-fw,
1296+ d->corner->setGeometry( xpos,
1297 h-hsbExt-fw,
1298 vsbExt,
1299 hsbExt );
1300 else
1301- d->corner->setGeometry( w-vsbExt,
1302+ d->corner->setGeometry( xpos,
1303 h-hsbExt,
1304 vsbExt,
1305 hsbExt );
1306@@ -1266,6 +1277,9 @@
1307 case QEvent::LayoutHint:
1308 d->autoResizeHint(this);
1309 break;
1310 +case QEvent::WindowActivate:
1311 +case QEvent::WindowDeactivate:
1312 + return TRUE;
1313 default:
1314 break;
1315 }
1316@@ -1675,7 +1689,7 @@
1317 }
1318
1319 /*!
1320- Scrolls the content by \a x to the left and \a y upwards.
1321+ Scrolls the content by \a dx to the left and \a dy upwards.
1322 */
1323 void QScrollView::scrollBy( int dx, int dy )
1324 {
1325diff -ur qt-2.3.7-old/src/widgets/qtoolbutton.cpp qt-2.3.7/src/widgets/qtoolbutton.cpp
1326 --- qt-2.3.7-old/src/widgets/qtoolbutton.cpp2004-07-23 15:22:56.000000000 +0200
1327 +++ qt-2.3.7/src/widgets/qtoolbutton.cpp2004-07-23 15:38:13.000000000 +0200
285@@ -230,7 +230,7 @@ 1328@@ -230,7 +230,7 @@
286 else 1329 else
287 QToolTip::add( this, textLabel ); 1330 QToolTip::add( this, textLabel );
288 } 1331 }
289 -#endif 1332 -#endif
290+#endif 1333+#endif
291 } 1334 }
292 1335
293 1336
294@@ -324,12 +324,12 @@ 1337@@ -324,12 +324,12 @@
295 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal); 1338 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal);
296 w = pm.width(); 1339 w = pm.width();
297 h = pm.height(); 1340 h = pm.height();
298 -if ( w < 32 ) 1341 -if ( w < 32 )
299 - w = 32; 1342 - w = 32;
300 -if ( h < 32 ) 1343 -if ( h < 32 )
301 - h = 32; 1344 - h = 32;
302 +if ( w < 24 ) 1345 +if ( w < 24 )
303 + w = 24; 1346 + w = 24;
304 +if ( h < 24 ) 1347 +if ( h < 24 )
305 + h = 24; 1348 + h = 24;
306 } else { 1349 } else {
307 -w = h = 16; 1350 -w = h = 16;
308 +w = h = 14; 1351 +w = h = 14;
309 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal); 1352 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal);
310 w = pm.width(); 1353 w = pm.width();
311 h = pm.height(); 1354 h = pm.height();
312 --- qt-2.3.7/src/kernel/qkeyboard_qws.cpp~qte237-all2003-07-17 03:20:25.000000000 +0200
313 +++ qt-2.3.7/src/kernel/qkeyboard_qws.cpp2004-04-15 21:06:51.244855148 +0200
314@@ -238,7 +238,7 @@
315 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 63
316 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 64
317 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 65
318 - { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 66
319+ { Qt::Key_F14, 0xffff , 0xffff , 0xffff }, // 66
320 { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 67
321 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 68
322 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 69
323 --- qt-2.3.7/configs/linux-generic-g++-shared~qte237-all2003-07-17 03:23:08.000000000 +0200
324 +++ qt-2.3.7/configs/linux-generic-g++-shared2004-04-15 21:06:51.244855148 +0200
325@@ -36,7 +36,7 @@
326 SYSCONF_LIBS_YACC=
327
328 # Linking applications
329 -SYSCONF_LINK = gcc
330 +SYSCONF_LINK = g++
331 SYSCONF_LFLAGS =
332 SYSCONF_LIBS =
333
334 --- qt-2.3.7/configs/linux-generic-g++-shared-debug~qte237-all2003-07-17 03:23:08.000000000 +0200
335 +++ qt-2.3.7/configs/linux-generic-g++-shared-debug2004-04-15 21:06:51.244855148 +0200
336@@ -36,7 +36,7 @@
337 SYSCONF_LIBS_YACC=
338
339 # Linking applications
340 -SYSCONF_LINK = gcc
341 +SYSCONF_LINK = g++
342 SYSCONF_LFLAGS =
343 SYSCONF_LIBS =
344
345 --- qt-2.3.7/configs/linux-generic-g++-static~qte237-all2003-07-17 03:23:08.000000000 +0200
346 +++ qt-2.3.7/configs/linux-generic-g++-static2004-04-15 21:06:51.244855148 +0200
347@@ -36,7 +36,7 @@
348 SYSCONF_LIBS_YACC=
349
350 # Linking applications
351 -SYSCONF_LINK = gcc
352 +SYSCONF_LINK = g++
353 SYSCONF_LFLAGS =
354 SYSCONF_LIBS =
355
356 --- qt-2.3.7/configs/linux-generic-g++-static-debug~qte237-all2003-07-17 03:23:08.000000000 +0200
357 +++ qt-2.3.7/configs/linux-generic-g++-static-debug2004-04-15 21:06:51.245854992 +0200
358@@ -36,7 +36,7 @@
359 SYSCONF_LIBS_YACC=
360
361 # Linking applications
362 -SYSCONF_LINK = gcc
363 +SYSCONF_LINK = g++
364 SYSCONF_LFLAGS =
365 SYSCONF_LIBS =
366
367 --- qt-2.3.7/configs/linux-generic_rtti-g++-shared~qte237-all2003-07-17 03:23:08.000000000 +0200
368 +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared2004-04-15 21:06:51.245854992 +0200
369@@ -36,7 +36,7 @@
370 SYSCONF_LIBS_YACC=
371
372 # Linking applications
373 -SYSCONF_LINK = gcc
374 +SYSCONF_LINK = g++
375 SYSCONF_LFLAGS =
376 SYSCONF_LIBS =
377
378 --- qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug~qte237-all2003-07-17 03:23:08.000000000 +0200
379 +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug2004-04-15 21:06:51.245854992 +0200
380@@ -36,7 +36,7 @@
381 SYSCONF_LIBS_YACC=
382
383 # Linking applications
384 -SYSCONF_LINK = gcc
385 +SYSCONF_LINK = g++
386 SYSCONF_LFLAGS =
387 SYSCONF_LIBS =
388
389 --- qt-2.3.7/configs/linux-generic_rtti-g++-static~qte237-all2003-07-17 03:23:08.000000000 +0200
390 +++ qt-2.3.7/configs/linux-generic_rtti-g++-static2004-04-15 21:06:51.245854992 +0200
391@@ -36,7 +36,7 @@
392 SYSCONF_LIBS_YACC=
393
394 # Linking applications
395 -SYSCONF_LINK = gcc
396 +SYSCONF_LINK = g++
397 SYSCONF_LFLAGS =
398 SYSCONF_LIBS =
399
400 --- qt-2.3.7/configs/linux-generic_rtti-g++-static-debug~qte237-all2003-07-17 03:23:08.000000000 +0200
401 +++ qt-2.3.7/configs/linux-generic_rtti-g++-static-debug2004-04-15 21:06:51.245854992 +0200
402@@ -36,7 +36,7 @@
403 SYSCONF_LIBS_YACC=
404
405 # Linking applications
406 -SYSCONF_LINK = gcc
407 +SYSCONF_LINK = g++
408 SYSCONF_LFLAGS =
409 SYSCONF_LIBS =
410
411 --- qt-2.3.7/configs/linux-x86rtti-g++-shared~qte237-all2003-07-17 03:23:10.000000000 +0200
412 +++ qt-2.3.7/configs/linux-x86rtti-g++-shared2004-04-15 21:06:51.245854992 +0200
413@@ -36,7 +36,7 @@
414 SYSCONF_LIBS_YACC=
415
416 # Linking applications
417 -SYSCONF_LINK = gcc
418 +SYSCONF_LINK = g++
419 SYSCONF_LFLAGS =
420 SYSCONF_LIBS = -lm
421
422 --- qt-2.3.7/configs/linux-x86rtti-g++-shared-debug~qte237-all2003-07-17 03:23:10.000000000 +0200
423 +++ qt-2.3.7/configs/linux-x86rtti-g++-shared-debug2004-04-15 21:06:51.245854992 +0200
424@@ -36,7 +36,7 @@
425 SYSCONF_LIBS_YACC=
426
427 # Linking applications
428 -SYSCONF_LINK = gcc
429 +SYSCONF_LINK = g++
430 SYSCONF_LFLAGS =
431 SYSCONF_LIBS = -lm
432
433 --- qt-2.3.7/configs/linux-x86rtti-g++-static~qte237-all2003-07-17 03:23:10.000000000 +0200
434 +++ qt-2.3.7/configs/linux-x86rtti-g++-static2004-04-15 21:06:51.246854837 +0200
435@@ -36,7 +36,7 @@
436 SYSCONF_LIBS_YACC=
437
438 # Linking applications
439 -SYSCONF_LINK = gcc
440 +SYSCONF_LINK = g++
441 SYSCONF_LFLAGS =
442 SYSCONF_LIBS = -lm
443
444 --- qt-2.3.7/configs/linux-x86rtti-g++-static-debug~qte237-all2003-07-17 03:23:10.000000000 +0200
445 +++ qt-2.3.7/configs/linux-x86rtti-g++-static-debug2004-04-15 21:06:51.246854837 +0200
446@@ -36,7 +36,7 @@
447 SYSCONF_LIBS_YACC=
448
449 # Linking applications
450 -SYSCONF_LINK = gcc
451 +SYSCONF_LINK = g++
452 SYSCONF_LFLAGS =
453 SYSCONF_LIBS = -lm
454
455 --- qt-2.3.7/src/kernel/qimage.cpp~qte237-all2003-07-17 03:20:25.000000000 +0200
456 +++ qt-2.3.7/src/kernel/qimage.cpp2004-04-15 21:07:23.293869923 +0200
457@@ -2201,7 +2201,7 @@
458 t2 = srcHeight * dstWidth;
459
460 if (((sModeQStr == "ScaleMin") && (t1 > t2)) ||
461 - ((sModeQStr == "ScaleMax") && (t2 < t2))) {
462 + ((sModeQStr == "ScaleMax") && (t1 < t2))) {
463 dstHeight = t2 / srcWidth;
464 } else if (sModeQStr != "ScaleFree") {
465 dstWidth = t1 / srcHeight;
diff --git a/qt/qt-2.3.7.patch/qte237-allowoverride.patch b/qt/qt-2.3.7.patch/qte237-allowoverride.patch
new file mode 100644
index 0000000..e0629f6
--- a/dev/null
+++ b/qt/qt-2.3.7.patch/qte237-allowoverride.patch
@@ -0,0 +1,229 @@
1Qt2.3.5 -> Qt2.3.6 changed the meaning of point sizes they used
2to be multiplied with 10, some apps get confused by that and
3in Opie we allow to work around for specefic application
4
5Courtsey to Robert 'sandman' Griebl
6
7
8
9
10
11
12
13
14diff -ur qt-2.3.7-old/src/kernel/qapplication.cpp qt-2.3.7/src/kernel/qapplication.cpp
15 --- qt-2.3.7-old/src/kernel/qapplication.cpp2004-07-23 15:22:56.000000000 +0200
16 +++ qt-2.3.7/src/kernel/qapplication.cpp2004-07-23 15:25:42.000000000 +0200
17@@ -35,6 +35,8 @@
18 **
19 **********************************************************************/
20
21 +#define QT_WEAK_SYMBOL__attribute__(( weak ))
22+
23 #include "qobjectlist.h"
24 #include "qobjectdict.h"
25 #include "qapplication.h"
26@@ -933,11 +935,16 @@
27 #ifndef QT_NO_STYLE
28 void QApplication::setStyle( QStyle *style )
29 {
30 +setStyle_NonWeak ( style );
31+}
32+
33+void QApplication::setStyle_NonWeak( QStyle *style )
34+{
35 QStyle* old = app_style;
36- app_style = style;
37
38 if ( startingUp() ) {
39 delete old;
40 +app_style = style;
41 return;
42 }
43
44@@ -958,6 +965,8 @@
45 old->unPolish( qApp );
46 }
47
48+ app_style = style;
49+
50 // take care of possible palette requirements of certain gui
51 // styles. Do it before polishing the application since the style
52 // might call QApplication::setStyle() itself
53@@ -1184,13 +1193,30 @@
54 \sa QWidget::setPalette(), palette(), QStyle::polish()
55 */
56
57-void QApplication::setPalette( const QPalette &palette, bool informWidgets,
58+void QApplication::setPalette ( const QPalette &palette, bool informWidgets,
59 + const char* className )
60+{
61 +setPalette_NonWeak ( palette, informWidgets, className );
62+}
63+
64+void QApplication::setPalette_NonWeak ( const QPalette &palette, bool informWidgets,
65 const char* className )
66 {
67 QPalette pal = palette;
68 #ifndef QT_NO_STYLE
69- if ( !startingUp() )
70+ if ( !startingUp() ) {
71 qApp->style().polish( pal );// NB: non-const reference
72 +if ( className ) {
73 + // if we just polished a class specific palette (this normally
74 + // only called by qt_fix_tooltips - see below), we better re-
75 + // polish the global palette. Some styles like liquid can get
76 + // confused, because they can not detect if the polished palette
77 + // is the global one or only a class specific one.
78 + // (liquid uses this palette to calculate blending pixmaps)
79 + QPalette p = qApp-> palette ( );
80 + qApp->style().polish ( p );
81 +}
82+ }
83 #endif
84 bool all = FALSE;
85 if ( !className ) {
86@@ -1275,6 +1301,12 @@
87 void QApplication::setFont( const QFont &font, bool informWidgets,
88 const char* className )
89 {
90 +setFont_NonWeak ( font, informWidgets, className );
91+}
92+
93+void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets,
94 + const char* className )
95+{
96 bool all = FALSE;
97 if ( !className ) {
98 if ( !app_font ) {
99diff -ur qt-2.3.7-old/src/kernel/qapplication.h qt-2.3.7/src/kernel/qapplication.h
100 --- qt-2.3.7-old/src/kernel/qapplication.h2004-07-23 15:22:56.000000000 +0200
101 +++ qt-2.3.7/src/kernel/qapplication.h2004-07-23 15:25:42.000000000 +0200
102@@ -61,6 +61,10 @@
103 class QSemaphore;
104 #endif
105
106+#if !defined( QT_WEAK_SYMBOL )
107+#define QT_WEAK_SYMBOL
108+#endif
109+
110 // REMOVE IN 3.0 (just here for moc source compatibility)
111 #define QNonBaseApplication QApplication
112
113@@ -85,7 +89,10 @@
114
115 #ifndef QT_NO_STYLE
116 static QStyle &style();
117 - static void setStyle( QStyle* );
118 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL;
119+private:
120 +static void setStyle_NonWeak( QStyle* );
121+public:
122 #endif
123 #if 1/* OBSOLETE */
124 enum ColorMode { NormalColors, CustomColors };
125@@ -106,11 +113,19 @@
126 #ifndef QT_NO_PALETTE
127 static QPalette palette( const QWidget* = 0 );
128 static void setPalette( const QPalette &, bool informWidgets=FALSE,
129 + const char* className = 0 ) QT_WEAK_SYMBOL;
130+private:
131 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE,
132 const char* className = 0 );
133+public:
134 #endif
135 static QFont font( const QWidget* = 0 );
136 static void setFont( const QFont &, bool informWidgets=FALSE,
137 + const char* className = 0 ) QT_WEAK_SYMBOL;
138+private:
139 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE,
140 const char* className = 0 );
141 +public:
142 static QFontMetrics fontMetrics();
143
144 QWidget *mainWidget() const;
145@@ -207,7 +222,10 @@
146 void qwsSetCustomColors( QRgb *colortable, int start, int numColors );
147 #ifndef QT_NO_QWS_MANAGER
148 static QWSDecoration &qwsDecoration();
149- static void qwsSetDecoration( QWSDecoration *);
150+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL;
151+private:
152+ static void qwsSetDecoration_NonWeak( QWSDecoration *);
153+public:
154 #endif
155 #endif
156
157diff -ur qt-2.3.7-old/src/kernel/qapplication_qws.cpp qt-2.3.7/src/kernel/qapplication_qws.cpp
158 --- qt-2.3.7-old/src/kernel/qapplication_qws.cpp2004-07-23 15:22:56.000000000 +0200
159 +++ qt-2.3.7/src/kernel/qapplication_qws.cpp2004-07-23 15:25:42.000000000 +0200
160@@ -2804,6 +2804,11 @@
161 */
162 void QApplication::qwsSetDecoration( QWSDecoration *d )
163 {
164 +qwsSetDecoration_NonWeak ( d );
165+}
166+
167+void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d )
168+{
169 if ( d ) {
170 delete qws_decoration;
171 qws_decoration = d;
172diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.cpp qt-2.3.7/src/kernel/qfontdatabase.cpp
173 --- qt-2.3.7-old/src/kernel/qfontdatabase.cpp2004-07-23 15:22:56.000000000 +0200
174 +++ qt-2.3.7/src/kernel/qfontdatabase.cpp2004-07-23 15:25:42.000000000 +0200
175@@ -35,6 +35,8 @@
176 **
177 **********************************************************************/
178
179+#define QT_WEAK_SYMBOL __attribute__(( weak ))
180+
181 #include "qfontdatabase.h"
182
183 #ifndef QT_NO_FONTDATABASE
184@@ -2424,6 +2426,13 @@
185 const QString &style,
186 const QString &charSet )
187 {
188 +return pointSizes_NonWeak ( family, style, charSet );
189+}
190+
191+QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family,
192+ const QString &style,
193+ const QString &charSet )
194+{
195 QString cs( charSet );
196 if ( charSet.isEmpty() ) {
197 QStringList lst = charSets( family );
198diff -ur qt-2.3.7-old/src/kernel/qfontdatabase.h qt-2.3.7/src/kernel/qfontdatabase.h
199 --- qt-2.3.7-old/src/kernel/qfontdatabase.h2004-07-23 15:22:56.000000000 +0200
200 +++ qt-2.3.7/src/kernel/qfontdatabase.h2004-07-23 15:25:42.000000000 +0200
201@@ -59,6 +59,10 @@
202 class QDiskFont;
203 #endif
204
205+#if !defined( QT_WEAK_SYMBOL )
206+#define QT_WEAK_SYMBOL
207+#endif
208+
209 class QFontDatabasePrivate;
210
211 class Q_EXPORT QFontDatabase
212@@ -67,9 +71,16 @@
213 QFontDatabase();
214
215 QStringList families( bool onlyForLocale = TRUE ) const;
216+
217+
218 QValueList<int> pointSizes( const QString &family,
219 const QString &style = QString::null,
220 - const QString &charSet = QString::null );
221 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL;
222+private:
223+ QValueList<int> pointSizes_NonWeak( const QString &family,
224 + const QString &style,
225 + const QString &charSet );
226+public:
227 QStringList styles( const QString &family,
228 const QString &charSet = QString::null ) const;
229 QStringList charSets( const QString &familyName,
diff --git a/qt/qt-2.3.7.patch/qte237-g++-aslinker.patch b/qt/qt-2.3.7.patch/qte237-g++-aslinker.patch
new file mode 100644
index 0000000..1ae72e9
--- a/dev/null
+++ b/qt/qt-2.3.7.patch/qte237-g++-aslinker.patch
@@ -0,0 +1,161 @@
1GCC3 requires libstdc++ for virtual all C++ application
2linking with gcc would trigger unresolved symbols like
3new, delete, pure_virtual etc.
4
5This is the safe one which works with gcc2 and gcc3. If you do
6not want the stdc++ dependency link with gcc and add -lsupc++ to the
7library dependency
8
9
10
11
12
13
14
15
16
17
18diff -ur qt-2.3.7-old/configs/linux-generic-g++-shared qt-2.3.7/configs/linux-generic-g++-shared
19 --- qt-2.3.7-old/configs/linux-generic-g++-shared2004-07-23 15:22:56.000000000 +0200
20 +++ qt-2.3.7/configs/linux-generic-g++-shared2004-07-23 15:23:12.000000000 +0200
21@@ -36,7 +36,7 @@
22 SYSCONF_LIBS_YACC=
23
24 # Linking applications
25 -SYSCONF_LINK = gcc
26 +SYSCONF_LINK = g++
27 SYSCONF_LFLAGS =
28 SYSCONF_LIBS =
29
30diff -ur qt-2.3.7-old/configs/linux-generic-g++-shared-debug qt-2.3.7/configs/linux-generic-g++-shared-debug
31 --- qt-2.3.7-old/configs/linux-generic-g++-shared-debug2004-07-23 15:22:56.000000000 +0200
32 +++ qt-2.3.7/configs/linux-generic-g++-shared-debug2004-07-23 15:23:12.000000000 +0200
33@@ -36,7 +36,7 @@
34 SYSCONF_LIBS_YACC=
35
36 # Linking applications
37 -SYSCONF_LINK = gcc
38 +SYSCONF_LINK = g++
39 SYSCONF_LFLAGS =
40 SYSCONF_LIBS =
41
42diff -ur qt-2.3.7-old/configs/linux-generic-g++-static qt-2.3.7/configs/linux-generic-g++-static
43 --- qt-2.3.7-old/configs/linux-generic-g++-static2004-07-23 15:22:56.000000000 +0200
44 +++ qt-2.3.7/configs/linux-generic-g++-static2004-07-23 15:23:12.000000000 +0200
45@@ -36,7 +36,7 @@
46 SYSCONF_LIBS_YACC=
47
48 # Linking applications
49 -SYSCONF_LINK = gcc
50 +SYSCONF_LINK = g++
51 SYSCONF_LFLAGS =
52 SYSCONF_LIBS =
53
54diff -ur qt-2.3.7-old/configs/linux-generic-g++-static-debug qt-2.3.7/configs/linux-generic-g++-static-debug
55 --- qt-2.3.7-old/configs/linux-generic-g++-static-debug2004-07-23 15:22:56.000000000 +0200
56 +++ qt-2.3.7/configs/linux-generic-g++-static-debug2004-07-23 15:23:12.000000000 +0200
57@@ -36,7 +36,7 @@
58 SYSCONF_LIBS_YACC=
59
60 # Linking applications
61 -SYSCONF_LINK = gcc
62 +SYSCONF_LINK = g++
63 SYSCONF_LFLAGS =
64 SYSCONF_LIBS =
65
66diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-shared qt-2.3.7/configs/linux-generic_rtti-g++-shared
67 --- qt-2.3.7-old/configs/linux-generic_rtti-g++-shared2004-07-23 15:22:56.000000000 +0200
68 +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared2004-07-23 15:23:12.000000000 +0200
69@@ -36,7 +36,7 @@
70 SYSCONF_LIBS_YACC=
71
72 # Linking applications
73 -SYSCONF_LINK = gcc
74 +SYSCONF_LINK = g++
75 SYSCONF_LFLAGS =
76 SYSCONF_LIBS =
77
78diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-shared-debug qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug
79 --- qt-2.3.7-old/configs/linux-generic_rtti-g++-shared-debug2004-07-23 15:22:56.000000000 +0200
80 +++ qt-2.3.7/configs/linux-generic_rtti-g++-shared-debug2004-07-23 15:23:12.000000000 +0200
81@@ -36,7 +36,7 @@
82 SYSCONF_LIBS_YACC=
83
84 # Linking applications
85 -SYSCONF_LINK = gcc
86 +SYSCONF_LINK = g++
87 SYSCONF_LFLAGS =
88 SYSCONF_LIBS =
89
90diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-static qt-2.3.7/configs/linux-generic_rtti-g++-static
91 --- qt-2.3.7-old/configs/linux-generic_rtti-g++-static2004-07-23 15:22:56.000000000 +0200
92 +++ qt-2.3.7/configs/linux-generic_rtti-g++-static2004-07-23 15:23:12.000000000 +0200
93@@ -36,7 +36,7 @@
94 SYSCONF_LIBS_YACC=
95
96 # Linking applications
97 -SYSCONF_LINK = gcc
98 +SYSCONF_LINK = g++
99 SYSCONF_LFLAGS =
100 SYSCONF_LIBS =
101
102diff -ur qt-2.3.7-old/configs/linux-generic_rtti-g++-static-debug qt-2.3.7/configs/linux-generic_rtti-g++-static-debug
103 --- qt-2.3.7-old/configs/linux-generic_rtti-g++-static-debug2004-07-23 15:22:56.000000000 +0200
104 +++ qt-2.3.7/configs/linux-generic_rtti-g++-static-debug2004-07-23 15:23:12.000000000 +0200
105@@ -36,7 +36,7 @@
106 SYSCONF_LIBS_YACC=
107
108 # Linking applications
109 -SYSCONF_LINK = gcc
110 +SYSCONF_LINK = g++
111 SYSCONF_LFLAGS =
112 SYSCONF_LIBS =
113
114diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-shared qt-2.3.7/configs/linux-x86rtti-g++-shared
115 --- qt-2.3.7-old/configs/linux-x86rtti-g++-shared2004-07-23 15:22:56.000000000 +0200
116 +++ qt-2.3.7/configs/linux-x86rtti-g++-shared2004-07-23 15:23:12.000000000 +0200
117@@ -36,7 +36,7 @@
118 SYSCONF_LIBS_YACC=
119
120 # Linking applications
121 -SYSCONF_LINK = gcc
122 +SYSCONF_LINK = g++
123 SYSCONF_LFLAGS =
124 SYSCONF_LIBS = -lm
125
126diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-shared-debug qt-2.3.7/configs/linux-x86rtti-g++-shared-debug
127 --- qt-2.3.7-old/configs/linux-x86rtti-g++-shared-debug2004-07-23 15:22:56.000000000 +0200
128 +++ qt-2.3.7/configs/linux-x86rtti-g++-shared-debug2004-07-23 15:23:12.000000000 +0200
129@@ -36,7 +36,7 @@
130 SYSCONF_LIBS_YACC=
131
132 # Linking applications
133 -SYSCONF_LINK = gcc
134 +SYSCONF_LINK = g++
135 SYSCONF_LFLAGS =
136 SYSCONF_LIBS = -lm
137
138diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-static qt-2.3.7/configs/linux-x86rtti-g++-static
139 --- qt-2.3.7-old/configs/linux-x86rtti-g++-static2004-07-23 15:22:56.000000000 +0200
140 +++ qt-2.3.7/configs/linux-x86rtti-g++-static2004-07-23 15:23:12.000000000 +0200
141@@ -36,7 +36,7 @@
142 SYSCONF_LIBS_YACC=
143
144 # Linking applications
145 -SYSCONF_LINK = gcc
146 +SYSCONF_LINK = g++
147 SYSCONF_LFLAGS =
148 SYSCONF_LIBS = -lm
149
150diff -ur qt-2.3.7-old/configs/linux-x86rtti-g++-static-debug qt-2.3.7/configs/linux-x86rtti-g++-static-debug
151 --- qt-2.3.7-old/configs/linux-x86rtti-g++-static-debug2004-07-23 15:22:56.000000000 +0200
152 +++ qt-2.3.7/configs/linux-x86rtti-g++-static-debug2004-07-23 15:23:12.000000000 +0200
153@@ -36,7 +36,7 @@
154 SYSCONF_LIBS_YACC=
155
156 # Linking applications
157 -SYSCONF_LINK = gcc
158 +SYSCONF_LINK = g++
159 SYSCONF_LFLAGS =
160 SYSCONF_LIBS = -lm
161
diff --git a/qt/qt-2.3.7.patch/qte237-gcc34.patch b/qt/qt-2.3.7.patch/qte237-gcc34.patch
index 5abdd7f..856028d 100644
--- a/qt/qt-2.3.7.patch/qte237-gcc34.patch
+++ b/qt/qt-2.3.7.patch/qte237-gcc34.patch
@@ -13,85 +13,64 @@ diff -ur qt-2.3.7_clean/include/qcstring.h qt-2.3.7/include/qcstring.h
13diff -ur qt-2.3.7_clean/include/qglobal.h qt-2.3.7/include/qglobal.h 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 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 15 +++ qt-2.3.7/include/qglobal.h2004-06-04 02:29:41.000000000 +0200
16@@ -207,8 +207,16 @@ 16@@ -207,8 +207,16 @@
17 #if __GNUC__ == 2 && __GNUC_MINOR__ == 96 17 #if __GNUC__ == 2 && __GNUC_MINOR__ == 96
18 #define Q_FP_CCAST_BROKEN 18 #define Q_FP_CCAST_BROKEN
19 #endif 19 #endif
20+/* ARM gcc pads structs to 32 bits, even when they contain a single 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 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 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 23+ members of a packed struct. (Pointers are OK, because then you
24+ supposedly know what you are doing.) */ 24+ supposedly know what you are doing.) */
25 #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) 25 #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
26 #define Q_PACKED __attribute__ ((packed)) 26 #define Q_PACKED __attribute__ ((packed))
27+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 27+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
28+# define Q_NO_PACKED_REFERENCE 28+# define Q_NO_PACKED_REFERENCE
29+# endif 29+# endif
30 #endif 30 #endif
31 #elif defined(__xlC__) 31 #elif defined(__xlC__)
32 #define _CC_XLC_ 32 #define _CC_XLC_
33diff -ur qt-2.3.7_clean/include/qsortedlist.h qt-2.3.7/include/qsortedlist.h 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 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 35 +++ qt-2.3.7/include/qsortedlist.h2004-06-04 02:24:25.000000000 +0200
36@@ -48,7 +48,7 @@ 36@@ -48,7 +48,7 @@
37 public: 37 public:
38 QSortedList() {} 38 QSortedList() {}
39 QSortedList( const QSortedList<type> &l ) : QList<type>(l) {} 39 QSortedList( const QSortedList<type> &l ) : QList<type>(l) {}
40- ~QSortedList() { clear(); } 40- ~QSortedList() { clear(); }
41+ ~QSortedList() { this->clear(); } 41+ ~QSortedList() { this->clear(); }
42 QSortedList<type> &operator=(const QSortedList<type> &l) 42 QSortedList<type> &operator=(const QSortedList<type> &l)
43 { return (QSortedList<type>&)QList<type>::operator=(l); } 43 { return (QSortedList<type>&)QList<type>::operator=(l); }
44 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 45diff -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 46 --- 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 47 +++ qt-2.3.7/src/kernel/qgfxtransformed_qws.cpp2004-06-04 02:24:25.000000000 +0200
69@@ -671,11 +671,11 @@ 48@@ -671,11 +671,11 @@
70 inline int tx( int x, int y ) { 49 inline int tx( int x, int y ) {
71 switch ( qt_trans_screen->transformation() ) { 50 switch ( qt_trans_screen->transformation() ) {
72 case QTransformedScreen::Rot90: 51 case QTransformedScreen::Rot90:
73 - return y - xoffs + yoffs; 52 - return y - xoffs + yoffs;
74 + return y - this->xoffs + this->yoffs; 53 + return y - this->xoffs + this->yoffs;
75 case QTransformedScreen::Rot180: 54 case QTransformedScreen::Rot180:
76 - return (width - x - 1) - xoffs - xoffs; 55 - return (width - x - 1) - xoffs - xoffs;
77 + return (this->width - x - 1) - this->xoffs - this->xoffs; 56 + return (this->width - x - 1) - this->xoffs - this->xoffs;
78 case QTransformedScreen::Rot270: 57 case QTransformedScreen::Rot270:
79 - return (height - y - 1) - xoffs - yoffs; 58 - return (height - y - 1) - xoffs - yoffs;
80 + return (this->height - y - 1) - this->xoffs - this->yoffs; 59 + return (this->height - y - 1) - this->xoffs - this->yoffs;
81 default: 60 default:
82 return x; 61 return x;
83 } 62 }
84@@ -683,11 +683,11 @@ 63@@ -683,11 +683,11 @@
85 inline int ty( int x, int y ) { 64 inline int ty( int x, int y ) {
86 switch ( qt_trans_screen->transformation() ) { 65 switch ( qt_trans_screen->transformation() ) {
87 case QTransformedScreen::Rot90: 66 case QTransformedScreen::Rot90:
88 - return (width - x - 1) - yoffs - xoffs; 67 - return (width - x - 1) - yoffs - xoffs;
89 + return (this->width - x - 1) - this->yoffs - this->xoffs; 68 + return (this->width - x - 1) - this->yoffs - this->xoffs;
90 case QTransformedScreen::Rot180: 69 case QTransformedScreen::Rot180:
91 - return (height - y - 1) - yoffs - yoffs; 70 - return (height - y - 1) - yoffs - yoffs;
92 + return (this->height - y - 1) - this->yoffs - this->yoffs; 71 + return (this->height - y - 1) - this->yoffs - this->yoffs;
93 case QTransformedScreen::Rot270: 72 case QTransformedScreen::Rot270:
94 - return x - yoffs + xoffs; 73 - return x - yoffs + xoffs;
95 + return x - this->yoffs + this->xoffs; 74 + return x - this->yoffs + this->xoffs;
96 default: 75 default:
97 return y; 76 return y;
diff --git a/qt/qt-2.3.7.patch/qte237-hancomwordcrash.patch b/qt/qt-2.3.7.patch/qte237-hancomwordcrash.patch
new file mode 100644
index 0000000..f5b26ea
--- a/dev/null
+++ b/qt/qt-2.3.7.patch/qte237-hancomwordcrash.patch
@@ -0,0 +1,14 @@
1Not included in the ALL patch
2
3
4 --- qt-2.3.7-old/src/kernel/qgfxraster_qws.cpp2004-07-23 15:22:56.000000000 +0200
5 +++ qt-2.3.7/src/kernel/qgfxraster_qws.cpp2004-07-23 15:29:16.000000000 +0200
6@@ -4237,7 +4237,7 @@
7 setAlphaType(IgnoreAlpha);
8 if ( w <= 0 || h <= 0 || !ncliprect ) return;
9 GFX_START(QRect(rx+xoffs, ry+yoffs, w+1, h+1))
10-#ifdef QWS_EXPERIMENTAL_FASTPATH
11+#if 0 // def QWS_EXPERIMENTAL_FASTPATH !! this is crashing HancomWord on OZ !!
12 // ### fix for 8bpp
13 // This seems to be reliable now, at least for 16bpp
14
diff --git a/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch b/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch
new file mode 100644
index 0000000..63e45ec
--- a/dev/null
+++ b/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch
@@ -0,0 +1,149 @@
1Speed up patches backported from
2
3http://robotics.dei.unipd.it/~koral/KDE/kflicker.html
4
5and
6
7http://lists.kde.org/?l=kde-optimize&m=105382164111363&w=2 (complete thread)
8
9
10
11
12diff -u qt-2.3.7_old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp
13 --- qt-2.3.7_old/src/iconview/qiconview.cpp2004-06-13 22:29:56.000000000 +0200
14 +++ qt-2.3.7/src/iconview/qiconview.cpp2004-06-13 22:33:32.000000000 +0200
15@@ -1,5 +1,5 @@
16 /****************************************************************************
17-** $Id$
18+** $Id$
19 **
20 ** Implementation of QIconView widget class
21 **
22@@ -220,6 +220,7 @@
23 QIconView::SelectionMode selectionMode;
24 QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor;
25 QRect *rubber;
26+ QPixmap *backBuffer;
27 QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer,
28 *fullRedrawTimer;
29 int rastX, rastY, spacing;
30@@ -2263,6 +2264,7 @@
31 d->currentItem = 0;
32 d->highlightedItem = 0;
33 d->rubber = 0;
34+ d->backBuffer = 0;
35 d->scrollTimer = 0;
36 d->startDragItem = 0;
37 d->tmpCurrentItem = 0;
38@@ -2411,6 +2413,8 @@
39 delete item;
40 item = tmp;
41 }
42+ delete d->backBuffer;
43+ d->backBuffer = 0;
44 delete d->fm;
45 d->fm = 0;
46 #ifndef QT_NO_TOOLTIP
47@@ -2877,6 +2881,48 @@
48 }
49
50 /*!
51+ This function grabs all paintevents that otherwise would have been
52+ processed by the QScrollView::viewportPaintEvent(). Here we use a
53+ doublebuffer to reduce 'on-paint' flickering on QIconView
54+ (and of course its childs).
55+
56+ \sa QScrollView::viewportPaintEvent(), QIconView::drawContents()
57+*/
58+
59+void QIconView::bufferedPaintEvent( QPaintEvent* pe )
60+{
61+ QWidget* vp = viewport();
62+ QRect r = pe->rect() & vp->rect();
63+ int ex = r.x() + contentsX();
64+ int ey = r.y() + contentsY();
65+ int ew = r.width();
66+ int eh = r.height();
67+
68+ if ( !d->backBuffer )
69 +d->backBuffer = new QPixmap(vp->size());
70+ if ( d->backBuffer->size() != vp->size() ) {
71 +//Resize function (with hysteesis). Uses a good compromise between memory
72 +//consumption and speed (number) of resizes.
73+ float newWidth = (float)vp->width();
74 +float newHeight = (float)vp->height();
75 +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() )
76 +{
77 + newWidth *= 1.1892;
78 + newHeight *= 1.1892;
79 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
80 +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() )
81 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
82+ }
83+
84+ QPainter p;
85+ p.begin(d->backBuffer, vp);
86+ drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh);
87+ p.end();
88+ bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh);
89+}
90+
91+/*!
92+
93 \reimp
94 */
95
96@@ -4855,7 +4901,7 @@
97 if ( !d->rubber )
98 drawDragShapes( d->oldDragPos );
99 }
100 - viewportPaintEvent( (QPaintEvent*)e );
101+ bufferedPaintEvent ((QPaintEvent*)e );
102 if ( d->dragging ) {
103 if ( !d->rubber )
104 drawDragShapes( d->oldDragPos );
105@@ -5286,11 +5332,19 @@
106 return;
107
108 if ( item->d->container1 && d->firstContainer ) {
109 -item->d->container1->items.removeRef( item );
110+ //Special-case checking of the last item, since this may be
111+ //called a few times for the same item.
112+ if (item->d->container1->items.last() == item)
113+ item->d->container1->items.removeLast();
114+ else
115+ item->d->container1->items.removeRef( item );
116 }
117 item->d->container1 = 0;
118 if ( item->d->container2 && d->firstContainer ) {
119 -item->d->container2->items.removeRef( item );
120+ if (item->d->container2->items.last() == item)
121+ item->d->container2->items.removeLast();
122+ else
123+ item->d->container2->items.removeRef( item );
124 }
125 item->d->container2 = 0;
126
127diff -u qt-2.3.7_old/src/iconview/qiconview.h qt-2.3.7/src/iconview/qiconview.h
128 --- qt-2.3.7_old/src/iconview/qiconview.h2004-06-13 22:29:56.000000000 +0200
129 +++ qt-2.3.7/src/iconview/qiconview.h2004-06-13 22:33:32.000000000 +0200
130@@ -444,6 +444,7 @@
131 virtual void contentsDropEvent( QDropEvent *e );
132 #endif
133
134+ void bufferedPaintEvent( QPaintEvent* );
135 virtual void resizeEvent( QResizeEvent* e );
136 virtual void keyPressEvent( QKeyEvent *e );
137 virtual void focusInEvent( QFocusEvent *e );
138 --- qt-2.3.7-old/src/widgets/qscrollview.cpp2004-07-23 15:22:56.000000000 +0200
139 +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-07-23 19:23:10.000000000 +0200
140@@ -1266,6 +1277,9 @@
141 case QEvent::LayoutHint:
142 d->autoResizeHint(this);
143 break;
144 +case QEvent::WindowActivate:
145 +case QEvent::WindowDeactivate:
146 + return TRUE;
147 default:
148 break;
149 }
diff --git a/qt/qt-2.3.7.patch/qte237-keyboard.patch b/qt/qt-2.3.7.patch/qte237-keyboard.patch
new file mode 100644
index 0000000..b644fd7
--- a/dev/null
+++ b/qt/qt-2.3.7.patch/qte237-keyboard.patch
@@ -0,0 +1,43 @@
1Free the Virtual Terminal and Keyboard on a segfault in all cases...
2
3
4 --- qt-2.3.7-old/src/kernel/qwindowsystem_qws.cpp2004-07-23 15:22:56.000000000 +0200
5 +++ qt-2.3.7/src/kernel/qwindowsystem_qws.cpp2004-07-23 15:33:47.000000000 +0200
6@@ -844,6 +844,18 @@
7 {
8 }
9
10+static void catchSegvSignal( int )
11+{
12+#ifndef QT_NO_QWS_KEYBOARD
13+ if ( qwsServer )
14 +qwsServer->closeKeyboard();
15+#endif
16+ QWSServer::closedown();
17+ fprintf(stderr, "Segmentation fault.\n");
18+ exit(1);
19+}
20+
21+
22 /*!
23 \class QWSServer qwindowsystem_qws.h
24 \brief Server-specific functionality in Qt/Embedded
25@@ -936,6 +948,7 @@
26 }
27
28 signal(SIGPIPE, ignoreSignal); //we get it when we read
29+ signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash
30 #endif
31 focusw = 0;
32 mouseGrabber = 0;
33 --- qt-2.3.7-old/src/kernel/qkeyboard_qws.cpp2004-07-23 15:22:56.000000000 +0200
34 +++ qt-2.3.7/src/kernel/qkeyboard_qws.cpp2004-07-23 15:33:46.000000000 +0200
35@@ -238,7 +238,7 @@
36 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 63
37 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 64
38 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 65
39 - { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 66
40+ { Qt::Key_F14, 0xffff , 0xffff , 0xffff }, // 66
41 { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 67
42 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 68
43 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 69
diff --git a/qt/qt-2.3.7.patch/qte237-lefthand.patch b/qt/qt-2.3.7.patch/qte237-lefthand.patch
index 0a0cccf..1287430 100644
--- a/qt/qt-2.3.7.patch/qte237-lefthand.patch
+++ b/qt/qt-2.3.7.patch/qte237-lefthand.patch
@@ -1,32 +1,39 @@
1Backport of the LeftHand patch from Qt2.3.8
2
3Puts Scrollbar on the left for people using the right hand
4to hold the devices
5
6
7
1diff -u qt-2.3.7_orig/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp 8diff -u qt-2.3.7_orig/src/widgets/qscrollview.cpp qt-2.3.7/src/widgets/qscrollview.cpp
2 --- qt-2.3.7_orig/src/widgets/qscrollview.cpp2004-06-13 20:42:54.000000000 +0200 9 --- qt-2.3.7_orig/src/widgets/qscrollview.cpp2004-06-13 20:42:54.000000000 +0200
3 +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-06-13 20:45:16.000000000 +0200 10 +++ qt-2.3.7/src/widgets/qscrollview.cpp2004-06-13 20:45:16.000000000 +0200
4@@ -526,15 +526,16 @@ 11@@ -526,15 +526,16 @@
5 this, SLOT( doDragAutoScroll() ) ); 12 this, SLOT( doDragAutoScroll() ) );
6 #endif 13 #endif
7 14
8- connect( &d->hbar, SIGNAL( valueChanged( int ) ), 15- connect( &d->hbar, SIGNAL( valueChanged( int ) ),
9 -this, SLOT( hslide( int ) ) ); 16 -this, SLOT( hslide( int ) ) );
10- connect( &d->vbar, SIGNAL( valueChanged( int ) ), 17- connect( &d->vbar, SIGNAL( valueChanged( int ) ),
11 -this, SLOT( vslide( int ) ) ); 18 -this, SLOT( vslide( int ) ) );
12+ connect( &d->hbar, SIGNAL( valueChanged(int) ), 19+ connect( &d->hbar, SIGNAL( valueChanged(int) ),
13 +this, SLOT( hslide(int) ) ); 20 +this, SLOT( hslide(int) ) );
14+ connect( &d->vbar, SIGNAL( valueChanged(int) ), 21+ connect( &d->vbar, SIGNAL( valueChanged(int) ),
15 +this, SLOT( vslide(int) ) ); 22 +this, SLOT( vslide(int) ) );
16 d->viewport.installEventFilter( this ); 23 d->viewport.installEventFilter( this );
17 24
18 setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); 25 setFrameStyle( QFrame::StyledPanel | QFrame::Sunken );
19 setLineWidth( style().defaultFrameWidth() ); 26 setLineWidth( style().defaultFrameWidth() );
20 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); 27 setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) );
21+ 28+
22 } 29 }
23 30
24 31
25@@ -683,6 +684,11 @@ 32@@ -683,6 +684,11 @@
26 h-tmarg-bmarg - (showh ? hsbExt : 0) ); 33 h-tmarg-bmarg - (showh ? hsbExt : 0) );
27 } 34 }
28 35
29+/* 36+/*
30+ The surrounding environment (or application, if there is no 37+ The surrounding environment (or application, if there is no
31+ environment, may set this. Requires Qt >= 2.3.8. 38+ environment, may set this. Requires Qt >= 2.3.8.
32+*/ 39+*/
diff --git a/qt/qt-2.3.8.patch/qte238-adjustsizes.patch b/qt/qt-2.3.8.patch/qte238-adjustsizes.patch
new file mode 100644
index 0000000..b2a7f7e
--- a/dev/null
+++ b/qt/qt-2.3.8.patch/qte238-adjustsizes.patch
@@ -0,0 +1,64 @@
1Qt was not created for 240x320 and we adjust some default values to be more
2sane for the usage on handhelds
3
4
5diff -ur qt-2.3.8-old/src/widgets/qcommonstyle.cpp qt-2.3.8/src/widgets/qcommonstyle.cpp
6 --- qt-2.3.8-old/src/widgets/qcommonstyle.cpp2004-07-22 01:07:44.000000000 +0200
7 +++ qt-2.3.8/src/widgets/qcommonstyle.cpp2004-07-23 16:15:16.000000000 +0200
8@@ -566,7 +566,7 @@
9 bool enabled, bool active )
10 {
11 #ifndef QT_NO_MENUBAR
12-#ifndef QT_NO_STYLE_SGI
13+#if 1 // #ifndef QT_NO_STYLE_SGI
14 if (draw_menu_bar_impl != 0) {
15 QDrawMenuBarItemImpl impl = draw_menu_bar_impl;
16 (this->*impl)(p, x, y, w, h, mi, g, enabled, active);
17diff -ur qt-2.3.8-old/src/widgets/qlistview.cpp qt-2.3.8/src/widgets/qlistview.cpp
18 --- qt-2.3.8-old/src/widgets/qlistview.cpp2004-07-22 01:07:44.000000000 +0200
19 +++ qt-2.3.8/src/widgets/qlistview.cpp2004-07-23 16:15:16.000000000 +0200
20@@ -5054,9 +5054,9 @@
21 l = l->childItem ? l->childItem : l->siblingItem;
22
23 if ( l && l->height() )
24 -s.setHeight( s.height() + 10 * l->height() );
25- else
26 -s.setHeight( s.height() + 140 );
27 +s.setHeight( s.height() + 4 /*10*/ * l->height() );
28+ else // ^v much too big for handhelds
29 +s.setHeight( s.height() + 30 /*140*/ );
30
31 if ( s.width() > s.height() * 3 )
32 s.setHeight( s.width() / 3 );
33Nur in qt-2.3.8/src/widgets/: qlistview.cpp.orig.
34diff -ur qt-2.3.8-old/src/widgets/qtoolbutton.cpp qt-2.3.8/src/widgets/qtoolbutton.cpp
35 --- qt-2.3.8-old/src/widgets/qtoolbutton.cpp2004-07-22 01:07:44.000000000 +0200
36 +++ qt-2.3.8/src/widgets/qtoolbutton.cpp2004-07-23 16:15:16.000000000 +0200
37@@ -232,7 +232,7 @@
38 else
39 QToolTip::add( this, textLabel );
40 }
41 -#endif
42+#endif
43 }
44
45
46@@ -326,12 +326,12 @@
47 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal);
48 w = pm.width();
49 h = pm.height();
50 -if ( w < 32 )
51 - w = 32;
52 -if ( h < 32 )
53 - h = 32;
54 +if ( w < 24 )
55 + w = 24;
56 +if ( h < 24 )
57 + h = 24;
58 } else {
59 -w = h = 16;
60 +w = h = 14;
61 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal);
62 w = pm.width();
63 h = pm.height();
64Nur in qt-2.3.8/src/widgets/: qtoolbutton.cpp.orig.
diff --git a/qt/qt-2.3.8.patch/qte238-all.patch b/qt/qt-2.3.8.patch/qte238-all.patch
index 931d3d8..3266f78 100644
--- a/qt/qt-2.3.8.patch/qte238-all.patch
+++ b/qt/qt-2.3.8.patch/qte238-all.patch
@@ -1,39 +1,322 @@
1 1diff -ur qt-2.3.8-old/include/qapplication.h qt-2.3.8/include/qapplication.h
2# 2 --- qt-2.3.8-old/include/qapplication.h2004-07-22 01:07:45.000000000 +0200
3# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher 3 +++ qt-2.3.8/include/qapplication.h2004-07-23 19:08:46.000000000 +0200
4# 4@@ -61,6 +61,10 @@
5 5 class QSemaphore;
6 --- qt-2.3.8-snapshot-20040706/src/kernel/qapplication.cpp~opie2004-07-06 01:07:38.000000000 +0200 6 #endif
7 +++ qt-2.3.8-snapshot-20040706/src/kernel/qapplication.cpp2004-07-06 23:53:12.000000000 +0200 7
8+#if !defined( QT_WEAK_SYMBOL )
9+#define QT_WEAK_SYMBOL
10+#endif
11+
12 // REMOVE IN 3.0 (just here for moc source compatibility)
13 #define QNonBaseApplication QApplication
14
15@@ -85,7 +89,10 @@
16
17 #ifndef QT_NO_STYLE
18 static QStyle &style();
19 - static void setStyle( QStyle* );
20 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL;
21+private:
22 +static void setStyle_NonWeak( QStyle* );
23+public:
24 #endif
25 #if 1/* OBSOLETE */
26 enum ColorMode { NormalColors, CustomColors };
27@@ -106,11 +113,19 @@
28 #ifndef QT_NO_PALETTE
29 static QPalette palette( const QWidget* = 0 );
30 static void setPalette( const QPalette &, bool informWidgets=FALSE,
31 + const char* className = 0 ) QT_WEAK_SYMBOL;
32+private:
33 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE,
34 const char* className = 0 );
35+public:
36 #endif
37 static QFont font( const QWidget* = 0 );
38 static void setFont( const QFont &, bool informWidgets=FALSE,
39 + const char* className = 0 ) QT_WEAK_SYMBOL;
40+private:
41 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE,
42 const char* className = 0 );
43 +public:
44 static QFontMetrics fontMetrics();
45
46 QWidget *mainWidget() const;
47@@ -207,7 +222,10 @@
48 void qwsSetCustomColors( QRgb *colortable, int start, int numColors );
49 #ifndef QT_NO_QWS_MANAGER
50 static QWSDecoration &qwsDecoration();
51- static void qwsSetDecoration( QWSDecoration *);
52+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL;
53+private:
54+ static void qwsSetDecoration_NonWeak( QWSDecoration *);
55+public:
56 #endif
57 #endif
58
59diff -ur qt-2.3.8-old/include/qcstring.h qt-2.3.8/include/qcstring.h
60 --- qt-2.3.8-old/include/qcstring.h2004-07-22 01:07:46.000000000 +0200
61 +++ qt-2.3.8/include/qcstring.h2004-07-23 19:09:55.000000000 +0200
62@@ -119,7 +119,7 @@
63 // We want to keep source compatibility for 2.x
64 // ### TODO for 4.0: completely remove these and the cstr* functions
65
66-#if !defined(QT_GENUINE_STR)
67+#if 0
68
69 #undefstrlen
70 #define strlen qstrlen
71diff -ur qt-2.3.8-old/include/qfontdatabase.h qt-2.3.8/include/qfontdatabase.h
72 --- qt-2.3.8-old/include/qfontdatabase.h2004-07-22 01:07:45.000000000 +0200
73 +++ qt-2.3.8/include/qfontdatabase.h2004-07-23 19:08:46.000000000 +0200
74@@ -59,6 +59,10 @@
75 class QDiskFont;
76 #endif
77
78+#if !defined( QT_WEAK_SYMBOL )
79+#define QT_WEAK_SYMBOL
80+#endif
81+
82 class QFontDatabasePrivate;
83
84 class Q_EXPORT QFontDatabase
85@@ -67,9 +71,16 @@
86 QFontDatabase();
87
88 QStringList families( bool onlyForLocale = TRUE ) const;
89+
90+
91 QValueList<int> pointSizes( const QString &family,
92 const QString &style = QString::null,
93 - const QString &charSet = QString::null );
94 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL;
95+private:
96+ QValueList<int> pointSizes_NonWeak( const QString &family,
97 + const QString &style,
98 + const QString &charSet );
99+public:
100 QStringList styles( const QString &family,
101 const QString &charSet = QString::null ) const;
102 QStringList charSets( const QString &familyName,
103diff -ur qt-2.3.8-old/include/qglobal.h qt-2.3.8/include/qglobal.h
104 --- qt-2.3.8-old/include/qglobal.h2004-07-22 01:07:46.000000000 +0200
105 +++ qt-2.3.8/include/qglobal.h2004-07-23 19:09:55.000000000 +0200
106@@ -207,8 +207,16 @@
107 #if __GNUC__ == 2 && __GNUC_MINOR__ == 96
108 #define Q_FP_CCAST_BROKEN
109 #endif
110+/* ARM gcc pads structs to 32 bits, even when they contain a single
111+ char, or short. We tell gcc to pack QChars to 16 bits, to avoid
112+ QString bloat. However, gcc 3.4 doesn't allow us to create references to
113+ members of a packed struct. (Pointers are OK, because then you
114+ supposedly know what you are doing.) */
115 #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
116 #define Q_PACKED __attribute__ ((packed))
117+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
118+# define Q_NO_PACKED_REFERENCE
119+# endif
120 #endif
121 #elif defined(__xlC__)
122 #define _CC_XLC_
123diff -ur qt-2.3.8-old/include/qiconview.h qt-2.3.8/include/qiconview.h
124 --- qt-2.3.8-old/include/qiconview.h2004-07-22 01:07:46.000000000 +0200
125 +++ qt-2.3.8/include/qiconview.h2004-07-23 19:13:09.000000000 +0200
126@@ -444,6 +444,7 @@
127 virtual void contentsDropEvent( QDropEvent *e );
128 #endif
129
130+ void bufferedPaintEvent( QPaintEvent* );
131 virtual void resizeEvent( QResizeEvent* e );
132 virtual void keyPressEvent( QKeyEvent *e );
133 virtual void focusInEvent( QFocusEvent *e );
134diff -ur qt-2.3.8-old/include/qsortedlist.h qt-2.3.8/include/qsortedlist.h
135 --- qt-2.3.8-old/include/qsortedlist.h2004-07-22 01:07:46.000000000 +0200
136 +++ qt-2.3.8/include/qsortedlist.h2004-07-23 19:09:55.000000000 +0200
137@@ -48,7 +48,7 @@
138 public:
139 QSortedList() {}
140 QSortedList( const QSortedList<type> &l ) : QList<type>(l) {}
141- ~QSortedList() { clear(); }
142+ ~QSortedList() { this->clear(); }
143 QSortedList<type> &operator=(const QSortedList<type> &l)
144 { return (QSortedList<type>&)QList<type>::operator=(l); }
145
146diff -ur qt-2.3.8-old/include/qstring.h qt-2.3.8/include/qstring.h
147 --- qt-2.3.8-old/include/qstring.h2004-07-22 01:07:46.000000000 +0200
148 +++ qt-2.3.8/include/qstring.h2004-07-23 19:09:55.000000000 +0200
149@@ -163,8 +163,16 @@
150 bool isLetterOrNumber() const;
151 bool isDigit() const;
152
153+
154+#ifdef Q_NO_PACKED_REFERENCE
155+ uchar& cell() { return *(&cl); }
156+ uchar& row() { return *(&rw); }
157+#else
158 uchar& cell() { return cl; }
159- uchar& row() { return rw; }
160+ uchar& row() { return rw; }
161+#endif
162+
163+
164 uchar cell() const { return cl; }
165 uchar row() const { return rw; }
166
167diff -ur qt-2.3.8-old/src/iconview/qiconview.cpp qt-2.3.8/src/iconview/qiconview.cpp
168 --- qt-2.3.8-old/src/iconview/qiconview.cpp2004-07-22 01:07:46.000000000 +0200
169 +++ qt-2.3.8/src/iconview/qiconview.cpp2004-07-23 19:13:09.000000000 +0200
170@@ -224,6 +224,7 @@
171 QIconView::SelectionMode selectionMode;
172 QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor;
173 QRect *rubber;
174+ QPixmap *backBuffer;
175 QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer,
176 *fullRedrawTimer;
177 int rastX, rastY, spacing;
178@@ -2267,6 +2268,7 @@
179 d->currentItem = 0;
180 d->highlightedItem = 0;
181 d->rubber = 0;
182+ d->backBuffer = 0;
183 d->scrollTimer = 0;
184 d->startDragItem = 0;
185 d->tmpCurrentItem = 0;
186@@ -2415,6 +2417,8 @@
187 delete item;
188 item = tmp;
189 }
190+ delete d->backBuffer;
191+ d->backBuffer = 0;
192 delete d->fm;
193 d->fm = 0;
194 #ifndef QT_NO_TOOLTIP
195@@ -2881,6 +2885,48 @@
196 }
197
198 /*!
199+ This function grabs all paintevents that otherwise would have been
200+ processed by the QScrollView::viewportPaintEvent(). Here we use a
201+ doublebuffer to reduce 'on-paint' flickering on QIconView
202+ (and of course its childs).
203+
204+ \sa QScrollView::viewportPaintEvent(), QIconView::drawContents()
205+*/
206+
207+void QIconView::bufferedPaintEvent( QPaintEvent* pe )
208+{
209+ QWidget* vp = viewport();
210+ QRect r = pe->rect() & vp->rect();
211+ int ex = r.x() + contentsX();
212+ int ey = r.y() + contentsY();
213+ int ew = r.width();
214+ int eh = r.height();
215+
216+ if ( !d->backBuffer )
217 +d->backBuffer = new QPixmap(vp->size());
218+ if ( d->backBuffer->size() != vp->size() ) {
219 +//Resize function (with hysteesis). Uses a good compromise between memory
220 +//consumption and speed (number) of resizes.
221+ float newWidth = (float)vp->width();
222 +float newHeight = (float)vp->height();
223 +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() )
224 +{
225 + newWidth *= 1.1892;
226 + newHeight *= 1.1892;
227 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
228 +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() )
229 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
230+ }
231+
232+ QPainter p;
233+ p.begin(d->backBuffer, vp);
234+ drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh);
235+ p.end();
236+ bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh);
237+}
238+
239+/*!
240+
241 \reimp
242 */
243
244@@ -4937,7 +4983,7 @@
245 if ( !d->rubber )
246 drawDragShapes( d->oldDragPos );
247 }
248 - viewportPaintEvent( (QPaintEvent*)e );
249+ bufferedPaintEvent ((QPaintEvent*)e );
250 if ( d->dragging ) {
251 if ( !d->rubber )
252 drawDragShapes( d->oldDragPos );
253@@ -5374,11 +5420,19 @@
254 return;
255
256 if ( item->d->container1 && d->firstContainer ) {
257 -item->d->container1->items.removeRef( item );
258+ //Special-case checking of the last item, since this may be
259+ //called a few times for the same item.
260+ if (item->d->container1->items.last() == item)
261+ item->d->container1->items.removeLast();
262+ else
263+ item->d->container1->items.removeRef( item );
264 }
265 item->d->container1 = 0;
266 if ( item->d->container2 && d->firstContainer ) {
267 -item->d->container2->items.removeRef( item );
268+ if (item->d->container2->items.last() == item)
269+ item->d->container2->items.removeLast();
270+ else
271+ item->d->container2->items.removeRef( item );
272 }
273 item->d->container2 = 0;
274
275Nur in qt-2.3.8/src/iconview: qiconview.cpp.orig.
276Nur in qt-2.3.8/src/iconview: qiconview.cpp.rej.
277diff -ur qt-2.3.8-old/src/iconview/qiconview.h qt-2.3.8/src/iconview/qiconview.h
278 --- qt-2.3.8-old/src/iconview/qiconview.h2004-07-22 01:07:46.000000000 +0200
279 +++ qt-2.3.8/src/iconview/qiconview.h2004-07-23 19:13:09.000000000 +0200
280@@ -444,6 +444,7 @@
281 virtual void contentsDropEvent( QDropEvent *e );
282 #endif
283
284+ void bufferedPaintEvent( QPaintEvent* );
285 virtual void resizeEvent( QResizeEvent* e );
286 virtual void keyPressEvent( QKeyEvent *e );
287 virtual void focusInEvent( QFocusEvent *e );
288diff -ur qt-2.3.8-old/src/kernel/qapplication.cpp qt-2.3.8/src/kernel/qapplication.cpp
289 --- qt-2.3.8-old/src/kernel/qapplication.cpp2004-07-22 01:07:46.000000000 +0200
290 +++ qt-2.3.8/src/kernel/qapplication.cpp2004-07-23 19:08:46.000000000 +0200
8@@ -35,6 +35,8 @@ 291@@ -35,6 +35,8 @@
9 ** 292 **
10 **********************************************************************/ 293 **********************************************************************/
11 294
12 +#define QT_WEAK_SYMBOL__attribute__(( weak )) 295 +#define QT_WEAK_SYMBOL__attribute__(( weak ))
13+ 296+
14 #include "qobjectlist.h" 297 #include "qobjectlist.h"
15 #include "qobjectdict.h" 298 #include "qobjectdict.h"
16 #include "qapplication.h" 299 #include "qapplication.h"
17@@ -936,11 +938,16 @@ 300@@ -936,11 +938,16 @@
18 #ifndef QT_NO_STYLE 301 #ifndef QT_NO_STYLE
19 void QApplication::setStyle( QStyle *style ) 302 void QApplication::setStyle( QStyle *style )
20 { 303 {
21 +setStyle_NonWeak ( style ); 304 +setStyle_NonWeak ( style );
22+} 305+}
23+ 306+
24+void QApplication::setStyle_NonWeak( QStyle *style ) 307+void QApplication::setStyle_NonWeak( QStyle *style )
25+{ 308+{
26 QStyle* old = app_style; 309 QStyle* old = app_style;
27- app_style = style; 310- app_style = style;
28 311
29 if ( startingUp() ) { 312 if ( startingUp() ) {
30 delete old; 313 delete old;
31 +app_style = style; 314 +app_style = style;
32 return; 315 return;
33 } 316 }
34 317
35@@ -961,6 +968,8 @@ 318@@ -961,6 +968,8 @@
36 old->unPolish( qApp ); 319 old->unPolish( qApp );
37 } 320 }
38 321
39+ app_style = style; 322+ app_style = style;
@@ -58,265 +341,719 @@
58 QPalette pal = palette; 341 QPalette pal = palette;
59 #ifndef QT_NO_STYLE 342 #ifndef QT_NO_STYLE
60- if ( !startingUp() ) 343- if ( !startingUp() )
61+ if ( !startingUp() ) { 344+ if ( !startingUp() ) {
62 qApp->style().polish( pal );// NB: non-const reference 345 qApp->style().polish( pal );// NB: non-const reference
63 +if ( className ) { 346 +if ( className ) {
64 + // if we just polished a class specific palette (this normally 347 + // if we just polished a class specific palette (this normally
65 + // only called by qt_fix_tooltips - see below), we better re- 348 + // only called by qt_fix_tooltips - see below), we better re-
66 + // polish the global palette. Some styles like liquid can get 349 + // polish the global palette. Some styles like liquid can get
67 + // confused, because they can not detect if the polished palette 350 + // confused, because they can not detect if the polished palette
68 + // is the global one or only a class specific one. 351 + // is the global one or only a class specific one.
69 + // (liquid uses this palette to calculate blending pixmaps) 352 + // (liquid uses this palette to calculate blending pixmaps)
70 + QPalette p = qApp-> palette ( ); 353 + QPalette p = qApp-> palette ( );
71 + qApp->style().polish ( p ); 354 + qApp->style().polish ( p );
72 +} 355 +}
73+ } 356+ }
74 #endif 357 #endif
75 bool all = FALSE; 358 bool all = FALSE;
76 if ( !className ) { 359 if ( !className ) {
77@@ -1278,6 +1304,12 @@ 360@@ -1278,6 +1304,12 @@
78 void QApplication::setFont( const QFont &font, bool informWidgets, 361 void QApplication::setFont( const QFont &font, bool informWidgets,
79 const char* className ) 362 const char* className )
80 { 363 {
81 +setFont_NonWeak ( font, informWidgets, className ); 364 +setFont_NonWeak ( font, informWidgets, className );
82+} 365+}
83+ 366+
84+void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets, 367+void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets,
85 + const char* className ) 368 + const char* className )
86+{ 369+{
87 bool all = FALSE; 370 bool all = FALSE;
88 if ( !className ) { 371 if ( !className ) {
89 if ( !app_font ) { 372 if ( !app_font ) {
90 --- qt-2.3.8-snapshot-20040706/src/kernel/qapplication.h~opie2004-07-06 01:07:38.000000000 +0200 373Nur in qt-2.3.8/src/kernel: qapplication.cpp.orig.
91 +++ qt-2.3.8-snapshot-20040706/src/kernel/qapplication.h2004-07-06 23:53:12.000000000 +0200 374diff -ur qt-2.3.8-old/src/kernel/qapplication.h qt-2.3.8/src/kernel/qapplication.h
375 --- qt-2.3.8-old/src/kernel/qapplication.h2004-07-22 01:07:45.000000000 +0200
376 +++ qt-2.3.8/src/kernel/qapplication.h2004-07-23 19:08:46.000000000 +0200
92@@ -61,6 +61,10 @@ 377@@ -61,6 +61,10 @@
93 class QSemaphore; 378 class QSemaphore;
94 #endif 379 #endif
95 380
96+#if !defined( QT_WEAK_SYMBOL ) 381+#if !defined( QT_WEAK_SYMBOL )
97+#define QT_WEAK_SYMBOL 382+#define QT_WEAK_SYMBOL
98+#endif 383+#endif
99+ 384+
100 // REMOVE IN 3.0 (just here for moc source compatibility) 385 // REMOVE IN 3.0 (just here for moc source compatibility)
101 #define QNonBaseApplication QApplication 386 #define QNonBaseApplication QApplication
102 387
103@@ -85,7 +89,10 @@ 388@@ -85,7 +89,10 @@
104 389
105 #ifndef QT_NO_STYLE 390 #ifndef QT_NO_STYLE
106 static QStyle &style(); 391 static QStyle &style();
107 - static void setStyle( QStyle* ); 392 - static void setStyle( QStyle* );
108 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL; 393 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL;
109+private: 394+private:
110 +static void setStyle_NonWeak( QStyle* ); 395 +static void setStyle_NonWeak( QStyle* );
111+public: 396+public:
112 #endif 397 #endif
113 #if 1/* OBSOLETE */ 398 #if 1/* OBSOLETE */
114 enum ColorMode { NormalColors, CustomColors }; 399 enum ColorMode { NormalColors, CustomColors };
115@@ -106,11 +113,19 @@ 400@@ -106,11 +113,19 @@
116 #ifndef QT_NO_PALETTE 401 #ifndef QT_NO_PALETTE
117 static QPalette palette( const QWidget* = 0 ); 402 static QPalette palette( const QWidget* = 0 );
118 static void setPalette( const QPalette &, bool informWidgets=FALSE, 403 static void setPalette( const QPalette &, bool informWidgets=FALSE,
119 + const char* className = 0 ) QT_WEAK_SYMBOL; 404 + const char* className = 0 ) QT_WEAK_SYMBOL;
120+private: 405+private:
121 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE, 406 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE,
122 const char* className = 0 ); 407 const char* className = 0 );
123+public: 408+public:
124 #endif 409 #endif
125 static QFont font( const QWidget* = 0 ); 410 static QFont font( const QWidget* = 0 );
126 static void setFont( const QFont &, bool informWidgets=FALSE, 411 static void setFont( const QFont &, bool informWidgets=FALSE,
127 + const char* className = 0 ) QT_WEAK_SYMBOL; 412 + const char* className = 0 ) QT_WEAK_SYMBOL;
128+private: 413+private:
129 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE, 414 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE,
130 const char* className = 0 ); 415 const char* className = 0 );
131 +public: 416 +public:
132 static QFontMetrics fontMetrics(); 417 static QFontMetrics fontMetrics();
133 418
134 QWidget *mainWidget() const; 419 QWidget *mainWidget() const;
135@@ -207,7 +222,10 @@ 420@@ -207,7 +222,10 @@
136 void qwsSetCustomColors( QRgb *colortable, int start, int numColors ); 421 void qwsSetCustomColors( QRgb *colortable, int start, int numColors );
137 #ifndef QT_NO_QWS_MANAGER 422 #ifndef QT_NO_QWS_MANAGER
138 static QWSDecoration &qwsDecoration(); 423 static QWSDecoration &qwsDecoration();
139- static void qwsSetDecoration( QWSDecoration *); 424- static void qwsSetDecoration( QWSDecoration *);
140+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL; 425+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL;
141+private: 426+private:
142+ static void qwsSetDecoration_NonWeak( QWSDecoration *); 427+ static void qwsSetDecoration_NonWeak( QWSDecoration *);
143+public: 428+public:
144 #endif 429 #endif
145 #endif 430 #endif
146 431
147 --- qt-2.3.8-snapshot-20040706/src/kernel/qapplication_qws.cpp~opie2004-07-06 23:37:08.000000000 +0200 432diff -ur qt-2.3.8-old/src/kernel/qapplication_qws.cpp qt-2.3.8/src/kernel/qapplication_qws.cpp
148 +++ qt-2.3.8-snapshot-20040706/src/kernel/qapplication_qws.cpp2004-07-06 23:53:12.000000000 +0200 433 --- qt-2.3.8-old/src/kernel/qapplication_qws.cpp2004-07-22 01:07:45.000000000 +0200
149@@ -2989,6 +2989,11 @@ 434 +++ qt-2.3.8/src/kernel/qapplication_qws.cpp2004-07-23 19:08:46.000000000 +0200
435@@ -2896,6 +2896,11 @@
150 */ 436 */
151 void QApplication::qwsSetDecoration( QWSDecoration *d ) 437 void QApplication::qwsSetDecoration( QWSDecoration *d )
152 { 438 {
153 +qwsSetDecoration_NonWeak ( d ); 439 +qwsSetDecoration_NonWeak ( d );
154+} 440+}
155+ 441+
156+void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d ) 442+void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d )
157+{ 443+{
158 if ( d ) { 444 if ( d ) {
159 delete qws_decoration; 445 delete qws_decoration;
160 qws_decoration = d; 446 qws_decoration = d;
161 --- qt-2.3.8-snapshot-20040706/src/kernel/qfontdatabase.cpp~opie2004-07-06 01:07:38.000000000 +0200 447Nur in qt-2.3.8/src/kernel: qapplication_qws.cpp.orig.
162 +++ qt-2.3.8-snapshot-20040706/src/kernel/qfontdatabase.cpp2004-07-06 23:53:12.000000000 +0200 448diff -ur qt-2.3.8-old/src/kernel/qfontdatabase.cpp qt-2.3.8/src/kernel/qfontdatabase.cpp
449 --- qt-2.3.8-old/src/kernel/qfontdatabase.cpp2004-07-22 01:07:45.000000000 +0200
450 +++ qt-2.3.8/src/kernel/qfontdatabase.cpp2004-07-23 19:08:46.000000000 +0200
163@@ -35,6 +35,8 @@ 451@@ -35,6 +35,8 @@
164 ** 452 **
165 **********************************************************************/ 453 **********************************************************************/
166 454
167+#define QT_WEAK_SYMBOL __attribute__(( weak )) 455+#define QT_WEAK_SYMBOL __attribute__(( weak ))
168+ 456+
169 #include "qfontdatabase.h" 457 #include "qfontdatabase.h"
170 458
171 #ifndef QT_NO_FONTDATABASE 459 #ifndef QT_NO_FONTDATABASE
172@@ -2424,6 +2426,13 @@ 460@@ -2424,6 +2426,13 @@
173 const QString &style, 461 const QString &style,
174 const QString &charSet ) 462 const QString &charSet )
175 { 463 {
176 +return pointSizes_NonWeak ( family, style, charSet ); 464 +return pointSizes_NonWeak ( family, style, charSet );
177+} 465+}
178+ 466+
179+QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family, 467+QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family,
180+ const QString &style, 468+ const QString &style,
181+ const QString &charSet ) 469+ const QString &charSet )
182+{ 470+{
183 QString cs( charSet ); 471 QString cs( charSet );
184 if ( charSet.isEmpty() ) { 472 if ( charSet.isEmpty() ) {
185 QStringList lst = charSets( family ); 473 QStringList lst = charSets( family );
186 --- qt-2.3.8-snapshot-20040706/src/kernel/qfontdatabase.h~opie2004-07-06 01:07:38.000000000 +0200 474diff -ur qt-2.3.8-old/src/kernel/qfontdatabase.h qt-2.3.8/src/kernel/qfontdatabase.h
187 +++ qt-2.3.8-snapshot-20040706/src/kernel/qfontdatabase.h2004-07-06 23:53:12.000000000 +0200 475 --- qt-2.3.8-old/src/kernel/qfontdatabase.h2004-07-22 01:07:45.000000000 +0200
476 +++ qt-2.3.8/src/kernel/qfontdatabase.h2004-07-23 19:08:46.000000000 +0200
188@@ -59,6 +59,10 @@ 477@@ -59,6 +59,10 @@
189 class QDiskFont; 478 class QDiskFont;
190 #endif 479 #endif
191 480
192+#if !defined( QT_WEAK_SYMBOL ) 481+#if !defined( QT_WEAK_SYMBOL )
193+#define QT_WEAK_SYMBOL 482+#define QT_WEAK_SYMBOL
194+#endif 483+#endif
195+ 484+
196 class QFontDatabasePrivate; 485 class QFontDatabasePrivate;
197 486
198 class Q_EXPORT QFontDatabase 487 class Q_EXPORT QFontDatabase
199@@ -67,9 +71,16 @@ 488@@ -67,9 +71,16 @@
200 QFontDatabase(); 489 QFontDatabase();
201 490
202 QStringList families( bool onlyForLocale = TRUE ) const; 491 QStringList families( bool onlyForLocale = TRUE ) const;
203+ 492+
204+ 493+
205 QValueList<int> pointSizes( const QString &family, 494 QValueList<int> pointSizes( const QString &family,
206 const QString &style = QString::null, 495 const QString &style = QString::null,
207 - const QString &charSet = QString::null ); 496 - const QString &charSet = QString::null );
208 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL; 497 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL;
209+private: 498+private:
210+ QValueList<int> pointSizes_NonWeak( const QString &family, 499+ QValueList<int> pointSizes_NonWeak( const QString &family,
211 + const QString &style, 500 + const QString &style,
212 + const QString &charSet ); 501 + const QString &charSet );
213+public: 502+public:
214 QStringList styles( const QString &family, 503 QStringList styles( const QString &family,
215 const QString &charSet = QString::null ) const; 504 const QString &charSet = QString::null ) const;
216 QStringList charSets( const QString &familyName, 505 QStringList charSets( const QString &familyName,
217 --- qt-2.3.8-snapshot-20040706/src/kernel/qgfxraster_qws.cpp~opie2004-07-06 01:07:38.000000000 +0200 506diff -ur qt-2.3.8-old/src/kernel/qgfxraster_qws.cpp qt-2.3.8/src/kernel/qgfxraster_qws.cpp
218 +++ qt-2.3.8-snapshot-20040706/src/kernel/qgfxraster_qws.cpp2004-07-06 23:53:12.000000000 +0200 507 --- qt-2.3.8-old/src/kernel/qgfxraster_qws.cpp2004-07-22 01:07:45.000000000 +0200
219@@ -4398,7 +4398,7 @@ 508 +++ qt-2.3.8/src/kernel/qgfxraster_qws.cpp2004-07-23 19:10:03.000000000 +0200
509@@ -4400,7 +4400,7 @@
220 setAlphaType(IgnoreAlpha); 510 setAlphaType(IgnoreAlpha);
221 if ( w <= 0 || h <= 0 || !ncliprect ) return; 511 if ( w <= 0 || h <= 0 || !ncliprect ) return;
222 GFX_START(QRect(rx+xoffs, ry+yoffs, w+1, h+1)) 512 GFX_START(QRect(rx+xoffs, ry+yoffs, w+1, h+1))
223-#ifdef QWS_EXPERIMENTAL_FASTPATH 513-#ifdef QWS_EXPERIMENTAL_FASTPATH
224+#if 0 // def QWS_EXPERIMENTAL_FASTPATH !! this is crashing HancomWord on OZ !! 514+#if 0 // def QWS_EXPERIMENTAL_FASTPATH !! this is crashing HancomWord on OZ !!
225 // ### fix for 8bpp 515 // ### fix for 8bpp
226 // This seems to be reliable now, at least for 16bpp 516 // This seems to be reliable now, at least for 16bpp
227 517
228 --- qt-2.3.8-snapshot-20040706/src/kernel/qkeyboard_qws.cpp~opie2004-07-06 23:37:08.000000000 +0200 518Nur in qt-2.3.8/src/kernel: qgfxraster_qws.cpp.orig.
229 +++ qt-2.3.8-snapshot-20040706/src/kernel/qkeyboard_qws.cpp2004-07-06 23:53:12.000000000 +0200 519diff -ur qt-2.3.8-old/src/kernel/qgfxtransformed_qws.cpp qt-2.3.8/src/kernel/qgfxtransformed_qws.cpp
520 --- qt-2.3.8-old/src/kernel/qgfxtransformed_qws.cpp2004-07-22 01:07:45.000000000 +0200
521 +++ qt-2.3.8/src/kernel/qgfxtransformed_qws.cpp2004-07-23 19:09:55.000000000 +0200
522@@ -671,11 +671,11 @@
523 inline int tx( int x, int y ) {
524 switch ( qt_trans_screen->transformation() ) {
525 case QTransformedScreen::Rot90:
526 - return y - xoffs + yoffs;
527 + return y - this->xoffs + this->yoffs;
528 case QTransformedScreen::Rot180:
529 - return (width - x - 1) - xoffs - xoffs;
530 + return (this->width - x - 1) - this->xoffs - this->xoffs;
531 case QTransformedScreen::Rot270:
532 - return (height - y - 1) - xoffs - yoffs;
533 + return (this->height - y - 1) - this->xoffs - this->yoffs;
534 default:
535 return x;
536 }
537@@ -683,11 +683,11 @@
538 inline int ty( int x, int y ) {
539 switch ( qt_trans_screen->transformation() ) {
540 case QTransformedScreen::Rot90:
541 - return (width - x - 1) - yoffs - xoffs;
542 + return (this->width - x - 1) - this->yoffs - this->xoffs;
543 case QTransformedScreen::Rot180:
544 - return (height - y - 1) - yoffs - yoffs;
545 + return (this->height - y - 1) - this->yoffs - this->yoffs;
546 case QTransformedScreen::Rot270:
547 - return x - yoffs + xoffs;
548 + return x - this->yoffs + this->xoffs;
549 default:
550 return y;
551 }
552@@ -715,23 +715,23 @@
553 template <const int depth, const int type>
554 void QGfxTransformedRaster<depth,type>::setSourceWidgetOffset(int x, int y)
555 {
556- if ( srcbits == buffer ) {
557+ if ( this->srcbits == this->buffer ) {
558 switch ( qt_trans_screen->transformation() ) {
559 case QTransformedScreen::Rot90:
560 - srcwidgetoffs = QPoint( y, width - x - srcwidth );
561 + this->srcwidgetoffs = QPoint( y, this->width - x - this->srcwidth );
562 break;
563 case QTransformedScreen::Rot180:
564 - srcwidgetoffs = QPoint( width - x - srcwidth, height - y - srcheight );
565 + this->srcwidgetoffs = QPoint( this->width - x - this->srcwidth, this->height - y - this->srcheight );
566 break;
567 case QTransformedScreen::Rot270:
568 - srcwidgetoffs = QPoint( height - y - srcheight, x );
569 + this->srcwidgetoffs = QPoint( this->height - y - this->srcheight, x );
570 break;
571 default:
572 - srcwidgetoffs = QPoint( x, y );
573 + this->srcwidgetoffs = QPoint( x, y );
574 break;
575 }
576 } else
577 -srcwidgetoffs = QPoint( x, y );
578 +this->srcwidgetoffs = QPoint( x, y );
579 }
580
581 template <const int depth, const int type>
582@@ -739,8 +739,8 @@
583 {
584 QT_TRANS_GFX_BASE<depth,type>::setSource(i);
585 QSize s = qt_screen->mapToDevice( QSize(i->width(), i->height()) );
586- srcwidth = s.width();
587- srcheight = s.height();
588+ this->srcwidth = s.width();
589+ this->srcheight = s.height();
590 }
591
592 template <const int depth, const int type>
593@@ -782,7 +782,7 @@
594 if ( w == 0 || h == 0 )
595 return;
596 QRect r( x, y, w, h );
597- if ( cbrush.style() == SolidPattern ) {
598+ if ( this->cbrush.style() == Qt::SolidPattern ) {
599 r.setCoords( tx(x,y), ty(x,y), tx(x+w-1,y+h-1), ty(x+w-1,y+h-1) );
600 r = r.normalize();
601 }
602@@ -797,7 +797,7 @@
603 // solution. The brush offset logic is complicated enough, so we don't
604 // fastpath patternedbrush.
605
606- if ( inDraw || cpen.style()==NoPen || patternedbrush ) {
607+ if ( inDraw || this->cpen.style()==Qt::NoPen || this->patternedbrush ) {
608 //slowpath
609 QT_TRANS_GFX_BASE<depth,type>::drawPolygon( a, w, idx, num );
610 } else {
611@@ -819,29 +819,29 @@
612 template <const int depth, const int type>
613 void QGfxTransformedRaster<depth,type>::processSpans( int n, QPoint* point, int* width )
614 {
615- if ( inDraw || patternedbrush && srcwidth != 0 && srcheight != 0 ) {
616+ if ( inDraw || this->patternedbrush && this->srcwidth != 0 && this->srcheight != 0 ) {
617 //in the patternedbrush case, we let blt do the transformation
618 // so we leave inDraw false.
619 - QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width );
620 +QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width );
621 } else {
622 inDraw = TRUE;
623 while (n--) {
624 if ( *width > 0 ) {
625 - int x=tx(point->x(),point->y())+xoffs;
626 - int y=ty(point->x(),point->y())+yoffs;
627 + int x=tx(point->x(),point->y())+this->xoffs;
628 + int y=ty(point->x(),point->y())+this->yoffs;
629
630 switch( qt_trans_screen->transformation() ) {
631 case QTransformedScreen::Rot90:
632 - vline( x, y-(*width-1), y );
633 + this->vline( x, y-(*width-1), y );
634 break;
635 case QTransformedScreen::Rot180:
636 - hline( x - (*width-1), x, y );
637 + this->hline( x - (*width-1), x, y );
638 break;
639 case QTransformedScreen::Rot270:
640 - vline( x, y, y+*width-1 );
641 + this->vline( x, y, y+*width-1 );
642 break;
643 default:
644 - hline( x, x+*width-1, y );
645 + this->hline( x, x+*width-1, y );
646 break;
647 }
648 }
649@@ -896,14 +896,14 @@
650 switch ( qt_trans_screen->transformation() ) {
651 case QTransformedScreen::Rot90:
652 rsx = sy;
653 - rsy = srcwidth - sx - w;
654 + rsy = this->srcwidth - sx - w;
655 break;
656 case QTransformedScreen::Rot180:
657 - rsx = srcwidth - sx - w;
658 - rsy = srcheight - sy - h;
659 + rsx = this->srcwidth - sx - w;
660 + rsy = this->srcheight - sy - h;
661 break;
662 case QTransformedScreen::Rot270:
663 - rsx = srcheight - sy - h;
664 + rsx = this->srcheight - sy - h;
665 rsy = sx;
666 break;
667 default:
668@@ -941,39 +941,39 @@
669 r.setCoords( tx(rx,ry), ty(rx,ry), tx(rx+w-1,ry+h-1), ty(rx+w-1,ry+h-1) );
670 r = r.normalize();
671
672- QPoint oldBrushOffs = brushoffs;
673+ QPoint oldBrushOffs = this->brushoffs;
674 int brx, bry;
675 switch ( qt_trans_screen->transformation() ) {
676 case QTransformedScreen::Rot90:
677 - brx = brushoffs.y();
678 - bry = srcwidth - brushoffs.x() - w;
679 + brx = this->brushoffs.y();
680 + bry = this->srcwidth - this->brushoffs.x() - w;
681 break;
682 case QTransformedScreen::Rot180:
683 - brx = srcwidth - brushoffs.x() - w;
684 - bry = srcheight - brushoffs.y() - h;
685 + brx = this->srcwidth - this->brushoffs.x() - w;
686 + bry = this->srcheight - this->brushoffs.y() - h;
687 break;
688 case QTransformedScreen::Rot270:
689 - brx = srcheight - brushoffs.y() - h;
690 - bry = brushoffs.x();
691 + brx = this->srcheight - this->brushoffs.y() - h;
692 + bry = this->brushoffs.x();
693 break;
694 default:
695 - brx = brushoffs.x();
696 - bry = brushoffs.y();
697 + brx = this->brushoffs.x();
698 + bry = this->brushoffs.y();
699 break;
700 }
701- brushoffs = QPoint( brx, bry );
702+ this->brushoffs = QPoint( brx, bry );
703
704- int oldsw = srcwidth;
705- int oldsh = srcheight;
706- QSize s = qt_screen->mapToDevice( QSize(srcwidth,srcheight) );
707- srcwidth = s.width();
708- srcheight = s.height();
709+ int oldsw = this->srcwidth;
710+ int oldsh = this->srcheight;
711+ QSize s = qt_screen->mapToDevice( QSize(this->srcwidth,this->srcheight) );
712+ this->srcwidth = s.width();
713+ this->srcheight = s.height();
714
715 QT_TRANS_GFX_BASE<depth,type>::tiledBlt( r.x(), r.y(), r.width(), r.height() );
716
717- srcwidth = oldsw;
718- srcheight = oldsh;
719- brushoffs = oldBrushOffs;
720+ this->srcwidth = oldsw;
721+ this->srcheight = oldsh;
722+ this->brushoffs = oldBrushOffs;
723 inDraw = FALSE;
724 }
725
726diff -ur qt-2.3.8-old/src/kernel/qgfxvfb_qws.cpp qt-2.3.8/src/kernel/qgfxvfb_qws.cpp
727 --- qt-2.3.8-old/src/kernel/qgfxvfb_qws.cpp2004-07-22 01:07:45.000000000 +0200
728 +++ qt-2.3.8/src/kernel/qgfxvfb_qws.cpp2004-07-23 19:09:55.000000000 +0200
729@@ -31,7 +31,6 @@
730 **********************************************************************/
731
732 #include "qgfxraster_qws.h"
733-
734 #ifndef QT_NO_QWS_VFB
735
736 #include <sys/ipc.h>
737@@ -140,8 +139,8 @@
738 void QGfxVFb<depth,type>::drawPoint( int x, int y )
739 {
740 QWSDisplay::grab( TRUE );
741- if ( is_screen_gfx )
742 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, 1, 1 ) );
743+ if ( this->is_screen_gfx )
744 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, 1, 1 ) );
745 QGfxRaster<depth,type>::drawPoint( x, y );
746 QWSDisplay::ungrab();
747 }
748@@ -150,8 +149,8 @@
749 void QGfxVFb<depth,type>::drawPoints( const QPointArray &pa,int x,int y )
750 {
751 QWSDisplay::grab( TRUE );
752- if ( is_screen_gfx )
753 -qvfb_screen->setDirty( clipbounds );
754+ if ( this->is_screen_gfx )
755 +qvfb_screen->setDirty( this->clipbounds );
756 QGfxRaster<depth,type>::drawPoints( pa, x, y );
757 QWSDisplay::ungrab();
758 }
759@@ -160,9 +159,9 @@
760 void QGfxVFb<depth,type>::drawLine( int x1,int y1,int x2,int y2 )
761 {
762 QWSDisplay::grab( TRUE );
763- if ( is_screen_gfx ) {
764+ if ( this->is_screen_gfx ) {
765 QRect r;
766 -r.setCoords( x1+xoffs, y1+yoffs, x2+xoffs, y2+yoffs );
767 +r.setCoords( x1+this->xoffs, y1+this->yoffs, x2+this->xoffs, y2+this->yoffs );
768 qvfb_screen->setDirty( r.normalize() );
769 }
770 QGfxRaster<depth,type>::drawLine( x1, y1, x2, y2 );
771@@ -173,8 +172,8 @@
772 void QGfxVFb<depth,type>::fillRect( int x,int y,int w,int h )
773 {
774 QWSDisplay::grab( TRUE );
775- if ( is_screen_gfx )
776 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) );
777+ if ( this->is_screen_gfx )
778 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) );
779 QGfxRaster<depth,type>::fillRect( x, y, w, h );
780 QWSDisplay::ungrab();
781 }
782@@ -183,8 +182,8 @@
783 void QGfxVFb<depth,type>::drawPolyline( const QPointArray &pa,int x,int y )
784 {
785 QWSDisplay::grab( TRUE );
786- if ( is_screen_gfx )
787 -qvfb_screen->setDirty( clipbounds );
788+ if ( this->is_screen_gfx )
789 +qvfb_screen->setDirty( this->clipbounds );
790 QGfxRaster<depth,type>::drawPolyline( pa, x, y );
791 QWSDisplay::ungrab();
792 }
793@@ -193,8 +192,8 @@
794 void QGfxVFb<depth,type>::drawPolygon( const QPointArray &pa,bool w,int x,int y )
795 {
796 QWSDisplay::grab( TRUE );
797- if ( is_screen_gfx )
798 -qvfb_screen->setDirty( clipbounds );
799+ if ( this->is_screen_gfx )
800 +qvfb_screen->setDirty( this->clipbounds );
801 QGfxRaster<depth,type>::drawPolygon( pa, w, x, y );
802 QWSDisplay::ungrab();
803 }
804@@ -203,8 +202,8 @@
805 void QGfxVFb<depth,type>::blt( int x,int y,int w,int h, int sx, int sy )
806 {
807 QWSDisplay::grab( TRUE );
808- if ( is_screen_gfx )
809 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) );
810+ if ( this->is_screen_gfx )
811 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) );
812 QGfxRaster<depth,type>::blt( x, y, w, h, sx, sy );
813 QWSDisplay::ungrab();
814 }
815@@ -215,8 +214,8 @@
816 QWSDisplay::grab( TRUE );
817 int dy = sy - y;
818 int dx = sx - x;
819- if ( is_screen_gfx )
820 -qvfb_screen->setDirty( QRect(QMIN(x,sx) + xoffs, QMIN(y,sy) + yoffs,
821+ if ( this->is_screen_gfx )
822 +qvfb_screen->setDirty( QRect(QMIN(x,sx) + this->xoffs, QMIN(y,sy) + this->yoffs,
823 w+abs(dx), h+abs(dy)) );
824 QGfxRaster<depth,type>::scroll( x, y, w, h, sx, sy );
825 QWSDisplay::ungrab();
826@@ -227,8 +226,8 @@
827 void QGfxVFb<depth,type>::stretchBlt( int x,int y,int w,int h,int sx,int sy )
828 {
829 QWSDisplay::grab( TRUE );
830- if ( is_screen_gfx )
831 -qvfb_screen->setDirty( QRect( x + xoffs, y + yoffs, w, h) );
832+ if ( this->is_screen_gfx )
833 +qvfb_screen->setDirty( QRect( x + this->xoffs, y + this->yoffs, w, h) );
834 QGfxRaster<depth,type>::stretchBlt( x, y, w, h, sx, sy );
835 QWSDisplay::ungrab();
836 }
837@@ -238,8 +237,8 @@
838 void QGfxVFb<depth,type>::tiledBlt( int x,int y,int w,int h )
839 {
840 QWSDisplay::grab( TRUE );
841- if ( is_screen_gfx )
842 -qvfb_screen->setDirty( QRect(x + xoffs, y + yoffs, w, h) );
843+ if ( this->is_screen_gfx )
844 +qvfb_screen->setDirty( QRect(x + this->xoffs, y + this->yoffs, w, h) );
845 QGfxRaster<depth,type>::tiledBlt( x, y, w, h );
846 QWSDisplay::ungrab();
847 }
848diff -ur qt-2.3.8-old/src/kernel/qkeyboard_qws.cpp qt-2.3.8/src/kernel/qkeyboard_qws.cpp
849 --- qt-2.3.8-old/src/kernel/qkeyboard_qws.cpp2004-07-22 01:07:45.000000000 +0200
850 +++ qt-2.3.8/src/kernel/qkeyboard_qws.cpp2004-07-23 19:15:51.000000000 +0200
230@@ -314,7 +314,7 @@ 851@@ -314,7 +314,7 @@
231 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 63 852 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 63
232 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 64 853 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 64
233 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 65 854 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 65
234 - { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 66 855 - { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 66
235+ { Qt::Key_F14, 0xffff , 0xffff , 0xffff }, // 66 856+ { Qt::Key_F14, 0xffff , 0xffff , 0xffff }, // 66
236 { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 67 857 { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 67
237 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 68 858 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 68
238 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 69 859 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 69
239 --- qt-2.3.8-snapshot-20040706/src/kernel/qwindowsystem_qws.cpp~opie2004-07-06 23:37:08.000000000 +0200 860Nur in qt-2.3.8/src/kernel: qkeyboard_qws.cpp.orig.
240 +++ qt-2.3.8-snapshot-20040706/src/kernel/qwindowsystem_qws.cpp2004-07-06 23:53:12.000000000 +0200 861diff -ur qt-2.3.8-old/src/kernel/qwindowsystem_qws.cpp qt-2.3.8/src/kernel/qwindowsystem_qws.cpp
241@@ -1158,6 +1158,18 @@ 862 --- qt-2.3.8-old/src/kernel/qwindowsystem_qws.cpp2004-07-22 01:07:45.000000000 +0200
863 +++ qt-2.3.8/src/kernel/qwindowsystem_qws.cpp2004-07-23 19:15:51.000000000 +0200
864@@ -1273,6 +1273,18 @@
242 { 865 {
243 } 866 }
244 867
245+static void catchSegvSignal( int ) 868+static void catchSegvSignal( int )
246+{ 869+{
247+#ifndef QT_NO_QWS_KEYBOARD 870+#ifndef QT_NO_QWS_KEYBOARD
248+ if ( qwsServer ) 871+ if ( qwsServer )
249 +qwsServer->closeKeyboard(); 872 +qwsServer->closeKeyboard();
250+#endif 873+#endif
251+ QWSServer::closedown(); 874+ QWSServer::closedown();
252+ fprintf(stderr, "Segmentation fault.\n"); 875+ fprintf(stderr, "Segmentation fault.\n");
253+ exit(1); 876+ exit(1);
254+} 877+}
255+ 878+
256+ 879+
257 /*! 880 /*!
258 \class QWSServer qwindowsystem_qws.h 881 \class QWSServer qwindowsystem_qws.h
259 \brief Server-specific functionality in Qt/Embedded 882 \brief Server-specific functionality in Qt/Embedded
260@@ -1250,6 +1262,7 @@ 883@@ -1365,6 +1377,7 @@
261 } 884 }
262 885
263 signal(SIGPIPE, ignoreSignal); //we get it when we read 886 signal(SIGPIPE, ignoreSignal); //we get it when we read
264+ signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash 887+ signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash
265 #endif 888 #endif
266 focusw = 0; 889 focusw = 0;
267 mouseGrabber = 0; 890 mouseGrabber = 0;
268 --- qt-2.3.8-snapshot-20040706/src/widgets/qcommonstyle.cpp~opie2004-07-06 01:07:37.000000000 +0200 891Nur in qt-2.3.8/src/kernel: qwindowsystem_qws.cpp.orig.
269 +++ qt-2.3.8-snapshot-20040706/src/widgets/qcommonstyle.cpp2004-07-06 23:53:12.000000000 +0200 892diff -ur qt-2.3.8-old/src/tools/qcstring.h qt-2.3.8/src/tools/qcstring.h
893 --- qt-2.3.8-old/src/tools/qcstring.h2004-07-22 01:07:46.000000000 +0200
894 +++ qt-2.3.8/src/tools/qcstring.h2004-07-23 19:09:55.000000000 +0200
895@@ -119,7 +119,7 @@
896 // We want to keep source compatibility for 2.x
897 // ### TODO for 4.0: completely remove these and the cstr* functions
898
899-#if !defined(QT_GENUINE_STR)
900+#if 0
901
902 #undefstrlen
903 #define strlen qstrlen
904diff -ur qt-2.3.8-old/src/tools/qglobal.h qt-2.3.8/src/tools/qglobal.h
905 --- qt-2.3.8-old/src/tools/qglobal.h2004-07-22 01:07:46.000000000 +0200
906 +++ qt-2.3.8/src/tools/qglobal.h2004-07-23 19:09:55.000000000 +0200
907@@ -207,8 +207,16 @@
908 #if __GNUC__ == 2 && __GNUC_MINOR__ == 96
909 #define Q_FP_CCAST_BROKEN
910 #endif
911+/* ARM gcc pads structs to 32 bits, even when they contain a single
912+ char, or short. We tell gcc to pack QChars to 16 bits, to avoid
913+ QString bloat. However, gcc 3.4 doesn't allow us to create references to
914+ members of a packed struct. (Pointers are OK, because then you
915+ supposedly know what you are doing.) */
916 #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
917 #define Q_PACKED __attribute__ ((packed))
918+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
919+# define Q_NO_PACKED_REFERENCE
920+# endif
921 #endif
922 #elif defined(__xlC__)
923 #define _CC_XLC_
924diff -ur qt-2.3.8-old/src/tools/qsortedlist.h qt-2.3.8/src/tools/qsortedlist.h
925 --- qt-2.3.8-old/src/tools/qsortedlist.h2004-07-22 01:07:46.000000000 +0200
926 +++ qt-2.3.8/src/tools/qsortedlist.h2004-07-23 19:09:55.000000000 +0200
927@@ -48,7 +48,7 @@
928 public:
929 QSortedList() {}
930 QSortedList( const QSortedList<type> &l ) : QList<type>(l) {}
931- ~QSortedList() { clear(); }
932+ ~QSortedList() { this->clear(); }
933 QSortedList<type> &operator=(const QSortedList<type> &l)
934 { return (QSortedList<type>&)QList<type>::operator=(l); }
935
936diff -ur qt-2.3.8-old/src/tools/qstring.cpp qt-2.3.8/src/tools/qstring.cpp
937 --- qt-2.3.8-old/src/tools/qstring.cpp2004-07-23 14:34:57.000000000 +0200
938 +++ qt-2.3.8/src/tools/qstring.cpp2004-07-23 19:09:49.000000000 +0200
939@@ -14469,7 +14469,11 @@
940 return qt_winQString2MB( *this );
941 #endif
942 #ifdef _WS_QWS_
943- return utf8(); // ##### if there is ANY 8 bit format supported?
944+ QTextCodec* codec = QTextCodec::codecForLocale();
945+ return codec
946 + ? codec->fromUnicode(*this)
947 + : utf8();
948+ //return latin1(); // ##### if there is ANY 8 bit format supported?
949 #endif
950 #endif
951 }
952@@ -14515,7 +14519,12 @@
953 return qt_winMB2QString( local8Bit );
954 #endif
955 #ifdef _WS_QWS_
956- return fromUtf8(local8Bit,len);
957+ QTextCodec* codec = QTextCodec::codecForLocale();
958+ if( len < 0) len = qstrlen(local8Bit);
959+ return codec
960 + ? codec->toUnicode(local8Bit, len)
961 + : QString::fromUtf8(local8Bit,len);
962+// return fromLatin1(local8Bit,len);
963 #endif
964 #endif // QT_NO_TEXTCODEC
965 }
966diff -ur qt-2.3.8-old/src/tools/qstring.h qt-2.3.8/src/tools/qstring.h
967 --- qt-2.3.8-old/src/tools/qstring.h2004-07-22 01:07:46.000000000 +0200
968 +++ qt-2.3.8/src/tools/qstring.h2004-07-23 19:09:55.000000000 +0200
969@@ -163,8 +163,16 @@
970 bool isLetterOrNumber() const;
971 bool isDigit() const;
972
973+
974+#ifdef Q_NO_PACKED_REFERENCE
975+ uchar& cell() { return *(&cl); }
976+ uchar& row() { return *(&rw); }
977+#else
978 uchar& cell() { return cl; }
979- uchar& row() { return rw; }
980+ uchar& row() { return rw; }
981+#endif
982+
983+
984 uchar cell() const { return cl; }
985 uchar row() const { return rw; }
986
987diff -ur qt-2.3.8-old/src/widgets/qcommonstyle.cpp qt-2.3.8/src/widgets/qcommonstyle.cpp
988 --- qt-2.3.8-old/src/widgets/qcommonstyle.cpp2004-07-22 01:07:44.000000000 +0200
989 +++ qt-2.3.8/src/widgets/qcommonstyle.cpp2004-07-23 16:15:16.000000000 +0200
270@@ -566,7 +566,7 @@ 990@@ -566,7 +566,7 @@
271 bool enabled, bool active ) 991 bool enabled, bool active )
272 { 992 {
273 #ifndef QT_NO_MENUBAR 993 #ifndef QT_NO_MENUBAR
274-#ifndef QT_NO_STYLE_SGI 994-#ifndef QT_NO_STYLE_SGI
275+#if 1 // #ifndef QT_NO_STYLE_SGI 995+#if 1 // #ifndef QT_NO_STYLE_SGI
276 if (draw_menu_bar_impl != 0) { 996 if (draw_menu_bar_impl != 0) {
277 QDrawMenuBarItemImpl impl = draw_menu_bar_impl; 997 QDrawMenuBarItemImpl impl = draw_menu_bar_impl;
278 (this->*impl)(p, x, y, w, h, mi, g, enabled, active); 998 (this->*impl)(p, x, y, w, h, mi, g, enabled, active);
279 --- qt-2.3.8-snapshot-20040706/src/widgets/qlistview.cpp~opie2004-07-06 01:07:37.000000000 +0200 999diff -ur qt-2.3.8-old/src/widgets/qlistview.cpp qt-2.3.8/src/widgets/qlistview.cpp
280 +++ qt-2.3.8-snapshot-20040706/src/widgets/qlistview.cpp2004-07-06 23:53:12.000000000 +0200 1000 --- qt-2.3.8-old/src/widgets/qlistview.cpp2004-07-22 01:07:44.000000000 +0200
281@@ -5057,9 +5057,9 @@ 1001 +++ qt-2.3.8/src/widgets/qlistview.cpp2004-07-23 16:15:16.000000000 +0200
1002@@ -5054,9 +5054,9 @@
282 l = l->childItem ? l->childItem : l->siblingItem; 1003 l = l->childItem ? l->childItem : l->siblingItem;
283 1004
284 if ( l && l->height() ) 1005 if ( l && l->height() )
285 -s.setHeight( s.height() + 10 * l->height() ); 1006 -s.setHeight( s.height() + 10 * l->height() );
286- else 1007- else
287 -s.setHeight( s.height() + 140 ); 1008 -s.setHeight( s.height() + 140 );
288 +s.setHeight( s.height() + 4 /*10*/ * l->height() ); 1009 +s.setHeight( s.height() + 4 /*10*/ * l->height() );
289+ else // ^v much too big for handhelds 1010+ else // ^v much too big for handhelds
290 +s.setHeight( s.height() + 30 /*140*/ ); 1011 +s.setHeight( s.height() + 30 /*140*/ );
291 1012
292 if ( s.width() > s.height() * 3 ) 1013 if ( s.width() > s.height() * 3 )
293 s.setHeight( s.width() / 3 ); 1014 s.setHeight( s.width() / 3 );
294 --- qt-2.3.8-snapshot-20040706/src/widgets/qtoolbutton.cpp~opie2004-07-06 01:07:37.000000000 +0200 1015Nur in qt-2.3.8/src/widgets: qlistview.cpp.orig.
295 +++ qt-2.3.8-snapshot-20040706/src/widgets/qtoolbutton.cpp2004-07-06 23:53:12.000000000 +0200 1016diff -ur qt-2.3.8-old/src/widgets/qscrollview.cpp qt-2.3.8/src/widgets/qscrollview.cpp
1017 --- qt-2.3.8-old/src/widgets/qscrollview.cpp2004-07-22 01:07:44.000000000 +0200
1018 +++ qt-2.3.8/src/widgets/qscrollview.cpp2004-07-23 19:21:06.000000000 +0200
1019@@ -1280,6 +1280,9 @@
1020 case QEvent::LayoutHint:
1021 d->autoResizeHint(this);
1022 break;
1023 +case QEvent::WindowActivate:
1024 +case QEvent::WindowDeactivate:
1025 + return TRUE;
1026 default:
1027 break;
1028 }
1029diff -ur qt-2.3.8-old/src/widgets/qtoolbutton.cpp qt-2.3.8/src/widgets/qtoolbutton.cpp
1030 --- qt-2.3.8-old/src/widgets/qtoolbutton.cpp2004-07-22 01:07:44.000000000 +0200
1031 +++ qt-2.3.8/src/widgets/qtoolbutton.cpp2004-07-23 16:15:16.000000000 +0200
296@@ -232,7 +232,7 @@ 1032@@ -232,7 +232,7 @@
297 else 1033 else
298 QToolTip::add( this, textLabel ); 1034 QToolTip::add( this, textLabel );
299 } 1035 }
300 -#endif 1036 -#endif
301+#endif 1037+#endif
302 } 1038 }
303 1039
304 1040
305@@ -326,12 +326,12 @@ 1041@@ -326,12 +326,12 @@
306 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal); 1042 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal);
307 w = pm.width(); 1043 w = pm.width();
308 h = pm.height(); 1044 h = pm.height();
309 -if ( w < 32 ) 1045 -if ( w < 32 )
310 - w = 32; 1046 - w = 32;
311 -if ( h < 32 ) 1047 -if ( h < 32 )
312 - h = 32; 1048 - h = 32;
313 +if ( w < 24 ) 1049 +if ( w < 24 )
314 + w = 24; 1050 + w = 24;
315 +if ( h < 24 ) 1051 +if ( h < 24 )
316 + h = 24; 1052 + h = 24;
317 } else { 1053 } else {
318 -w = h = 16; 1054 -w = h = 16;
319 +w = h = 14; 1055 +w = h = 14;
320 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal); 1056 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal);
321 w = pm.width(); 1057 w = pm.width();
322 h = pm.height(); 1058 h = pm.height();
1059Nur in qt-2.3.8/src/widgets: qtoolbutton.cpp.orig.
diff --git a/qt/qt-2.3.8.patch/qte238-allowoverride.patch b/qt/qt-2.3.8.patch/qte238-allowoverride.patch
new file mode 100644
index 0000000..8a63710
--- a/dev/null
+++ b/qt/qt-2.3.8.patch/qte238-allowoverride.patch
@@ -0,0 +1,231 @@
1Qt2.3.5 -> Qt2.3.6 changed the meaning of point sizes they used
2to be multiplied with 10, some apps get confused by that and
3in Opie we allow to work around for specefic application
4
5Courtsey to Robert 'sandman' Griebl
6
7
8
9
10
11
12
13
14diff -ur qt-2.3.8-old/src/kernel/qapplication.cpp qt-2.3.8/src/kernel/qapplication.cpp
15 --- qt-2.3.8-old/src/kernel/qapplication.cpp2004-07-22 01:07:46.000000000 +0200
16 +++ qt-2.3.8/src/kernel/qapplication.cpp2004-07-23 19:08:46.000000000 +0200
17@@ -35,6 +35,8 @@
18 **
19 **********************************************************************/
20
21 +#define QT_WEAK_SYMBOL__attribute__(( weak ))
22+
23 #include "qobjectlist.h"
24 #include "qobjectdict.h"
25 #include "qapplication.h"
26@@ -936,11 +938,16 @@
27 #ifndef QT_NO_STYLE
28 void QApplication::setStyle( QStyle *style )
29 {
30 +setStyle_NonWeak ( style );
31+}
32+
33+void QApplication::setStyle_NonWeak( QStyle *style )
34+{
35 QStyle* old = app_style;
36- app_style = style;
37
38 if ( startingUp() ) {
39 delete old;
40 +app_style = style;
41 return;
42 }
43
44@@ -961,6 +968,8 @@
45 old->unPolish( qApp );
46 }
47
48+ app_style = style;
49+
50 // take care of possible palette requirements of certain gui
51 // styles. Do it before polishing the application since the style
52 // might call QApplication::setStyle() itself
53@@ -1187,13 +1196,30 @@
54 \sa QWidget::setPalette(), palette(), QStyle::polish()
55 */
56
57-void QApplication::setPalette( const QPalette &palette, bool informWidgets,
58+void QApplication::setPalette ( const QPalette &palette, bool informWidgets,
59 + const char* className )
60+{
61 +setPalette_NonWeak ( palette, informWidgets, className );
62+}
63+
64+void QApplication::setPalette_NonWeak ( const QPalette &palette, bool informWidgets,
65 const char* className )
66 {
67 QPalette pal = palette;
68 #ifndef QT_NO_STYLE
69- if ( !startingUp() )
70+ if ( !startingUp() ) {
71 qApp->style().polish( pal );// NB: non-const reference
72 +if ( className ) {
73 + // if we just polished a class specific palette (this normally
74 + // only called by qt_fix_tooltips - see below), we better re-
75 + // polish the global palette. Some styles like liquid can get
76 + // confused, because they can not detect if the polished palette
77 + // is the global one or only a class specific one.
78 + // (liquid uses this palette to calculate blending pixmaps)
79 + QPalette p = qApp-> palette ( );
80 + qApp->style().polish ( p );
81 +}
82+ }
83 #endif
84 bool all = FALSE;
85 if ( !className ) {
86@@ -1278,6 +1304,12 @@
87 void QApplication::setFont( const QFont &font, bool informWidgets,
88 const char* className )
89 {
90 +setFont_NonWeak ( font, informWidgets, className );
91+}
92+
93+void QApplication::setFont_NonWeak( const QFont &font, bool informWidgets,
94 + const char* className )
95+{
96 bool all = FALSE;
97 if ( !className ) {
98 if ( !app_font ) {
99Nur in qt-2.3.8/src/kernel/: qapplication.cpp.orig.
100diff -ur qt-2.3.8-old/src/kernel/qapplication.h qt-2.3.8/src/kernel/qapplication.h
101 --- qt-2.3.8-old/src/kernel/qapplication.h2004-07-22 01:07:45.000000000 +0200
102 +++ qt-2.3.8/src/kernel/qapplication.h2004-07-23 19:08:46.000000000 +0200
103@@ -61,6 +61,10 @@
104 class QSemaphore;
105 #endif
106
107+#if !defined( QT_WEAK_SYMBOL )
108+#define QT_WEAK_SYMBOL
109+#endif
110+
111 // REMOVE IN 3.0 (just here for moc source compatibility)
112 #define QNonBaseApplication QApplication
113
114@@ -85,7 +89,10 @@
115
116 #ifndef QT_NO_STYLE
117 static QStyle &style();
118 - static void setStyle( QStyle* );
119 + static void setStyle( QStyle* ) QT_WEAK_SYMBOL;
120+private:
121 +static void setStyle_NonWeak( QStyle* );
122+public:
123 #endif
124 #if 1/* OBSOLETE */
125 enum ColorMode { NormalColors, CustomColors };
126@@ -106,11 +113,19 @@
127 #ifndef QT_NO_PALETTE
128 static QPalette palette( const QWidget* = 0 );
129 static void setPalette( const QPalette &, bool informWidgets=FALSE,
130 + const char* className = 0 ) QT_WEAK_SYMBOL;
131+private:
132 + static void setPalette_NonWeak( const QPalette &, bool informWidgets=FALSE,
133 const char* className = 0 );
134+public:
135 #endif
136 static QFont font( const QWidget* = 0 );
137 static void setFont( const QFont &, bool informWidgets=FALSE,
138 + const char* className = 0 ) QT_WEAK_SYMBOL;
139+private:
140 + static void setFont_NonWeak( const QFont &, bool informWidgets=FALSE,
141 const char* className = 0 );
142 +public:
143 static QFontMetrics fontMetrics();
144
145 QWidget *mainWidget() const;
146@@ -207,7 +222,10 @@
147 void qwsSetCustomColors( QRgb *colortable, int start, int numColors );
148 #ifndef QT_NO_QWS_MANAGER
149 static QWSDecoration &qwsDecoration();
150- static void qwsSetDecoration( QWSDecoration *);
151+ static void qwsSetDecoration( QWSDecoration *) QT_WEAK_SYMBOL;
152+private:
153+ static void qwsSetDecoration_NonWeak( QWSDecoration *);
154+public:
155 #endif
156 #endif
157
158diff -ur qt-2.3.8-old/src/kernel/qapplication_qws.cpp qt-2.3.8/src/kernel/qapplication_qws.cpp
159 --- qt-2.3.8-old/src/kernel/qapplication_qws.cpp2004-07-22 01:07:45.000000000 +0200
160 +++ qt-2.3.8/src/kernel/qapplication_qws.cpp2004-07-23 19:08:46.000000000 +0200
161@@ -2896,6 +2896,11 @@
162 */
163 void QApplication::qwsSetDecoration( QWSDecoration *d )
164 {
165 +qwsSetDecoration_NonWeak ( d );
166+}
167+
168+void QApplication::qwsSetDecoration_NonWeak( QWSDecoration *d )
169+{
170 if ( d ) {
171 delete qws_decoration;
172 qws_decoration = d;
173Nur in qt-2.3.8/src/kernel/: qapplication_qws.cpp.orig.
174diff -ur qt-2.3.8-old/src/kernel/qfontdatabase.cpp qt-2.3.8/src/kernel/qfontdatabase.cpp
175 --- qt-2.3.8-old/src/kernel/qfontdatabase.cpp2004-07-22 01:07:45.000000000 +0200
176 +++ qt-2.3.8/src/kernel/qfontdatabase.cpp2004-07-23 19:08:46.000000000 +0200
177@@ -35,6 +35,8 @@
178 **
179 **********************************************************************/
180
181+#define QT_WEAK_SYMBOL __attribute__(( weak ))
182+
183 #include "qfontdatabase.h"
184
185 #ifndef QT_NO_FONTDATABASE
186@@ -2424,6 +2426,13 @@
187 const QString &style,
188 const QString &charSet )
189 {
190 +return pointSizes_NonWeak ( family, style, charSet );
191+}
192+
193+QValueList<int> QFontDatabase::pointSizes_NonWeak ( const QString &family,
194+ const QString &style,
195+ const QString &charSet )
196+{
197 QString cs( charSet );
198 if ( charSet.isEmpty() ) {
199 QStringList lst = charSets( family );
200diff -ur qt-2.3.8-old/src/kernel/qfontdatabase.h qt-2.3.8/src/kernel/qfontdatabase.h
201 --- qt-2.3.8-old/src/kernel/qfontdatabase.h2004-07-22 01:07:45.000000000 +0200
202 +++ qt-2.3.8/src/kernel/qfontdatabase.h2004-07-23 19:08:46.000000000 +0200
203@@ -59,6 +59,10 @@
204 class QDiskFont;
205 #endif
206
207+#if !defined( QT_WEAK_SYMBOL )
208+#define QT_WEAK_SYMBOL
209+#endif
210+
211 class QFontDatabasePrivate;
212
213 class Q_EXPORT QFontDatabase
214@@ -67,9 +71,16 @@
215 QFontDatabase();
216
217 QStringList families( bool onlyForLocale = TRUE ) const;
218+
219+
220 QValueList<int> pointSizes( const QString &family,
221 const QString &style = QString::null,
222 - const QString &charSet = QString::null );
223 + const QString &charSet = QString::null ) QT_WEAK_SYMBOL;
224+private:
225+ QValueList<int> pointSizes_NonWeak( const QString &family,
226 + const QString &style,
227 + const QString &charSet );
228+public:
229 QStringList styles( const QString &family,
230 const QString &charSet = QString::null ) const;
231 QStringList charSets( const QString &familyName,
diff --git a/qt/qt-2.3.8.patch/qte238-gcc34.patch b/qt/qt-2.3.8.patch/qte238-gcc34.patch
new file mode 100644
index 0000000..770740d
--- a/dev/null
+++ b/qt/qt-2.3.8.patch/qte238-gcc34.patch
@@ -0,0 +1,440 @@
1diff -ur qt-2.3.8_clean/include/qcstring.h qt-2.3.8/include/qcstring.h
2 --- qt-2.3.8_clean/include/qcstring.h2004-06-04 02:17:53.000000000 +0200
3 +++ qt-2.3.8/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.8_clean/include/qglobal.h qt-2.3.8/include/qglobal.h
14 --- qt-2.3.8_clean/include/qglobal.h2004-06-04 02:17:53.000000000 +0200
15 +++ qt-2.3.8/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.8_clean/include/qsortedlist.h qt-2.3.8/include/qsortedlist.h
34 --- qt-2.3.8_clean/include/qsortedlist.h2004-06-04 02:17:53.000000000 +0200
35 +++ qt-2.3.8/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.8_clean/src/kernel/qgfxtransformed_qws.cpp qt-2.3.8/src/kernel/qgfxtransformed_qws.cpp
46 --- qt-2.3.8_clean/src/kernel/qgfxtransformed_qws.cpp2004-06-04 02:17:53.000000000 +0200
47 +++ qt-2.3.8/src/kernel/qgfxtransformed_qws.cpp2004-06-04 02:24:25.000000000 +0200
48@@ -671,11 +671,11 @@
49 inline int tx( int x, int y ) {
50 switch ( qt_trans_screen->transformation() ) {
51 case QTransformedScreen::Rot90:
52 - return y - xoffs + yoffs;
53 + return y - this->xoffs + this->yoffs;
54 case QTransformedScreen::Rot180:
55 - return (width - x - 1) - xoffs - xoffs;
56 + return (this->width - x - 1) - this->xoffs - this->xoffs;
57 case QTransformedScreen::Rot270:
58 - return (height - y - 1) - xoffs - yoffs;
59 + return (this->height - y - 1) - this->xoffs - this->yoffs;
60 default:
61 return x;
62 }
63@@ -683,11 +683,11 @@
64 inline int ty( int x, int y ) {
65 switch ( qt_trans_screen->transformation() ) {
66 case QTransformedScreen::Rot90:
67 - return (width - x - 1) - yoffs - xoffs;
68 + return (this->width - x - 1) - this->yoffs - this->xoffs;
69 case QTransformedScreen::Rot180:
70 - return (height - y - 1) - yoffs - yoffs;
71 + return (this->height - y - 1) - this->yoffs - this->yoffs;
72 case QTransformedScreen::Rot270:
73 - return x - yoffs + xoffs;
74 + return x - this->yoffs + this->xoffs;
75 default:
76 return y;
77 }
78@@ -715,23 +715,23 @@
79 template <const int depth, const int type>
80 void QGfxTransformedRaster<depth,type>::setSourceWidgetOffset(int x, int y)
81 {
82- if ( srcbits == buffer ) {
83+ if ( this->srcbits == this->buffer ) {
84 switch ( qt_trans_screen->transformation() ) {
85 case QTransformedScreen::Rot90:
86 - srcwidgetoffs = QPoint( y, width - x - srcwidth );
87 + this->srcwidgetoffs = QPoint( y, this->width - x - this->srcwidth );
88 break;
89 case QTransformedScreen::Rot180:
90 - srcwidgetoffs = QPoint( width - x - srcwidth, height - y - srcheight );
91 + this->srcwidgetoffs = QPoint( this->width - x - this->srcwidth, this->height - y - this->srcheight );
92 break;
93 case QTransformedScreen::Rot270:
94 - srcwidgetoffs = QPoint( height - y - srcheight, x );
95 + this->srcwidgetoffs = QPoint( this->height - y - this->srcheight, x );
96 break;
97 default:
98 - srcwidgetoffs = QPoint( x, y );
99 + this->srcwidgetoffs = QPoint( x, y );
100 break;
101 }
102 } else
103 -srcwidgetoffs = QPoint( x, y );
104 +this->srcwidgetoffs = QPoint( x, y );
105 }
106
107 template <const int depth, const int type>
108@@ -739,8 +739,8 @@
109 {
110 QT_TRANS_GFX_BASE<depth,type>::setSource(i);
111 QSize s = qt_screen->mapToDevice( QSize(i->width(), i->height()) );
112- srcwidth = s.width();
113- srcheight = s.height();
114+ this->srcwidth = s.width();
115+ this->srcheight = s.height();
116 }
117
118 template <const int depth, const int type>
119@@ -782,7 +782,7 @@
120 if ( w == 0 || h == 0 )
121 return;
122 QRect r( x, y, w, h );
123- if ( cbrush.style() == SolidPattern ) {
124+ if ( this->cbrush.style() == Qt::SolidPattern ) {
125 r.setCoords( tx(x,y), ty(x,y), tx(x+w-1,y+h-1), ty(x+w-1,y+h-1) );
126 r = r.normalize();
127 }
128@@ -797,7 +797,7 @@
129 // solution. The brush offset logic is complicated enough, so we don't
130 // fastpath patternedbrush.
131
132- if ( inDraw || cpen.style()==NoPen || patternedbrush ) {
133+ if ( inDraw || this->cpen.style()==Qt::NoPen || this->patternedbrush ) {
134 //slowpath
135 QT_TRANS_GFX_BASE<depth,type>::drawPolygon( a, w, idx, num );
136 } else {
137@@ -819,29 +819,29 @@
138 template <const int depth, const int type>
139 void QGfxTransformedRaster<depth,type>::processSpans( int n, QPoint* point, int* width )
140 {
141- if ( inDraw || patternedbrush && srcwidth != 0 && srcheight != 0 ) {
142+ if ( inDraw || this->patternedbrush && this->srcwidth != 0 && this->srcheight != 0 ) {
143 //in the patternedbrush case, we let blt do the transformation
144 // so we leave inDraw false.
145 - QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width );
146 +QT_TRANS_GFX_BASE<depth,type>::processSpans( n, point, width );
147 } else {
148 inDraw = TRUE;
149 while (n--) {
150 if ( *width > 0 ) {
151 - int x=tx(point->x(),point->y())+xoffs;
152 - int y=ty(point->x(),point->y())+yoffs;
153 + int x=tx(point->x(),point->y())+this->xoffs;
154 + int y=ty(point->x(),point->y())+this->yoffs;
155
156 switch( qt_trans_screen->transformation() ) {
157 case QTransformedScreen::Rot90:
158 - vline( x, y-(*width-1), y );
159 + this->vline( x, y-(*width-1), y );
160 break;
161 case QTransformedScreen::Rot180:
162 - hline( x - (*width-1), x, y );
163 + this->hline( x - (*width-1), x, y );
164 break;
165 case QTransformedScreen::Rot270:
166 - vline( x, y, y+*width-1 );
167 + this->vline( x, y, y+*width-1 );
168 break;
169 default:
170 - hline( x, x+*width-1, y );
171 + this->hline( x, x+*width-1, y );
172 break;
173 }
174 }
175@@ -896,14 +896,14 @@
176 switch ( qt_trans_screen->transformation() ) {
177 case QTransformedScreen::Rot90:
178 rsx = sy;
179 - rsy = srcwidth - sx - w;
180 + rsy = this->srcwidth - sx - w;
181 break;
182 case QTransformedScreen::Rot180:
183 - rsx = srcwidth - sx - w;
184 - rsy = srcheight - sy - h;
185 + rsx = this->srcwidth - sx - w;
186 + rsy = this->srcheight - sy - h;
187 break;
188 case QTransformedScreen::Rot270:
189 - rsx = srcheight - sy - h;
190 + rsx = this->srcheight - sy - h;
191 rsy = sx;
192 break;
193 default:
194@@ -941,39 +941,39 @@
195 r.setCoords( tx(rx,ry), ty(rx,ry), tx(rx+w-1,ry+h-1), ty(rx+w-1,ry+h-1) );
196 r = r.normalize();
197
198- QPoint oldBrushOffs = brushoffs;
199+ QPoint oldBrushOffs = this->brushoffs;
200 int brx, bry;
201 switch ( qt_trans_screen->transformation() ) {
202 case QTransformedScreen::Rot90:
203 - brx = brushoffs.y();
204 - bry = srcwidth - brushoffs.x() - w;
205 + brx = this->brushoffs.y();
206 + bry = this->srcwidth - this->brushoffs.x() - w;
207 break;
208 case QTransformedScreen::Rot180:
209 - brx = srcwidth - brushoffs.x() - w;
210 - bry = srcheight - brushoffs.y() - h;
211 + brx = this->srcwidth - this->brushoffs.x() - w;
212 + bry = this->srcheight - this->brushoffs.y() - h;
213 break;
214 case QTransformedScreen::Rot270:
215 - brx = srcheight - brushoffs.y() - h;
216 - bry = brushoffs.x();
217 + brx = this->srcheight - this->brushoffs.y() - h;
218 + bry = this->brushoffs.x();
219 break;
220 default:
221 - brx = brushoffs.x();
222 - bry = brushoffs.y();
223 + brx = this->brushoffs.x();
224 + bry = this->brushoffs.y();
225 break;
226 }
227- brushoffs = QPoint( brx, bry );
228+ this->brushoffs = QPoint( brx, bry );
229
230- int oldsw = srcwidth;
231- int oldsh = srcheight;
232- QSize s = qt_screen->mapToDevice( QSize(srcwidth,srcheight) );
233- srcwidth = s.width();
234- srcheight = s.height();
235+ int oldsw = this->srcwidth;
236+ int oldsh = this->srcheight;
237+ QSize s = qt_screen->mapToDevice( QSize(this->srcwidth,this->srcheight) );
238+ this->srcwidth = s.width();
239+ this->srcheight = s.height();
240
241 QT_TRANS_GFX_BASE<depth,type>::tiledBlt( r.x(), r.y(), r.width(), r.height() );
242
243- srcwidth = oldsw;
244- srcheight = oldsh;
245- brushoffs = oldBrushOffs;
246+ this->srcwidth = oldsw;
247+ this->srcheight = oldsh;
248+ this->brushoffs = oldBrushOffs;
249 inDraw = FALSE;
250 }
251
252diff -ur qt-2.3.8_clean/src/kernel/qgfxvfb_qws.cpp qt-2.3.8/src/kernel/qgfxvfb_qws.cpp
253 --- qt-2.3.8_clean/src/kernel/qgfxvfb_qws.cpp2004-06-04 02:17:53.000000000 +0200
254 +++ qt-2.3.8/src/kernel/qgfxvfb_qws.cpp2004-06-04 02:24:25.000000000 +0200
255@@ -31,7 +31,6 @@
256 **********************************************************************/
257
258 #include "qgfxraster_qws.h"
259-
260 #ifndef QT_NO_QWS_VFB
261
262 #include <sys/ipc.h>
263@@ -140,8 +139,8 @@
264 void QGfxVFb<depth,type>::drawPoint( int x, int y )
265 {
266 QWSDisplay::grab( TRUE );
267- if ( is_screen_gfx )
268 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, 1, 1 ) );
269+ if ( this->is_screen_gfx )
270 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, 1, 1 ) );
271 QGfxRaster<depth,type>::drawPoint( x, y );
272 QWSDisplay::ungrab();
273 }
274@@ -150,8 +149,8 @@
275 void QGfxVFb<depth,type>::drawPoints( const QPointArray &pa,int x,int y )
276 {
277 QWSDisplay::grab( TRUE );
278- if ( is_screen_gfx )
279 -qvfb_screen->setDirty( clipbounds );
280+ if ( this->is_screen_gfx )
281 +qvfb_screen->setDirty( this->clipbounds );
282 QGfxRaster<depth,type>::drawPoints( pa, x, y );
283 QWSDisplay::ungrab();
284 }
285@@ -160,9 +159,9 @@
286 void QGfxVFb<depth,type>::drawLine( int x1,int y1,int x2,int y2 )
287 {
288 QWSDisplay::grab( TRUE );
289- if ( is_screen_gfx ) {
290+ if ( this->is_screen_gfx ) {
291 QRect r;
292 -r.setCoords( x1+xoffs, y1+yoffs, x2+xoffs, y2+yoffs );
293 +r.setCoords( x1+this->xoffs, y1+this->yoffs, x2+this->xoffs, y2+this->yoffs );
294 qvfb_screen->setDirty( r.normalize() );
295 }
296 QGfxRaster<depth,type>::drawLine( x1, y1, x2, y2 );
297@@ -173,8 +172,8 @@
298 void QGfxVFb<depth,type>::fillRect( int x,int y,int w,int h )
299 {
300 QWSDisplay::grab( TRUE );
301- if ( is_screen_gfx )
302 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) );
303+ if ( this->is_screen_gfx )
304 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) );
305 QGfxRaster<depth,type>::fillRect( x, y, w, h );
306 QWSDisplay::ungrab();
307 }
308@@ -183,8 +182,8 @@
309 void QGfxVFb<depth,type>::drawPolyline( const QPointArray &pa,int x,int y )
310 {
311 QWSDisplay::grab( TRUE );
312- if ( is_screen_gfx )
313 -qvfb_screen->setDirty( clipbounds );
314+ if ( this->is_screen_gfx )
315 +qvfb_screen->setDirty( this->clipbounds );
316 QGfxRaster<depth,type>::drawPolyline( pa, x, y );
317 QWSDisplay::ungrab();
318 }
319@@ -193,8 +192,8 @@
320 void QGfxVFb<depth,type>::drawPolygon( const QPointArray &pa,bool w,int x,int y )
321 {
322 QWSDisplay::grab( TRUE );
323- if ( is_screen_gfx )
324 -qvfb_screen->setDirty( clipbounds );
325+ if ( this->is_screen_gfx )
326 +qvfb_screen->setDirty( this->clipbounds );
327 QGfxRaster<depth,type>::drawPolygon( pa, w, x, y );
328 QWSDisplay::ungrab();
329 }
330@@ -203,8 +202,8 @@
331 void QGfxVFb<depth,type>::blt( int x,int y,int w,int h, int sx, int sy )
332 {
333 QWSDisplay::grab( TRUE );
334- if ( is_screen_gfx )
335 -qvfb_screen->setDirty( QRect( x+xoffs, y+yoffs, w, h ) );
336+ if ( this->is_screen_gfx )
337 +qvfb_screen->setDirty( QRect( x+this->xoffs, y+this->yoffs, w, h ) );
338 QGfxRaster<depth,type>::blt( x, y, w, h, sx, sy );
339 QWSDisplay::ungrab();
340 }
341@@ -215,8 +214,8 @@
342 QWSDisplay::grab( TRUE );
343 int dy = sy - y;
344 int dx = sx - x;
345- if ( is_screen_gfx )
346 -qvfb_screen->setDirty( QRect(QMIN(x,sx) + xoffs, QMIN(y,sy) + yoffs,
347+ if ( this->is_screen_gfx )
348 +qvfb_screen->setDirty( QRect(QMIN(x,sx) + this->xoffs, QMIN(y,sy) + this->yoffs,
349 w+abs(dx), h+abs(dy)) );
350 QGfxRaster<depth,type>::scroll( x, y, w, h, sx, sy );
351 QWSDisplay::ungrab();
352@@ -227,8 +226,8 @@
353 void QGfxVFb<depth,type>::stretchBlt( int x,int y,int w,int h,int sx,int sy )
354 {
355 QWSDisplay::grab( TRUE );
356- if ( is_screen_gfx )
357 -qvfb_screen->setDirty( QRect( x + xoffs, y + yoffs, w, h) );
358+ if ( this->is_screen_gfx )
359 +qvfb_screen->setDirty( QRect( x + this->xoffs, y + this->yoffs, w, h) );
360 QGfxRaster<depth,type>::stretchBlt( x, y, w, h, sx, sy );
361 QWSDisplay::ungrab();
362 }
363@@ -238,8 +237,8 @@
364 void QGfxVFb<depth,type>::tiledBlt( int x,int y,int w,int h )
365 {
366 QWSDisplay::grab( TRUE );
367- if ( is_screen_gfx )
368 -qvfb_screen->setDirty( QRect(x + xoffs, y + yoffs, w, h) );
369+ if ( this->is_screen_gfx )
370 +qvfb_screen->setDirty( QRect(x + this->xoffs, y + this->yoffs, w, h) );
371 QGfxRaster<depth,type>::tiledBlt( x, y, w, h );
372 QWSDisplay::ungrab();
373 }
374diff -ur qt-2.3.8_clean/src/tools/qcstring.h qt-2.3.8/src/tools/qcstring.h
375 --- qt-2.3.8_clean/src/tools/qcstring.h2004-06-04 02:17:53.000000000 +0200
376 +++ qt-2.3.8/src/tools/qcstring.h2004-06-04 02:24:25.000000000 +0200
377@@ -119,7 +119,7 @@
378 // We want to keep source compatibility for 2.x
379 // ### TODO for 4.0: completely remove these and the cstr* functions
380
381-#if !defined(QT_GENUINE_STR)
382+#if 0
383
384 #undefstrlen
385 #define strlen qstrlen
386diff -ur qt-2.3.8_clean/src/tools/qglobal.h qt-2.3.8/src/tools/qglobal.h
387 --- qt-2.3.8_clean/src/tools/qglobal.h2004-06-04 02:17:53.000000000 +0200
388 +++ qt-2.3.8/src/tools/qglobal.h2004-06-04 02:29:41.000000000 +0200
389@@ -207,8 +207,16 @@
390 #if __GNUC__ == 2 && __GNUC_MINOR__ == 96
391 #define Q_FP_CCAST_BROKEN
392 #endif
393+/* ARM gcc pads structs to 32 bits, even when they contain a single
394+ char, or short. We tell gcc to pack QChars to 16 bits, to avoid
395+ QString bloat. However, gcc 3.4 doesn't allow us to create references to
396+ members of a packed struct. (Pointers are OK, because then you
397+ supposedly know what you are doing.) */
398 #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP)
399 #define Q_PACKED __attribute__ ((packed))
400+# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4
401+# define Q_NO_PACKED_REFERENCE
402+# endif
403 #endif
404 #elif defined(__xlC__)
405 #define _CC_XLC_
406Nur in qt-2.3.8/src/tools: qglobal.h~.
407diff -ur qt-2.3.8_clean/src/tools/qsortedlist.h qt-2.3.8/src/tools/qsortedlist.h
408 --- qt-2.3.8_clean/src/tools/qsortedlist.h2004-06-04 02:17:53.000000000 +0200
409 +++ qt-2.3.8/src/tools/qsortedlist.h2004-06-04 02:24:25.000000000 +0200
410@@ -48,7 +48,7 @@
411 public:
412 QSortedList() {}
413 QSortedList( const QSortedList<type> &l ) : QList<type>(l) {}
414- ~QSortedList() { clear(); }
415+ ~QSortedList() { this->clear(); }
416 QSortedList<type> &operator=(const QSortedList<type> &l)
417 { return (QSortedList<type>&)QList<type>::operator=(l); }
418
419diff -ur qt-2.3.8_clean/src/tools/qstring.h qt-2.3.8/src/tools/qstring.h
420 --- qt-2.3.8_clean/src/tools/qstring.h2004-06-04 02:17:53.000000000 +0200
421 +++ qt-2.3.8/src/tools/qstring.h2004-06-04 02:54:16.000000000 +0200
422@@ -163,8 +163,16 @@
423 bool isLetterOrNumber() const;
424 bool isDigit() const;
425
426+
427+#ifdef Q_NO_PACKED_REFERENCE
428+ uchar& cell() { return *(&cl); }
429+ uchar& row() { return *(&rw); }
430+#else
431 uchar& cell() { return cl; }
432- uchar& row() { return rw; }
433+ uchar& row() { return rw; }
434+#endif
435+
436+
437 uchar cell() const { return cl; }
438 uchar row() const { return rw; }
439
440Nur in qt-2.3.8/src/tools: qstring.h~.
diff --git a/qt/qt-2.3.8.patch/qte238-hancomwordcrash.patch b/qt/qt-2.3.8.patch/qte238-hancomwordcrash.patch
new file mode 100644
index 0000000..57c752e
--- a/dev/null
+++ b/qt/qt-2.3.8.patch/qte238-hancomwordcrash.patch
@@ -0,0 +1,15 @@
1Not included in the ALL patch
2
3
4
5 --- qt-2.3.8-old/src/kernel/qgfxraster_qws.cpp2004-07-22 01:07:45.000000000 +0200
6 +++ qt-2.3.8/src/kernel/qgfxraster_qws.cpp2004-07-23 19:10:03.000000000 +0200
7@@ -4400,7 +4400,7 @@
8 setAlphaType(IgnoreAlpha);
9 if ( w <= 0 || h <= 0 || !ncliprect ) return;
10 GFX_START(QRect(rx+xoffs, ry+yoffs, w+1, h+1))
11-#ifdef QWS_EXPERIMENTAL_FASTPATH
12+#if 0 // def QWS_EXPERIMENTAL_FASTPATH !! this is crashing HancomWord on OZ !!
13 // ### fix for 8bpp
14 // This seems to be reliable now, at least for 16bpp
15
diff --git a/qt/qt-2.3.8.patch/qte238-iconviewspeed.patch b/qt/qt-2.3.8.patch/qte238-iconviewspeed.patch
new file mode 100644
index 0000000..3351bbb
--- a/dev/null
+++ b/qt/qt-2.3.8.patch/qte238-iconviewspeed.patch
@@ -0,0 +1,145 @@
1Speed up patches backported from
2
3http://robotics.dei.unipd.it/~koral/KDE/kflicker.html
4
5and
6
7http://lists.kde.org/?l=kde-optimize&m=105382164111363&w=2 (complete thread)
8
9
10
11
12
13
14
15diff -ur qt-2.3.8-old/src/iconview/qiconview.cpp qt-2.3.8/src/iconview/qiconview.cpp
16 --- qt-2.3.8-old/src/iconview/qiconview.cpp2004-07-22 01:07:46.000000000 +0200
17 +++ qt-2.3.8/src/iconview/qiconview.cpp2004-07-23 19:13:09.000000000 +0200
18@@ -224,6 +224,7 @@
19 QIconView::SelectionMode selectionMode;
20 QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor;
21 QRect *rubber;
22+ QPixmap *backBuffer;
23 QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer,
24 *fullRedrawTimer;
25 int rastX, rastY, spacing;
26@@ -2267,6 +2268,7 @@
27 d->currentItem = 0;
28 d->highlightedItem = 0;
29 d->rubber = 0;
30+ d->backBuffer = 0;
31 d->scrollTimer = 0;
32 d->startDragItem = 0;
33 d->tmpCurrentItem = 0;
34@@ -2415,6 +2417,8 @@
35 delete item;
36 item = tmp;
37 }
38+ delete d->backBuffer;
39+ d->backBuffer = 0;
40 delete d->fm;
41 d->fm = 0;
42 #ifndef QT_NO_TOOLTIP
43@@ -2881,6 +2885,48 @@
44 }
45
46 /*!
47+ This function grabs all paintevents that otherwise would have been
48+ processed by the QScrollView::viewportPaintEvent(). Here we use a
49+ doublebuffer to reduce 'on-paint' flickering on QIconView
50+ (and of course its childs).
51+
52+ \sa QScrollView::viewportPaintEvent(), QIconView::drawContents()
53+*/
54+
55+void QIconView::bufferedPaintEvent( QPaintEvent* pe )
56+{
57+ QWidget* vp = viewport();
58+ QRect r = pe->rect() & vp->rect();
59+ int ex = r.x() + contentsX();
60+ int ey = r.y() + contentsY();
61+ int ew = r.width();
62+ int eh = r.height();
63+
64+ if ( !d->backBuffer )
65 +d->backBuffer = new QPixmap(vp->size());
66+ if ( d->backBuffer->size() != vp->size() ) {
67 +//Resize function (with hysteesis). Uses a good compromise between memory
68 +//consumption and speed (number) of resizes.
69+ float newWidth = (float)vp->width();
70 +float newHeight = (float)vp->height();
71 +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() )
72 +{
73 + newWidth *= 1.1892;
74 + newHeight *= 1.1892;
75 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
76 +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() )
77 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
78+ }
79+
80+ QPainter p;
81+ p.begin(d->backBuffer, vp);
82+ drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh);
83+ p.end();
84+ bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh);
85+}
86+
87+/*!
88+
89 \reimp
90 */
91
92@@ -4937,7 +4983,7 @@
93 if ( !d->rubber )
94 drawDragShapes( d->oldDragPos );
95 }
96 - viewportPaintEvent( (QPaintEvent*)e );
97+ bufferedPaintEvent ((QPaintEvent*)e );
98 if ( d->dragging ) {
99 if ( !d->rubber )
100 drawDragShapes( d->oldDragPos );
101@@ -5374,11 +5420,19 @@
102 return;
103
104 if ( item->d->container1 && d->firstContainer ) {
105 -item->d->container1->items.removeRef( item );
106+ //Special-case checking of the last item, since this may be
107+ //called a few times for the same item.
108+ if (item->d->container1->items.last() == item)
109+ item->d->container1->items.removeLast();
110+ else
111+ item->d->container1->items.removeRef( item );
112 }
113 item->d->container1 = 0;
114 if ( item->d->container2 && d->firstContainer ) {
115 -item->d->container2->items.removeRef( item );
116+ if (item->d->container2->items.last() == item)
117+ item->d->container2->items.removeLast();
118+ else
119+ item->d->container2->items.removeRef( item );
120 }
121 item->d->container2 = 0;
122
123diff -ur qt-2.3.8-old/src/iconview/qiconview.h qt-2.3.8/src/iconview/qiconview.h
124 --- qt-2.3.8-old/src/iconview/qiconview.h2004-07-22 01:07:46.000000000 +0200
125 +++ qt-2.3.8/src/iconview/qiconview.h2004-07-23 19:13:09.000000000 +0200
126@@ -444,6 +444,7 @@
127 virtual void contentsDropEvent( QDropEvent *e );
128 #endif
129
130+ void bufferedPaintEvent( QPaintEvent* );
131 virtual void resizeEvent( QResizeEvent* e );
132 virtual void keyPressEvent( QKeyEvent *e );
133 virtual void focusInEvent( QFocusEvent *e );
134 --- qt-2.3.8-old/src/widgets/qscrollview.cpp2004-07-22 01:07:44.000000000 +0200
135 +++ qt-2.3.8/src/widgets/qscrollview.cpp2004-07-23 19:21:06.000000000 +0200
136@@ -1280,6 +1280,9 @@
137 case QEvent::LayoutHint:
138 d->autoResizeHint(this);
139 break;
140 +case QEvent::WindowActivate:
141 +case QEvent::WindowDeactivate:
142 + return TRUE;
143 default:
144 break;
145 }
diff --git a/qt/qt-2.3.8.patch/qte238-keyboard.patch b/qt/qt-2.3.8.patch/qte238-keyboard.patch
new file mode 100644
index 0000000..0ac321f
--- a/dev/null
+++ b/qt/qt-2.3.8.patch/qte238-keyboard.patch
@@ -0,0 +1,47 @@
1Free the Virtual Terminal and Keyboard on a segfault in all cases...
2
3
4diff -ur qt-2.3.8-old/src/kernel/qkeyboard_qws.cpp qt-2.3.8/src/kernel/qkeyboard_qws.cpp
5 --- qt-2.3.8-old/src/kernel/qkeyboard_qws.cpp2004-07-22 01:07:45.000000000 +0200
6 +++ qt-2.3.8/src/kernel/qkeyboard_qws.cpp2004-07-23 19:13:52.000000000 +0200
7@@ -314,7 +314,7 @@
8 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 63
9 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 64
10 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 65
11 - { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 66
12+ { Qt::Key_F14, 0xffff , 0xffff , 0xffff }, // 66
13 { Qt::Key_Meta, 0xffff , 0xffff , 0xffff }, // 67
14 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 68
15 { Qt::Key_unknown,0xffff , 0xffff , 0xffff }, // 69
16Nur in qt-2.3.8/src/kernel/: qkeyboard_qws.cpp.orig.
17diff -ur qt-2.3.8-old/src/kernel/qwindowsystem_qws.cpp qt-2.3.8/src/kernel/qwindowsystem_qws.cpp
18 --- qt-2.3.8-old/src/kernel/qwindowsystem_qws.cpp2004-07-22 01:07:45.000000000 +0200
19 +++ qt-2.3.8/src/kernel/qwindowsystem_qws.cpp2004-07-23 19:13:52.000000000 +0200
20@@ -1273,6 +1273,18 @@
21 {
22 }
23
24+static void catchSegvSignal( int )
25+{
26+#ifndef QT_NO_QWS_KEYBOARD
27+ if ( qwsServer )
28 +qwsServer->closeKeyboard();
29+#endif
30+ QWSServer::closedown();
31+ fprintf(stderr, "Segmentation fault.\n");
32+ exit(1);
33+}
34+
35+
36 /*!
37 \class QWSServer qwindowsystem_qws.h
38 \brief Server-specific functionality in Qt/Embedded
39@@ -1365,6 +1377,7 @@
40 }
41
42 signal(SIGPIPE, ignoreSignal); //we get it when we read
43+ signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash
44 #endif
45 focusw = 0;
46 mouseGrabber = 0;
47Nur in qt-2.3.8/src/kernel/: qwindowsystem_qws.cpp.orig.