-rw-r--r-- | qt/qt-2.3.7.patch/qte237-all.patch | 7 | ||||
-rw-r--r-- | qt/qt-2.3.7.patch/qte237-iconviewspeed.patch | 7 |
2 files changed, 0 insertions, 14 deletions
diff --git a/qt/qt-2.3.7.patch/qte237-all.patch b/qt/qt-2.3.7.patch/qte237-all.patch index e3351a3..6f94211 100644 --- a/qt/qt-2.3.7.patch/qte237-all.patch +++ b/qt/qt-2.3.7.patch/qte237-all.patch | |||
@@ -271,135 +271,128 @@ diff -ur qt-2.3.7-old/include/qglobal.h qt-2.3.7/include/qglobal.h | |||
271 | @@ -207,8 +207,16 @@ | 271 | @@ -207,8 +207,16 @@ |
272 | #if __GNUC__ == 2 && __GNUC_MINOR__ == 96 | 272 | #if __GNUC__ == 2 && __GNUC_MINOR__ == 96 |
273 | #define Q_FP_CCAST_BROKEN | 273 | #define Q_FP_CCAST_BROKEN |
274 | #endif | 274 | #endif |
275 | +/* ARM gcc pads structs to 32 bits, even when they contain a single | 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 | 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 | 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 | 278 | + members of a packed struct. (Pointers are OK, because then you |
279 | + supposedly know what you are doing.) */ | 279 | + supposedly know what you are doing.) */ |
280 | #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) | 280 | #if (defined(__arm__) || defined(__ARMEL__)) && !defined(QT_MOC_CPP) |
281 | #define Q_PACKED __attribute__ ((packed)) | 281 | #define Q_PACKED __attribute__ ((packed)) |
282 | +# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 | 282 | +# if __GNUC__ == 3 && __GNUC_MINOR__ >= 4 |
283 | +# define Q_NO_PACKED_REFERENCE | 283 | +# define Q_NO_PACKED_REFERENCE |
284 | +# endif | 284 | +# endif |
285 | #endif | 285 | #endif |
286 | #elif defined(__xlC__) | 286 | #elif defined(__xlC__) |
287 | #define _CC_XLC_ | 287 | #define _CC_XLC_ |
288 | diff -ur qt-2.3.7-old/include/qiconview.h qt-2.3.7/include/qiconview.h | 288 | diff -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 | 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 | 290 | +++ qt-2.3.7/include/qiconview.h2004-07-23 15:45:34.000000000 +0200 |
291 | @@ -444,6 +444,7 @@ | 291 | @@ -444,6 +444,7 @@ |
292 | virtual void contentsDropEvent( QDropEvent *e ); | 292 | virtual void contentsDropEvent( QDropEvent *e ); |
293 | #endif | 293 | #endif |
294 | 294 | ||
295 | + void bufferedPaintEvent( QPaintEvent* ); | 295 | + void bufferedPaintEvent( QPaintEvent* ); |
296 | virtual void resizeEvent( QResizeEvent* e ); | 296 | virtual void resizeEvent( QResizeEvent* e ); |
297 | virtual void keyPressEvent( QKeyEvent *e ); | 297 | virtual void keyPressEvent( QKeyEvent *e ); |
298 | virtual void focusInEvent( QFocusEvent *e ); | 298 | virtual void focusInEvent( QFocusEvent *e ); |
299 | diff -ur qt-2.3.7-old/include/qsortedlist.h qt-2.3.7/include/qsortedlist.h | 299 | diff -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 | 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 | 301 | +++ qt-2.3.7/include/qsortedlist.h2004-07-23 15:42:01.000000000 +0200 |
302 | @@ -48,7 +48,7 @@ | 302 | @@ -48,7 +48,7 @@ |
303 | public: | 303 | public: |
304 | QSortedList() {} | 304 | QSortedList() {} |
305 | QSortedList( const QSortedList<type> &l ) : QList<type>(l) {} | 305 | QSortedList( const QSortedList<type> &l ) : QList<type>(l) {} |
306 | - ~QSortedList() { clear(); } | 306 | - ~QSortedList() { clear(); } |
307 | + ~QSortedList() { this->clear(); } | 307 | + ~QSortedList() { this->clear(); } |
308 | QSortedList<type> &operator=(const QSortedList<type> &l) | 308 | QSortedList<type> &operator=(const QSortedList<type> &l) |
309 | { return (QSortedList<type>&)QList<type>::operator=(l); } | 309 | { return (QSortedList<type>&)QList<type>::operator=(l); } |
310 | 310 | ||
311 | diff -ur qt-2.3.7-old/include/qstring.h qt-2.3.7/include/qstring.h | 311 | diff -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 | 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 | 313 | +++ qt-2.3.7/include/qstring.h2004-07-23 15:42:01.000000000 +0200 |
314 | @@ -163,8 +163,16 @@ | 314 | @@ -163,8 +163,16 @@ |
315 | bool isLetterOrNumber() const; | 315 | bool isLetterOrNumber() const; |
316 | bool isDigit() const; | 316 | bool isDigit() const; |
317 | 317 | ||
318 | + | 318 | + |
319 | +#ifdef Q_NO_PACKED_REFERENCE | 319 | +#ifdef Q_NO_PACKED_REFERENCE |
320 | + uchar& cell() { return *(&cl); } | 320 | + uchar& cell() { return *(&cl); } |
321 | + uchar& row() { return *(&rw); } | 321 | + uchar& row() { return *(&rw); } |
322 | +#else | 322 | +#else |
323 | uchar& cell() { return cl; } | 323 | uchar& cell() { return cl; } |
324 | - uchar& row() { return rw; } | 324 | - uchar& row() { return rw; } |
325 | + uchar& row() { return rw; } | 325 | + uchar& row() { return rw; } |
326 | +#endif | 326 | +#endif |
327 | + | 327 | + |
328 | + | 328 | + |
329 | uchar cell() const { return cl; } | 329 | uchar cell() const { return cl; } |
330 | uchar row() const { return rw; } | 330 | uchar row() const { return rw; } |
331 | 331 | ||
332 | diff -ur qt-2.3.7-old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp | 332 | diff -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 | 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 | 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 @@ | 335 | @@ -220,6 +220,7 @@ |
343 | QIconView::SelectionMode selectionMode; | 336 | QIconView::SelectionMode selectionMode; |
344 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; | 337 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; |
345 | QRect *rubber; | 338 | QRect *rubber; |
346 | + QPixmap *backBuffer; | 339 | + QPixmap *backBuffer; |
347 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, | 340 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, |
348 | *fullRedrawTimer; | 341 | *fullRedrawTimer; |
349 | int rastX, rastY, spacing; | 342 | int rastX, rastY, spacing; |
350 | @@ -2263,6 +2264,7 @@ | 343 | @@ -2263,6 +2264,7 @@ |
351 | d->currentItem = 0; | 344 | d->currentItem = 0; |
352 | d->highlightedItem = 0; | 345 | d->highlightedItem = 0; |
353 | d->rubber = 0; | 346 | d->rubber = 0; |
354 | + d->backBuffer = 0; | 347 | + d->backBuffer = 0; |
355 | d->scrollTimer = 0; | 348 | d->scrollTimer = 0; |
356 | d->startDragItem = 0; | 349 | d->startDragItem = 0; |
357 | d->tmpCurrentItem = 0; | 350 | d->tmpCurrentItem = 0; |
358 | @@ -2411,6 +2413,8 @@ | 351 | @@ -2411,6 +2413,8 @@ |
359 | delete item; | 352 | delete item; |
360 | item = tmp; | 353 | item = tmp; |
361 | } | 354 | } |
362 | + delete d->backBuffer; | 355 | + delete d->backBuffer; |
363 | + d->backBuffer = 0; | 356 | + d->backBuffer = 0; |
364 | delete d->fm; | 357 | delete d->fm; |
365 | d->fm = 0; | 358 | d->fm = 0; |
366 | #ifndef QT_NO_TOOLTIP | 359 | #ifndef QT_NO_TOOLTIP |
367 | @@ -2877,6 +2881,48 @@ | 360 | @@ -2877,6 +2881,48 @@ |
368 | } | 361 | } |
369 | 362 | ||
370 | /*! | 363 | /*! |
371 | + This function grabs all paintevents that otherwise would have been | 364 | + This function grabs all paintevents that otherwise would have been |
372 | + processed by the QScrollView::viewportPaintEvent(). Here we use a | 365 | + processed by the QScrollView::viewportPaintEvent(). Here we use a |
373 | + doublebuffer to reduce 'on-paint' flickering on QIconView | 366 | + doublebuffer to reduce 'on-paint' flickering on QIconView |
374 | + (and of course its childs). | 367 | + (and of course its childs). |
375 | + | 368 | + |
376 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() | 369 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() |
377 | +*/ | 370 | +*/ |
378 | + | 371 | + |
379 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) | 372 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) |
380 | +{ | 373 | +{ |
381 | + QWidget* vp = viewport(); | 374 | + QWidget* vp = viewport(); |
382 | + QRect r = pe->rect() & vp->rect(); | 375 | + QRect r = pe->rect() & vp->rect(); |
383 | + int ex = r.x() + contentsX(); | 376 | + int ex = r.x() + contentsX(); |
384 | + int ey = r.y() + contentsY(); | 377 | + int ey = r.y() + contentsY(); |
385 | + int ew = r.width(); | 378 | + int ew = r.width(); |
386 | + int eh = r.height(); | 379 | + int eh = r.height(); |
387 | + | 380 | + |
388 | + if ( !d->backBuffer ) | 381 | + if ( !d->backBuffer ) |
389 | +d->backBuffer = new QPixmap(vp->size()); | 382 | +d->backBuffer = new QPixmap(vp->size()); |
390 | + if ( d->backBuffer->size() != vp->size() ) { | 383 | + if ( d->backBuffer->size() != vp->size() ) { |
391 | +//Resize function (with hysteesis). Uses a good compromise between memory | 384 | +//Resize function (with hysteesis). Uses a good compromise between memory |
392 | +//consumption and speed (number) of resizes. | 385 | +//consumption and speed (number) of resizes. |
393 | + float newWidth = (float)vp->width(); | 386 | + float newWidth = (float)vp->width(); |
394 | +float newHeight = (float)vp->height(); | 387 | +float newHeight = (float)vp->height(); |
395 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) | 388 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) |
396 | +{ | 389 | +{ |
397 | + newWidth *= 1.1892; | 390 | + newWidth *= 1.1892; |
398 | + newHeight *= 1.1892; | 391 | + newHeight *= 1.1892; |
399 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 392 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
400 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) | 393 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) |
401 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 394 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
402 | + } | 395 | + } |
403 | + | 396 | + |
404 | + QPainter p; | 397 | + QPainter p; |
405 | + p.begin(d->backBuffer, vp); | 398 | + p.begin(d->backBuffer, vp); |
diff --git a/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch b/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch index 63e45ec..81064e1 100644 --- a/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch +++ b/qt/qt-2.3.7.patch/qte237-iconviewspeed.patch | |||
@@ -1,85 +1,78 @@ | |||
1 | Speed up patches backported from | 1 | Speed up patches backported from |
2 | 2 | ||
3 | http://robotics.dei.unipd.it/~koral/KDE/kflicker.html | 3 | http://robotics.dei.unipd.it/~koral/KDE/kflicker.html |
4 | 4 | ||
5 | and | 5 | and |
6 | 6 | ||
7 | http://lists.kde.org/?l=kde-optimize&m=105382164111363&w=2 (complete thread) | 7 | http://lists.kde.org/?l=kde-optimize&m=105382164111363&w=2 (complete thread) |
8 | 8 | ||
9 | 9 | ||
10 | 10 | ||
11 | 11 | ||
12 | diff -u qt-2.3.7_old/src/iconview/qiconview.cpp qt-2.3.7/src/iconview/qiconview.cpp | 12 | diff -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 | 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 | 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 @@ | 15 | @@ -220,6 +220,7 @@ |
23 | QIconView::SelectionMode selectionMode; | 16 | QIconView::SelectionMode selectionMode; |
24 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; | 17 | QIconViewItem *currentItem, *tmpCurrentItem, *highlightedItem, *startDragItem, *pressedItem, *selectAnchor; |
25 | QRect *rubber; | 18 | QRect *rubber; |
26 | + QPixmap *backBuffer; | 19 | + QPixmap *backBuffer; |
27 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, | 20 | QTimer *scrollTimer, *adjustTimer, *updateTimer, *inputTimer, |
28 | *fullRedrawTimer; | 21 | *fullRedrawTimer; |
29 | int rastX, rastY, spacing; | 22 | int rastX, rastY, spacing; |
30 | @@ -2263,6 +2264,7 @@ | 23 | @@ -2263,6 +2264,7 @@ |
31 | d->currentItem = 0; | 24 | d->currentItem = 0; |
32 | d->highlightedItem = 0; | 25 | d->highlightedItem = 0; |
33 | d->rubber = 0; | 26 | d->rubber = 0; |
34 | + d->backBuffer = 0; | 27 | + d->backBuffer = 0; |
35 | d->scrollTimer = 0; | 28 | d->scrollTimer = 0; |
36 | d->startDragItem = 0; | 29 | d->startDragItem = 0; |
37 | d->tmpCurrentItem = 0; | 30 | d->tmpCurrentItem = 0; |
38 | @@ -2411,6 +2413,8 @@ | 31 | @@ -2411,6 +2413,8 @@ |
39 | delete item; | 32 | delete item; |
40 | item = tmp; | 33 | item = tmp; |
41 | } | 34 | } |
42 | + delete d->backBuffer; | 35 | + delete d->backBuffer; |
43 | + d->backBuffer = 0; | 36 | + d->backBuffer = 0; |
44 | delete d->fm; | 37 | delete d->fm; |
45 | d->fm = 0; | 38 | d->fm = 0; |
46 | #ifndef QT_NO_TOOLTIP | 39 | #ifndef QT_NO_TOOLTIP |
47 | @@ -2877,6 +2881,48 @@ | 40 | @@ -2877,6 +2881,48 @@ |
48 | } | 41 | } |
49 | 42 | ||
50 | /*! | 43 | /*! |
51 | + This function grabs all paintevents that otherwise would have been | 44 | + This function grabs all paintevents that otherwise would have been |
52 | + processed by the QScrollView::viewportPaintEvent(). Here we use a | 45 | + processed by the QScrollView::viewportPaintEvent(). Here we use a |
53 | + doublebuffer to reduce 'on-paint' flickering on QIconView | 46 | + doublebuffer to reduce 'on-paint' flickering on QIconView |
54 | + (and of course its childs). | 47 | + (and of course its childs). |
55 | + | 48 | + |
56 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() | 49 | + \sa QScrollView::viewportPaintEvent(), QIconView::drawContents() |
57 | +*/ | 50 | +*/ |
58 | + | 51 | + |
59 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) | 52 | +void QIconView::bufferedPaintEvent( QPaintEvent* pe ) |
60 | +{ | 53 | +{ |
61 | + QWidget* vp = viewport(); | 54 | + QWidget* vp = viewport(); |
62 | + QRect r = pe->rect() & vp->rect(); | 55 | + QRect r = pe->rect() & vp->rect(); |
63 | + int ex = r.x() + contentsX(); | 56 | + int ex = r.x() + contentsX(); |
64 | + int ey = r.y() + contentsY(); | 57 | + int ey = r.y() + contentsY(); |
65 | + int ew = r.width(); | 58 | + int ew = r.width(); |
66 | + int eh = r.height(); | 59 | + int eh = r.height(); |
67 | + | 60 | + |
68 | + if ( !d->backBuffer ) | 61 | + if ( !d->backBuffer ) |
69 | +d->backBuffer = new QPixmap(vp->size()); | 62 | +d->backBuffer = new QPixmap(vp->size()); |
70 | + if ( d->backBuffer->size() != vp->size() ) { | 63 | + if ( d->backBuffer->size() != vp->size() ) { |
71 | +//Resize function (with hysteesis). Uses a good compromise between memory | 64 | +//Resize function (with hysteesis). Uses a good compromise between memory |
72 | +//consumption and speed (number) of resizes. | 65 | +//consumption and speed (number) of resizes. |
73 | + float newWidth = (float)vp->width(); | 66 | + float newWidth = (float)vp->width(); |
74 | +float newHeight = (float)vp->height(); | 67 | +float newHeight = (float)vp->height(); |
75 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) | 68 | +if ( newWidth > d->backBuffer->width() || newHeight > d->backBuffer->height() ) |
76 | +{ | 69 | +{ |
77 | + newWidth *= 1.1892; | 70 | + newWidth *= 1.1892; |
78 | + newHeight *= 1.1892; | 71 | + newHeight *= 1.1892; |
79 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 72 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
80 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) | 73 | +} else if ( 1.5*newWidth < d->backBuffer->width() || 1.5*newHeight < d->backBuffer->height() ) |
81 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); | 74 | + d->backBuffer->resize( (int)newWidth, (int)newHeight ); |
82 | + } | 75 | + } |
83 | + | 76 | + |
84 | + QPainter p; | 77 | + QPainter p; |
85 | + p.begin(d->backBuffer, vp); | 78 | + p.begin(d->backBuffer, vp); |