From f7e71d47719ab6094cf4a9fafffa5ea351973522 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 13 Jan 2011 08:32:36 +0000 Subject: Initial conversion for TQt for Qt4 3.4.0 TP2 This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdefx/kpixmap.cpp | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'kdefx/kpixmap.cpp') diff --git a/kdefx/kpixmap.cpp b/kdefx/kpixmap.cpp index eeccb6213..152ae6e83 100644 --- a/kdefx/kpixmap.cpp +++ b/kdefx/kpixmap.cpp @@ -56,7 +56,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) for ( gc=0; gc<=MAX_G; gc++ ) for ( bc=0; bc<=MAX_B; bc++ ) { dst->setColor( INDEXOF(rc,gc,bc), - qRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); + tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) ); } int sw = src->width(); @@ -79,8 +79,8 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst ) b = dst->scanLine(y); int endian = (TQImage::systemBitOrder() == TQImage::BigEndian); int x; - uchar* q = src->scanLine(y); - uchar* q2 = src->scanLine(y+1 < src->height() ? y + 1 : 0); + uchar* q = const_cast(src)->scanLine(y); + uchar* q2 = const_cast(src)->scanLine(y+1 < src->height() ? y + 1 : 0); for (int chan = 0; chan < 3; chan++) { b = dst->scanLine(y); @@ -293,26 +293,26 @@ bool KPixmap::checkColorTable( const TQImage &image ) int i = 0; if (kpixmap_iconPalette == 0) { - kpixmap_iconPalette = new QColor[40]; + kpixmap_iconPalette = new TQColor[40]; // Standard palette - kpixmap_iconPalette[i++] = tqred; - kpixmap_iconPalette[i++] = tqgreen; - kpixmap_iconPalette[i++] = tqblue; - kpixmap_iconPalette[i++] = tqcyan; - kpixmap_iconPalette[i++] = tqmagenta; - kpixmap_iconPalette[i++] = tqyellow; - kpixmap_iconPalette[i++] = tqdarkRed; - kpixmap_iconPalette[i++] = tqdarkGreen; - kpixmap_iconPalette[i++] = tqdarkBlue; - kpixmap_iconPalette[i++] = tqdarkCyan; - kpixmap_iconPalette[i++] = tqdarkMagenta; - kpixmap_iconPalette[i++] = tqdarkYellow; - kpixmap_iconPalette[i++] = tqwhite; - kpixmap_iconPalette[i++] = tqlightGray; - kpixmap_iconPalette[i++] = tqgray; - kpixmap_iconPalette[i++] = tqdarkGray; - kpixmap_iconPalette[i++] = tqblack; + kpixmap_iconPalette[i++] = red; + kpixmap_iconPalette[i++] = green; + kpixmap_iconPalette[i++] = blue; + kpixmap_iconPalette[i++] = cyan; + kpixmap_iconPalette[i++] = magenta; + kpixmap_iconPalette[i++] = yellow; + kpixmap_iconPalette[i++] = darkRed; + kpixmap_iconPalette[i++] = darkGreen; + kpixmap_iconPalette[i++] = darkBlue; + kpixmap_iconPalette[i++] = darkCyan; + kpixmap_iconPalette[i++] = darkMagenta; + kpixmap_iconPalette[i++] = darkYellow; + kpixmap_iconPalette[i++] = white; + kpixmap_iconPalette[i++] = lightGray; + kpixmap_iconPalette[i++] = gray; + kpixmap_iconPalette[i++] = darkGray; + kpixmap_iconPalette[i++] = black; // Pastels kpixmap_iconPalette[i++] = TQColor( 255, 192, 192 ); @@ -367,9 +367,9 @@ bool KPixmap::checkColorTable( const TQImage &image ) for ( i=0; i