From 374d939d8af431477ce2601815f0ba121b66871c Mon Sep 17 00:00:00 2001 From: tpearson Date: Tue, 15 Feb 2011 19:11:41 +0000 Subject: Allow kdelibs to function correctly with TQt for Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1220926 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kimgio/dds.cpp | 4 ++-- kimgio/eps.cpp | 4 ++-- kimgio/hdr.cpp | 2 +- kimgio/ico.cpp | 12 ++++++------ kimgio/jp2.cpp | 2 +- kimgio/pcx.cpp | 8 ++++---- kimgio/psd.cpp | 6 +++--- kimgio/tga.cpp | 2 +- kimgio/tiffr.cpp | 6 +++--- kimgio/xcf.cpp | 20 ++++++++++---------- 10 files changed, 33 insertions(+), 33 deletions(-) (limited to 'kimgio') diff --git a/kimgio/dds.cpp b/kimgio/dds.cpp index bdf1ae750..1beb025cf 100644 --- a/kimgio/dds.cpp +++ b/kimgio/dds.cpp @@ -910,7 +910,7 @@ namespace { // Private. return false; } - int offset = s.tqdevice()->at(); + int offset = s.tqdevice()->tqat(); int size = FaceOffset( header ); for( int i = 0; i < 6; i++ ) { @@ -921,7 +921,7 @@ namespace { // Private. } // Seek device. - s.tqdevice()->at( offset ); + s.tqdevice()->tqat( offset ); offset += size; // Load face from stream. diff --git a/kimgio/eps.cpp b/kimgio/eps.cpp index e5495aaf1..e4308b0f7 100644 --- a/kimgio/eps.cpp +++ b/kimgio/eps.cpp @@ -61,7 +61,7 @@ static bool seekToCodeStart( TQIODevice * io, TQ_UINT32 & ps_offset, TQ_UINT32 & + ((unsigned char) buf[2] << 16) + ((unsigned char) buf[3] << 24); kdDebug(399) << "kimgio EPS: Offset: " << ps_offset <<" Size: " << ps_size << endl; - if ( !io->at(ps_offset) ) // Get offset of PostScript code in the MS-DOS EPS file. + if ( !io->tqat(ps_offset) ) // Get offset of PostScript code in the MS-DOS EPS file. { kdError(399) << "kimgio EPS: cannot seek in MS-DOS EPS file" << endl; return false; @@ -218,7 +218,7 @@ KDE_EXPORT void kimgio_eps_read (TQImageIO *image) io->reset(); // Go back to start of file to give all the file to GhostScript if (ps_offset>0L) // We have an offset - io->at(ps_offset); + io->tqat(ps_offset); TQByteArray buffer ( io->readAll() ); // If we have no MS-DOS EPS file or if the size seems wrong, then choose the buffer size diff --git a/kimgio/hdr.cpp b/kimgio/hdr.cpp index b96cddcb0..82a2e111d 100644 --- a/kimgio/hdr.cpp +++ b/kimgio/hdr.cpp @@ -127,7 +127,7 @@ namespace { // Private. if (val != 2) { - s.tqdevice()->at( s.tqdevice()->at() - 1 ); + s.tqdevice()->tqat( s.tqdevice()->tqat() - 1 ); Read_Old_Line(image.data(), width, s); RGBE_To_QRgbLine(image.data(), scanline, width); continue; diff --git a/kimgio/ico.cpp b/kimgio/ico.cpp index daaeb3de7..d973896c2 100644 --- a/kimgio/ico.cpp +++ b/kimgio/ico.cpp @@ -243,7 +243,7 @@ namespace extern "C" KDE_EXPORT void kimgio_ico_read( TQImageIO* io ) { - TQIODevice::Offset offset = io->ioDevice()->at(); + TQIODevice::Offset offset = io->ioDevice()->tqat(); TQDataStream stream( io->ioDevice() ); stream.setByteOrder( TQDataStream::LittleEndian ); @@ -295,7 +295,7 @@ extern "C" KDE_EXPORT void kimgio_ico_read( TQImageIO* io ) offset + selected->offset > io->ioDevice()->size() ) return; - io->ioDevice()->at( offset + selected->offset ); + io->ioDevice()->tqat( offset + selected->offset ); TQImage icon; if ( loadFromDIB( stream, *selected, icon ) ) { @@ -334,7 +334,7 @@ void kimgio_ico_write(TQImageIO *io) if (!qt_write_dib(dib, pixels)) return; - uint hdrPos = dib.device()->at(); + uint hdrPos = dib.device()->tqat(); if (!qt_write_dib(dib, mask)) return; memmove(dibData.data() + hdrPos, dibData.data() + hdrPos + BMP_WIN + 8, dibData.size() - hdrPos - BMP_WIN - 8); @@ -361,14 +361,14 @@ void kimgio_ico_write(TQImageIO *io) rec.dibSize = dibData.size(); ico << rec.width << rec.height << rec.colors << rec.hotspotX << rec.hotspotY << rec.dibSize; - rec.dibOffset = ico.device()->at() + sizeof(rec.dibOffset); + rec.dibOffset = ico.device()->tqat() + sizeof(rec.dibOffset); ico << rec.dibOffset; BMP_INFOHDR dibHeader; - dib.device()->at(0); + dib.device()->tqat(0); dib >> dibHeader; dibHeader.biHeight = io->image().height() << 1; - dib.device()->at(0); + dib.device()->tqat(0); dib << dibHeader; ico.writeRawBytes(dibData.data(), dibData.size()); diff --git a/kimgio/jp2.cpp b/kimgio/jp2.cpp index ed5ef99c3..121e83287 100644 --- a/kimgio/jp2.cpp +++ b/kimgio/jp2.cpp @@ -291,7 +291,7 @@ kimgio_jp2_write( TQImageIO* io ) TQ_LONG size; // seek to the beginning of the file. - if( !in->at( 0 ) ) { delete ktempf; return; } + if( !in->tqat( 0 ) ) { delete ktempf; return; } // 0 or -1 is EOF / error while( ( size = in->readBlock( b.data(), 4096 ) ) > 0 ) { diff --git a/kimgio/pcx.cpp b/kimgio/pcx.cpp index 37361e848..e823ebb8d 100644 --- a/kimgio/pcx.cpp +++ b/kimgio/pcx.cpp @@ -46,7 +46,7 @@ static TQDataStream &operator>>( TQDataStream &s, PCXHEADER &ph ) // Skip the rest of the header TQ_UINT8 byte; - while ( s.tqdevice()->at() < 128 ) + while ( s.tqdevice()->tqat() < 128 ) s >> byte; return s; @@ -183,7 +183,7 @@ static void readImage4( TQImage &img, TQDataStream &s, const PCXHEADER &header ) TQ_UINT32 offset = i*header.BytesPerLine; for ( unsigned int x=0; x> ( x%8 ) ) ) - pixbuf[ x ] = pixbuf.at(x) + ( 1 << i ); + pixbuf[ x ] = static_cast(pixbuf.tqat(x)) + ( 1 << i ); } uchar *p = img.scanLine( y ); @@ -343,7 +343,7 @@ static void writeLine( TQDataStream &s, TQByteArray &buf ) count = 1; byte = buf[ i++ ]; - while ( ( i < size ) && ( byte == buf.at(i) ) && ( count < 63 ) ) + while ( ( i < size ) && ( TQChar(byte) == buf.tqat(i) ) && ( count < 63 ) ) { ++i; ++count; @@ -412,7 +412,7 @@ static void writeImage4( TQImage &img, TQDataStream &s, PCXHEADER &header ) { for ( int i=0; i<4; ++i ) if ( *( p+x ) & ( 1 << i ) ) - buf[ i ][ x/8 ] = buf[ i ].at(x/8) | 1 << ( 7-x%8 ); + buf[ i ][ x/8 ] = buf[ i ].tqat(x/8) | 1 << ( 7-x%8 ); } for ( int i=0; i<4; ++i ) diff --git a/kimgio/psd.cpp b/kimgio/psd.cpp index d1b93b853..d400257aa 100644 --- a/kimgio/psd.cpp +++ b/kimgio/psd.cpp @@ -119,15 +119,15 @@ namespace { // Private. // Skip mode data. s >> tmp; - s.tqdevice()->at( s.tqdevice()->at() + tmp ); + s.tqdevice()->tqat( s.tqdevice()->tqat() + tmp ); // Skip image resources. s >> tmp; - s.tqdevice()->at( s.tqdevice()->at() + tmp ); + s.tqdevice()->tqat( s.tqdevice()->tqat() + tmp ); // Skip the reserved data. s >> tmp; - s.tqdevice()->at( s.tqdevice()->at() + tmp ); + s.tqdevice()->tqat( s.tqdevice()->tqat() + tmp ); // Find out if the data is compressed. // Known values: diff --git a/kimgio/tga.cpp b/kimgio/tga.cpp index 46ecb0624..0b7c3df1e 100644 --- a/kimgio/tga.cpp +++ b/kimgio/tga.cpp @@ -324,7 +324,7 @@ KDE_EXPORT void kimgio_tga_read( TQImageIO *io ) // Read image header. TgaHeader tga; s >> tga; - s.tqdevice()->at( TgaHeader::SIZE + tga.id_length ); + s.tqdevice()->tqat( TgaHeader::SIZE + tga.id_length ); // Check image file format. if( s.atEnd() ) { diff --git a/kimgio/tiffr.cpp b/kimgio/tiffr.cpp index 96b259b39..3a95f7949 100644 --- a/kimgio/tiffr.cpp +++ b/kimgio/tiffr.cpp @@ -30,14 +30,14 @@ static toff_t tiff_seek( thandle_t handle, toff_t off, int whence ) TQIODevice *dev = reinterpret_cast( handle ); if ( whence == SEEK_CUR ) - off += dev->at(); + off += dev->tqat(); else if ( whence == SEEK_END ) off += dev->size(); - if ( !dev->at( off ) ) + if ( !dev->tqat( off ) ) return ( toff_t )-1; - return dev->at(); + return dev->tqat(); } static toff_t tiff_size( thandle_t handle ) diff --git a/kimgio/xcf.cpp b/kimgio/xcf.cpp index 64b18f060..ff74f1576 100644 --- a/kimgio/xcf.cpp +++ b/kimgio/xcf.cpp @@ -178,7 +178,7 @@ kdDebug() << tag << " " << xcf_image.width << " " << xcf_image.height << " " << while (!layer_offsets.isEmpty()) { TQ_INT32 layer_offset = layer_offsets.pop(); - xcf_io.tqdevice()->at(layer_offset); + xcf_io.tqdevice()->tqat(layer_offset); if (!loadLayer(xcf_io, xcf_image)) return; @@ -415,7 +415,7 @@ bool XCFImageFormat::loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image) if( !composeTiles(xcf_image)) return false; - xcf_io.tqdevice()->at(layer.hierarchy_offset); + xcf_io.tqdevice()->tqat(layer.hierarchy_offset); // As tiles are loaded, they are copied into the layers tiles by // this routine. (loadMask(), below, uses a slightly different @@ -427,7 +427,7 @@ bool XCFImageFormat::loadLayer(TQDataStream& xcf_io, XCFImage& xcf_image) return false; if (layer.mask_offset != 0) { - xcf_io.tqdevice()->at(layer.mask_offset); + xcf_io.tqdevice()->tqat(layer.mask_offset); if (!loadMask(xcf_io, layer)) return false; @@ -758,13 +758,13 @@ bool XCFImageFormat::loadHierarchy(TQDataStream& xcf_io, Layer& layer) } } while (junk != 0); - TQIODevice::Offset saved_pos = xcf_io.tqdevice()->at(); + TQIODevice::Offset saved_pos = xcf_io.tqdevice()->tqat(); - xcf_io.tqdevice()->at(offset); + xcf_io.tqdevice()->tqat(offset); if (!loadLevel(xcf_io, layer, bpp)) return false; - xcf_io.tqdevice()->at(saved_pos); + xcf_io.tqdevice()->tqat(saved_pos); return true; } @@ -801,7 +801,7 @@ bool XCFImageFormat::loadLevel(TQDataStream& xcf_io, Layer& layer, TQ_INT32 bpp) return false; } - TQIODevice::Offset saved_pos = xcf_io.tqdevice()->at(); + TQIODevice::Offset saved_pos = xcf_io.tqdevice()->tqat(); TQ_UINT32 offset2; xcf_io >> offset2; @@ -815,7 +815,7 @@ bool XCFImageFormat::loadLevel(TQDataStream& xcf_io, Layer& layer, TQ_INT32 bpp) if (offset2 == 0) offset2 = offset + (uint)(TILE_WIDTH * TILE_HEIGHT * 4 * 1.5); - xcf_io.tqdevice()->at(offset); + xcf_io.tqdevice()->tqat(offset); int size = layer.image_tiles[j][i].width() * layer.image_tiles[j][i].height(); if (!loadTileRLE(xcf_io, layer.tile, size, offset2 - offset, bpp)) @@ -827,7 +827,7 @@ bool XCFImageFormat::loadLevel(TQDataStream& xcf_io, Layer& layer, TQ_INT32 bpp) layer.assignBytes(layer, i, j); - xcf_io.tqdevice()->at(saved_pos); + xcf_io.tqdevice()->tqat(saved_pos); xcf_io >> offset; if (xcf_io.tqdevice()->status() != IO_Ok) { @@ -873,7 +873,7 @@ bool XCFImageFormat::loadMask(TQDataStream& xcf_io, Layer& layer) return false; } - xcf_io.tqdevice()->at(hierarchy_offset); + xcf_io.tqdevice()->tqat(hierarchy_offset); layer.assignBytes = assignMaskBytes; if (!loadHierarchy(xcf_io, layer)) -- cgit v1.2.1