diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
commit | e69e8b1d09fb579316595b4e6a850e717358a8b1 (patch) | |
tree | a24fc20865f65772f530d16177520190594ffdd2 /kfile-plugins/dds | |
parent | eecec9afb81fdebb0f22e9da22635874c403f854 (diff) | |
download | tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip |
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kfile-plugins/dds')
-rw-r--r-- | kfile-plugins/dds/kfile_dds.cpp | 34 | ||||
-rw-r--r-- | kfile-plugins/dds/kfile_dds.h | 3 |
2 files changed, 19 insertions, 18 deletions
diff --git a/kfile-plugins/dds/kfile_dds.cpp b/kfile-plugins/dds/kfile_dds.cpp index f8c3346e..17321e13 100644 --- a/kfile-plugins/dds/kfile_dds.cpp +++ b/kfile-plugins/dds/kfile_dds.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE project - * Copyright (C) 2002 Ignacio Casta�o <[email protected]> + * Copyright (C) 2002 Ignacio Casta�o <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public @@ -35,9 +35,9 @@ typedef KGenericFactory<KDdsPlugin> DdsFactory; -typedef Q_UINT32 uint; -typedef Q_UINT16 ushort; -typedef Q_UINT8 uchar; +typedef TQ_UINT32 uint; +typedef TQ_UINT16 ushort; +typedef TQ_UINT8 uchar; namespace { // Private. @@ -90,10 +90,10 @@ namespace { // Private. uint flags; uint fourcc; uint bitcount; - uint rmask; - uint gmask; - uint bmask; - uint amask; + uint rtqmask; + uint gtqmask; + uint btqmask; + uint atqmask; }; TQDataStream & operator>> ( TQDataStream & s, DDSPixelFormat & pf ) @@ -102,10 +102,10 @@ namespace { // Private. s >> pf.flags; s >> pf.fourcc; s >> pf.bitcount; - s >> pf.rmask; - s >> pf.gmask; - s >> pf.bmask; - s >> pf.amask; + s >> pf.rtqmask; + s >> pf.gtqmask; + s >> pf.btqmask; + s >> pf.atqmask; return s; } @@ -182,8 +182,8 @@ namespace { // Private. K_EXPORT_COMPONENT_FACTORY(kfile_dds, DdsFactory( "kfile_dds" )) // Constructor, init mime type info. -KDdsPlugin::KDdsPlugin(TQObject *parent, const char *name, const TQStringList &args) : - KFilePlugin(parent, name, args) +KDdsPlugin::KDdsPlugin(TQObject *tqparent, const char *name, const TQStringList &args) : + KFilePlugin(tqparent, name, args) { KFileMimeTypeInfo * info = addMimeTypeInfo( "image/x-dds" ); @@ -216,7 +216,7 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) TQFile file(info.path()); if (!file.open(IO_ReadOnly)) { - kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()) << endl; + kdDebug(7034) << "Couldn't open " << TQFile::encodeName(info.path()).data() << endl; return false; } @@ -227,7 +227,7 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) uint fourcc; s >> fourcc; if( fourcc != FOURCC_DDS ) { - kdDebug(7034) << TQFile::encodeName(info.path()) << " is not a DDS file." << endl; + kdDebug(7034) << TQFile::encodeName(info.path()).data() << " is not a DDS file." << endl; return false; } @@ -237,7 +237,7 @@ bool KDdsPlugin::readInfo( KFileMetaInfo& info, uint /*what*/) // Check image file format. if( s.atEnd() || !IsValid( header ) ) { - kdDebug(7034) << TQFile::encodeName(info.path()) << " is not a valid DDS file." << endl; + kdDebug(7034) << TQFile::encodeName(info.path()).data() << " is not a valid DDS file." << endl; return false; } diff --git a/kfile-plugins/dds/kfile_dds.h b/kfile-plugins/dds/kfile_dds.h index 63dd156b..19ef6a12 100644 --- a/kfile-plugins/dds/kfile_dds.h +++ b/kfile-plugins/dds/kfile_dds.h @@ -27,9 +27,10 @@ class TQStringList; class KDdsPlugin: public KFilePlugin { Q_OBJECT + TQ_OBJECT public: - KDdsPlugin( TQObject *parent, const char *name, const TQStringList& args ); + KDdsPlugin( TQObject *tqparent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& info, uint what); }; |