summaryrefslogtreecommitdiffstats
path: root/lib/kross/main/scriptcontainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kross/main/scriptcontainer.cpp')
-rw-r--r--lib/kross/main/scriptcontainer.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/lib/kross/main/scriptcontainer.cpp b/lib/kross/main/scriptcontainer.cpp
index 56c9bb8e..5acde9db 100644
--- a/lib/kross/main/scriptcontainer.cpp
+++ b/lib/kross/main/scriptcontainer.cpp
@@ -25,7 +25,7 @@
#include "../main/manager.h"
#include "mainmodule.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <klocale.h>
@@ -50,19 +50,19 @@ namespace Kross { namespace Api {
* The unique name the \a ScriptContainer is
* reachable as.
*/
- QString name;
+ TQString name;
/**
* The scripting code.
*/
- QString code;
+ TQString code;
/**
* The name of the interpreter. This could be
* something like "python" for the python
* binding.
*/
- QString interpretername;
+ TQString interpretername;
/**
* The name of the scriptfile that should be
@@ -71,23 +71,23 @@ namespace Kross { namespace Api {
* scripting code and, if not defined, the
* used interpreter.
*/
- QString scriptfile;
+ TQString scriptfile;
/**
* Map of options that overwritte the \a InterpreterInfo::Option::Map
* standard options.
*/
- QMap<QString, QVariant> options;
+ TQMap<TQString, TQVariant> options;
};
}}
-ScriptContainer::ScriptContainer(const QString& name)
+ScriptContainer::ScriptContainer(const TQString& name)
: MainModule(name)
, d( new ScriptContainerPrivate() ) // initialize d-pointer class
{
- //krossdebug( QString("ScriptContainer::ScriptContainer() Ctor name='%1'").arg(name) );
+ //krossdebug( TQString("ScriptContainer::ScriptContainer() Ctor name='%1'").tqarg(name) );
d->script = 0;
d->name = name;
@@ -95,77 +95,77 @@ ScriptContainer::ScriptContainer(const QString& name)
ScriptContainer::~ScriptContainer()
{
- //krossdebug( QString("ScriptContainer::~ScriptContainer() Dtor name='%1'").arg(d->name) );
+ //krossdebug( TQString("ScriptContainer::~ScriptContainer() Dtor name='%1'").tqarg(d->name) );
finalize();
delete d;
}
-const QString ScriptContainer::getName() const
+const TQString ScriptContainer::getName() const
{
return d->name;
}
-void ScriptContainer::setName(const QString& name)
+void ScriptContainer::setName(const TQString& name)
{
d->name = name;
}
-QString ScriptContainer::getCode() const
+TQString ScriptContainer::getCode() const
{
return d->code;
}
-void ScriptContainer::setCode(const QString& code)
+void ScriptContainer::setCode(const TQString& code)
{
finalize();
d->code = code;
}
-QString ScriptContainer::getInterpreterName() const
+TQString ScriptContainer::getInterpreterName() const
{
return d->interpretername;
}
-void ScriptContainer::setInterpreterName(const QString& interpretername)
+void ScriptContainer::setInterpreterName(const TQString& interpretername)
{
finalize();
d->interpretername = interpretername;
}
-QString ScriptContainer::getFile() const
+TQString ScriptContainer::getFile() const
{
return d->scriptfile;
}
-void ScriptContainer::setFile(const QString& scriptfile)
+void ScriptContainer::setFile(const TQString& scriptfile)
{
finalize();
d->scriptfile = scriptfile;
}
-QMap<QString, QVariant>& ScriptContainer::getOptions()
+TQMap<TQString, TQVariant>& ScriptContainer::getOptions()
{
return d->options;
}
-QVariant ScriptContainer::getOption(const QString name, QVariant defaultvalue, bool /*recursive*/)
+TQVariant ScriptContainer::getOption(const TQString name, TQVariant defaultvalue, bool /*recursive*/)
{
- if(d->options.contains(name))
+ if(d->options.tqcontains(name))
return d->options[name];
Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername );
return info ? info->getOptionValue(name, defaultvalue) : defaultvalue;
}
-bool ScriptContainer::setOption(const QString name, const QVariant& value)
+bool ScriptContainer::setOption(const TQString name, const TQVariant& value)
{
Kross::Api::InterpreterInfo* info = Kross::Api::Manager::scriptManager()->getInterpreterInfo( d->interpretername );
if(info) {
if(info->hasOption(name)) {
- d->options.replace(name, value);
+ d->options.tqreplace(name, value);
return true;
- } else krosswarning( QString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").arg(name).arg(value.toString()) );
- } else krosswarning( QString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").arg(name).arg(value.toString()) );
+ } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").tqarg(name).tqarg(value.toString()) );
+ } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").tqarg(name).tqarg(value.toString()) );
return false;
}
@@ -187,12 +187,12 @@ Object::Ptr ScriptContainer::execute()
return r;
}
-const QStringList ScriptContainer::getFunctionNames()
+const TQStringList ScriptContainer::getFunctionNames()
{
- return d->script ? d->script->getFunctionNames() : QStringList(); //FIXME init before if needed?
+ return d->script ? d->script->getFunctionNames() : TQStringList(); //FIXME init before if needed?
}
-Object::Ptr ScriptContainer::callFunction(const QString& functionname, List::Ptr arguments)
+Object::Ptr ScriptContainer::callFunction(const TQString& functionname, List::Ptr arguments)
{
if(! d->script)
if(! initialize())
@@ -216,12 +216,12 @@ Object::Ptr ScriptContainer::callFunction(const QString& functionname, List::Ptr
return r;
}
-QStringList ScriptContainer::getClassNames()
+TQStringList ScriptContainer::getClassNames()
{
- return d->script ? d->script->getClassNames() : QStringList(); //FIXME init before if needed?
+ return d->script ? d->script->getClassNames() : TQStringList(); //FIXME init before if needed?
}
-Object::Ptr ScriptContainer::classInstance(const QString& classname)
+Object::Ptr ScriptContainer::classInstance(const TQString& classname)
{
if(! d->script)
if(! initialize())
@@ -244,34 +244,34 @@ bool ScriptContainer::initialize()
finalize();
if(! d->scriptfile.isNull()) {
- krossdebug( QString("Kross::Api::ScriptContainer::initialize() file=%1").arg(d->scriptfile) );
+ krossdebug( TQString("Kross::Api::ScriptContainer::initialize() file=%1").tqarg(d->scriptfile) );
if(d->interpretername.isNull()) {
d->interpretername = Manager::scriptManager()->getInterpreternameForFile( d->scriptfile );
if(d->interpretername.isNull()) {
- setException( new Exception(i18n("Failed to determinate interpreter for scriptfile '%1'").arg(d->scriptfile)) );
+ setException( new Exception(i18n("Failed to determinate interpreter for scriptfile '%1'").tqarg(d->scriptfile)) );
return false;
}
}
- QFile f( d->scriptfile );
+ TQFile f( d->scriptfile );
if(! f.open(IO_ReadOnly)) {
- setException( new Exception(i18n("Failed to open scriptfile '%1'").arg(d->scriptfile)) );
+ setException( new Exception(i18n("Failed to open scriptfile '%1'").tqarg(d->scriptfile)) );
return false;
}
- d->code = QString( f.readAll() );
+ d->code = TQString( f.readAll() );
f.close();
}
Interpreter* interpreter = Manager::scriptManager()->getInterpreter(d->interpretername);
if(! interpreter) {
- setException( new Exception(i18n("Unknown interpreter '%1'").arg(d->interpretername)) );
+ setException( new Exception(i18n("Unknown interpreter '%1'").tqarg(d->interpretername)) );
return false;
}
d->script = interpreter->createScript(this);
if(! d->script) {
- setException( new Exception(i18n("Failed to create script for interpreter '%1'").arg(d->interpretername)) );
+ setException( new Exception(i18n("Failed to create script for interpreter '%1'").tqarg(d->interpretername)) );
return false;
}
if(d->script->hadException()) {