summaryrefslogtreecommitdiffstats
path: root/kjsembed/builtins/resources.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:44:01 +0000
commit479f5f799523bffbcc83dff581a2299c047c6fff (patch)
tree186aae707ed02aac6c7cab2fb14e97f72aca5e36 /kjsembed/builtins/resources.cpp
parentf1dbff6145c98324ff82e34448b7483727e8ace4 (diff)
downloadtdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.tar.gz
tdebindings-479f5f799523bffbcc83dff581a2299c047c6fff.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1157645 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kjsembed/builtins/resources.cpp')
-rw-r--r--kjsembed/builtins/resources.cpp56
1 files changed, 28 insertions, 28 deletions
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 <jsproxy.h>
#include <jsbinding.h>
#include <jsfactory.h>
-#include <qdir.h>
-#include <qapplication.h>
+#include <tqdir.h>
+#include <tqapplication.h>
#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;