From d9fc094ff656e1a374f14ca45ad6d51234f21e85 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 27 Feb 2012 17:40:08 -0600 Subject: [PATCH] Rename tqt3 color functions --- .../files/0001-dnd_optimization.patch | 2 +- .../files/0002-dnd_active_window_fix.patch | 6 ++--- .../files/0007-qpixmap_constants.patch | 26 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libs/qt-x11-free/files/0001-dnd_optimization.patch b/libs/qt-x11-free/files/0001-dnd_optimization.patch index 595949d..b77b882 100644 --- a/libs/qt-x11-free/files/0001-dnd_optimization.patch +++ b/libs/qt-x11-free/files/0001-dnd_optimization.patch @@ -134,7 +134,7 @@ See http://lists.kde.org/?t=104388858900001&r=1&w=2 + } return TRUE; } else if ( e->type() == QEvent::MouseButtonRelease ) { - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); @@ -1106,7 +1176,7 @@ void QDragManager::move( const QPoint & delete qt_xdnd_deco; qt_xdnd_deco = new QShapedPixmapWidget( screen ); diff --git a/libs/qt-x11-free/files/0002-dnd_active_window_fix.patch b/libs/qt-x11-free/files/0002-dnd_active_window_fix.patch index f4b4cb8..9137a0c 100644 --- a/libs/qt-x11-free/files/0002-dnd_active_window_fix.patch +++ b/libs/qt-x11-free/files/0002-dnd_active_window_fix.patch @@ -131,10 +131,10 @@ author: Lubos Lunak + need_modifiers_check = FALSE; return TRUE; } else if ( e->type() == QEvent::MouseButtonRelease ) { - qApp->removeEventFilter( this ); + tqApp->removeEventFilter( this ); @@ -986,9 +1003,11 @@ bool QDragManager::eventFilter( QObject beingCancelled = FALSE; - qApp->exit_loop(); + tqApp->exit_loop(); } else { - updateMode(ke->stateAfter()); - qt_xdnd_source_sameanswer = QRect(); // force move @@ -175,7 +175,7 @@ author: Lubos Lunak + need_modifiers_check = FALSE; #ifndef QT_NO_CURSOR - qApp->setOverrideCursor( arrowCursor ); + tqApp->setOverrideCursor( arrowCursor ); --- work/qt-x11-free-3.3.8/src/kernel/qdragobject.h.sav 2003-05-19 22:34:43.000000000 +0200 +++ work/qt-x11-free-3.3.8/src/kernel/qdragobject.h 2001-01-01 01:01:00.000000000 +0100 @@ -248,7 +248,7 @@ private: diff --git a/libs/qt-x11-free/files/0007-qpixmap_constants.patch b/libs/qt-x11-free/files/0007-qpixmap_constants.patch index 276aa16..c946dfd 100644 --- a/libs/qt-x11-free/files/0007-qpixmap_constants.patch +++ b/libs/qt-x11-free/files/0007-qpixmap_constants.patch @@ -36,9 +36,9 @@ See 0005-qpixmap_mitshm.patch for details. + bppc++; -#define GET_RGB \ -- int r = qRed ( *p ); \ -- int g = qGreen( *p ); \ -- int b = qBlue ( *p++ ); \ +- int r = tqRed ( *p ); \ +- int g = tqGreen( *p ); \ +- int b = tqBlue ( *p++ ); \ - r = red_shift > 0 \ - ? r << red_shift : r >> -red_shift; \ - g = green_shift > 0 \ @@ -78,9 +78,9 @@ See 0005-qpixmap_mitshm.patch for details. else { \ - GET_RGB \ - pixel = (b & blue_mask)|(g & green_mask) | (r & red_mask) \ -+ int r = qRed ( *p ); \ -+ int g = qGreen( *p ); \ -+ int b = qBlue ( *p++ ); \ ++ int r = tqRed ( *p ); \ ++ int g = tqGreen( *p ); \ ++ int b = tqBlue ( *p++ ); \ + r = red_shift > 0 \ + ? r << red_shift : r >> -red_shift; \ + g = green_shift > 0 \ @@ -93,7 +93,7 @@ See 0005-qpixmap_mitshm.patch for details. +// optimized case - no d8 case, shift only once instead of twice, mask only once instead of twice, +// use direct values instead of variables, and use only one statement -+// (*p >> 16), (*p >> 8 ) and (*p) are qRed(),qGreen() and qBlue() without masking ++// (*p >> 16), (*p >> 8 ) and (*p) are tqRed(),tqGreen() and tqBlue() without masking +// shifts have to be passed including the shift operator (e.g. '>>3'), because of the direction +#define GET_PIXEL_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask) \ + int pixel = ((( *p >> 16 ) red_shift ) & red_mask ) \ @@ -102,8 +102,8 @@ See 0005-qpixmap_mitshm.patch for details. + ++p; + #define GET_PIXEL_DITHER_TC \ - int r = qRed ( *p ); \ - int g = qGreen( *p ); \ + int r = tqRed ( *p ); \ + int g = tqGreen( *p ); \ @@ -1220,91 +1255,177 @@ bool QPixmap::convertFromImage( const QI ? g << green_shift : g >> -green_shift; \ b = blue_shift > 0 \ @@ -125,15 +125,15 @@ See 0005-qpixmap_mitshm.patch for details. +#define GET_PIXEL_DITHER_TC_OPT(red_shift,green_shift,blue_shift,red_mask,green_mask,blue_mask, \ + rbits,gbits,bbits) \ + const int thres = D[x%16][y%16]; \ -+ int r = qRed ( *p ); \ ++ int r = tqRed ( *p ); \ + if ( r <= (255-(1<<(8-rbits))) && ((r< thres) \ + r += (1<<(8-rbits)); \ -+ int g = qGreen( *p ); \ ++ int g = tqGreen( *p ); \ + if ( g <= (255-(1<<(8-gbits))) && ((g< thres) \ + g += (1<<(8-gbits)); \ -+ int b = qBlue ( *p++ ); \ ++ int b = tqBlue ( *p++ ); \ + if ( b <= (255-(1<<(8-bbits))) && ((b< thres) \ + b += (1<<(8-bbits)); \ @@ -377,7 +377,7 @@ See 0005-qpixmap_mitshm.patch for details. for (uint y = 0; y < h; ++y) { const uchar *iptr = image.scanLine(y); for (uint x = 0; x < w; ++x) - *aptr++ = qAlpha(rgb[*iptr++]); + *aptr++ = tqAlpha(rgb[*iptr++]); + aptr += ( axi->bytes_per_line - w ); } }