summaryrefslogtreecommitdiff
path: root/qt/qt-2.3.10.patch
authorzecke <zecke>2005-02-24 20:55:16 (UTC)
committer zecke <zecke>2005-02-24 20:55:16 (UTC)
commit5bb50abc6c40e815714676a4a1505bc393c49b13 (patch) (unidiff)
tree0b0d3482919d526c16b2f79b1b4b6290df11239b /qt/qt-2.3.10.patch
parent2b6eb729bfc4c2a0868d5b19e2518b275e3a8f39 (diff)
downloadopie-5bb50abc6c40e815714676a4a1505bc393c49b13.zip
opie-5bb50abc6c40e815714676a4a1505bc393c49b13.tar.gz
opie-5bb50abc6c40e815714676a4a1505bc393c49b13.tar.bz2
Due popular request here is a 'all' patch with patches useful for
x86 builds
Diffstat (limited to 'qt/qt-2.3.10.patch') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/qt-2.3.10.patch/qte-2.3.10-all.patch292
1 files changed, 292 insertions, 0 deletions
diff --git a/qt/qt-2.3.10.patch/qte-2.3.10-all.patch b/qt/qt-2.3.10.patch/qte-2.3.10-all.patch
new file mode 100644
index 0000000..ab52716
--- a/dev/null
+++ b/qt/qt-2.3.10.patch/qte-2.3.10-all.patch
@@ -0,0 +1,292 @@
1All patches (necessary) for x86 builds. Special support for devices
2like Beagle, iPAQ, SIMpad, Zaurus can be found at the OpenEmbedded
3package database
4
5
6
7Index: qt-2.3.10/src/iconview/qiconview.cpp
8===================================================================
9 --- qt-2.3.10.orig/src/iconview/qiconview.cpp2005-02-24 21:09:53.059676113 +0100
10 +++ qt-2.3.10/src/iconview/qiconview.cpp2005-02-24 21:10:04.601020103 +0100
11@@ -225,6 +225,7 @@
12 QIconView::SelectionMode selectionMode;
13 QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor;
14 QRect *rubber;
15+ QPixmap *backBuffer;
16 QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer,
17 *fullRedrawTimer;
18 int rastX, rastY, spacing;
19@@ -2268,6 +2269,7 @@
20 d->currentItem = 0;
21 d->highlightedItem = 0;
22 d->rubber = 0;
23+ d->backBuffer = 0;
24 d->scrollTimer = 0;
25 d->startDragItem = 0;
26 d->tmpCurrentItem = 0;
27@@ -2416,6 +2418,8 @@
28 delete item;
29 item = tmp;
30 }
31+ delete d->backBuffer;
32+ d->backBuffer = 0;
33 delete d->fm;
34 d->fm = 0;
35 #ifndef QT_NO_TOOLTIP
36@@ -2882,6 +2886,48 @@
37 }
38
39 /*!
40+ This function grabs all paintevents that otherwise would have been
41+ processed by the QScrollView::viewportPaintEvent(). Here we use a
42+ doublebuffer to reduce 'on-paint' flickering on QIconView
43+ (and of course its childs).
44+
45+ \sa QScrollView::viewportPaintEvent(), QIconView::drawContents()
46+*/
47+
48+void QIconView::bufferedPaintEvent( QPaintEvent* pe )
49+{
50+ QWidget* vp = viewport();
51+ QRect r = pe->rect() & vp->rect();
52+ int ex = r.x() + contentsX();
53+ int ey = r.y() + contentsY();
54+ int ew = r.width();
55+ int eh = r.height();
56+
57+ if ( !d->backBuffer )
58 +d->backBuffer = new QPixmap(vp->size());
59+ if ( d->backBuffer->size() != vp->size() ) {
60 +//Resize function (with hysteesis). Uses a good compromise between memory
61 +//consumption and speed (number) of resizes.
62+ float newWidth = (float)vp->width();
63 +float newHeight = (float)vp->height();
64 +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() )
65 +{
66 + newWidth *= 1.1892;
67 + newHeight *= 1.1892;
68 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
69 +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() )
70 + d->backBuffer->resize( (int)newWidth, (int)newHeight );
71+ }
72+
73+ QPainter p;
74+ p.begin(d->backBuffer, vp);
75+ drawContentsOffset(&p, contentsX(), contentsY(), ex, ey, ew, eh);
76+ p.end();
77+ bitBlt(vp, r.x(), r.y(), d->backBuffer, r.x(), r.y(), ew, eh);
78+}
79+
80+/*!
81+
82 \reimp
83 */
84
85@@ -4939,7 +4985,7 @@
86 if ( !d->rubber )
87 drawDragShapes( d->oldDragPos );
88 }
89 - viewportPaintEvent( (QPaintEvent*)e );
90+ bufferedPaintEvent ((QPaintEvent*)e );
91 if ( d->dragging ) {
92 if ( !d->rubber )
93 drawDragShapes( d->oldDragPos );
94@@ -5377,11 +5423,19 @@
95 return;
96
97 if ( item->d->container1 && d->firstContainer ) {
98 -item->d->container1->items.removeRef( item );
99+ //Special-case checking of the last item, since this may be
100+ //called a few times for the same item.
101+ if (item->d->container1->items.last() == item)
102+ item->d->container1->items.removeLast();
103+ else
104+ item->d->container1->items.removeRef( item );
105 }
106 item->d->container1 = 0;
107 if ( item->d->container2 && d->firstContainer ) {
108 -item->d->container2->items.removeRef( item );
109+ if (item->d->container2->items.last() == item)
110+ item->d->container2->items.removeLast();
111+ else
112+ item->d->container2->items.removeRef( item );
113 }
114 item->d->container2 = 0;
115
116Index: qt-2.3.10/src/iconview/qiconview.h
117===================================================================
118 --- qt-2.3.10.orig/src/iconview/qiconview.h2005-02-24 21:09:53.060675971 +0100
119 +++ qt-2.3.10/src/iconview/qiconview.h2005-02-24 21:10:04.602019959 +0100
120@@ -444,6 +444,7 @@
121 virtual void contentsDropEvent( QDropEvent *e );
122 #endif
123
124+ void bufferedPaintEvent( QPaintEvent* );
125 virtual void resizeEvent( QResizeEvent* e );
126 virtual void keyPressEvent( QKeyEvent *e );
127 virtual void focusInEvent( QFocusEvent *e );
128Index: qt-2.3.10/src/kernel/qgfxraster_qws.cpp
129===================================================================
130 --- qt-2.3.10.orig/src/kernel/qgfxraster_qws.cpp2005-02-24 21:09:54.817425663 +0100
131 +++ qt-2.3.10/src/kernel/qgfxraster_qws.cpp2005-02-24 21:10:02.521320506 +0100
132@@ -4037,13 +4037,14 @@
133 for( loopc2=0;loopc2<frontadd;loopc2++ )
134 *(alphaptr++)=get_value_32(16,(unsigned char **)&temppos);
135
136 -PackType temp2;
137 -unsigned char * cp;
138 +volatile PackType temp2;
139 +volatile unsigned short int * cp;
140 for( loopc2=0;loopc2<count;loopc2++ ) {
141 - temp2=*((PackType *)temppos);
142 - cp=(unsigned char *)&temp2;
143 - *(alphaptr++)=get_value_32(16,&cp);
144 - *(alphaptr++)=get_value_32(16,&cp);
145+ temp2=*reinterpret_cast<PackType *>(temppos);
146+ cp=reinterpret_cast<volatile unsigned short int *>(&temp2);
147+ *(alphaptr++)=qt_conv16ToRgb(*cp);
148+ cp++;
149+ *(alphaptr++)=qt_conv16ToRgb(*cp);
150 temppos += 2;
151 }
152
153Index: qt-2.3.10/src/kernel/qwindowsystem_qws.cpp
154===================================================================
155 --- qt-2.3.10.orig/src/kernel/qwindowsystem_qws.cpp2005-02-24 21:09:53.891557664 +0100
156 +++ qt-2.3.10/src/kernel/qwindowsystem_qws.cpp2005-02-24 21:10:03.511177634 +0100
157@@ -918,6 +918,18 @@
158 {
159 }
160
161+static void catchSegvSignal( int )
162+{
163+#ifndef QT_NO_QWS_KEYBOARD
164+ if ( qwsServer )
165 +qwsServer->closeKeyboard();
166+#endif
167+ QWSServer::closedown();
168+ fprintf(stderr, "Segmentation fault.\n");
169+ exit(1);
170+}
171+
172+
173 /*!
174 \class QWSServer qwindowsystem_qws.h
175 \brief Server-specific functionality in Qt/Embedded
176@@ -1043,6 +1055,7 @@
177 }
178
179 signal(SIGPIPE, ignoreSignal); //we get it when we read
180+ signal(SIGSEGV, catchSegvSignal); //recover the keyboard on crash
181 #endif
182 focusw = 0;
183 mouseGrabber = 0;
184Index: qt-2.3.10/src/kernel/qwsdecoration_qws.h
185===================================================================
186 --- qt-2.3.10.orig/src/kernel/qwsdecoration_qws.h2005-02-24 21:09:54.355491532 +0100
187 +++ qt-2.3.10/src/kernel/qwsdecoration_qws.h2005-02-24 21:10:03.040245652 +0100
188@@ -50,7 +50,7 @@
189 enum Region { None=0, All=1, Title=2, Top=3, Bottom=4, Left=5, Right=6,
190 TopLeft=7, TopRight=8, BottomLeft=9, BottomRight=10,
191 Close=11, Minimize=12, Maximize=13, Normalize=14,
192 - Menu=15, LastRegion=Menu };
193 + Menu=15, LastRegion=Menu, UserDefined = 100 };
194
195 virtual QRegion region(const QWidget *, const QRect &rect, Region r=All) = 0;
196 virtual void close( QWidget * );
197Index: qt-2.3.10/src/tools/qcstring.h
198===================================================================
199 --- qt-2.3.10.orig/src/tools/qcstring.h2005-02-24 21:09:54.354491675 +0100
200 +++ qt-2.3.10/src/tools/qcstring.h2005-02-24 21:10:03.026247674 +0100
201@@ -119,7 +119,7 @@
202 // We want to keep source compatibility for 2.x
203 // ### TODO for 4.0: completely remove these and the cstr* functions
204
205-#if !defined(QT_GENUINE_STR)
206+#if 0
207
208 #undefstrlen
209 #define strlen qstrlen
210Index: qt-2.3.10/src/tools/qstring.cpp
211===================================================================
212 --- qt-2.3.10.orig/src/tools/qstring.cpp2005-02-24 21:09:55.291358022 +0100
213 +++ qt-2.3.10/src/tools/qstring.cpp2005-02-24 21:10:01.748431931 +0100
214@@ -14469,7 +14469,11 @@
215 return qt_winQString2MB( *this );
216 #endif
217 #ifdef _WS_QWS_
218- return utf8(); // ##### if there is ANY 8 bit format supported?
219+ QTextCodec* codec = QTextCodec::codecForLocale();
220+ return codec
221 + ? codec->fromUnicode(*this)
222 + : utf8();
223+ //return latin1(); // ##### if there is ANY 8 bit format supported?
224 #endif
225 #endif
226 }
227@@ -14515,7 +14519,12 @@
228 return qt_winMB2QString( local8Bit );
229 #endif
230 #ifdef _WS_QWS_
231- return fromUtf8(local8Bit,len);
232+ QTextCodec* codec = QTextCodec::codecForLocale();
233+ if( len < 0) len = qstrlen(local8Bit);
234+ return codec
235 + ? codec->toUnicode(local8Bit, len)
236 + : QString::fromUtf8(local8Bit,len);
237+// return fromLatin1(local8Bit,len);
238 #endif
239 #endif // QT_NO_TEXTCODEC
240 }
241Index: qt-2.3.10/src/widgets/qcommonstyle.cpp
242===================================================================
243 --- qt-2.3.10.orig/src/widgets/qcommonstyle.cpp2005-02-24 21:09:53.864561508 +0100
244 +++ qt-2.3.10/src/widgets/qcommonstyle.cpp2005-02-24 21:10:03.484181533 +0100
245@@ -572,7 +572,7 @@
246 bool enabled, bool active )
247 {
248 #ifndef QT_NO_MENUBAR
249-#ifndef QT_NO_STYLE_SGI
250+#if 1 // #ifndef QT_NO_STYLE_SGI
251 if (draw_menu_bar_impl != 0) {
252 QDrawMenuBarItemImpl impl = draw_menu_bar_impl;
253 (this->*impl)(p, x, y, w, h, mi, g, enabled, active);
254Index: qt-2.3.10/src/widgets/qlistview.cpp
255===================================================================
256 --- qt-2.3.10.orig/src/widgets/qlistview.cpp2005-02-24 21:09:53.868560939 +0100
257 +++ qt-2.3.10/src/widgets/qlistview.cpp2005-02-24 21:10:03.500179222 +0100
258@@ -5051,9 +5051,9 @@
259 l = l->childItem ? l->childItem : l->siblingItem;
260
261 if ( l && l->height() )
262 -s.setHeight( s.height() + 10 * l->height() );
263- else
264 -s.setHeight( s.height() + 140 );
265 +s.setHeight( s.height() + 4 /*10*/ * l->height() );
266+ else // ^v much too big for handhelds
267 +s.setHeight( s.height() + 30 /*140*/ );
268
269 if ( s.width() > s.height() * 3 )
270 s.setHeight( s.width() / 3 );
271Index: qt-2.3.10/src/widgets/qtoolbutton.cpp
272===================================================================
273 --- qt-2.3.10.orig/src/widgets/qtoolbutton.cpp2005-02-24 21:09:53.868560939 +0100
274 +++ qt-2.3.10/src/widgets/qtoolbutton.cpp2005-02-24 21:10:03.524175756 +0100
275@@ -332,12 +332,12 @@
276 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Large, QIconSet::Normal);
277 w = pm.width();
278 h = pm.height();
279 -if ( w < 32 )
280 - w = 32;
281 -if ( h < 32 )
282 - h = 32;
283 +if ( w < 24 )
284 + w = 24;
285 +if ( h < 24 )
286 + h = 24;
287 } else {
288 -w = h = 16;
289 +w = h = 14;
290 QPixmap pm = iconSet(TRUE).pixmap(QIconSet::Small, QIconSet::Normal);
291 w = pm.width();
292 h = pm.height();