diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 23:15:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 23:15:51 +0000 |
commit | 6b1b516f42036cf9eff691dba3fd6e9eab82a7e1 (patch) | |
tree | 6830f75fd57d0fac7e33c097ee98b210e90c5239 /src/pluginloader/formatinfoloader.cpp | |
parent | 6318b8bb3ef964cfa99ba454a2630779cc9ac3ec (diff) | |
download | soundkonverter-6b1b516f42036cf9eff691dba3fd6e9eab82a7e1.tar.gz soundkonverter-6b1b516f42036cf9eff691dba3fd6e9eab82a7e1.zip |
TQt4 port soundkonverter
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/soundkonverter@1239038 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/pluginloader/formatinfoloader.cpp')
-rwxr-xr-x | src/pluginloader/formatinfoloader.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/pluginloader/formatinfoloader.cpp b/src/pluginloader/formatinfoloader.cpp index c585ed6..8a559bb 100755 --- a/src/pluginloader/formatinfoloader.cpp +++ b/src/pluginloader/formatinfoloader.cpp @@ -1,7 +1,7 @@ #include "formatinfoloader.h" -#include <qfile.h> +#include <tqfile.h> #include <klocale.h> #include <kglobal.h> @@ -19,9 +19,9 @@ FormatInfoLoader::FormatInfoLoader() FormatInfoLoader::~FormatInfoLoader() {} -bool FormatInfoLoader::verifyFile( QString fileName ) +bool FormatInfoLoader::verifyFile( TQString fileName ) { - QFile opmlFile( fileName ); + TQFile opmlFile( fileName ); if( !opmlFile.open( IO_ReadOnly ) ) { return false; } @@ -30,22 +30,22 @@ bool FormatInfoLoader::verifyFile( QString fileName ) } opmlFile.close(); - QDomElement root = domTree.documentElement(); + TQDomElement root = domTree.documentElement(); if( root.attribute("type") == "format_info" ) return true; return false; } -FormatInfo* FormatInfoLoader::loadFile( QString fileName ) +FormatInfo* FormatInfoLoader::loadFile( TQString fileName ) { int t_int; float t_float; - QString t_str; + TQString t_str; FormatInfo* plugin = new FormatInfo(); plugin->mime_types = "application/octet-stream"; // if something goes wrong, we can see that by looking at plugin->mimetype - QFile opmlFile( fileName ); + TQFile opmlFile( fileName ); if( !opmlFile.open( IO_ReadOnly ) ) { return plugin; } @@ -54,25 +54,25 @@ FormatInfo* FormatInfoLoader::loadFile( QString fileName ) } opmlFile.close(); - QString language = KGlobal::locale()->languagesTwoAlpha().first(); + TQString language = KGlobal::locale()->languagesTwoAlpha().first(); - QDomElement root = domTree.documentElement(); + TQDomElement root = domTree.documentElement(); if( root.attribute("type") != "format_info" ) return plugin; - QDomNode node; + TQDomNode node; node = root.firstChild(); while( !node.isNull() ) { if( node.isElement() && node.nodeName() == "data" ) { - plugin->mime_types = QStringList::split( ',',node.toElement().attribute("mime_types","application/octet-stream") ); - plugin->extensions = QStringList::split( ',',node.toElement().attribute("extensions") ); + plugin->mime_types = TQStringList::split( ',',node.toElement().attribute("mime_types","application/octet-stream") ); + plugin->extensions = TQStringList::split( ',',node.toElement().attribute("extensions") ); plugin->description = node.toElement().attribute("description_"+language); if( plugin->description.isEmpty() ) plugin->description = node.toElement().attribute("description"); - plugin->urls = QStringList::split( ',',node.toElement().attribute("urls_"+language) ); - if( plugin->urls.isEmpty() ) plugin->urls = QStringList::split( ',',node.toElement().attribute("urls") ); - QStringList compressionTypeList = QStringList::split( ',',node.toElement().attribute("compression_type") ); + plugin->urls = TQStringList::split( ',',node.toElement().attribute("urls_"+language) ); + if( plugin->urls.isEmpty() ) plugin->urls = TQStringList::split( ',',node.toElement().attribute("urls") ); + TQStringList compressionTypeList = TQStringList::split( ',',node.toElement().attribute("compression_type") ); plugin->compressionType = (FormatInfo::CompressionType)0x0000; - for( QStringList::Iterator it = compressionTypeList.begin(); it != compressionTypeList.end(); ++it ) { + for( TQStringList::Iterator it = compressionTypeList.begin(); it != compressionTypeList.end(); ++it ) { if( *it == "lossy" ) plugin->compressionType = FormatInfo::CompressionType( plugin->compressionType | FormatInfo::lossy ); else if( *it == "lossless" ) plugin->compressionType = FormatInfo::CompressionType( plugin->compressionType | FormatInfo::lossless ); else if( *it == "hybrid" ) plugin->compressionType = FormatInfo::CompressionType( plugin->compressionType | FormatInfo::hybrid ); |