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/resources.cpp | 56 ++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'kjsembed/builtins/resources.cpp') diff --git a/kjsembed/builtins/resources.cpp b/kjsembed/builtins/resources.cpp index 14912303..84128f69 100644 --- a/kjsembed/builtins/resources.cpp +++ b/kjsembed/builtins/resources.cpp @@ -24,8 +24,8 @@ #include #include #include -#include -#include +#include +#include #include "resources.h" namespace KJSEmbed { @@ -70,75 +70,75 @@ void StdDirsImp::addBindings( KJS::ExecState *exec, KJS::Object &parent ) KJS::Value StdDirsImp::call( KJS::ExecState *exec, KJS::Object &/*self*/, const KJS::List &args ) { -// QString arg0 = extractQString(exec, args, 0); -// QString arg1 = extractQString(exec, args, 1); +// TQString arg0 = extractQString(exec, args, 0); +// TQString arg1 = extractQString(exec, args, 1); switch( id ) { case StdDirsImp::findResource: { - QString arg0 = extractQString(exec, args, 0); - QString arg1 = extractQString(exec, args, 1); - QString path = KGlobal::dirs ()->findResource(arg0.latin1(), arg1); + TQString arg0 = extractQString(exec, args, 0); + TQString arg1 = extractQString(exec, args, 1); + TQString path = KGlobal::dirs ()->findResource(arg0.latin1(), arg1); return KJS::String( path ); } case StdDirsImp::addResourceType: { - QString arg0 = extractQString(exec, args, 0); - QString arg1 = extractQString(exec, args, 1); + TQString arg0 = extractQString(exec, args, 0); + TQString arg1 = extractQString(exec, args, 1); bool isOk = KGlobal::dirs ()->addResourceType(arg0.latin1(), arg1); return KJS::Boolean( isOk ); } case StdDirsImp::kde_default: { - QString arg0 = extractQString(exec, args, 0); - QString path = KGlobal::dirs ()->kde_default(arg0.latin1()); + TQString arg0 = extractQString(exec, args, 0); + TQString path = KGlobal::dirs ()->kde_default(arg0.latin1()); return KJS::String( path ); } case StdDirsImp::addResourceDir: { - QString arg0 = extractQString(exec, args, 0); - QString arg1 = extractQString(exec, args, 1); + TQString arg0 = extractQString(exec, args, 0); + TQString arg1 = extractQString(exec, args, 1); bool isOk = KGlobal::dirs ()->addResourceDir(arg0.latin1(), arg1); return KJS::Boolean( isOk ); } case StdDirsImp::findResourceDir: { - QString arg0 = extractQString(exec, args, 0); - QString arg1 = extractQString(exec, args, 1); - QString path = KGlobal::dirs ()->findResourceDir(arg0.latin1(), arg1); + TQString arg0 = extractQString(exec, args, 0); + TQString arg1 = extractQString(exec, args, 1); + TQString path = KGlobal::dirs ()->findResourceDir(arg0.latin1(), arg1); return KJS::String( path ); } case StdDirsImp::saveLocation: { - QString arg0 = extractQString(exec, args, 0); - QString arg1 = extractQString(exec, args, 1); + TQString arg0 = extractQString(exec, args, 0); + TQString arg1 = extractQString(exec, args, 1); bool arg2 = (args.size() > 2) ? args[2].toBoolean(exec) : true; - QString path = KGlobal::dirs ()->saveLocation(arg0.latin1(), arg1, arg2); + TQString path = KGlobal::dirs ()->saveLocation(arg0.latin1(), arg1, arg2); return KJS::String( path ); } case StdDirsImp::makeDir: { - QString arg0 = extractQString(exec, args, 0); + TQString arg0 = extractQString(exec, args, 0); int arg1 = (args.size() > 1) ? args[1].toInteger(exec) : 0755; bool isOk = KStandardDirs::makeDir(arg0, arg1); return KJS::Boolean( isOk ); } case StdDirsImp::exists: { - QString arg0 = extractQString(exec, args, 0); + TQString arg0 = extractQString(exec, args, 0); bool isOk = KStandardDirs::exists(arg0); return KJS::Boolean( isOk ); } case StdDirsImp::realPath: { - QString arg0 = extractQString(exec, args, 0); - QString path = KStandardDirs::realPath(arg0); + TQString arg0 = extractQString(exec, args, 0); + TQString path = KStandardDirs::realPath(arg0); return KJS::String( path ); } case StdDirsImp::currentDirPath: - return KJS::String(QDir::currentDirPath()); + return KJS::String(TQDir::currentDirPath()); case StdDirsImp::homeDirPath: - return KJS::String(QDir::homeDirPath()); + return KJS::String(TQDir::homeDirPath()); case StdDirsImp::applicationDirPath: return KJS::String(qApp->applicationDirPath()); default: @@ -178,14 +178,14 @@ void StdIconsImp::addBindings( JSFactory *fact, KJS::ExecState *exec, KJS::Obje } -KJS::Value StdIconsImp::wrapPixmap(KJS::ExecState *exec, const QPixmap &icon) +KJS::Value StdIconsImp::wrapPixmap(KJS::ExecState *exec, const TQPixmap &icon) { return convertToValue(exec, icon); } KJS::Value StdIconsImp::call( KJS::ExecState *exec, KJS::Object &/*obj*/, const KJS::List &args ) { - QString arg0 = extractQString(exec, args, 0); // Name + TQString arg0 = extractQString(exec, args, 0); // Name int arg1 = extractInt(exec, args, 1); // Size 0, 16, 24, 32, 48, 64, 128 int arg2 = extractInt(exec, args, 2); // State 0 DefaultState, 1 ActiveState, 2 DisabledState, 3 LastState @@ -212,7 +212,7 @@ KJS::Value StdIconsImp::call( KJS::ExecState *exec, KJS::Object &/*obj*/, const } case StdIconsImp::MimeSourceIcon: { - return wrapPixmap( exec, QPixmap::fromMimeSource(arg0)); + return wrapPixmap( exec, TQPixmap::fromMimeSource(arg0)); } default: kdWarning() << "StdDirsImp has no method " << id << endl; -- cgit v1.2.1