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/convertpluginloader.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/convertpluginloader.cpp')
-rwxr-xr-x | src/pluginloader/convertpluginloader.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/pluginloader/convertpluginloader.cpp b/src/pluginloader/convertpluginloader.cpp index 89996ba..0631c19 100755 --- a/src/pluginloader/convertpluginloader.cpp +++ b/src/pluginloader/convertpluginloader.cpp @@ -1,7 +1,7 @@ #include "convertpluginloader.h" -#include <qfile.h> +#include <tqfile.h> #include <klocale.h> #include <kglobal.h> @@ -21,9 +21,9 @@ ConvertPluginLoader::ConvertPluginLoader() ConvertPluginLoader::~ConvertPluginLoader() {} -int ConvertPluginLoader::verifyFile( QString fileName ) +int ConvertPluginLoader::verifyFile( TQString fileName ) { - QFile opmlFile( fileName ); + TQFile opmlFile( fileName ); if( !opmlFile.open( IO_ReadOnly ) ) { return -1; } @@ -32,10 +32,10 @@ int ConvertPluginLoader::verifyFile( QString fileName ) } opmlFile.close(); - QDomElement root = domTree.documentElement(); + TQDomElement root = domTree.documentElement(); if( root.attribute("type") != "converter" ) return -1; int version; - QDomNode node; + TQDomNode node; node = root.firstChild(); while( !node.isNull() ) { if( node.isElement() && node.nodeName() == "info" ) { @@ -47,17 +47,17 @@ int ConvertPluginLoader::verifyFile( QString fileName ) return version; } -ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName ) +ConvertPlugin* ConvertPluginLoader::loadFile( TQString fileName ) { int t_int; float t_float; - QString t_str; + TQString t_str; ConvertPlugin* plugin = new ConvertPlugin(); plugin->info.version = -1; // if something goes wrong, we can see that by looking at plugin->info.version plugin->filePathName = fileName; - QFile opmlFile( fileName ); + TQFile opmlFile( fileName ); if( !opmlFile.open( IO_ReadOnly ) ) { return plugin; } @@ -66,11 +66,11 @@ ConvertPlugin* ConvertPluginLoader::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") != "converter" ) return plugin; - QDomNode node, sub1Node, sub2Node, sub3Node, sub4Node; + TQDomNode node, sub1Node, sub2Node, sub3Node, sub4Node; node = root.firstChild(); plugin->enc.enabled = false; @@ -110,7 +110,7 @@ ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName ) plugin->enc.bin = node.toElement().attribute( "bin" ); plugin->enc.param = node.toElement().attribute("param"); plugin->enc.silent_param = node.toElement().attribute("silent_param"); - plugin->enc.mime_types = QStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") ); + plugin->enc.mime_types = TQStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") ); plugin->enc.in_out_files = node.toElement().attribute("in_out_files"); plugin->enc.overwrite = node.toElement().attribute("overwrite"); @@ -124,7 +124,7 @@ ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName ) plugin->enc.strength.separator = sub1Node.toElement().attribute("separator").at(0); plugin->enc.strength.param = sub1Node.toElement().attribute("param"); plugin->enc.strength.step = sub1Node.toElement().attribute("step").toFloat(); - plugin->enc.strength.profiles = QStringList::split( ',', sub1Node.toElement().attribute("profiles") ); + plugin->enc.strength.profiles = TQStringList::split( ',', sub1Node.toElement().attribute("profiles") ); plugin->enc.strength.default_value = sub1Node.toElement().attribute("default_value").toFloat(); } @@ -144,7 +144,7 @@ ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName ) plugin->enc.lossy.quality.output = sub2Node.toElement().attribute("output"); plugin->enc.lossy.quality.param = sub2Node.toElement().attribute("param"); plugin->enc.lossy.quality.step = sub2Node.toElement().attribute("step").toFloat(); - plugin->enc.lossy.quality.profiles = QStringList::split( ',', sub2Node.toElement().attribute("profiles") ); + plugin->enc.lossy.quality.profiles = TQStringList::split( ',', sub2Node.toElement().attribute("profiles") ); } else if( sub2Node.isElement() && sub2Node.nodeName() == "bitrate" ) { @@ -252,7 +252,7 @@ ConvertPlugin* ConvertPluginLoader::loadFile( QString fileName ) plugin->dec.output = node.toElement().attribute("output"); plugin->dec.param = node.toElement().attribute("param"); plugin->dec.overwrite = node.toElement().attribute("overwrite"); - plugin->dec.mime_types = QStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") ); + plugin->dec.mime_types = TQStringList::split( ',', node.toElement().attribute("mime_types","application/octet-stream") ); plugin->dec.in_out_files = node.toElement().attribute("in_out_files"); plugin->dec.silent_param = node.toElement().attribute("silent_param"); |