From 479f5f799523bffbcc83dff581a2299c047c6fff Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:44:01 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kjsembed/builtins/qdir_imp.cpp | 134 ++++++++++++++++++++--------------------- 1 file changed, 67 insertions(+), 67 deletions(-) (limited to 'kjsembed/builtins/qdir_imp.cpp') diff --git a/kjsembed/builtins/qdir_imp.cpp b/kjsembed/builtins/qdir_imp.cpp index 32d79d14..55895a59 100644 --- a/kjsembed/builtins/qdir_imp.cpp +++ b/kjsembed/builtins/qdir_imp.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include "qdir_imp.h" /** @@ -26,10 +26,10 @@ namespace Bindings { { JSOpaqueProxy * prx; if ( args.size() == 0 ) { - prx = new JSOpaqueProxy( new QDir( QDir::current() ), "QDir" ); + prx = new JSOpaqueProxy( new TQDir( TQDir::current() ), "TQDir" ); } else { - QString arg0 = ( args.size() >= 1 ) ? args[ 0 ].toString( exec ).qstring() : QString::null; - prx = new JSOpaqueProxy( new QDir( arg0 ), "QDir" ); + TQString arg0 = ( args.size() >= 1 ) ? args[ 0 ].toString( exec ).qstring() : TQString::null; + prx = new JSOpaqueProxy( new TQDir( arg0 ), "TQDir" ); } prx->setOwner( JSProxy::JavaScript ); KJS::Object proxyObj( prx ); @@ -177,31 +177,31 @@ void QDirImp::addBindings( KJS::ExecState *exec, KJS::Object &object ) EnumValue enums[] = { // enum FilterSpec - { "Dirs", QDir::Dirs }, - { "Files", QDir::Files }, - { "Drives", QDir::Drives }, - { "NoSymLinks", QDir::NoSymLinks }, - { "All", QDir::All }, - { "TypeMask", QDir::TypeMask }, - { "Readable", QDir::Readable }, - { "Writable", QDir::Writable }, - { "Executable", QDir::Executable }, - { "RWEMask", QDir::RWEMask }, - { "Modified", QDir::Modified }, - { "Hidden", QDir::Hidden }, - { "System", QDir::System }, - { "AccessMask", QDir::AccessMask }, - { "DefaultFilter", QDir::DefaultFilter }, + { "Dirs", TQDir::Dirs }, + { "Files", TQDir::Files }, + { "Drives", TQDir::Drives }, + { "NoSymLinks", TQDir::NoSymLinks }, + { "All", TQDir::All }, + { "TypeMask", TQDir::TypeMask }, + { "Readable", TQDir::Readable }, + { "Writable", TQDir::Writable }, + { "Executable", TQDir::Executable }, + { "RWEMask", TQDir::RWEMask }, + { "Modified", TQDir::Modified }, + { "Hidden", TQDir::Hidden }, + { "System", TQDir::System }, + { "AccessMask", TQDir::AccessMask }, + { "DefaultFilter", TQDir::DefaultFilter }, // enum SortSpec - { "Name", QDir::Name }, - { "Time", QDir::Time }, - { "Size", QDir::Size }, - { "Unsorted", QDir::Unsorted }, - { "SortByMask", QDir::SortByMask }, - { "DirsFirst", QDir::DirsFirst }, - { "Reversed", QDir::Reversed }, - { "IgnoreCase", QDir::IgnoreCase }, - { "DefaultSort", QDir::DefaultSort }, + { "Name", TQDir::Name }, + { "Time", TQDir::Time }, + { "Size", TQDir::Size }, + { "Unsorted", TQDir::Unsorted }, + { "SortByMask", TQDir::SortByMask }, + { "DirsFirst", TQDir::DirsFirst }, + { "Reversed", TQDir::Reversed }, + { "IgnoreCase", TQDir::IgnoreCase }, + { "DefaultSort", TQDir::DefaultSort }, { 0, 0 } }; @@ -222,12 +222,12 @@ KJS::Value QDirImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::Li return KJS::Value(); } - if ( op->typeName() != "QDir" ) { + if ( op->typeName() != "TQDir" ) { kdWarning() << "QDirImp::call() failed, type is " << op->typeName() << endl; return KJS::Value(); } - instance = op->toNative(); + instance = op->toNative(); switch( mid ) { @@ -431,7 +431,7 @@ KJS::Value QDirImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::Li break; } - QString msg = i18n( "QDirImp has no method with id '%1'." ).arg( mid ); + TQString msg = i18n( "QDirImp has no method with id '%1'." ).arg( mid ); return throwError(exec, msg,KJS::ReferenceError); } @@ -439,7 +439,7 @@ KJS::Value QDirImp::call( KJS::ExecState *exec, KJS::Object &self, const KJS::Li KJS::Value QDirImp::setPath_7( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; instance->setPath( arg0 ); @@ -450,7 +450,7 @@ KJS::Value QDirImp::setPath_7( KJS::ExecState *exec, KJS::Object &obj, const KJS KJS::Value QDirImp::path_8( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString ret; + TQString ret; ret = instance->path( ); return KJS::String( ret ); @@ -459,7 +459,7 @@ KJS::Value QDirImp::path_8( KJS::ExecState *exec, KJS::Object &obj, const KJS::L KJS::Value QDirImp::absPath_9( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString ret; + TQString ret; ret = instance->absPath( ); return KJS::String( ret ); @@ -468,7 +468,7 @@ KJS::Value QDirImp::absPath_9( KJS::ExecState *exec, KJS::Object &obj, const KJS KJS::Value QDirImp::canonicalPath_10( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString ret; + TQString ret; ret = instance->canonicalPath( ); return KJS::String( ret ); @@ -477,7 +477,7 @@ KJS::Value QDirImp::canonicalPath_10( KJS::ExecState *exec, KJS::Object &obj, co KJS::Value QDirImp::dirName_11( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString ret; + TQString ret; ret = instance->dirName( ); return KJS::String( ret ); @@ -486,11 +486,11 @@ KJS::Value QDirImp::dirName_11( KJS::ExecState *exec, KJS::Object &obj, const KJ KJS::Value QDirImp::filePath_12( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false; - QString ret; + TQString ret; ret = instance->filePath( arg0, arg1 ); @@ -501,11 +501,11 @@ KJS::Value QDirImp::filePath_12( KJS::ExecState *exec, KJS::Object &obj, const K KJS::Value QDirImp::absFilePath_13( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false; - QString ret; + TQString ret; ret = instance->absFilePath( arg0, arg1 ); @@ -516,7 +516,7 @@ KJS::Value QDirImp::absFilePath_13( KJS::ExecState *exec, KJS::Object &obj, cons KJS::Value QDirImp::cd_14( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false; @@ -540,7 +540,7 @@ KJS::Value QDirImp::cdUp_15( KJS::ExecState *exec, KJS::Object &obj, const KJS:: KJS::Value QDirImp::nameFilter_16( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString ret; + TQString ret; ret = instance->nameFilter( ); return KJS::String( ret ); @@ -549,7 +549,7 @@ KJS::Value QDirImp::nameFilter_16( KJS::ExecState *exec, KJS::Object &obj, const KJS::Value QDirImp::setNameFilter_17( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; instance->setNameFilter( arg0 ); @@ -641,7 +641,7 @@ KJS::Value QDirImp::encodedEntryList_26( KJS::ExecState *exec, KJS::Object &obj, KJS::Value QDirImp::encodedEntryList_27( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1; @@ -662,7 +662,7 @@ KJS::Value QDirImp::entryList_28( KJS::ExecState *exec, KJS::Object &obj, const int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1; - QStringList ret; + TQStringList ret; ret = instance->entryList( arg0, arg1 ); @@ -674,13 +674,13 @@ KJS::Value QDirImp::entryList_28( KJS::ExecState *exec, KJS::Object &obj, const KJS::Value QDirImp::entryList_29( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1; int arg2 = (args.size() >= 3) ? args[2].toInteger(exec) : -1; - QStringList ret; + TQStringList ret; ret = instance->entryList( arg0, arg1, @@ -707,7 +707,7 @@ KJS::Value QDirImp::entryInfoList_30( KJS::ExecState *exec, KJS::Object &obj, co KJS::Value QDirImp::entryInfoList_31( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; int arg1 = (args.size() >= 2) ? args[1].toInteger(exec) : -1; @@ -724,7 +724,7 @@ KJS::Value QDirImp::entryInfoList_31( KJS::ExecState *exec, KJS::Object &obj, co KJS::Value QDirImp::mkdir_32( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false; @@ -739,7 +739,7 @@ KJS::Value QDirImp::mkdir_32( KJS::ExecState *exec, KJS::Object &obj, const KJS: KJS::Value QDirImp::rmdir_33( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false; @@ -798,7 +798,7 @@ KJS::Value QDirImp::convertToAbs_38( KJS::ExecState *exec, KJS::Object &obj, con KJS::Value QDirImp::remove_41( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false; @@ -813,9 +813,9 @@ KJS::Value QDirImp::remove_41( KJS::ExecState *exec, KJS::Object &obj, const KJS KJS::Value QDirImp::rename_42( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; - QString arg1 = (args.size() >= 2) ? args[1].toString(exec).qstring() : QString::null; + TQString arg1 = (args.size() >= 2) ? args[1].toString(exec).qstring() : TQString::null; bool arg2 = (args.size() >= 3) ? args[2].toBoolean(exec) : false; @@ -831,7 +831,7 @@ KJS::Value QDirImp::rename_42( KJS::ExecState *exec, KJS::Object &obj, const KJS KJS::Value QDirImp::exists_43( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; bool arg1 = (args.size() >= 2) ? args[1].toBoolean(exec) : false; @@ -854,9 +854,9 @@ KJS::Value QDirImp::refresh_44( KJS::ExecState *exec, KJS::Object &obj, const KJ KJS::Value QDirImp::convertSeparators_45( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; - QString ret; + TQString ret; ret = instance->convertSeparators( arg0 ); return KJS::String( ret ); @@ -882,7 +882,7 @@ KJS::Value QDirImp::separator_47( KJS::ExecState *exec, KJS::Object &obj, const KJS::Value QDirImp::setCurrent_48( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; bool ret; ret = instance->setCurrent( @@ -918,7 +918,7 @@ KJS::Value QDirImp::root_51( KJS::ExecState *exec, KJS::Object &obj, const KJS:: KJS::Value QDirImp::currentDirPath_52( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString ret; + TQString ret; ret = instance->currentDirPath( ); return KJS::String( ret ); @@ -927,7 +927,7 @@ KJS::Value QDirImp::currentDirPath_52( KJS::ExecState *exec, KJS::Object &obj, c KJS::Value QDirImp::homeDirPath_53( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString ret; + TQString ret; ret = instance->homeDirPath( ); return KJS::String( ret ); @@ -936,7 +936,7 @@ KJS::Value QDirImp::homeDirPath_53( KJS::ExecState *exec, KJS::Object &obj, cons KJS::Value QDirImp::rootDirPath_54( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString ret; + TQString ret; ret = instance->rootDirPath( ); return KJS::String( ret ); @@ -945,12 +945,12 @@ KJS::Value QDirImp::rootDirPath_54( KJS::ExecState *exec, KJS::Object &obj, cons KJS::Value QDirImp::match_55( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QStringList arg0; + TQStringList arg0; if ( args.size() >= 1 ) { // TODO: populate the list } - QString arg1 = (args.size() >= 2) ? args[1].toString(exec).qstring() : QString::null; + TQString arg1 = (args.size() >= 2) ? args[1].toString(exec).qstring() : TQString::null; bool ret; ret = instance->match( @@ -963,9 +963,9 @@ KJS::Value QDirImp::match_55( KJS::ExecState *exec, KJS::Object &obj, const KJS: KJS::Value QDirImp::match_56( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; - QString arg1 = (args.size() >= 2) ? args[1].toString(exec).qstring() : QString::null; + TQString arg1 = (args.size() >= 2) ? args[1].toString(exec).qstring() : TQString::null; bool ret; ret = instance->match( @@ -978,9 +978,9 @@ KJS::Value QDirImp::match_56( KJS::ExecState *exec, KJS::Object &obj, const KJS: KJS::Value QDirImp::cleanDirPath_57( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; - QString ret; + TQString ret; ret = instance->cleanDirPath( arg0 ); return KJS::String( ret ); @@ -990,7 +990,7 @@ KJS::Value QDirImp::cleanDirPath_57( KJS::ExecState *exec, KJS::Object &obj, con KJS::Value QDirImp::isRelativePath_58( KJS::ExecState *exec, KJS::Object &obj, const KJS::List &args ) { - QString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : QString::null; + TQString arg0 = (args.size() >= 1) ? args[0].toString(exec).qstring() : TQString::null; bool ret; ret = instance->isRelativePath( -- cgit v1.2.1