diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
commit | 8155225c9be993acc0512956416d195edfef4eb9 (patch) | |
tree | de4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /kwin/clients/keramik/embedtool.cpp | |
parent | 364641b8e0279758d236af39abd138d379328a19 (diff) | |
download | tdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip |
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin/clients/keramik/embedtool.cpp')
-rw-r--r-- | kwin/clients/keramik/embedtool.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/kwin/clients/keramik/embedtool.cpp b/kwin/clients/keramik/embedtool.cpp index 4f5135a3f..415862842 100644 --- a/kwin/clients/keramik/embedtool.cpp +++ b/kwin/clients/keramik/embedtool.cpp @@ -1,7 +1,7 @@ /* * Keramik KWin embed tool (version 1.0) * - * Copyright (C) 2002 Fredrik H�glund <[email protected]> + * Copyright (C) 2002 Fredrik H�glund <[email protected]> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,13 +60,13 @@ private: KeramikEmbedder::KeramikEmbedder() { - TQDateTime date( TQDateTime::currentDateTime() ); + TQDateTime date( TQDateTime::tqcurrentDateTime() ); TQString datestring( date.toString() ); file = new TQFile( "tiles.h" ); file->open( IO_WriteOnly | IO_Truncate ); - stream.setDevice( file ); + stream.setDevice( TQT_TQIODEVICE(file) ); stream << "/*\n"; stream << " * Generated by embedtool 1.0 on " << datestring << endl; @@ -100,19 +100,19 @@ void KeramikEmbedder::embed( const char *name ) TQString codename( basename ); TQImage image( name ); - codename = codename.replace( TQRegExp("[^a-zA-Z0-9]"), "_" ); + codename = codename.tqreplace( TQRegExp("[^a-zA-Z0-9]"), "_" ); stream << "\tstatic const QRgb " << codename << "_data[] = {" << endl << "\t\t"; stream.setf( TQTextStream::hex | TQTextStream::right ); stream.fill( '0' ); int pixels = image.width() * image.height(); - Q_UINT32 *data = reinterpret_cast<Q_UINT32*>( image.bits() ); + TQ_UINT32 *data = reinterpret_cast<TQ_UINT32*>( image.bits() ); bool hasAlpha = false; for ( int i = 0, j = 0; i < pixels; i++ ) { - if ( qAlpha( *data ) && qAlpha( *data ) != 0xff ) + if ( tqAlpha( *data ) && tqAlpha( *data ) != 0xff ) hasAlpha = true; stream << "0x" << qSetW(8) << *(data++); @@ -174,12 +174,12 @@ void KeramikEmbedder::writeIndex() stream << "\tclass KeramikImageDb {\n"; stream << "\tprivate:\n"; stream << "\t\tstatic KeramikImageDb *m_inst;\n"; - stream << "\t\tQDict<TQImage> *db;\n\n"; + stream << "\t\tTQDict<TQImage> *db;\n\n"; stream << "\t\tKeramikImageDb() {\n"; stream << "\t\t\tdb = new TQDict<TQImage>( " << prime << " );\n"; stream << "\t\t\tdb->setAutoDelete( true );\n\n"; stream << "\t\t\tfor ( int i = 0; i < " << index->count() << "; i++ ) {\n"; - stream << "\t\t\t\tQImage *img = new TQImage( (uchar*)image_db[i].data,\n"; + stream << "\t\t\t\tTQImage *img = new TQImage( (uchar*)image_db[i].data,\n"; stream << "\t\t\t\t\t\timage_db[i].width, image_db[i].height,\n"; stream << "\t\t\t\t\t\t32, NULL, 0, TQImage::LittleEndian );\n\n"; stream << "\t\t\t\tif ( image_db[i].alpha )\n"; @@ -199,8 +199,8 @@ void KeramikEmbedder::writeIndex() stream << "\t\t\tif ( m_inst ) delete m_inst;\n"; stream << "\t\t\tm_inst = NULL;\n"; stream << "\t\t}\n\n"; - stream << "\t\tQImage *image( const TQString &name ) const {\n"; - stream << "\t\t\treturn db->find( name );\n"; + stream << "\t\tTQImage *image( const TQString &name ) const {\n"; + stream << "\t\t\treturn db->tqfind( name );\n"; stream << "\t\t}\n\n"; stream << "\t}; // class KeramikImageDb\n\n"; stream << "\tKeramikImageDb *KeramikImageDb::m_inst = NULL;\n\n"; |