From 6dec101d43dcbd4195c47d54bd388db1a8d7230e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 17 Jun 2012 17:28:28 -0500 Subject: Automated update from Qt3 --- src/kernel/ntqpen.h | 2 +- src/kernel/ntqprocess.h | 2 +- src/kernel/ntqsizepolicy.h | 16 +++--- src/kernel/ntqvariant.h | 16 +++--- src/kernel/ntqwidget.h | 4 +- src/kernel/ntqwindowdefs.h | 2 +- src/kernel/qapplication_x11.cpp | 2 +- src/kernel/qcolor.cpp | 4 +- src/kernel/qcolor_p.cpp | 4 +- src/kernel/qcursor.cpp | 4 +- src/kernel/qfont.cpp | 28 +++++------ src/kernel/qfontdatabase_x11.cpp | 48 +++++++++--------- src/kernel/qimage.cpp | 78 ++++++++++++++--------------- src/kernel/qinternal.cpp | 2 +- src/kernel/qinternal_p.h | 2 +- src/kernel/qjpegio.cpp | 2 +- src/kernel/qpainter.cpp | 12 ++--- src/kernel/qpicture.cpp | 104 +++++++++++++++++++-------------------- src/kernel/qpixmap_x11.cpp | 8 +-- src/kernel/qpoint.cpp | 8 +-- src/kernel/qprinter_p.h | 2 +- src/kernel/qpsprinter.cpp | 20 ++++---- src/kernel/qrect.cpp | 12 ++--- src/kernel/qregion.cpp | 16 +++--- src/kernel/qrichtext.cpp | 2 +- src/kernel/qscriptengine.cpp | 2 +- src/kernel/qsize.cpp | 8 +-- src/kernel/qtextengine.cpp | 4 +- src/kernel/qtextengine_p.h | 2 +- src/kernel/qtextlayout.cpp | 6 +-- src/kernel/qtranslator.cpp | 62 +++++++++++------------ src/kernel/qvariant.cpp | 66 ++++++++++++------------- 32 files changed, 275 insertions(+), 275 deletions(-) (limited to 'src/kernel') diff --git a/src/kernel/ntqpen.h b/src/kernel/ntqpen.h index e92a7cc06..dc839dc7e 100644 --- a/src/kernel/ntqpen.h +++ b/src/kernel/ntqpen.h @@ -86,7 +86,7 @@ private: PenStyle style; uint width; TQColor color; - Q_UINT16 linest; + TQ_UINT16 linest; } *data; }; diff --git a/src/kernel/ntqprocess.h b/src/kernel/ntqprocess.h index 2e76223de..5638517e8 100644 --- a/src/kernel/ntqprocess.h +++ b/src/kernel/ntqprocess.h @@ -99,7 +99,7 @@ public: #if defined(Q_OS_WIN32) typedef void* PID; #else - typedef Q_LONG PID; + typedef TQ_LONG PID; #endif PID processIdentifier(); diff --git a/src/kernel/ntqsizepolicy.h b/src/kernel/ntqsizepolicy.h index 85b087a53..ef13db7c4 100644 --- a/src/kernel/ntqsizepolicy.h +++ b/src/kernel/ntqsizepolicy.h @@ -73,7 +73,7 @@ public: TQSizePolicy() : data( 0 ) { } TQSizePolicy( SizeType hor, SizeType ver, bool hfw = FALSE ) - : data( hor | (ver<> 16) & 0xff) | (p & 0xff00ff00); return s << p; @@ -945,7 +945,7 @@ TQDataStream &operator<<( TQDataStream &s, const TQColor &c ) TQDataStream &operator>>( TQDataStream &s, TQColor &c ) { - Q_UINT32 p; + TQ_UINT32 p; s >> p; if ( s.version() == 1 ) // Swap red and blue p = ((p << 16) & 0xff0000) | ((p >> 16) & 0xff) | (p & 0xff00ff00); diff --git a/src/kernel/qcolor_p.cpp b/src/kernel/qcolor_p.cpp index 5db1ffe18..97a3e4882 100644 --- a/src/kernel/qcolor_p.cpp +++ b/src/kernel/qcolor_p.cpp @@ -737,9 +737,9 @@ static int rgb_cmp( const void *d1, const void *d2 ) bool qt_get_named_rgb( const char *name, TQRgb* rgb ) { - Q_LONG len = strlen(name)+1; + TQ_LONG len = strlen(name)+1; char *name_no_space = (char *)malloc(len); - for(Q_LONG o=0,i=0; i < len; i++) { + for(TQ_LONG o=0,i=0; i < len; i++) { if(name[i] != '\t' && name[i] != ' ') name_no_space[o++] = name[i]; } diff --git a/src/kernel/qcursor.cpp b/src/kernel/qcursor.cpp index 2a4cfd18d..ecb21333f 100644 --- a/src/kernel/qcursor.cpp +++ b/src/kernel/qcursor.cpp @@ -159,7 +159,7 @@ TQDataStream &operator<<( TQDataStream &s, const TQCursor &c ) { - s << (Q_INT16)c.shape(); // write shape id to stream + s << (TQ_INT16)c.shape(); // write shape id to stream if ( c.shape() == TQt::BitmapCursor ) { // bitmap cursor #if !defined(QT_NO_IMAGEIO) s << *c.bitmap() << *c.mask(); @@ -180,7 +180,7 @@ TQDataStream &operator<<( TQDataStream &s, const TQCursor &c ) TQDataStream &operator>>( TQDataStream &s, TQCursor &c ) { - Q_INT16 shape; + TQ_INT16 shape; s >> shape; // read shape id from stream if ( shape == TQt::BitmapCursor ) { // read bitmap cursor #if !defined(QT_NO_IMAGEIO) diff --git a/src/kernel/qfont.cpp b/src/kernel/qfont.cpp index be0275151..a49dd3493 100644 --- a/src/kernel/qfont.cpp +++ b/src/kernel/qfont.cpp @@ -1547,13 +1547,13 @@ TQStringList TQFont::substitutions() Internal function. Converts boolean font settings to an unsigned 8-bit number. Used for serialization etc. */ -static Q_UINT8 get_font_bits( const TQFontPrivate *f ) +static TQ_UINT8 get_font_bits( const TQFontPrivate *f ) { #ifdef QT_CHECK_STATE Q_ASSERT( f != 0 ); #endif - Q_UINT8 bits = 0; + TQ_UINT8 bits = 0; if ( f->request.italic ) bits |= 0x01; if ( f->underline ) @@ -1578,7 +1578,7 @@ static Q_UINT8 get_font_bits( const TQFontPrivate *f ) Internal function. Sets boolean font settings from an unsigned 8-bit number. Used for serialization etc. */ -static void set_font_bits( Q_UINT8 bits, TQFontPrivate *f ) +static void set_font_bits( TQ_UINT8 bits, TQFontPrivate *f ) { #ifdef QT_CHECK_STATE Q_ASSERT( f != 0 ); @@ -1728,25 +1728,25 @@ TQDataStream &operator<<( TQDataStream &s, const TQFont &font ) } if ( s.version() <= 3 ) { - Q_INT16 pointSize = (Q_INT16) font.d->request.pointSize; + TQ_INT16 pointSize = (TQ_INT16) font.d->request.pointSize; if ( pointSize == -1 ) { #ifdef Q_WS_X11 - pointSize = (Q_INT16)(font.d->request.pixelSize*720/TQPaintDevice::x11AppDpiY()); + pointSize = (TQ_INT16)(font.d->request.pixelSize*720/TQPaintDevice::x11AppDpiY()); #else - pointSize = (Q_INT16)TQFontInfo( font ).pointSize() * 10; + pointSize = (TQ_INT16)TQFontInfo( font ).pointSize() * 10; #endif } s << pointSize; } else { - s << (Q_INT16) font.d->request.pointSize; - s << (Q_INT16) font.d->request.pixelSize; + s << (TQ_INT16) font.d->request.pointSize; + s << (TQ_INT16) font.d->request.pixelSize; } - s << (Q_UINT8) font.d->request.styleHint; + s << (TQ_UINT8) font.d->request.styleHint; if ( s.version() >= 5 ) - s << (Q_UINT8 ) font.d->request.styleStrategy; - return s << (Q_UINT8) 0 - << (Q_UINT8) font.d->request.weight + s << (TQ_UINT8 ) font.d->request.styleStrategy; + return s << (TQ_UINT8) 0 + << (TQ_UINT8) font.d->request.weight << get_font_bits(font.d); } @@ -1766,8 +1766,8 @@ TQDataStream &operator>>( TQDataStream &s, TQFont &font ) font.d = new TQFontPrivate; font.d->mask = TQFontPrivate::Complete; - Q_INT16 pointSize, pixelSize = -1; - Q_UINT8 styleHint, styleStrategy = TQFont::PreferDefault, charSet, weight, bits; + TQ_INT16 pointSize, pixelSize = -1; + TQ_UINT8 styleHint, styleStrategy = TQFont::PreferDefault, charSet, weight, bits; if ( s.version() == 1 ) { TQCString fam; diff --git a/src/kernel/qfontdatabase_x11.cpp b/src/kernel/qfontdatabase_x11.cpp index ba768d811..286bd08ee 100644 --- a/src/kernel/qfontdatabase_x11.cpp +++ b/src/kernel/qfontdatabase_x11.cpp @@ -1054,15 +1054,15 @@ static bool loadXftFont( FcPattern* font ) #ifndef QT_XFT2 #define MAKE_TAG( _x1, _x2, _x3, _x4 ) \ - ( ( (Q_UINT32)_x1 << 24 ) | \ - ( (Q_UINT32)_x2 << 16 ) | \ - ( (Q_UINT32)_x3 << 8 ) | \ - (Q_UINT32)_x4 ) + ( ( (TQ_UINT32)_x1 << 24 ) | \ + ( (TQ_UINT32)_x2 << 16 ) | \ + ( (TQ_UINT32)_x3 << 8 ) | \ + (TQ_UINT32)_x4 ) #ifdef _POSIX_MAPPED_FILES -static inline Q_UINT32 getUInt(unsigned char *p) +static inline TQ_UINT32 getUInt(unsigned char *p) { - Q_UINT32 val; + TQ_UINT32 val; val = *p++ << 24; val |= *p++ << 16; val |= *p++ << 8; @@ -1071,16 +1071,16 @@ static inline Q_UINT32 getUInt(unsigned char *p) return val; } -static inline Q_UINT16 getUShort(unsigned char *p) +static inline TQ_UINT16 getUShort(unsigned char *p) { - Q_UINT16 val; + TQ_UINT16 val; val = *p++ << 8; val |= *p; return val; } -static inline void tag_to_string( char *string, Q_UINT32 tag ) +static inline void tag_to_string( char *string, TQ_UINT32 tag ) { string[0] = (tag >> 24)&0xff; string[1] = (tag >> 16)&0xff; @@ -1089,7 +1089,7 @@ static inline void tag_to_string( char *string, Q_UINT32 tag ) string[4] = 0; } -static Q_UINT16 getGlyphIndex( unsigned char *table, Q_UINT16 format, unsigned short unicode ) +static TQ_UINT16 getGlyphIndex( unsigned char *table, TQ_UINT16 format, unsigned short unicode ) { if ( format == 0 ) { if ( unicode < 256 ) @@ -1097,26 +1097,26 @@ static Q_UINT16 getGlyphIndex( unsigned char *table, Q_UINT16 format, unsigned s } else if ( format == 2 ) { tqWarning("format 2 encoding table for Unicode, not implemented!"); } else if ( format == 4 ) { - Q_UINT16 segCountX2 = getUShort( table + 6 ); + TQ_UINT16 segCountX2 = getUShort( table + 6 ); unsigned char *ends = table + 14; - Q_UINT16 endIndex = 0; + TQ_UINT16 endIndex = 0; int i = 0; for ( ; i < segCountX2/2 && (endIndex = getUShort( ends + 2*i )) < unicode; i++ ); unsigned char *idx = ends + segCountX2 + 2 + 2*i; - Q_UINT16 startIndex = getUShort( idx ); + TQ_UINT16 startIndex = getUShort( idx ); if ( startIndex > unicode ) return 0; idx += segCountX2; - Q_INT16 idDelta = (Q_INT16)getUShort( idx ); + TQ_INT16 idDelta = (TQ_INT16)getUShort( idx ); idx += segCountX2; - Q_UINT16 idRangeoffset_t = (Q_UINT16)getUShort( idx ); + TQ_UINT16 idRangeoffset_t = (TQ_UINT16)getUShort( idx ); - Q_UINT16 glyphIndex; + TQ_UINT16 glyphIndex; if ( idRangeoffset_t ) { - Q_UINT16 id = getUShort( idRangeoffset_t + 2*(unicode - startIndex) + idx); + TQ_UINT16 id = getUShort( idRangeoffset_t + 2*(unicode - startIndex) + idx); if ( id ) glyphIndex = ( idDelta + id ) % 0x10000; else @@ -1150,18 +1150,18 @@ static inline void checkXftCoverage( TQtFontFamily *family ) goto error; unsigned char *ttf = (unsigned char *)map; - Q_UINT32 version = getUInt( ttf ); + TQ_UINT32 version = getUInt( ttf ); if ( version != 0x00010000 ) { // tqDebug("file has wrong version %x", version ); goto error1; } - Q_UINT16 numTables = getUShort( ttf+4 ); + TQ_UINT16 numTables = getUShort( ttf+4 ); unsigned char *table_dir = ttf + 12; - Q_UINT32 cmap_offset = 0; - Q_UINT32 cmap_length = 0; + TQ_UINT32 cmap_offset = 0; + TQ_UINT32 cmap_length = 0; for ( int n = 0; n < numTables; n++ ) { - Q_UINT32 tag = getUInt( table_dir + 16*n ); + TQ_UINT32 tag = getUInt( table_dir + 16*n ); if ( tag == MAKE_TAG( 'c', 'm', 'a', 'p' ) ) { cmap_offset = getUInt( table_dir + 16*n + 8 ); cmap_length = getUInt( table_dir + 16*n + 12 ); @@ -1193,7 +1193,7 @@ static inline void checkXftCoverage( TQtFontFamily *family ) unsigned char *unicode_table = 0; bool symbol_table = TRUE; for ( int n = 0; n < numTables; n++ ) { - Q_UINT32 version = getUInt( cmap + 4 + 8*n ); + TQ_UINT32 version = getUInt( cmap + 4 + 8*n ); // accept both symbol and Unicode encodings. prefer unicode. if ( version == 0x00030001 || version == 0x00030000 ) { unicode_table = cmap + getUInt( cmap + 4 + 8*n + 4 ); @@ -1209,7 +1209,7 @@ static inline void checkXftCoverage( TQtFontFamily *family ) goto error1; } - Q_UINT16 format = getUShort( unicode_table ); + TQ_UINT16 format = getUShort( unicode_table ); if ( format != 4 ) goto error1; diff --git a/src/kernel/qimage.cpp b/src/kernel/qimage.cpp index fad12bfae..59ed9f106 100644 --- a/src/kernel/qimage.cpp +++ b/src/kernel/qimage.cpp @@ -1062,15 +1062,15 @@ void TQImage::fill( uint pixel ) void TQImage::invertPixels( bool invertAlpha ) { - Q_UINT32 n = numBytes(); + TQ_UINT32 n = numBytes(); if ( n % 4 ) { - Q_UINT8 *p = (Q_UINT8*)bits(); - Q_UINT8 *end = p + n; + TQ_UINT8 *p = (TQ_UINT8*)bits(); + TQ_UINT8 *end = p + n; while ( p < end ) *p++ ^= 0xff; } else { - Q_UINT32 *p = (Q_UINT32*)bits(); - Q_UINT32 *end = p + n/4; + TQ_UINT32 *p = (TQ_UINT32*)bits(); + TQ_UINT32 *end = p + n/4; uint xorbits = invertAlpha && depth() == 32 ? 0x00ffffff : 0xffffffff; while ( p < end ) *p++ ^= xorbits; @@ -3231,8 +3231,8 @@ TQImage TQImage::mirror(bool horizontal, bool vertical) const // 1 bit, 8 bit if (depth() == 1 || depth() == 8) { for (int sy = 0; sy < h; sy++, dy += dyi) { - Q_UINT8* ssl = (Q_UINT8*)(data->bits[sy]); - Q_UINT8* dsl = (Q_UINT8*)(result.data->bits[dy]); + TQ_UINT8* ssl = (TQ_UINT8*)(data->bits[sy]); + TQ_UINT8* dsl = (TQ_UINT8*)(result.data->bits[dy]); int dx = dxs; for (int sx = 0; sx < w; sx++, dx += dxi) dsl[dx] = ssl[sx]; @@ -3243,8 +3243,8 @@ TQImage TQImage::mirror(bool horizontal, bool vertical) const // 16 bit else if (depth() == 16) { for (int sy = 0; sy < h; sy++, dy += dyi) { - Q_UINT16* ssl = (Q_UINT16*)(data->bits[sy]); - Q_UINT16* dsl = (Q_UINT16*)(result.data->bits[dy]); + TQ_UINT16* ssl = (TQ_UINT16*)(data->bits[sy]); + TQ_UINT16* dsl = (TQ_UINT16*)(result.data->bits[dy]); int dx = dxs; for (int sx = 0; sx < w; sx++, dx += dxi) dsl[dx] = ssl[sx]; @@ -3254,8 +3254,8 @@ TQImage TQImage::mirror(bool horizontal, bool vertical) const // 32 bit else if (depth() == 32) { for (int sy = 0; sy < h; sy++, dy += dyi) { - Q_UINT32* ssl = (Q_UINT32*)(data->bits[sy]); - Q_UINT32* dsl = (Q_UINT32*)(result.data->bits[dy]); + TQ_UINT32* ssl = (TQ_UINT32*)(data->bits[sy]); + TQ_UINT32* dsl = (TQ_UINT32*)(result.data->bits[dy]); int dx = dxs; for (int sx = 0; sx < w; sx++, dx += dxi) dsl[dx] = ssl[sx]; @@ -3267,9 +3267,9 @@ TQImage TQImage::mirror(bool horizontal, bool vertical) const if (horizontal && depth() == 1) { int shift = width() % 8; for (int y = h-1; y >= 0; y--) { - Q_UINT8* a0 = (Q_UINT8*)(result.data->bits[y]); + TQ_UINT8* a0 = (TQ_UINT8*)(result.data->bits[y]); // Swap bytes - Q_UINT8* a = a0+dxs; + TQ_UINT8* a = a0+dxs; while (a >= a0) { *a = bitflip[*a]; a--; @@ -3277,17 +3277,17 @@ TQImage TQImage::mirror(bool horizontal, bool vertical) const // Shift bits if unaligned if (shift != 0) { a = a0+dxs; - Q_UINT8 c = 0; + TQ_UINT8 c = 0; if (bitOrder() == TQImage::LittleEndian) { while (a >= a0) { - Q_UINT8 nc = *a << shift; + TQ_UINT8 nc = *a << shift; *a = (*a >> (8-shift)) | c; --a; c = nc; } } else { while (a >= a0) { - Q_UINT8 nc = *a >> shift; + TQ_UINT8 nc = *a >> shift; *a = (*a << (8-shift)) | c; --a; c = nc; @@ -3590,10 +3590,10 @@ TQDataStream &operator<<( TQDataStream &s, const TQImage &image ) { if ( s.version() >= 5 ) { if ( image.isNull() ) { - s << (Q_INT32) 0; // null image marker + s << (TQ_INT32) 0; // null image marker return s; } else { - s << (Q_INT32) 1; + s << (TQ_INT32) 1; // continue ... } } @@ -3621,7 +3621,7 @@ TQDataStream &operator<<( TQDataStream &s, const TQImage &image ) TQDataStream &operator>>( TQDataStream &s, TQImage &image ) { if ( s.version() >= 5 ) { - Q_INT32 nullMarker; + TQ_INT32 nullMarker; s >> nullMarker; if ( !nullMarker ) { image = TQImage(); // null image @@ -4536,10 +4536,10 @@ const int BMP_FILEHDR_SIZE = 14; // size of BMP_FILEHDR data struct BMP_FILEHDR { // BMP file header char bfType[2]; // "BM" - Q_INT32 bfSize; // size of file - Q_INT16 bfReserved1; - Q_INT16 bfReserved2; - Q_INT32 bfOffBits; // pointer to the pixmap bits + TQ_INT32 bfSize; // size of file + TQ_INT16 bfReserved1; + TQ_INT16 bfReserved2; + TQ_INT32 bfOffBits; // pointer to the pixmap bits }; TQDataStream &operator>>( TQDataStream &s, BMP_FILEHDR &bf ) @@ -4567,17 +4567,17 @@ const int BMP_RLE4 = 2; // run-length encoded, 4 bits const int BMP_BITFIELDS = 3; // RGB values encoded in data as bit-fields struct BMP_INFOHDR { // BMP information header - Q_INT32 biSize; // size of this struct - Q_INT32 biWidth; // pixmap width - Q_INT32 biHeight; // pixmap height - Q_INT16 biPlanes; // should be 1 - Q_INT16 biBitCount; // number of bits per pixel - Q_INT32 biCompression; // compression method - Q_INT32 biSizeImage; // size of image - Q_INT32 biXPelsPerMeter; // horizontal resolution - Q_INT32 biYPelsPerMeter; // vertical resolution - Q_INT32 biClrUsed; // number of colors used - Q_INT32 biClrImportant; // number of important colors + TQ_INT32 biSize; // size of this struct + TQ_INT32 biWidth; // pixmap width + TQ_INT32 biHeight; // pixmap height + TQ_INT16 biPlanes; // should be 1 + TQ_INT16 biBitCount; // number of bits per pixel + TQ_INT32 biCompression; // compression method + TQ_INT32 biSizeImage; // size of image + TQ_INT32 biXPelsPerMeter; // horizontal resolution + TQ_INT32 biYPelsPerMeter; // vertical resolution + TQ_INT32 biClrUsed; // number of colors used + TQ_INT32 biClrImportant; // number of important colors }; @@ -4591,7 +4591,7 @@ TQDataStream &operator>>( TQDataStream &s, BMP_INFOHDR &bi ) s >> bi.biClrUsed >> bi.biClrImportant; } else { // probably old Windows format - Q_INT16 w, h; + TQ_INT16 w, h; s >> w >> h >> bi.biPlanes >> bi.biBitCount; bi.biWidth = w; bi.biHeight = h; @@ -4709,11 +4709,11 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) return FALSE; } } else if (comp == BMP_BITFIELDS && (nbits == 16 || nbits == 32)) { - if ( (Q_ULONG)d->readBlock( (char *)&red_mask, sizeof(red_mask) ) != sizeof(red_mask) ) + if ( (TQ_ULONG)d->readBlock( (char *)&red_mask, sizeof(red_mask) ) != sizeof(red_mask) ) return FALSE; - if ( (Q_ULONG)d->readBlock( (char *)&green_mask, sizeof(green_mask) ) != sizeof(green_mask) ) + if ( (TQ_ULONG)d->readBlock( (char *)&green_mask, sizeof(green_mask) ) != sizeof(green_mask) ) return FALSE; - if ( (Q_ULONG)d->readBlock( (char *)&blue_mask, sizeof(blue_mask) ) != sizeof(blue_mask) ) + if ( (TQ_ULONG)d->readBlock( (char *)&blue_mask, sizeof(blue_mask) ) != sizeof(blue_mask) ) return FALSE; red_shift = calc_shift(red_mask); red_scale = 256 / ((red_mask >> red_shift) + 1); @@ -4733,7 +4733,7 @@ bool read_dib( TQDataStream& s, int offset, int startpos, TQImage& image ) return FALSE; // offset can be bogus, be careful - if (offset>=0 && startpos + offset > (Q_LONG)d->at() ) + if (offset>=0 && startpos + offset > (TQ_LONG)d->at() ) d->at( startpos + offset ); // start of image data int bpl = image.bytesPerLine(); diff --git a/src/kernel/qinternal.cpp b/src/kernel/qinternal.cpp index 0b64c69cf..453ff05b8 100644 --- a/src/kernel/qinternal.cpp +++ b/src/kernel/qinternal.cpp @@ -679,7 +679,7 @@ TQMembuf::~TQMembuf() buffer and copies it into \a sink. If \a sink is a 0 pointer the data goes into the nirvana. */ -bool TQMembuf::consumeBytes( Q_ULONG nbytes, char *sink ) +bool TQMembuf::consumeBytes( TQ_ULONG nbytes, char *sink ) { if ( nbytes <= 0 || nbytes > _size ) return FALSE; diff --git a/src/kernel/qinternal_p.h b/src/kernel/qinternal_p.h index 875263dd9..57c5dcd15 100644 --- a/src/kernel/qinternal_p.h +++ b/src/kernel/qinternal_p.h @@ -179,7 +179,7 @@ public: void append( TQByteArray *ba ); void clear(); - bool consumeBytes( Q_ULONG nbytes, char *sink ); + bool consumeBytes( TQ_ULONG nbytes, char *sink ); TQByteArray readAll(); bool scanNewline( TQByteArray *store ); bool canReadLine() const; diff --git a/src/kernel/qjpegio.cpp b/src/kernel/qjpegio.cpp index 8e2f3e2e1..153a3cee7 100644 --- a/src/kernel/qjpegio.cpp +++ b/src/kernel/qjpegio.cpp @@ -415,7 +415,7 @@ void qt_term_destination(j_compress_ptr cinfo) { my_jpeg_destination_mgr* dest = (my_jpeg_destination_mgr*)cinfo->dest; TQIODevice* dev = dest->iio->ioDevice(); - Q_LONG n = max_buf - dest->free_in_buffer; + TQ_LONG n = max_buf - dest->free_in_buffer; if ( dev->writeBlock( (char*)dest->buffer, n ) != n ) qt_exit_on_error(cinfo, dev); diff --git a/src/kernel/qpainter.cpp b/src/kernel/qpainter.cpp index e3841b4d4..0dad68364 100644 --- a/src/kernel/qpainter.cpp +++ b/src/kernel/qpainter.cpp @@ -3538,10 +3538,10 @@ TQDataStream &operator<<( TQDataStream &s, const TQPen &p ) { // ### width() should not be restricted to 8-bit values if ( s.version() < 3 ) - return s << (Q_UINT8)p.style() << (Q_UINT8)p.width() << p.color(); + return s << (TQ_UINT8)p.style() << (TQ_UINT8)p.width() << p.color(); else - return s << (Q_UINT8)( p.style() | p.capStyle() | p.joinStyle() ) - << (Q_UINT8)p.width() << p.color(); + return s << (TQ_UINT8)( p.style() | p.capStyle() | p.joinStyle() ) + << (TQ_UINT8)p.width() << p.color(); } /*! @@ -3555,7 +3555,7 @@ TQDataStream &operator<<( TQDataStream &s, const TQPen &p ) TQDataStream &operator>>( TQDataStream &s, TQPen &p ) { - Q_UINT8 style, width; + TQ_UINT8 style, width; TQColor color; s >> style; s >> width; @@ -3927,7 +3927,7 @@ bool TQBrush::operator==( const TQBrush &b ) const TQDataStream &operator<<( TQDataStream &s, const TQBrush &b ) { - s << (Q_UINT8)b.style() << b.color(); + s << (TQ_UINT8)b.style() << b.color(); if ( b.style() == TQt::CustomPattern ) #ifndef QT_NO_IMAGEIO s << *b.pixmap(); @@ -3948,7 +3948,7 @@ TQDataStream &operator<<( TQDataStream &s, const TQBrush &b ) TQDataStream &operator>>( TQDataStream &s, TQBrush &b ) { - Q_UINT8 style; + TQ_UINT8 style; TQColor color; s >> style; s >> color; diff --git a/src/kernel/qpicture.cpp b/src/kernel/qpicture.cpp index 64245179a..b9d350a0e 100644 --- a/src/kernel/qpicture.cpp +++ b/src/kernel/qpicture.cpp @@ -104,8 +104,8 @@ static const char *mfhdr_tag = "TQPIC"; // header tag -static const Q_UINT16 mfhdr_maj = 5; // major version # -static const Q_UINT16 mfhdr_min = 0; // minor version # +static const TQ_UINT16 mfhdr_maj = 5; // major version # +static const TQ_UINT16 mfhdr_min = 0; // minor version # /*! @@ -397,13 +397,13 @@ bool TQPicture::play( TQPainter *painter ) s.device()->at( 10 ); // go directly to the data s.setVersion( d->formatMajor == 4 ? 3 : d->formatMajor ); - Q_UINT8 c, clen; - Q_UINT32 nrecords; + TQ_UINT8 c, clen; + TQ_UINT32 nrecords; s >> c >> clen; Q_ASSERT( c == PdcBegin ); // bounding rect was introduced in ver 4. Read in checkFormat(). if ( d->formatMajor >= 4 ) { - Q_INT32 dummy; + TQ_INT32 dummy; s >> dummy >> dummy >> dummy >> dummy; } s >> nrecords; @@ -430,12 +430,12 @@ bool TQPicture::exec( TQPainter *painter, TQDataStream &s, int nrecords ) #if defined(QT_DEBUG) int strm_pos; #endif - Q_UINT8 c; // command id - Q_UINT8 tiny_len; // 8-bit length descriptor - Q_INT32 len; // 32-bit length descriptor - Q_INT16 i_16, i1_16, i2_16; // parameters... - Q_INT8 i_8; - Q_UINT32 ul; + TQ_UINT8 c; // command id + TQ_UINT8 tiny_len; // 8-bit length descriptor + TQ_INT32 len; // 32-bit length descriptor + TQ_INT16 i_16, i1_16, i2_16; // parameters... + TQ_INT8 i_8; + TQ_UINT32 ul; TQCString str1; TQString str; TQPoint p, p1, p2; @@ -676,7 +676,7 @@ bool TQPicture::exec( TQPainter *painter, TQDataStream &s, int nrecords ) } #if defined(QT_DEBUG) //tqDebug( "device->at(): %i, strm_pos: %i len: %i", s.device()->at(), strm_pos, len ); - Q_ASSERT( Q_INT32(s.device()->at() - strm_pos) == len ); + Q_ASSERT( TQ_INT32(s.device()->at() - strm_pos) == len ); #endif } return FALSE; @@ -710,40 +710,40 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p ) pictb.setBuffer( empty ); // reset byte array in buffer pictb.open( IO_WriteOnly ); s.writeRawBytes( mfhdr_tag, 4 ); - s << (Q_UINT16)0 << (Q_UINT16)formatMajor << (Q_UINT16)formatMinor; - s << (Q_UINT8)c << (Q_UINT8)sizeof(Q_INT32); + s << (TQ_UINT16)0 << (TQ_UINT16)formatMajor << (TQ_UINT16)formatMinor; + s << (TQ_UINT8)c << (TQ_UINT8)sizeof(TQ_INT32); brect = TQRect(); if ( formatMajor >= 4 ) { - s << (Q_INT32)brect.left() << (Q_INT32)brect.top() - << (Q_INT32)brect.width() << (Q_INT32)brect.height(); + s << (TQ_INT32)brect.left() << (TQ_INT32)brect.top() + << (TQ_INT32)brect.width() << (TQ_INT32)brect.height(); } trecs = 0; - s << (Q_UINT32)trecs; // total number of records + s << (TQ_UINT32)trecs; // total number of records formatOk = FALSE; return TRUE; } else if ( c == PdcEnd ) { // end; calc checksum and close trecs++; - s << (Q_UINT8)c << (Q_UINT8)0; + s << (TQ_UINT8)c << (TQ_UINT8)0; TQByteArray buf = pictb.buffer(); - int cs_start = sizeof(Q_UINT32); // pos of checksum word - int data_start = cs_start + sizeof(Q_UINT16); - int brect_start = data_start + 2*sizeof(Q_INT16) + 2*sizeof(Q_UINT8); + int cs_start = sizeof(TQ_UINT32); // pos of checksum word + int data_start = cs_start + sizeof(TQ_UINT16); + int brect_start = data_start + 2*sizeof(TQ_INT16) + 2*sizeof(TQ_UINT8); int pos = pictb.at(); pictb.at( brect_start ); if ( formatMajor >= 4 ) { // bounding rectangle - s << (Q_INT32)brect.left() << (Q_INT32)brect.top() - << (Q_INT32)brect.width() << (Q_INT32)brect.height(); + s << (TQ_INT32)brect.left() << (TQ_INT32)brect.top() + << (TQ_INT32)brect.width() << (TQ_INT32)brect.height(); } - s << (Q_UINT32)trecs; // write number of records + s << (TQ_UINT32)trecs; // write number of records pictb.at( cs_start ); - Q_UINT16 cs = (Q_UINT16)tqChecksum( buf.data()+data_start, pos-data_start ); + TQ_UINT16 cs = (TQ_UINT16)tqChecksum( buf.data()+data_start, pos-data_start ); s << cs; // write checksum pictb.close(); return TRUE; } trecs++; - s << (Q_UINT8)c; // write cmd to stream - s << (Q_UINT8)0; // write dummy length info + s << (TQ_UINT8)c; // write cmd to stream + s << (TQ_UINT8)0; // write dummy length info int pos = (int)pictb.at(); // save position TQRect br; // bounding rect addition bool corr = FALSE; // correction for pen width @@ -772,7 +772,7 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p ) case PdcDrawArc: case PdcDrawPie: case PdcDrawChord: - s << *p[0].rect << (Q_INT16)p[1].ival << (Q_INT16)p[2].ival; + s << *p[0].rect << (TQ_INT16)p[1].ival << (TQ_INT16)p[2].ival; br = *p[0].rect; corr = TRUE; break; @@ -790,14 +790,14 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p ) break; #endif case PdcDrawPolygon: - s << *p[0].ptarr << (Q_INT8)p[1].ival; + s << *p[0].ptarr << (TQ_INT8)p[1].ival; br = p[0].ptarr->boundingRect(); corr = TRUE; break; case PdcDrawText2: if ( formatMajor == 1 ) { pictb.at( pos - 2 ); - s << (Q_UINT8)PdcDrawText << (Q_UINT8)0; + s << (TQ_UINT8)PdcDrawText << (TQ_UINT8)0; TQCString str1( (*p[1].str).latin1() ); s << *p[0].point << str1; } @@ -810,12 +810,12 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p ) case PdcDrawText2Formatted: if ( formatMajor == 1 ) { pictb.at( pos - 2 ); - s << (Q_UINT8)PdcDrawTextFormatted << (Q_UINT8)0; + s << (TQ_UINT8)PdcDrawTextFormatted << (TQ_UINT8)0; TQCString str1( (*p[2].str).latin1() ); - s << *p[0].rect << (Q_INT16)p[1].ival << str1; + s << *p[0].rect << (TQ_INT16)p[1].ival << str1; } else { - s << *p[0].rect << (Q_INT16)p[1].ival << *p[2].str; + s << *p[0].rect << (TQ_INT16)p[1].ival << *p[2].str; } br = *p[0].rect; break; @@ -850,7 +850,7 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p ) break; case PdcSetBkMode: case PdcSetROP: - s << (Q_INT8)p[0].ival; + s << (TQ_INT8)p[0].ival; break; case PdcSetFont: { TQFont fnt = *p[0].font; @@ -868,21 +868,21 @@ bool TQPicture::TQPicturePrivate::cmd( int c, TQPainter *pt, TQPDevCmdParam *p ) s << *p[0].brush; break; case PdcSetTabStops: - s << (Q_INT16)p[0].ival; + s << (TQ_INT16)p[0].ival; break; case PdcSetTabArray: - s << (Q_INT16)p[0].ival; + s << (TQ_INT16)p[0].ival; if ( p[0].ival ) { int *ta = p[1].ivec; for ( int i=0; i> cs; // read checksum ccs = tqChecksum( buf.data() + data_start, buf.size() - data_start ); @@ -1141,7 +1141,7 @@ bool TQPicture::TQPicturePrivate::checkFormat() return FALSE; } - Q_UINT16 major, minor; + TQ_UINT16 major, minor; s >> major >> minor; // read version number if ( major > mfhdr_maj ) { // new, incompatible version #if defined(QT_CHECK_RANGE) @@ -1153,11 +1153,11 @@ bool TQPicture::TQPicturePrivate::checkFormat() } s.setVersion( major != 4 ? major : 3 ); - Q_UINT8 c, clen; + TQ_UINT8 c, clen; s >> c >> clen; if ( c == PdcBegin ) { if ( !( major >= 1 && major <= 3 )) { - Q_INT32 l, t, w, h; + TQ_INT32 l, t, w, h; s >> l >> t >> w >> h; brect = TQRect( l, t, w, h ); } @@ -1189,7 +1189,7 @@ bool TQPicture::TQPicturePrivate::checkFormat() TQDataStream &operator<<( TQDataStream &s, const TQPicture &r ) { - Q_UINT32 size = r.d->pictb.buffer().size(); + TQ_UINT32 size = r.d->pictb.buffer().size(); s << size; // null picture ? if ( size == 0 ) @@ -1213,7 +1213,7 @@ TQDataStream &operator>>( TQDataStream &s, TQPicture &r ) // "init"; this code is similar to the beginning of TQPicture::cmd() sr.setDevice( &r.d->pictb ); sr.setVersion( r.d->formatMajor ); - Q_UINT32 len; + TQ_UINT32 len; s >> len; TQByteArray data( len ); if ( len > 0 ) diff --git a/src/kernel/qpixmap_x11.cpp b/src/kernel/qpixmap_x11.cpp index fb4168aa8..06fcaabfb 100644 --- a/src/kernel/qpixmap_x11.cpp +++ b/src/kernel/qpixmap_x11.cpp @@ -1459,7 +1459,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) switch ( mode ) { case BPP16_8_3_M3: CYCLE( - Q_INT16* dst16 = (Q_INT16*)dst; + TQ_INT16* dst16 = (TQ_INT16*)dst; for ( uint x=0; x>3,0xf800,0x7e0,0x1f,5,6,5) *dst16++ = pixel; @@ -1468,7 +1468,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) break; case BPP16_7_2_M3: CYCLE( - Q_INT16* dst16 = (Q_INT16*)dst; + TQ_INT16* dst16 = (TQ_INT16*)dst; for ( uint x=0; x>3,0x7c00,0x3e0,0x1f,5,5,5) *dst16++ = pixel; @@ -1509,7 +1509,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) break; case BPP16_8_3_M3: CYCLE( - Q_INT16* dst16 = (Q_INT16*)dst; + TQ_INT16* dst16 = (TQ_INT16*)dst; for ( uint x=0; x>3,0xf800,0x7e0,0x1f) *dst16++ = pixel; @@ -1518,7 +1518,7 @@ bool TQPixmap::convertFromImage( const TQImage &img, int conversion_flags ) break; case BPP16_7_2_M3: CYCLE( - Q_INT16* dst16 = (Q_INT16*)dst; + TQ_INT16* dst16 = (TQ_INT16*)dst; for ( uint x=0; x>3,0x7c00,0x3e0,0x1f) *dst16++ = pixel; diff --git a/src/kernel/qpoint.cpp b/src/kernel/qpoint.cpp index e75134a28..98dc72576 100644 --- a/src/kernel/qpoint.cpp +++ b/src/kernel/qpoint.cpp @@ -397,9 +397,9 @@ void TQPoint::warningDivByZero() TQDataStream &operator<<( TQDataStream &s, const TQPoint &p ) { if ( s.version() == 1 ) - s << (Q_INT16)p.x() << (Q_INT16)p.y(); + s << (TQ_INT16)p.x() << (TQ_INT16)p.y(); else - s << (Q_INT32)p.x() << (Q_INT32)p.y(); + s << (TQ_INT32)p.x() << (TQ_INT32)p.y(); return s; } @@ -415,12 +415,12 @@ TQDataStream &operator<<( TQDataStream &s, const TQPoint &p ) TQDataStream &operator>>( TQDataStream &s, TQPoint &p ) { if ( s.version() == 1 ) { - Q_INT16 x, y; + TQ_INT16 x, y; s >> x; p.rx() = x; s >> y; p.ry() = y; } else { - Q_INT32 x, y; + TQ_INT32 x, y; s >> x; p.rx() = x; s >> y; p.ry() = y; } diff --git a/src/kernel/qprinter_p.h b/src/kernel/qprinter_p.h index 17d528985..b8733bec2 100644 --- a/src/kernel/qprinter_p.h +++ b/src/kernel/qprinter_p.h @@ -51,7 +51,7 @@ class TQPrinterPrivate { public: - Q_UINT32 printerOptions; + TQ_UINT32 printerOptions; TQPrinter::PrintRange printRange; }; diff --git a/src/kernel/qpsprinter.cpp b/src/kernel/qpsprinter.cpp index c2b9aad7e..1b4553b60 100644 --- a/src/kernel/qpsprinter.cpp +++ b/src/kernel/qpsprinter.cpp @@ -214,7 +214,7 @@ static const char *const ps_header = // the list contains glyphs in the private use area of unicode. These should get removed when regenerating the glyphlist. // also 0 shout be mapped to .notdef static const struct { - Q_UINT16 u; + TQ_UINT16 u; const char * g; } unicodetoglyph[] = { // grep '^[0-9A-F][0-9A-F][0-9A-F][0-9A-F];' < /tmp/glyphlist.txt | sed -e 's/;/, "/' -e 's-;-" }, // -' -e 's/^/ { 0x/' | sort @@ -2077,17 +2077,17 @@ void TQPSPrinterFontPrivate::downloadMapping( TQTextStream &s, bool global ) // ================== TTF ==================== -typedef Q_UINT8 BYTE; -typedef Q_UINT16 USHORT; -typedef Q_UINT16 uFWord; -typedef Q_INT16 SHORT; -typedef Q_INT16 FWord; -typedef Q_UINT32 ULONG; -typedef Q_INT32 FIXED; +typedef TQ_UINT8 BYTE; +typedef TQ_UINT16 USHORT; +typedef TQ_UINT16 uFWord; +typedef TQ_INT16 SHORT; +typedef TQ_INT16 FWord; +typedef TQ_UINT32 ULONG; +typedef TQ_INT32 FIXED; typedef struct { - Q_INT16 whole; - Q_UINT16 fraction; + TQ_INT16 whole; + TQ_UINT16 fraction; } Fixed; // 16.16 bit fixed-point number static float f2dot14( ushort s ) diff --git a/src/kernel/qrect.cpp b/src/kernel/qrect.cpp index 3a8bd2fb6..2ca88a4c2 100644 --- a/src/kernel/qrect.cpp +++ b/src/kernel/qrect.cpp @@ -926,11 +926,11 @@ bool operator!=( const TQRect &r1, const TQRect &r2 ) TQDataStream &operator<<( TQDataStream &s, const TQRect &r ) { if ( s.version() == 1 ) - s << (Q_INT16)r.left() << (Q_INT16)r.top() - << (Q_INT16)r.right() << (Q_INT16)r.bottom(); + s << (TQ_INT16)r.left() << (TQ_INT16)r.top() + << (TQ_INT16)r.right() << (TQ_INT16)r.bottom(); else - s << (Q_INT32)r.left() << (Q_INT32)r.top() - << (Q_INT32)r.right() << (Q_INT32)r.bottom(); + s << (TQ_INT32)r.left() << (TQ_INT32)r.top() + << (TQ_INT32)r.right() << (TQ_INT32)r.bottom(); return s; } @@ -946,12 +946,12 @@ TQDataStream &operator<<( TQDataStream &s, const TQRect &r ) TQDataStream &operator>>( TQDataStream &s, TQRect &r ) { if ( s.version() == 1 ) { - Q_INT16 x1, y1, x2, y2; + TQ_INT16 x1, y1, x2, y2; s >> x1; s >> y1; s >> x2; s >> y2; r.setCoords( x1, y1, x2, y2 ); } else { - Q_INT32 x1, y1, x2, y2; + TQ_INT32 x1, y1, x2, y2; s >> x1; s >> y1; s >> x2; s >> y2; r.setCoords( x1, y1, x2, y2 ); } diff --git a/src/kernel/qregion.cpp b/src/kernel/qregion.cpp index 014f0fad0..deb0ffa43 100644 --- a/src/kernel/qregion.cpp +++ b/src/kernel/qregion.cpp @@ -164,7 +164,7 @@ void TQRegion::exec( const TQByteArray &buffer, int ver ) int test_cnt = 0; #endif while ( !s.eof() ) { - Q_INT32 id; + TQ_INT32 id; if ( s.version() == 1 ) { int id_int; s >> id_int; @@ -210,7 +210,7 @@ void TQRegion::exec( const TQByteArray &buffer, int ver ) } } else if ( id == TQRGN_RECTS ) { // (This is the only form used in TQt 2.0) - Q_UINT32 n; + TQ_UINT32 n; s >> n; TQRect r; for ( int i=0; i<(int)n; i++ ) { @@ -241,22 +241,22 @@ TQDataStream &operator<<( TQDataStream &s, const TQRegion &r ) { TQMemArray a = r.rects(); if ( a.isEmpty() ) { - s << (Q_UINT32)0; + s << (TQ_UINT32)0; } else { if ( s.version() == 1 ) { int i; for ( i=(int)a.size()-1; i>0; i-- ) { - s << (Q_UINT32)(12+i*24); + s << (TQ_UINT32)(12+i*24); s << (int)TQRGN_OR; } for ( i=0; i<(int)a.size(); i++ ) { - s << (Q_UINT32)(4+8) << (int)TQRGN_SETRECT << a[i]; + s << (TQ_UINT32)(4+8) << (int)TQRGN_SETRECT << a[i]; } } else { - s << (Q_UINT32)(4+4+16*a.size()); // 16: storage size of TQRect - s << (Q_INT32)TQRGN_RECTS; - s << (Q_UINT32)a.size(); + s << (TQ_UINT32)(4+4+16*a.size()); // 16: storage size of TQRect + s << (TQ_INT32)TQRGN_RECTS; + s << (TQ_UINT32)a.size(); for ( int i=0; i<(int)a.size(); i++ ) s << a[i]; } diff --git a/src/kernel/qrichtext.cpp b/src/kernel/qrichtext.cpp index 42bcc9d23..1b7d53751 100644 --- a/src/kernel/qrichtext.cpp +++ b/src/kernel/qrichtext.cpp @@ -6949,7 +6949,7 @@ bool TQTextDocument::eat(const TQChar* doc, int length, int& pos, TQChar c) struct Entity { const char * name; - Q_UINT16 code; + TQ_UINT16 code; }; static const Entity entitylist [] = { diff --git a/src/kernel/qscriptengine.cpp b/src/kernel/qscriptengine.cpp index 14adbcf0c..202402556 100644 --- a/src/kernel/qscriptengine.cpp +++ b/src/kernel/qscriptengine.cpp @@ -94,7 +94,7 @@ private: int a; int s; T *ptr; - Q_UINT64 array[((Prealloc * sizeof(T)) / sizeof(Q_UINT64)) + 1]; + TQ_UINT64 array[((Prealloc * sizeof(T)) / sizeof(TQ_UINT64)) + 1]; }; template diff --git a/src/kernel/qsize.cpp b/src/kernel/qsize.cpp index d871aa74d..2fbe1f4e8 100644 --- a/src/kernel/qsize.cpp +++ b/src/kernel/qsize.cpp @@ -401,9 +401,9 @@ void TQSize::warningDivByZero() TQDataStream &operator<<( TQDataStream &s, const TQSize &sz ) { if ( s.version() == 1 ) - s << (Q_INT16)sz.width() << (Q_INT16)sz.height(); + s << (TQ_INT16)sz.width() << (TQ_INT16)sz.height(); else - s << (Q_INT32)sz.width() << (Q_INT32)sz.height(); + s << (TQ_INT32)sz.width() << (TQ_INT32)sz.height(); return s; } @@ -418,12 +418,12 @@ TQDataStream &operator<<( TQDataStream &s, const TQSize &sz ) TQDataStream &operator>>( TQDataStream &s, TQSize &sz ) { if ( s.version() == 1 ) { - Q_INT16 w, h; + TQ_INT16 w, h; s >> w; sz.rwidth() = w; s >> h; sz.rheight() = h; } else { - Q_INT32 w, h; + TQ_INT32 w, h; s >> w; sz.rwidth() = w; s >> h; sz.rheight() = h; } diff --git a/src/kernel/qtextengine.cpp b/src/kernel/qtextengine.cpp index adeafb887..d23f21e92 100644 --- a/src/kernel/qtextengine.cpp +++ b/src/kernel/qtextengine.cpp @@ -670,7 +670,7 @@ static void bidiItemize( TQTextEngine *engine, bool rightToLeft, int mode ) } -void TQTextEngine::bidiReorder( int numItems, const Q_UINT8 *levels, int *visualOrder ) +void TQTextEngine::bidiReorder( int numItems, const TQ_UINT8 *levels, int *visualOrder ) { // first find highest and lowest levels @@ -775,7 +775,7 @@ enum break_action { // The following line break classes are not treated by the table: // SA, BK, CR, LF, SG, CB, SP -static const Q_UINT8 breakTable[TQUnicodeTables::LineBreak_CM+1][TQUnicodeTables::LineBreak_CM+1] = +static const TQ_UINT8 breakTable[TQUnicodeTables::LineBreak_CM+1][TQUnicodeTables::LineBreak_CM+1] = { // OP, CL, QU, GL, NS, EX, SY, IS, PR, PO, NU, AL, ID, IN, HY, BA, BB, B2, ZW, CM { Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk, Pbk }, // OP diff --git a/src/kernel/qtextengine_p.h b/src/kernel/qtextengine_p.h index 74cca1890..701db02ce 100644 --- a/src/kernel/qtextengine_p.h +++ b/src/kernel/qtextengine_p.h @@ -306,7 +306,7 @@ public: void itemize( int mode = Full ); - static void bidiReorder( int numRuns, const Q_UINT8 *levels, int *visualOrder ); + static void bidiReorder( int numRuns, const TQ_UINT8 *levels, int *visualOrder ); const TQCharAttributes *attributes(); void shape( int item ) const; diff --git a/src/kernel/qtextlayout.cpp b/src/kernel/qtextlayout.cpp index ed5641a7b..777e61ad7 100644 --- a/src/kernel/qtextlayout.cpp +++ b/src/kernel/qtextlayout.cpp @@ -369,9 +369,9 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment, int available = d->lineWidth; int numRuns = 0; int numSpaceItems = 0; - Q_UINT8 _levels[128]; + TQ_UINT8 _levels[128]; int _visual[128]; - Q_UINT8 *levels = _levels; + TQ_UINT8 *levels = _levels; int *visual = _visual; int i; TQTextLayout::Result result = LineEmpty; @@ -504,7 +504,7 @@ TQTextLayout::Result TQTextLayout::endLine( int x, int y, int alignment, numRuns = d->currentItem - d->firstItemInLine - numSpaceItems; if ( numRuns > 127 ) { - levels = new Q_UINT8[numRuns]; + levels = new TQ_UINT8[numRuns]; visual = new int[numRuns]; } diff --git a/src/kernel/qtranslator.cpp b/src/kernel/qtranslator.cpp index 6a66947b3..5f3eec77e 100644 --- a/src/kernel/qtranslator.cpp +++ b/src/kernel/qtranslator.cpp @@ -563,11 +563,11 @@ bool TQTranslator::do_load( const uchar *data, int len ) s.device()->at( MagicLength ); - Q_UINT8 tag = 0; - Q_UINT32 blockLen = 0; + TQ_UINT8 tag = 0; + TQ_UINT32 blockLen = 0; s >> tag >> blockLen; while ( tag && blockLen ) { - if ( (Q_UINT32) s.device()->at() + blockLen > (Q_UINT32) len ) { + if ( (TQ_UINT32) s.device()->at() + blockLen > (TQ_UINT32) len ) { ok = FALSE; break; } @@ -622,23 +622,23 @@ bool TQTranslator::save( const TQString & filename, SaveMode mode ) TQDataStream s( &f ); s.writeRawBytes( (const char *)magic, MagicLength ); - Q_UINT8 tag; + TQ_UINT8 tag; if ( d->offsetArray != 0 ) { - tag = (Q_UINT8) TQTranslatorPrivate::Hashes; - Q_UINT32 oas = (Q_UINT32) d->offsetArray->size(); + tag = (TQ_UINT8) TQTranslatorPrivate::Hashes; + TQ_UINT32 oas = (TQ_UINT32) d->offsetArray->size(); s << tag << oas; s.writeRawBytes( d->offsetArray->data(), oas ); } if ( d->messageArray != 0 ) { - tag = (Q_UINT8) TQTranslatorPrivate::Messages; - Q_UINT32 mas = (Q_UINT32) d->messageArray->size(); + tag = (TQ_UINT8) TQTranslatorPrivate::Messages; + TQ_UINT32 mas = (TQ_UINT32) d->messageArray->size(); s << tag << mas; s.writeRawBytes( d->messageArray->data(), mas ); } if ( d->contextArray != 0 ) { - tag = (Q_UINT8) TQTranslatorPrivate::Contexts; - Q_UINT32 cas = (Q_UINT32) d->contextArray->size(); + tag = (TQ_UINT8) TQTranslatorPrivate::Contexts; + TQ_UINT32 cas = (TQ_UINT32) d->contextArray->size(); s << tag << cas; s.writeRawBytes( d->contextArray->data(), cas ); } @@ -760,7 +760,7 @@ void TQTranslator::squeeze( SaveMode mode ) while ( offset != offsets.end() ) { TQTranslatorPrivate::Offset k = offset.key(); ++offset; - ds << (Q_UINT32)k.h << (Q_UINT32)k.o; + ds << (TQ_UINT32)k.h << (TQ_UINT32)k.o; } if ( mode == Stripped ) { @@ -770,7 +770,7 @@ void TQTranslator::squeeze( SaveMode mode ) for ( it = messages->begin(); it != messages->end(); ++it ) contextSet.replace( it.key().context(), &baudelaire ); - Q_UINT16 hTableSize; + TQ_UINT16 hTableSize; if ( contextSet.count() < 200 ) hTableSize = ( contextSet.count() < 60 ) ? 151 : 503; else if ( contextSet.count() < 2500 ) @@ -791,14 +791,14 @@ void TQTranslator::squeeze( SaveMode mode ) table to provide fast lookup. The context array has the following format: - Q_UINT16 hTableSize; - Q_UINT16 hTable[hTableSize]; - Q_UINT8 contextPool[...]; + TQ_UINT16 hTableSize; + TQ_UINT16 hTable[hTableSize]; + TQ_UINT8 contextPool[...]; The context pool stores the contexts as Pascal strings: - Q_UINT8 len; - Q_UINT8 data[len]; + TQ_UINT8 len; + TQ_UINT8 data[len]; Let's consider the look-up of context "FunnyDialog". A hash value between 0 and hTableSize - 1 is computed, say h. @@ -811,12 +811,12 @@ void TQTranslator::squeeze( SaveMode mode ) d->contextArray = new TQByteArray; d->contextArray->resize( 2 + (hTableSize << 1) ); TQDataStream t( *d->contextArray, IO_WriteOnly ); - Q_UINT16 *hTable = new Q_UINT16[hTableSize]; - memset( hTable, 0, hTableSize * sizeof(Q_UINT16) ); + TQ_UINT16 *hTable = new TQ_UINT16[hTableSize]; + memset( hTable, 0, hTableSize * sizeof(TQ_UINT16) ); t << hTableSize; t.device()->at( 2 + (hTableSize << 1) ); - t << (Q_UINT16) 0; // the entry at offset 0 cannot be used + t << (TQ_UINT16) 0; // the entry at offset 0 cannot be used uint upto = 2; for ( int i = 0; i < hTableSize; i++ ) { @@ -824,17 +824,17 @@ void TQTranslator::squeeze( SaveMode mode ) if ( con == 0 ) { hTable[i] = 0; } else { - hTable[i] = (Q_UINT16) ( upto >> 1 ); + hTable[i] = (TQ_UINT16) ( upto >> 1 ); do { uint len = (uint) tqstrlen( con ); len = TQMIN( len, 255 ); - t << (Q_UINT8) len; + t << (TQ_UINT8) len; t.writeRawBytes( con, len ); upto += 1 + len; hDict.remove( i ); } while ( (con = hDict.find(i)) != 0 ); do { - t << (Q_UINT8) 0; // empty string (at least one) + t << (TQ_UINT8) 0; // empty string (at least one) upto++; } while ( (upto & 0x1) != 0 ); // offsets have to be even } @@ -1000,18 +1000,18 @@ TQTranslatorMessage TQTranslator::findMessage( const char* context, installed, this step is necessary. */ if ( d->contextArray ) { - Q_UINT16 hTableSize = 0; + TQ_UINT16 hTableSize = 0; TQDataStream t( *d->contextArray, IO_ReadOnly ); t >> hTableSize; uint g = elfHash( context ) % hTableSize; t.device()->at( 2 + (g << 1) ); - Q_UINT16 off; + TQ_UINT16 off; t >> off; if ( off == 0 ) return TQTranslatorMessage(); t.device()->at( 2 + (hTableSize << 1) + (off << 1) ); - Q_UINT8 len; + TQ_UINT8 len; char con[256]; for ( ;; ) { t >> len; @@ -1024,7 +1024,7 @@ TQTranslatorMessage TQTranslator::findMessage( const char* context, } } - size_t numItems = d->offsetArray->size() / ( 2 * sizeof(Q_UINT32) ); + size_t numItems = d->offsetArray->size() / ( 2 * sizeof(TQ_UINT32) ); if ( !numItems ) return TQTranslatorMessage(); @@ -1032,10 +1032,10 @@ TQTranslatorMessage TQTranslator::findMessage( const char* context, tqSysInfo( &systemWordSize, &systemBigEndian ); for ( ;; ) { - Q_UINT32 h = elfHash( TQCString(sourceText) + comment ); + TQ_UINT32 h = elfHash( TQCString(sourceText) + comment ); char *r = (char *) bsearch( &h, d->offsetArray->data(), numItems, - 2 * sizeof(Q_UINT32), + 2 * sizeof(TQ_UINT32), systemBigEndian ? cmp_uint32_big : cmp_uint32_little ); if ( r != 0 ) { @@ -1047,7 +1047,7 @@ TQTranslatorMessage TQTranslator::findMessage( const char* context, TQDataStream s( *d->offsetArray, IO_ReadOnly ); s.device()->at( r - d->offsetArray->data() ); - Q_UINT32 rh, ro; + TQ_UINT32 rh, ro; s >> rh >> ro; TQDataStream ms( *d->messageArray, IO_ReadOnly ); @@ -1191,7 +1191,7 @@ TQTranslatorMessage::TQTranslatorMessage( TQDataStream & stream ) { TQString str16; char tag; - Q_UINT8 obs1; + TQ_UINT8 obs1; for ( ;; ) { tag = 0; diff --git a/src/kernel/qvariant.cpp b/src/kernel/qvariant.cpp index 3f4fe430a..6c7372b09 100644 --- a/src/kernel/qvariant.cpp +++ b/src/kernel/qvariant.cpp @@ -856,7 +856,7 @@ TQVariant::TQVariant( uint val ) /*! Constructs a new variant with a long long integer value, \a val. */ -TQVariant::TQVariant( Q_LLONG val ) +TQVariant::TQVariant( TQ_LLONG val ) { d = new Private; d->typ = LongLong; @@ -868,7 +868,7 @@ TQVariant::TQVariant( Q_LLONG val ) Constructs a new variant with an unsigned long long integer value, \a val. */ -TQVariant::TQVariant( Q_ULLONG val ) +TQVariant::TQVariant( TQ_ULLONG val ) { d = new Private; d->typ = ULongLong; @@ -1027,8 +1027,8 @@ static const char* const type_map[ntypes] = "TQBitArray", "TQKeySequence", "TQPen", - "Q_LLONG", - "Q_ULLONG" + "TQ_LLONG", + "TQ_ULLONG" }; @@ -1070,7 +1070,7 @@ TQVariant::Type TQVariant::nameToType( const char* name ) void TQVariant::load( TQDataStream& s ) { clear(); - Q_UINT32 u; + TQ_UINT32 u; s >> u; Type t = (Type)u; @@ -1267,21 +1267,21 @@ void TQVariant::load( TQDataStream& s ) break; case LongLong: { - Q_LLONG x; + TQ_LLONG x; s >> x; d->value.ll = x; } break; case ULongLong: { - Q_ULLONG x; + TQ_ULLONG x; s >> x; d->value.ull = x; } break; case Bool: { - Q_INT8 x; + TQ_INT8 x; s >> x; d->value.b = x; d->is_null = FALSE; @@ -1298,7 +1298,7 @@ void TQVariant::load( TQDataStream& s ) case SizePolicy: { int h,v; - Q_INT8 hfw; + TQ_INT8 hfw; s >> h >> v >> hfw; d->value.ptr = new TQSizePolicy( (TQSizePolicy::SizeType)h, (TQSizePolicy::SizeType)v, @@ -1371,7 +1371,7 @@ void TQVariant::load( TQDataStream& s ) */ void TQVariant::save( TQDataStream& s ) const { - s << (Q_UINT32)type(); + s << (TQ_UINT32)type(); switch( d->typ ) { case Cursor: @@ -1462,7 +1462,7 @@ void TQVariant::save( TQDataStream& s ) const s << d->value.ull; break; case Bool: - s << (Q_INT8)d->value.b; + s << (TQ_INT8)d->value.b; break; case Double: s << d->value.d; @@ -1471,7 +1471,7 @@ void TQVariant::save( TQDataStream& s ) const { TQSizePolicy p = toSizePolicy(); s << (int) p.horData() << (int) p.verData() - << (Q_INT8) p.hasHeightForWidth(); + << (TQ_INT8) p.hasHeightForWidth(); } break; case Date: @@ -1532,7 +1532,7 @@ TQDataStream& operator<< ( TQDataStream& s, const TQVariant& p ) */ TQDataStream& operator>> ( TQDataStream& s, TQVariant::Type& p ) { - Q_UINT32 u; + TQ_UINT32 u; s >> u; p = (TQVariant::Type) u; @@ -1544,7 +1544,7 @@ TQDataStream& operator>> ( TQDataStream& s, TQVariant::Type& p ) */ TQDataStream& operator<< ( TQDataStream& s, const TQVariant::Type p ) { - s << (Q_UINT32)p; + s << (TQ_UINT32)p; return s; } @@ -2247,7 +2247,7 @@ uint TQVariant::toUInt( bool * ok ) const \sa asLongLong(), canCast() */ -Q_LLONG TQVariant::toLongLong( bool * ok ) const +TQ_LLONG TQVariant::toLongLong( bool * ok ) const { if ( ok ) *ok = canCast( LongLong ); @@ -2259,17 +2259,17 @@ Q_LLONG TQVariant::toLongLong( bool * ok ) const case ByteArray: return TQString(*(TQCString*)d->value.ptr).toLongLong(ok); case Int: - return (Q_LLONG)d->value.i; + return (TQ_LLONG)d->value.i; case UInt: - return (Q_LLONG)d->value.u; + return (TQ_LLONG)d->value.u; case LongLong: return d->value.ll; case ULongLong: - return (Q_LLONG)d->value.ull; + return (TQ_LLONG)d->value.ull; case Double: - return (Q_LLONG)d->value.d; + return (TQ_LLONG)d->value.d; case Bool: - return (Q_LLONG)d->value.b; + return (TQ_LLONG)d->value.b; default: return 0; } @@ -2284,24 +2284,24 @@ Q_LLONG TQVariant::toLongLong( bool * ok ) const \sa asULongLong(), canCast() */ -Q_ULLONG TQVariant::toULongLong( bool * ok ) const +TQ_ULLONG TQVariant::toULongLong( bool * ok ) const { if ( ok ) *ok = canCast( ULongLong ); switch ( d->typ ) { case Int: - return (Q_ULLONG)d->value.i; + return (TQ_ULLONG)d->value.i; case UInt: - return (Q_ULLONG)d->value.u; + return (TQ_ULLONG)d->value.u; case LongLong: - return (Q_ULLONG)d->value.ll; + return (TQ_ULLONG)d->value.ll; case ULongLong: return d->value.ull; case Double: - return (Q_ULLONG)d->value.d; + return (TQ_ULLONG)d->value.d; case Bool: - return (Q_ULLONG)d->value.b; + return (TQ_ULLONG)d->value.b; case String: return ((TQString*)d->value.ptr)->toULongLong( ok ); case CString: @@ -2382,7 +2382,7 @@ double TQVariant::toDouble( bool * ok ) const return (double)d->value.ll; case ULongLong: #if defined(Q_CC_MSVC) && !defined(Q_CC_MSVC_NET) - return (double)(Q_LLONG)d->value.ull; + return (double)(TQ_LLONG)d->value.ull; #else return (double)d->value.ull; #endif @@ -2819,11 +2819,11 @@ uint& TQVariant::asUInt() /*! Returns the variant's value as long long reference. */ -Q_LLONG& TQVariant::asLongLong() +TQ_LLONG& TQVariant::asLongLong() { detach(); if ( d->typ != LongLong ) { - Q_LLONG ll = toLongLong(); + TQ_LLONG ll = toLongLong(); bool b = isNull(); d->clear(); d->value.ll = ll; @@ -2836,11 +2836,11 @@ Q_LLONG& TQVariant::asLongLong() /*! Returns the variant's value as unsigned long long reference. */ -Q_ULLONG& TQVariant::asULongLong() +TQ_ULLONG& TQVariant::asULongLong() { detach(); if ( d->typ != ULongLong ) { - Q_ULLONG ull = toULongLong(); + TQ_ULLONG ull = toULongLong(); bool b = isNull(); d->clear(); d->value.ull = ull; @@ -3264,13 +3264,13 @@ bool TQVariant::operator==( const TQVariant &v ) const case LongLong: { - Q_LLONG val = toLongLong(&ok); + TQ_LLONG val = toLongLong(&ok); return (ok && val == v.toLongLong()); } case ULongLong: { - Q_ULLONG val = toULongLong(&ok); + TQ_ULLONG val = toULongLong(&ok); return (ok && val == v.toULongLong()); } -- cgit v1.2.1