summaryrefslogtreecommitdiffstats
path: root/lib/kross
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kross')
-rw-r--r--lib/kross/api/callable.cpp28
-rw-r--r--lib/kross/api/callable.h8
-rw-r--r--lib/kross/api/class.h2
-rw-r--r--lib/kross/api/event.h4
-rw-r--r--lib/kross/api/eventscript.cpp2
-rw-r--r--lib/kross/api/eventsignal.cpp4
-rw-r--r--lib/kross/api/eventslot.cpp22
-rw-r--r--lib/kross/api/exception.cpp6
-rw-r--r--lib/kross/api/interpreter.cpp6
-rw-r--r--lib/kross/api/list.cpp4
-rw-r--r--lib/kross/api/module.h4
-rw-r--r--lib/kross/api/object.cpp10
-rw-r--r--lib/kross/api/object.h2
-rw-r--r--lib/kross/api/qtobject.cpp18
-rw-r--r--lib/kross/api/variant.cpp18
-rw-r--r--lib/kross/main/mainmodule.cpp8
-rw-r--r--lib/kross/main/manager.cpp14
-rw-r--r--lib/kross/main/scriptaction.cpp8
-rw-r--r--lib/kross/main/scriptcontainer.cpp18
-rw-r--r--lib/kross/main/scriptguiclient.cpp22
-rw-r--r--lib/kross/main/wdgscriptsmanager.cpp8
-rw-r--r--lib/kross/python/cxx/Objects.hxx2
-rw-r--r--lib/kross/python/cxx/PyCXX.html6
-rw-r--r--lib/kross/python/pythonextension.cpp50
-rw-r--r--lib/kross/python/pythoninterpreter.cpp18
-rw-r--r--lib/kross/python/pythonmodule.cpp8
-rw-r--r--lib/kross/python/pythonobject.cpp8
-rw-r--r--lib/kross/python/pythonscript.cpp40
-rw-r--r--lib/kross/python/pythonsecurity.cpp18
-rw-r--r--lib/kross/ruby/rubyextension.cpp12
-rw-r--r--lib/kross/ruby/rubyinterpreter.cpp6
-rw-r--r--lib/kross/ruby/rubymodule.cpp4
-rw-r--r--lib/kross/ruby/rubyscript.cpp4
-rw-r--r--lib/kross/runner/main.cpp4
-rw-r--r--lib/kross/test/main.cpp8
-rw-r--r--lib/kross/test/testobject.cpp12
-rw-r--r--lib/kross/test/testwindow.cpp6
37 files changed, 211 insertions, 211 deletions
diff --git a/lib/kross/api/callable.cpp b/lib/kross/api/callable.cpp
index f095f596..b85aa4cd 100644
--- a/lib/kross/api/callable.cpp
+++ b/lib/kross/api/callable.cpp
@@ -47,26 +47,26 @@ const TQString Callable::getClassName() const
bool Callable::hasChild(const TQString& name) const
{
- return m_tqchildren.contains(name);
+ return m_children.contains(name);
}
Object::Ptr Callable::getChild(const TQString& name) const
{
- return m_tqchildren[name];
+ return m_children[name];
}
TQMap<TQString, Object::Ptr> Callable::getChildren() const
{
- return m_tqchildren;
+ return m_children;
}
bool Callable::addChild(const TQString& name, Object* object)
{
#ifdef KROSS_API_OBJECT_ADDCHILD_DEBUG
krossdebug( TQString("Kross::Api::Callable::addChild() object.name='%1' object.classname='%2'")
- .tqarg(name).tqarg(object->getClassName()) );
+ .arg(name).arg(object->getClassName()) );
#endif
- m_tqchildren.replace(name, Object::Ptr(object));
+ m_children.replace(name, Object::Ptr(object));
return true;
}
@@ -78,9 +78,9 @@ bool Callable::addChild(Callable* object)
void Callable::removeChild(const TQString& name)
{
#ifdef KROSS_API_OBJECT_REMCHILD_DEBUG
- krossdebug( TQString("Kross::Api::Callable::removeChild() name='%1'").tqarg(name) );
+ krossdebug( TQString("Kross::Api::Callable::removeChild() name='%1'").arg(name) );
#endif
- m_tqchildren.remove(name);
+ m_children.remove(name);
}
void Callable::removeAllChildren()
@@ -88,13 +88,13 @@ void Callable::removeAllChildren()
#ifdef KROSS_API_OBJECT_REMCHILD_DEBUG
krossdebug( "Kross::Api::Callable::removeAllChildren()" );
#endif
- m_tqchildren.clear();
+ m_children.clear();
}
Object::Ptr Callable::call(const TQString& name, List::Ptr args)
{
#ifdef KROSS_API_CALLABLE_CALL_DEBUG
- krossdebug( TQString("Kross::Api::Callable::call() name=%1 getName()=%2 arguments=%3").tqarg(name).tqarg(getName()).tqarg(args ? args->toString() : TQString("")) );
+ krossdebug( TQString("Kross::Api::Callable::call() name=%1 getName()=%2 arguments=%3").arg(name).arg(getName()).arg(args ? args->toString() : TQString("")) );
#endif
if(name.isEmpty()) // return a self-reference if no functionname is defined.
@@ -111,7 +111,7 @@ Object::Ptr Callable::call(const TQString& name, List::Ptr args)
TQString s = Variant::toString(args->item(0));
Object::Ptr obj = getChild(s);
if(! obj)
- throw Exception::Ptr( new Exception(TQString("The object '%1' has no child object '%2'").tqarg(getName()).tqarg(s)) );
+ throw Exception::Ptr( new Exception(TQString("The object '%1' has no child object '%2'").arg(getName()).arg(s)) );
return obj;
}
else if(name == "has") {
@@ -123,9 +123,9 @@ Object::Ptr Callable::call(const TQString& name, List::Ptr args)
}
else if(name == "list") {
TQStringList list;
- TQMap<TQString, Object::Ptr> tqchildren = getChildren();
- TQMap<TQString, Object::Ptr>::Iterator it( tqchildren.begin() );
- for(; it != tqchildren.end(); ++it)
+ TQMap<TQString, Object::Ptr> children = getChildren();
+ TQMap<TQString, Object::Ptr>::Iterator it( children.begin() );
+ for(; it != children.end(); ++it)
list.append( it.key() );
return new Variant(list);
}
@@ -134,6 +134,6 @@ Object::Ptr Callable::call(const TQString& name, List::Ptr args)
}
// If there exists no such object return NULL.
- krossdebug( TQString("Object '%1' has no callable object named '%2'.").tqarg(getName()).tqarg(name) );
+ krossdebug( TQString("Object '%1' has no callable object named '%2'.").arg(getName()).arg(name) );
return 0;
}
diff --git a/lib/kross/api/callable.h b/lib/kross/api/callable.h
index 63edb067..0e3dd3a6 100644
--- a/lib/kross/api/callable.h
+++ b/lib/kross/api/callable.h
@@ -92,9 +92,9 @@ namespace Kross { namespace Api {
Object::Ptr getChild(const TQString& name) const;
/**
- * Return all tqchildren.
+ * Return all children.
*
- * \return A \a ObjectMap of tqchildren this Object has.
+ * \return A \a ObjectMap of children this Object has.
*/
TQMap<TQString, Object::Ptr> getChildren() const;
@@ -125,7 +125,7 @@ namespace Kross { namespace Api {
void removeChild(const TQString& name);
/**
- * Remove all tqchildren.
+ * Remove all children.
*/
void removeAllChildren();
@@ -138,7 +138,7 @@ namespace Kross { namespace Api {
/// Name this callable object has.
TQString m_name;
/// A list of childobjects.
- TQMap<TQString, Object::Ptr> m_tqchildren;
+ TQMap<TQString, Object::Ptr> m_children;
};
}}
diff --git a/lib/kross/api/class.h b/lib/kross/api/class.h
index de1d898c..6224a61a 100644
--- a/lib/kross/api/class.h
+++ b/lib/kross/api/class.h
@@ -76,7 +76,7 @@ namespace Kross { namespace Api {
/*
virtual Object::Ptr call(const TQString& name, List::Ptr arguments)
{
- krossdebug( TQString("Class::call(%1)").tqarg(name) );
+ krossdebug( TQString("Class::call(%1)").arg(name) );
return Event<T>::call(name, arguments);
}
*/
diff --git a/lib/kross/api/event.h b/lib/kross/api/event.h
index 26a92117..b75107f7 100644
--- a/lib/kross/api/event.h
+++ b/lib/kross/api/event.h
@@ -201,13 +201,13 @@ namespace Kross { namespace Api {
virtual Object::Ptr call(const TQString& name, List::Ptr arguments)
{
#ifdef KROSS_API_EVENT_CALL_DEBUG
- krossdebug( TQString("Event::call() name='%1' getName()='%2'").tqarg(name).tqarg(getName()) );
+ krossdebug( TQString("Event::call() name='%1' getName()='%2'").arg(name).arg(getName()) );
#endif
Function* function = m_functions[name];
if(function) {
#ifdef KROSS_API_EVENT_CALL_DEBUG
- krossdebug( TQString("Event::call() name='%1' is a builtin function.").tqarg(name) );
+ krossdebug( TQString("Event::call() name='%1' is a builtin function.").arg(name) );
#endif
return function->call(arguments);
}
diff --git a/lib/kross/api/eventscript.cpp b/lib/kross/api/eventscript.cpp
index 43c4c1cb..f9fe9f9a 100644
--- a/lib/kross/api/eventscript.cpp
+++ b/lib/kross/api/eventscript.cpp
@@ -40,7 +40,7 @@ const TQString EventScript::getClassName() const
Object::Ptr EventScript::call(const TQString& name, KSharedPtr<List> arguments)
{
- krossdebug( TQString("EventScript::call() name=%1 arguments=%2").tqarg(name).tqarg(arguments->toString()) );
+ krossdebug( TQString("EventScript::call() name=%1 arguments=%2").arg(name).arg(arguments->toString()) );
//TODO
return 0;
}
diff --git a/lib/kross/api/eventsignal.cpp b/lib/kross/api/eventsignal.cpp
index 86e868f5..8f4d2c50 100644
--- a/lib/kross/api/eventsignal.cpp
+++ b/lib/kross/api/eventsignal.cpp
@@ -46,7 +46,7 @@ const TQString EventSignal::getClassName() const
Object::Ptr EventSignal::call(const TQString& /*name*/, KSharedPtr<List> arguments)
{
#ifdef KROSS_API_EVENTSIGNAL_CALL_DEBUG
- krossdebug( TQString("EventSignal::call() m_signal=%1 arguments=%2").tqarg(m_signal).tqarg(arguments->toString()) );
+ krossdebug( TQString("EventSignal::call() m_signal=%1 arguments=%2").arg(m_signal).arg(arguments->toString()) );
#endif
TQString n = m_signal;
@@ -56,7 +56,7 @@ Object::Ptr EventSignal::call(const TQString& /*name*/, KSharedPtr<List> argumen
int signalid = m_sender->metaObject()->findSignal(n.latin1(), false);
if(signalid < 0)
- throw new Exception(TQString("No such signal '%1'.").tqarg(n));
+ throw new Exception(TQString("No such signal '%1'.").arg(n));
TQUObject* uo = QtObject::toTQUObject(n, arguments);
m_sender->qt_emit(signalid, uo); // emit the signal
diff --git a/lib/kross/api/eventslot.cpp b/lib/kross/api/eventslot.cpp
index 56616904..3f6482db 100644
--- a/lib/kross/api/eventslot.cpp
+++ b/lib/kross/api/eventslot.cpp
@@ -46,7 +46,7 @@ const TQString EventSlot::getClassName() const
Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments)
{
#ifdef KROSS_API_EVENTSLOT_CALL_DEBUG
- krossdebug( TQString("EventSlot::call() m_slot=%1 arguments=%2").tqarg(m_slot).tqarg(arguments->toString()) );
+ krossdebug( TQString("EventSlot::call() m_slot=%1 arguments=%2").arg(m_slot).arg(arguments->toString()) );
#endif
TQString n = m_slot; //TODO name; //Variant::toString(args->item(0));
@@ -56,7 +56,7 @@ Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments)
int slotid = m_receiver->metaObject()->findSlot(n.latin1(), false);
if(slotid < 0)
- throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(n)) );
+ throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").arg(n)) );
TQUObject* uo = QtObject::toTQUObject(n, arguments);
m_receiver->qt_invoke(slotid, uo); // invoke the slot
@@ -72,7 +72,7 @@ TQCString EventSlot::getSlot(const TQCString& signal)
int startpos = signature.find("(");
int endpos = signature.findRev(")");
if(startpos < 0 || startpos > endpos) {
- krosswarning( TQString("EventSlot::getSlot(%1) Invalid signal.").tqarg(signal) );
+ krosswarning( TQString("EventSlot::getSlot(%1) Invalid signal.").arg(signal) );
return TQCString();
}
TQString signalname = signature.left(startpos);
@@ -83,13 +83,13 @@ TQCString EventSlot::getSlot(const TQCString& signal)
TQMetaObject* mo = metaObject();
int slotid = mo->findSlot(slot, false);
if(slotid < 0) {
- krossdebug( TQString("EventSlot::getSlot(%1) No such slot '%2' avaiable.").tqarg(signal).tqarg(slot) );
+ krossdebug( TQString("EventSlot::getSlot(%1) No such slot '%2' avaiable.").arg(signal).arg(slot) );
return TQCString();
}
const TQMetaData* md = mo->slot(slotid, false);
if(md->access != TQMetaData::Public) {
- krossdebug( TQString("EventSlot::getSlot(%1) The slot '%2' is not public.").tqarg(signal).tqarg(slot) );
+ krossdebug( TQString("EventSlot::getSlot(%1) The slot '%2' is not public.").arg(signal).arg(slot) );
return TQCString();
}
@@ -97,7 +97,7 @@ TQCString EventSlot::getSlot(const TQCString& signal)
//const TQUMethod *method = md->method;
krossdebug( TQString("signal=%1 slot=%2 slotid=%3 params=%4 mdname=%5")
- .tqarg(signal).tqarg(slot).tqarg(slotid).tqarg(params).tqarg(md->name) );
+ .arg(signal).arg(slot).arg(slotid).arg(params).arg(md->name) );
return TQCString("1" + slot); // Emulate the TQT_SLOT(...) macro by adding as first char a "1".
}
@@ -114,7 +114,7 @@ bool EventSlot::connect(EventManager* eventmanager, TQObject* senderobj, const T
EventSlot* eventslot = create(eventmanager);
eventslot->connect(eventmanager, senderobj, signal, function, slot);
m_slots.append(eventslot);
- krossdebug( TQString("EventSlot::connect(%1, %2, %3) added child EventSlot !!!").tqarg(senderobj->name()).tqarg(signal).tqarg(function) );
+ krossdebug( TQString("EventSlot::connect(%1, %2, %3) added child EventSlot !!!").arg(senderobj->name()).arg(signal).arg(function) );
}
else {
m_sender = senderobj;
@@ -122,10 +122,10 @@ bool EventSlot::connect(EventManager* eventmanager, TQObject* senderobj, const T
m_function = function;
m_slot = myslot;
if(! TQObject::connect((TQObject*)senderobj, signal, this, myslot)) {
- krossdebug( TQString("EventSlot::connect(%1, %2, %3) failed.").tqarg(senderobj->name()).tqarg(signal).tqarg(function) );
+ krossdebug( TQString("EventSlot::connect(%1, %2, %3) failed.").arg(senderobj->name()).arg(signal).arg(function) );
return false;
}
- krossdebug( TQString("EventSlot::connect(%1, %2, %3) successfully connected.").tqarg(senderobj->name()).tqarg(signal).tqarg(function) );
+ krossdebug( TQString("EventSlot::connect(%1, %2, %3) successfully connected.").arg(senderobj->name()).arg(signal).arg(function) );
}
return true;
}
@@ -144,7 +144,7 @@ bool EventSlot::disconnect()
void EventSlot::call(const TQVariant& variant)
{
krossdebug( TQString("EventSlot::call() sender='%1' signal='%2' function='%3'")
- .tqarg(m_sender->name()).tqarg(m_signal).tqarg(m_function) );
+ .arg(m_sender->name()).arg(m_signal).arg(m_function) );
Kross::Api::List* arglist = 0;
@@ -159,7 +159,7 @@ void EventSlot::call(const TQVariant& variant)
}
catch(Exception& e) {
//TODO add hadError(), getError() and setError()
- krossdebug( TQString("EXCEPTION in EventSlot::call('%1') type='%2' description='%3'").tqarg(variant.toString()).tqarg(e.type()).tqarg(e.description()) );
+ krossdebug( TQString("EXCEPTION in EventSlot::call('%1') type='%2' description='%3'").arg(variant.toString()).arg(e.type()).arg(e.description()) );
}
}
diff --git a/lib/kross/api/exception.cpp b/lib/kross/api/exception.cpp
index c6a0198f..cb0125c4 100644
--- a/lib/kross/api/exception.cpp
+++ b/lib/kross/api/exception.cpp
@@ -30,7 +30,7 @@ Exception::Exception(const TQString& error, long lineno)
, m_error(error)
, m_lineno(lineno)
{
- krosswarning( TQString("Kross::Api::Exception error='%1' lineno='%3'").tqarg(m_error).tqarg(m_lineno) );
+ krosswarning( TQString("Kross::Api::Exception error='%1' lineno='%3'").arg(m_error).arg(m_lineno) );
}
Exception::~Exception()
@@ -45,8 +45,8 @@ const TQString Exception::getClassName() const
const TQString Exception::toString()
{
return (m_lineno != -1)
- ? TQString("Exception at line %1: %2").tqarg(m_lineno).tqarg(m_error)
- : TQString("Exception: %1").tqarg(m_error);
+ ? TQString("Exception at line %1: %2").arg(m_lineno).arg(m_error)
+ : TQString("Exception: %1").arg(m_error);
}
const TQString Exception::getError() const
diff --git a/lib/kross/api/interpreter.cpp b/lib/kross/api/interpreter.cpp
index 8d266930..86eae479 100644
--- a/lib/kross/api/interpreter.cpp
+++ b/lib/kross/api/interpreter.cpp
@@ -95,7 +95,7 @@ Interpreter* InterpreterInfo::getInterpreter()
if(m_interpreter) // buffered
return m_interpreter;
- krossdebug( TQString("Loading the interpreter library for %1").tqarg(m_interpretername) );
+ krossdebug( TQString("Loading the interpreter library for %1").arg(m_interpretername) );
// Load the krosspython library.
KLibLoader *libloader = KLibLoader::self();
@@ -104,10 +104,10 @@ Interpreter* InterpreterInfo::getInterpreter()
if(! library) {
/*
setException(
- new Exception( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").tqarg(m_library).tqarg(m_interpretername) )
+ new Exception( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").arg(m_library).arg(m_interpretername) )
);
*/
- krosswarning( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").tqarg(m_library).tqarg(m_interpretername) );
+ krosswarning( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").arg(m_library).arg(m_interpretername) );
return 0;
}
diff --git a/lib/kross/api/list.cpp b/lib/kross/api/list.cpp
index 3d894116..9e2baf52 100644
--- a/lib/kross/api/list.cpp
+++ b/lib/kross/api/list.cpp
@@ -51,8 +51,8 @@ Object::Ptr List::item(uint idx, Object* defaultobject)
if(idx >= list.count()) {
if(defaultobject)
return defaultobject;
- krossdebug( TQString("List::item index=%1 is out of bounds. Raising TypeException.").tqarg(idx) );
- throw Exception::Ptr( new Exception(TQString("List-index %1 out of bounds.").tqarg(idx)) );
+ krossdebug( TQString("List::item index=%1 is out of bounds. Raising TypeException.").arg(idx) );
+ throw Exception::Ptr( new Exception(TQString("List-index %1 out of bounds.").arg(idx)) );
}
return list[idx];
}
diff --git a/lib/kross/api/module.h b/lib/kross/api/module.h
index 3e58305a..f27bdf5c 100644
--- a/lib/kross/api/module.h
+++ b/lib/kross/api/module.h
@@ -51,7 +51,7 @@ namespace Kross { namespace Api {
explicit Module(const TQString& name)
: Class<Module>(name)
{
- krossdebug( TQString("Kross::Api::Module %1 created").tqarg(name) );
+ krossdebug( TQString("Kross::Api::Module %1 created").arg(name) );
}
/**
@@ -59,7 +59,7 @@ namespace Kross { namespace Api {
*/
virtual ~Module()
{
- krossdebug( TQString("Kross::Api::Module %1 destroyed").tqarg(getName()) );
+ krossdebug( TQString("Kross::Api::Module %1 destroyed").arg(getName()) );
}
/**
diff --git a/lib/kross/api/object.cpp b/lib/kross/api/object.cpp
index 06ec55d5..43fa8b4b 100644
--- a/lib/kross/api/object.cpp
+++ b/lib/kross/api/object.cpp
@@ -30,21 +30,21 @@ Object::Object()
: KShared()
{
#ifdef KROSS_API_OBJECT_CTOR_DEBUG
- krossdebug( TQString("Kross::Api::Object::Constructor() name='%1' refcount='%2'").tqarg(m_name).tqarg(_KShared_count()) );
+ krossdebug( TQString("Kross::Api::Object::Constructor() name='%1' refcount='%2'").arg(m_name).arg(_KShared_count()) );
#endif
}
Object::~Object()
{
#ifdef KROSS_API_OBJECT_DTOR_DEBUG
- krossdebug( TQString("Kross::Api::Object::Destructor() name='%1' refcount='%2'").tqarg(m_name).tqarg(_KShared_count()) );
+ krossdebug( TQString("Kross::Api::Object::Destructor() name='%1' refcount='%2'").arg(m_name).arg(_KShared_count()) );
#endif
//removeAllChildren(); // not needed cause we use KShared to handle ref-couting and freeing.
}
const TQString Object::toString()
{
- return TQString("%1").tqarg(getClassName());
+ return TQString("%1").arg(getClassName());
}
Object::Ptr Object::call(const TQString& name, List::Ptr arguments)
@@ -52,12 +52,12 @@ Object::Ptr Object::call(const TQString& name, List::Ptr arguments)
Q_UNUSED(arguments);
#ifdef KROSS_API_OBJECT_CALL_DEBUG
- krossdebug( TQString("Kross::Api::Object::call(%1) name=%2 class=%3").tqarg(name).tqarg(getName()).tqarg(getClassName()) );
+ krossdebug( TQString("Kross::Api::Object::call(%1) name=%2 class=%3").arg(name).arg(getName()).arg(getClassName()) );
#endif
if(name.isEmpty()) // return a self-reference if no functionname is defined.
return this;
- throw Exception::Ptr( new Exception(TQString("No callable object named '%2'").tqarg(name)) );
+ throw Exception::Ptr( new Exception(TQString("No callable object named '%2'").arg(name)) );
}
diff --git a/lib/kross/api/object.h b/lib/kross/api/object.h
index 87bd2132..f23a6179 100644
--- a/lib/kross/api/object.h
+++ b/lib/kross/api/object.h
@@ -142,7 +142,7 @@ template<class T> inline T* Object::fromObject(Object::Ptr object)
{
T* t = (T*) object.data();
if(! t)
- throw KSharedPtr<Exception>( new Exception(TQString("Object \"%1\" invalid.").tqarg(object ? object->getClassName() : "")) );
+ throw KSharedPtr<Exception>( new Exception(TQString("Object \"%1\" invalid.").arg(object ? object->getClassName() : "")) );
return t;
}
diff --git a/lib/kross/api/qtobject.cpp b/lib/kross/api/qtobject.cpp
index 04736e2a..5fc1a36a 100644
--- a/lib/kross/api/qtobject.cpp
+++ b/lib/kross/api/qtobject.cpp
@@ -93,7 +93,7 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments)
int startpos = signature.find("(");
int endpos = signature.findRev(")");
if(startpos < 0 || startpos > endpos)
- throw Exception::Ptr( new Exception(TQString("Invalid TQt signal or slot signature '%1'").tqarg(signature)) );
+ throw Exception::Ptr( new Exception(TQString("Invalid TQt signal or slot signature '%1'").arg(signature)) );
//TQString sig = signature.left(startpos);
TQString params = signature.mid(startpos + 1, endpos - startpos - 1);
@@ -107,19 +107,19 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments)
//TQString t;
//for(int j=0; j<argcount; j++) t += "'" + Variant::toString(arguments->item(j)) + "' ";
-//krossdebug( TQString("1 ---------------------: (%1) %2").tqarg(argcount).tqarg(t) );
+//krossdebug( TQString("1 ---------------------: (%1) %2").arg(argcount).arg(t) );
// Fill parameters.
uint argcount = arguments ? arguments->count() : 0;
for(uint i = 0; i < paramcount; i++) {
if(paramlist[i].find(TQSTRING_OBJECT_NAME_STRING) >= 0) {
const TQString s = (argcount > i) ? Variant::toString(arguments->item(i)) : TQString();
- //krossdebug(TQString("EventSlot::toTQUObject s=%1").tqarg(s));
+ //krossdebug(TQString("EventSlot::toTQUObject s=%1").arg(s));
static_TQUType_TQString.set( &(uo[i + 1]), s );
}
//TODO handle int, long, char*, TQStringList, etc.
else {
- throw Exception::Ptr( new Exception(TQString("Unknown TQt signal or slot argument '%1' in signature '%2'.").tqarg(paramlist[i]).tqarg(signature)) );
+ throw Exception::Ptr( new Exception(TQString("Unknown TQt signal or slot argument '%1' in signature '%2'.").arg(paramlist[i]).arg(signature)) );
}
}
@@ -175,7 +175,7 @@ Kross::Api::Object::Ptr QtObject::callSlot(Kross::Api::List::Ptr args)
TQString name = Kross::Api::Variant::toString(args->item(0));
int slotid = m_object->metaObject()->findSlot(name.latin1(), false);
if(slotid < 0)
- throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(name)) );
+ throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").arg(name)) );
TQUObject* uo = QtObject::toTQUObject(name, args);
m_object->qt_invoke(slotid, uo);
@@ -203,7 +203,7 @@ Kross::Api::Object::Ptr QtObject::emitSignal(Kross::Api::List::Ptr args)
TQString name = Kross::Api::Variant::toString(args->item(0));
int signalid = m_object->metaObject()->findSignal(name.latin1(), false);
if(signalid < 0)
- throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").tqarg(name)) );
+ throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").arg(name)) );
m_object->qt_invoke(signalid, 0); //TODO convert Kross::Api::List::Ptr => TQUObject*
return 0;
}
@@ -211,16 +211,16 @@ Kross::Api::Object::Ptr QtObject::emitSignal(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr QtObject::connectSignal(Kross::Api::List::Ptr args)
{
TQString signalname = Kross::Api::Variant::toString(args->item(0));
- TQString signalsignatur = TQString("2%1").tqarg(signalname);
+ TQString signalsignatur = TQString("2%1").arg(signalname);
const char* signalsig = signalsignatur.latin1();
QtObject* obj = Kross::Api::Object::fromObject<Kross::Api::QtObject>(args->item(1));
TQObject* o = obj->getObject();
if(! o)
- throw Exception::Ptr( new Exception(TQString("No such TQObject receiver in '%1'.").tqarg(obj->getName())) );
+ throw Exception::Ptr( new Exception(TQString("No such TQObject receiver in '%1'.").arg(obj->getName())) );
TQString slotname = Kross::Api::Variant::toString(args->item(2));
- TQString slotsignatur = TQString("1%1").tqarg(slotname);
+ TQString slotsignatur = TQString("1%1").arg(slotname);
const char* slotsig = slotsignatur.latin1();
return new Kross::Api::Variant(
diff --git a/lib/kross/api/variant.cpp b/lib/kross/api/variant.cpp
index e8d8bc1b..54e8ed7e 100644
--- a/lib/kross/api/variant.cpp
+++ b/lib/kross/api/variant.cpp
@@ -81,7 +81,7 @@ const TQString Variant::toString(Object::Ptr object)
{
const TQVariant& variant = toVariant(object);
if(! variant.canCast(TQVariant::String))
- throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::String expected, but got %1.").tqarg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::String expected, but got %1.").arg(variant.typeName()).latin1()) );
return variant.toString();
}
@@ -89,7 +89,7 @@ int Variant::toInt(Object::Ptr object)
{
const TQVariant& variant = toVariant(object);
if(! variant.canCast(TQVariant::Int))
- throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Int expected, but got %1.").tqarg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Int expected, but got %1.").arg(variant.typeName()).latin1()) );
return variant.toInt();
}
@@ -97,7 +97,7 @@ uint Variant::toUInt(Object::Ptr object)
{
const TQVariant& variant = toVariant(object);
if(! variant.canCast(TQVariant::UInt))
- throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::UInt expected, but got %1.").tqarg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::UInt expected, but got %1.").arg(variant.typeName()).latin1()) );
return variant.toUInt();
}
@@ -105,7 +105,7 @@ double Variant::toDouble(Object::Ptr object)
{
const TQVariant& variant = toVariant(object);
if(! variant.canCast(TQVariant::Double))
- throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Double expected, but got %1.").tqarg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Double expected, but got %1.").arg(variant.typeName()).latin1()) );
return variant.toDouble();
}
@@ -113,7 +113,7 @@ TQ_LLONG Variant::toLLONG(Object::Ptr object)
{
const TQVariant& variant = toVariant(object);
if(! variant.canCast(TQVariant::LongLong))
- throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::LLONG expected, but got %1.").tqarg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::LLONG expected, but got %1.").arg(variant.typeName()).latin1()) );
return variant.toLongLong();
}
@@ -121,7 +121,7 @@ TQ_ULLONG Variant::toULLONG(Object::Ptr object)
{
const TQVariant& variant = toVariant(object);
if(! variant.canCast(TQVariant::ULongLong))
- throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::ULLONG expected, but got %1.").tqarg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::ULLONG expected, but got %1.").arg(variant.typeName()).latin1()) );
return variant.toULongLong();
}
@@ -129,7 +129,7 @@ bool Variant::toBool(Object::Ptr object)
{
const TQVariant& variant = toVariant(object);
if(! variant.canCast(TQVariant::Bool))
- throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Bool expected, but got %1.").tqarg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Bool expected, but got %1.").arg(variant.typeName()).latin1()) );
return variant.toBool();
}
@@ -146,7 +146,7 @@ TQStringList Variant::toStringList(Object::Ptr object)
}
const TQVariant& variant = toVariant(object);
if(! variant.canCast(TQVariant::StringList))
- throw Exception::Ptr( new Exception(TQString("Kross::Api::Variant::StringList expected, but got '%1'.").tqarg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(TQString("Kross::Api::Variant::StringList expected, but got '%1'.").arg(variant.typeName()).latin1()) );
return variant.toStringList();
}
@@ -163,6 +163,6 @@ TQValueList<TQVariant> Variant::toList(Object::Ptr object)
}
const TQVariant& variant = toVariant(object);
if(! variant.canCast(TQVariant::List))
- throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::List expected, but got '%1'.").tqarg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::List expected, but got '%1'.").arg(variant.typeName()).latin1()) );
return variant.toList();
}
diff --git a/lib/kross/main/mainmodule.cpp b/lib/kross/main/mainmodule.cpp
index dde74502..8c29180f 100644
--- a/lib/kross/main/mainmodule.cpp
+++ b/lib/kross/main/mainmodule.cpp
@@ -79,7 +79,7 @@ EventSignal::Ptr MainModule::addSignal(const TQString& name, TQObject* sender, T
{
EventSignal* event = new EventSignal(name, sender, signal);
if(! addChild(name, event)) {
- krosswarning( TQString("Failed to add signal name='%1' signature='%2'").tqarg(name).tqarg(signal.data()) );
+ krosswarning( TQString("Failed to add signal name='%1' signature='%2'").arg(name).arg(signal.data()) );
return 0;
}
return event;
@@ -89,7 +89,7 @@ EventSlot::Ptr MainModule::addSlot(const TQString& name, TQObject* receiver, TQC
{
EventSlot* event = new EventSlot(name, receiver, slot);
if(! addChild(name, event)) {
- krosswarning( TQString("Failed to add slot name='%1' signature='%2'").tqarg(name).tqarg(slot.data()) );
+ krosswarning( TQString("Failed to add slot name='%1' signature='%2'").arg(name).arg(slot.data()) );
return 0;
}
return event;
@@ -99,7 +99,7 @@ QtObject::Ptr MainModule::addTQObject(TQObject* object, const TQString& name)
{
QtObject* qtobject = new QtObject(object, name);
if(! addChild(name, qtobject)) {
- krosswarning( TQString("Failed to add TQObject name='%1'").tqarg(object->name()) );
+ krosswarning( TQString("Failed to add TQObject name='%1'").arg(object->name()) );
return 0;
}
return qtobject;
@@ -109,7 +109,7 @@ EventAction::Ptr MainModule::addKAction(KAction* action, const TQString& name)
{
EventAction* event = new EventAction(name, action);
if(! addChild(name, event)) {
- krosswarning( TQString("Failed to add KAction name='%1'").tqarg(action->name()) );
+ krosswarning( TQString("Failed to add KAction name='%1'").arg(action->name()) );
return 0;
}
return event;
diff --git a/lib/kross/main/manager.cpp b/lib/kross/main/manager.cpp
index 646a8746..156eb2ac 100644
--- a/lib/kross/main/manager.cpp
+++ b/lib/kross/main/manager.cpp
@@ -169,7 +169,7 @@ Interpreter* Manager::getInterpreter(const TQString& interpretername)
setException(0); // clear previous exceptions
if(! d->interpreterinfos.contains(interpretername)) {
- setException( new Exception(i18n("No such interpreter '%1'").tqarg(interpretername)) );
+ setException( new Exception(i18n("No such interpreter '%1'").arg(interpretername)) );
return 0;
}
@@ -206,22 +206,22 @@ Module::Ptr Manager::loadModule(const TQString& modulename)
if(module)
return module;
else
- krossdebug( TQString("Manager::loadModule(%1) =======> Modulename registered, but module is invalid!").tqarg(modulename) );
+ krossdebug( TQString("Manager::loadModule(%1) =======> Modulename registered, but module is invalid!").arg(modulename) );
}
KLibLoader* loader = KLibLoader::self();
KLibrary* lib = loader->globalLibrary( modulename.latin1() );
if(! lib) {
- krosswarning( TQString("Failed to load module '%1': %2").tqarg(modulename).tqarg(loader->lastErrorMessage()) );
+ krosswarning( TQString("Failed to load module '%1': %2").arg(modulename).arg(loader->lastErrorMessage()) );
return 0;
}
- krossdebug( TQString("Successfully loaded module '%1'").tqarg(modulename) );
+ krossdebug( TQString("Successfully loaded module '%1'").arg(modulename) );
def_module_func func;
func = (def_module_func) lib->symbol("init_module");
if(! func) {
- krosswarning( TQString("Failed to determinate init function in module '%1'").tqarg(modulename) );
+ krosswarning( TQString("Failed to determinate init function in module '%1'").arg(modulename) );
return 0;
}
@@ -235,14 +235,14 @@ Module::Ptr Manager::loadModule(const TQString& modulename)
lib->unload();
if(! module) {
- krosswarning( TQString("Failed to load module '%1'").tqarg(modulename) );
+ krosswarning( TQString("Failed to load module '%1'").arg(modulename) );
return 0;
}
// Don't remember module cause we like to have freeing it handled by the caller.
//d->modules.replace(modulename, module);
- //krossdebug( TQString("Kross::Api::Manager::loadModule modulename='%1' module='%2'").tqarg(modulename).tqarg(module->toString()) );
+ //krossdebug( TQString("Kross::Api::Manager::loadModule modulename='%1' module='%2'").arg(modulename).arg(module->toString()) );
return module;
}
diff --git a/lib/kross/main/scriptaction.cpp b/lib/kross/main/scriptaction.cpp
index b658a0b1..f7e11618 100644
--- a/lib/kross/main/scriptaction.cpp
+++ b/lib/kross/main/scriptaction.cpp
@@ -152,9 +152,9 @@ ScriptAction::ScriptAction(const TQString& scriptconfigfile, const TQDomElement&
if(icon.isNull())
icon = KMimeType::iconForURL( KURL(file) );
if(description.isEmpty())
- description = TQString("%1<br>%2").tqarg(text.isEmpty() ? name : text).tqarg(file);
+ description = TQString("%1<br>%2").arg(text.isEmpty() ? name : text).arg(file);
else
- description += TQString("<br>%1").tqarg(file);
+ description += TQString("<br>%1").arg(file);
ScriptContainer::setName(file);
}
@@ -230,8 +230,8 @@ void ScriptAction::activate()
TQString errormessage = Kross::Api::ScriptContainer::getException()->getError();
TQString tracedetails = Kross::Api::ScriptContainer::getException()->getTrace();
d->logs << TQString("<b>%1</b><br>%2")
- .tqarg( TQStyleSheet::escape(errormessage) )
- .tqarg( TQStyleSheet::escape(tracedetails) );
+ .arg( TQStyleSheet::escape(errormessage) )
+ .arg( TQStyleSheet::escape(tracedetails) );
emit failed(errormessage, tracedetails);
}
else {
diff --git a/lib/kross/main/scriptcontainer.cpp b/lib/kross/main/scriptcontainer.cpp
index a345dd02..7f7f980e 100644
--- a/lib/kross/main/scriptcontainer.cpp
+++ b/lib/kross/main/scriptcontainer.cpp
@@ -87,7 +87,7 @@ ScriptContainer::ScriptContainer(const TQString& name)
: MainModule(name)
, d( new ScriptContainerPrivate() ) // initialize d-pointer class
{
- //krossdebug( TQString("ScriptContainer::ScriptContainer() Ctor name='%1'").tqarg(name) );
+ //krossdebug( TQString("ScriptContainer::ScriptContainer() Ctor name='%1'").arg(name) );
d->script = 0;
d->name = name;
@@ -95,7 +95,7 @@ ScriptContainer::ScriptContainer(const TQString& name)
ScriptContainer::~ScriptContainer()
{
- //krossdebug( TQString("ScriptContainer::~ScriptContainer() Dtor name='%1'").tqarg(d->name) );
+ //krossdebug( TQString("ScriptContainer::~ScriptContainer() Dtor name='%1'").arg(d->name) );
finalize();
delete d;
@@ -164,8 +164,8 @@ bool ScriptContainer::setOption(const TQString name, const TQVariant& value)
if(info->hasOption(name)) {
d->options.replace(name, value);
return true;
- } 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()) );
+ } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").arg(name).arg(value.toString()) );
+ } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").arg(name).arg(value.toString()) );
return false;
}
@@ -244,19 +244,19 @@ bool ScriptContainer::initialize()
finalize();
if(! d->scriptfile.isNull()) {
- krossdebug( TQString("Kross::Api::ScriptContainer::initialize() file=%1").tqarg(d->scriptfile) );
+ krossdebug( TQString("Kross::Api::ScriptContainer::initialize() file=%1").arg(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'").tqarg(d->scriptfile)) );
+ setException( new Exception(i18n("Failed to determinate interpreter for scriptfile '%1'").arg(d->scriptfile)) );
return false;
}
}
TQFile f( d->scriptfile );
if(! f.open(IO_ReadOnly)) {
- setException( new Exception(i18n("Failed to open scriptfile '%1'").tqarg(d->scriptfile)) );
+ setException( new Exception(i18n("Failed to open scriptfile '%1'").arg(d->scriptfile)) );
return false;
}
d->code = TQString( f.readAll() );
@@ -265,13 +265,13 @@ bool ScriptContainer::initialize()
Interpreter* interpreter = Manager::scriptManager()->getInterpreter(d->interpretername);
if(! interpreter) {
- setException( new Exception(i18n("Unknown interpreter '%1'").tqarg(d->interpretername)) );
+ setException( new Exception(i18n("Unknown interpreter '%1'").arg(d->interpretername)) );
return false;
}
d->script = interpreter->createScript(this);
if(! d->script) {
- setException( new Exception(i18n("Failed to create script for interpreter '%1'").tqarg(d->interpretername)) );
+ setException( new Exception(i18n("Failed to create script for interpreter '%1'").arg(d->interpretername)) );
return false;
}
if(d->script->hadException()) {
diff --git a/lib/kross/main/scriptguiclient.cpp b/lib/kross/main/scriptguiclient.cpp
index bce26d5c..88877f5a 100644
--- a/lib/kross/main/scriptguiclient.cpp
+++ b/lib/kross/main/scriptguiclient.cpp
@@ -147,10 +147,10 @@ void ScriptGUIClient::reloadInstalledScripts()
bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile)
{
- krossdebug( TQString("Install script package: %1").tqarg(scriptpackagefile) );
+ krossdebug( TQString("Install script package: %1").arg(scriptpackagefile) );
KTar archive( scriptpackagefile );
if(! archive.open(IO_ReadOnly)) {
- KMessageBox::sorry(0, i18n("Could not read the package \"%1\".").tqarg(scriptpackagefile));
+ KMessageBox::sorry(0, i18n("Could not read the package \"%1\".").arg(scriptpackagefile));
return false;
}
@@ -167,17 +167,17 @@ bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile)
if( TQDir(destination).exists() ) {
if( KMessageBox::warningContinueCancel(0,
- i18n("A script package with the name \"%1\" already exists. Replace this package?" ).tqarg(packagename),
+ i18n("A script package with the name \"%1\" already exists. Replace this package?" ).arg(packagename),
i18n("Replace")) != KMessageBox::Continue )
return false;
if(! KIO::NetAccess::del(destination, 0) ) {
- KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").tqarg(destination));
+ KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").arg(destination));
return false;
}
}
- krossdebug( TQString("Copy script-package to destination directory: %1").tqarg(destination) );
+ krossdebug( TQString("Copy script-package to destination directory: %1").arg(destination) );
const KArchiveDirectory* archivedir = archive.directory();
archivedir->copyTo(destination, true);
@@ -188,7 +188,7 @@ bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile)
bool ScriptGUIClient::uninstallScriptPackage(const TQString& scriptpackagepath)
{
if(! KIO::NetAccess::del(scriptpackagepath, 0) ) {
- KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").tqarg(scriptpackagepath));
+ KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").arg(scriptpackagepath));
return false;
}
reloadInstalledScripts();
@@ -197,18 +197,18 @@ bool ScriptGUIClient::uninstallScriptPackage(const TQString& scriptpackagepath)
bool ScriptGUIClient::loadScriptConfigFile(const TQString& scriptconfigfile)
{
- krossdebug( TQString("ScriptGUIClient::loadScriptConfig file=%1").tqarg(scriptconfigfile) );
+ krossdebug( TQString("ScriptGUIClient::loadScriptConfig file=%1").arg(scriptconfigfile) );
TQDomDocument domdoc;
TQFile file(scriptconfigfile);
if(! file.open(IO_ReadOnly)) {
- krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to read scriptconfigfile: %1").tqarg(scriptconfigfile) );
+ krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to read scriptconfigfile: %1").arg(scriptconfigfile) );
return false;
}
bool ok = domdoc.setContent(&file);
file.close();
if(! ok) {
- krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to parse scriptconfigfile: %1").tqarg(scriptconfigfile) );
+ krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to parse scriptconfigfile: %1").arg(scriptconfigfile) );
return false;
}
@@ -244,7 +244,7 @@ bool ScriptGUIClient::loadScriptConfigDocument(const TQString& scriptconfigfile,
else {
// else just print a warning and fall through (so, install the action
// and don't care any longer of the duplicated name)...
- krosswarning( TQString("Kross::Api::ScriptGUIClient::loadScriptConfigDocument: There exists already a scriptaction with name \"%1\". Added anyway...").tqarg(action->name()) );
+ krosswarning( TQString("Kross::Api::ScriptGUIClient::loadScriptConfigDocument: There exists already a scriptaction with name \"%1\". Added anyway...").arg(action->name()) );
}
}
installedcollection->attach( action );
@@ -353,7 +353,7 @@ bool ScriptGUIClient::executeScriptFile()
bool ScriptGUIClient::executeScriptFile(const TQString& file)
{
- krossdebug( TQString("Kross::Api::ScriptGUIClient::executeScriptFile() file='%1'").tqarg(file) );
+ krossdebug( TQString("Kross::Api::ScriptGUIClient::executeScriptFile() file='%1'").arg(file) );
ScriptAction::Ptr action = new ScriptAction(file);
return executeScriptAction(action);
diff --git a/lib/kross/main/wdgscriptsmanager.cpp b/lib/kross/main/wdgscriptsmanager.cpp
index cb696c5a..e521023e 100644
--- a/lib/kross/main/wdgscriptsmanager.cpp
+++ b/lib/kross/main/wdgscriptsmanager.cpp
@@ -95,7 +95,7 @@ class ToolTip : public TQToolTip
if(item) {
TQRect r( m_parent->itemRect(item) );
if(r.isValid() && item->action()) {
- tip(r, TQString("<qt>%1</qt>").tqarg(item->action()->toolTip()));
+ tip(r, TQString("<qt>%1</qt>").arg(item->action()->toolTip()));
}
}
}
@@ -287,7 +287,7 @@ void WdgScriptsManager::slotUninstallScript()
if( KMessageBox::warningContinueCancel(0,
i18n("Uninstall the script package \"%1\" and delete the package's folder \"%2\"?")
- .tqarg(item->action()->text()).tqarg(packagepath),
+ .arg(item->action()->text()).arg(packagepath),
i18n("Uninstall")) != KMessageBox::Continue )
{
return;
@@ -321,7 +321,7 @@ void WdgScriptsManager::slotGetNewScript()
{
#ifdef KROSS_SUPPORT_NEWSTUFF
const TQString appname = KApplication::kApplication()->name();
- const TQString type = TQString("%1/script").tqarg(appname);
+ const TQString type = TQString("%1/script").arg(appname);
if(! d->newstuff) {
d->newstuff = new ScriptNewStuff(d->m_scripguiclient, type);
@@ -336,7 +336,7 @@ void WdgScriptsManager::slotGetNewScript()
TQObject::connect(p, TQT_SIGNAL(providersLoaded(Provider::List*)),
d, TQT_SLOT(slotProviders(Provider::List*)));
- p->load(type, TQString("http://download.kde.org/khotnewstuff/%1scripts-providers.xml").tqarg(appname));
+ p->load(type, TQString("http://download.kde.org/khotnewstuff/%1scripts-providers.xml").arg(appname));
d->exec();
#endif
}
diff --git a/lib/kross/python/cxx/Objects.hxx b/lib/kross/python/cxx/Objects.hxx
index 900a347b..3aa790e6 100644
--- a/lib/kross/python/cxx/Objects.hxx
+++ b/lib/kross/python/cxx/Objects.hxx
@@ -54,7 +54,7 @@ namespace Py
// The purpose of this class is to serve as the most general kind of
// Python object, for the purpose of writing C++ extensions in Python
// Objects hold a PyObject* which they own. This pointer is always a
- // valid pointer to a Python object. In tqchildren we must maintain this behavior.
+ // valid pointer to a Python object. In children we must maintain this behavior.
//
// Instructions on how to make your own class MyType descended from Object:
// (0) Pick a base class, either Object or perhaps SeqBase<T> or MapBase<T>.
diff --git a/lib/kross/python/cxx/PyCXX.html b/lib/kross/python/cxx/PyCXX.html
index 7213ad70..e162e601 100644
--- a/lib/kross/python/cxx/PyCXX.html
+++ b/lib/kross/python/cxx/PyCXX.html
@@ -303,7 +303,7 @@ returned by such a function, you need to know if the function returns you an <i>
or <i>unowned</i> reference. Unowned references are unusual but there are some cases where
unowned references are returned.</p>
-<p>Usually, <cite>Object</cite> and its tqchildren acquire a new reference when constructed from a
+<p>Usually, <cite>Object</cite> and its children acquire a new reference when constructed from a
<cite>PyObject *</cite>. This is usually not the right behavior if the reference comes from one
of the Python C API calls.</p>
@@ -1571,7 +1571,7 @@ converted to a standard string which is passed to std::ostream&amp; operator&lt;
<p>The Python exception facility and the C++ exception facility can be merged via the use
of try/catch blocks in the bodies of extension objects and module functions.</p>
-<h3>Class Exception and its tqchildren</h3>
+<h3>Class Exception and its children</h3>
<p>A set of classes is provided. Each is derived from class Exception, and represents a
particular sort of Python exception, such as IndexError, RuntimeError, ValueError. Each of
@@ -1612,7 +1612,7 @@ classes are shown here.</p>
</tr>
<tr>
<td class=code></td>
- <td>Constructors for other tqchildren of class Exception</td>
+ <td>Constructors for other children of class Exception</td>
</tr>
<tr>
<td class=code> </td>
diff --git a/lib/kross/python/pythonextension.cpp b/lib/kross/python/pythonextension.cpp
index f13cf93a..9d8c3ece 100644
--- a/lib/kross/python/pythonextension.cpp
+++ b/lib/kross/python/pythonextension.cpp
@@ -31,7 +31,7 @@ PythonExtension::PythonExtension(Kross::Api::Object::Ptr object)
, m_object(object)
{
#ifdef KROSS_PYTHON_EXTENSION_CTOR_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::Constructor objectname='%1' objectclass='%2'").tqarg(m_object->getName()).tqarg(m_object->getClassName()) );
+ krossdebug( TQString("Kross::Python::PythonExtension::Constructor objectname='%1' objectclass='%2'").arg(m_object->getName()).arg(m_object->getClassName()) );
#endif
behaviors().name("KrossPythonExtension");
@@ -55,7 +55,7 @@ PythonExtension::PythonExtension(Kross::Api::Object::Ptr object)
PythonExtension::~PythonExtension()
{
#ifdef KROSS_PYTHON_EXTENSION_DTOR_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::Destructor objectname='%1' objectclass='%2'").tqarg(m_object->getName()).tqarg(m_object->getClassName()) );
+ krossdebug( TQString("Kross::Python::PythonExtension::Destructor objectname='%1' objectclass='%2'").arg(m_object->getName()).arg(m_object->getClassName()) );
#endif
delete m_proxymethod;
}
@@ -77,7 +77,7 @@ Py::Object PythonExtension::repr()
Py::Object PythonExtension::getattr(const char* n)
{
#ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1'").tqarg(n) );
+ krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1'").arg(n) );
#endif
if(n[0] == '_') {
@@ -86,7 +86,7 @@ Py::Object PythonExtension::getattr(const char* n)
TQStringList calls = m_object->getCalls();
for(TQStringList::Iterator it = calls.begin(); it != calls.end(); ++it) {
#ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' callable='%2'").tqarg(n).tqarg(*it) );
+ krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' callable='%2'").arg(n).arg(*it) );
#endif
methods.append(Py::String( (*it).latin1() ));
}
@@ -97,11 +97,11 @@ Py::Object PythonExtension::getattr(const char* n)
Py::List members;
Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(m_object.data());
if(callable) {
- TQMap<TQString, Kross::Api::Object::Ptr> tqchildren = callable->getChildren();
- TQMap<TQString, Kross::Api::Object::Ptr>::Iterator it( tqchildren.begin() );
- for(; it != tqchildren.end(); ++it) {
+ TQMap<TQString, Kross::Api::Object::Ptr> children = callable->getChildren();
+ TQMap<TQString, Kross::Api::Object::Ptr>::Iterator it( children.begin() );
+ for(; it != children.end(); ++it) {
#ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::getattr n='%1' child='%2'").tqarg(n).tqarg(it.key()) );
+ krossdebug( TQString("Kross::Python::PythonExtension::getattr n='%1' child='%2'").arg(n).arg(it.key()) );
#endif
members.append(Py::String( it.key().latin1() ));
}
@@ -109,11 +109,11 @@ Py::Object PythonExtension::getattr(const char* n)
return members;
}
- //if(n == "__dict__") { krosswarning( TQString("PythonExtension::getattr(%1) __dict__").tqarg(n) ); return Py::None(); }
- //if(n == "__class__") { krosswarning( TQString("PythonExtension::getattr(%1) __class__").tqarg(n) ); return Py::None(); }
+ //if(n == "__dict__") { krosswarning( TQString("PythonExtension::getattr(%1) __dict__").arg(n) ); return Py::None(); }
+ //if(n == "__class__") { krosswarning( TQString("PythonExtension::getattr(%1) __class__").arg(n) ); return Py::None(); }
#ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' is a internal name.").tqarg(n) );
+ krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' is a internal name.").arg(n) );
#endif
return Py::PythonExtension<PythonExtension>::getattr_methods(n);
}
@@ -130,7 +130,7 @@ Py::Object PythonExtension::getattr(const char* n)
Py::Object PythonExtension::getattr_methods(const char* n)
{
#ifdef KROSS_PYTHON_EXTENSION_GETATTRMETHOD_DEBUG
- krossdebug( TQString("PythonExtension::getattr_methods name=%1").tqarg(n) );
+ krossdebug( TQString("PythonExtension::getattr_methods name=%1").arg(n) );
#endif
return Py::PythonExtension<PythonExtension>::getattr_methods(n);
}
@@ -138,7 +138,7 @@ Py::Object PythonExtension::getattr_methods(const char* n)
int PythonExtension::setattr(const char* name, const Py::Object& value)
{
#ifdef KROSS_PYTHON_EXTENSION_SETATTR_DEBUG
- krossdebug( TQString("PythonExtension::setattr name=%1 value=%2").tqarg(name).tqarg(value.as_string().c_str()) );
+ krossdebug( TQString("PythonExtension::setattr name=%1 value=%2").arg(name).arg(value.as_string().c_str()) );
#endif
return Py::PythonExtension<PythonExtension>::setattr(name, value);
}
@@ -185,13 +185,13 @@ Kross::Api::Dict::Ptr PythonExtension::toObject(const Py::Dict& dict)
Kross::Api::Object::Ptr PythonExtension::toObject(const Py::Object& object)
{
#ifdef KROSS_PYTHON_EXTENSION_TOOBJECT_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) object='%1'").tqarg(object.as_string().c_str()) );
+ krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) object='%1'").arg(object.as_string().c_str()) );
#endif
if(object == Py::None())
return 0;
PyTypeObject *type = (PyTypeObject*) object.type().ptr();
#ifdef KROSS_PYTHON_EXTENSION_TOOBJECT_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) type='%1'").tqarg(type->tp_name) );
+ krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) type='%1'").arg(type->tp_name) );
#endif
if(type == &PyInt_Type)
return new Kross::Api::Variant(int(Py::Int(object)));
@@ -287,7 +287,7 @@ const Py::List PythonExtension::toPyObject(const TQValueList<TQVariant>& list)
const Py::Object PythonExtension::toPyObject(const TQVariant& variant)
{
#ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) typename='%1'").tqarg(variant.typeName()) );
+ krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) typename='%1'").arg(variant.typeName()) );
#endif
switch(variant.type()) {
@@ -331,7 +331,7 @@ const Py::Object PythonExtension::toPyObject(const TQVariant& variant)
} break;
default: {
- krosswarning( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) Not possible to convert the TQVariant type '%1' to a Py::Object.").tqarg(variant.typeName()) );
+ krosswarning( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) Not possible to convert the TQVariant type '%1' to a Py::Object.").arg(variant.typeName()) );
return Py::None();
}
}
@@ -350,7 +350,7 @@ const Py::Object PythonExtension::toPyObject(Kross::Api::Object::Ptr object)
if(classname == "Kross::Api::Variant") {
TQVariant v = static_cast<Kross::Api::Variant*>( object.data() )->getValue();
#ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(Kross::Api::Object) is Kross::Api::Variant %1").tqarg(v.toString()) );
+ krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(Kross::Api::Object) is Kross::Api::Variant %1").arg(v.toString()) );
#endif
return toPyObject(v);
}
@@ -382,7 +382,7 @@ const Py::Object PythonExtension::toPyObject(Kross::Api::Object::Ptr object)
}
#ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG
- krossdebug( TQString("Trying to handle PythonExtension::toPyObject(%1) as PythonExtension").tqarg(object->getClassName()) );
+ krossdebug( TQString("Trying to handle PythonExtension::toPyObject(%1) as PythonExtension").arg(object->getClassName()) );
#endif
return Py::asObject( new PythonExtension(object) );
}
@@ -390,7 +390,7 @@ const Py::Object PythonExtension::toPyObject(Kross::Api::Object::Ptr object)
const Py::Tuple PythonExtension::toPyTuple(Kross::Api::List::Ptr list)
{
#ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::toPyTuple(Kross::Api::List) name='%1'").tqarg(list ? list->getName() : "NULL") );
+ krossdebug( TQString("Kross::Python::PythonExtension::toPyTuple(Kross::Api::List) name='%1'").arg(list ? list->getName() : "NULL") );
#endif
uint count = list ? list->count() : 0;
Py::Tuple tuple(count);
@@ -409,20 +409,20 @@ PyObject* PythonExtension::proxyhandler(PyObject *_self_and_name_tuple, PyObject
Kross::Api::List::Ptr arguments = toObject( Py::Tuple(args) );
#ifdef KROSS_PYTHON_EXTENSION_CALL_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' arguments='%2'").tqarg(methodname).tqarg(arguments->toString()) );
+ krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' arguments='%2'").arg(methodname).arg(arguments->toString()) );
#endif
Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(self->m_object.data());
if(callable && callable->hasChild(methodname)) {
#ifdef KROSS_PYTHON_EXTENSION_CALL_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' is a child object of '%2'.").tqarg(methodname).tqarg(self->m_object->getName()) );
+ krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' is a child object of '%2'.").arg(methodname).arg(self->m_object->getName()) );
#endif
Py::Object result = toPyObject( callable->getChild(methodname)->call(TQString(), arguments) );
result.increment_reference_count();
return result.ptr();
}
#ifdef KROSS_PYTHON_EXTENSION_CALL_DEBUG
- krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler try to call function with methodname '%1' in object '%2'.").tqarg(methodname).tqarg(self->m_object->getName()) );
+ krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler try to call function with methodname '%1' in object '%2'.").arg(methodname).arg(self->m_object->getName()) );
#endif
Py::Object result = toPyObject( self->m_object->call(methodname, arguments) );
result.increment_reference_count();
@@ -430,12 +430,12 @@ PyObject* PythonExtension::proxyhandler(PyObject *_self_and_name_tuple, PyObject
}
catch(Py::Exception& e) {
const TQString err = Py::value(e).as_string().c_str();
- krosswarning( TQString("Py::Exception in Kross::Python::PythonExtension::proxyhandler %1").tqarg(err) );
+ krosswarning( TQString("Py::Exception in Kross::Python::PythonExtension::proxyhandler %1").arg(err) );
//throw e;
}
catch(Kross::Api::Exception::Ptr e) {
const TQString err = e->toString();
- krosswarning( TQString("Kross::Api::Exception in Kross::Python::PythonExtension::proxyhandler %1").tqarg(err) );
+ krosswarning( TQString("Kross::Api::Exception in Kross::Python::PythonExtension::proxyhandler %1").arg(err) );
// Don't throw here cause it will end in a crash deep in python. The
// error is already handled anyway.
//throw Py::Exception( (char*) e->toString().latin1() );
diff --git a/lib/kross/python/pythoninterpreter.cpp b/lib/kross/python/pythoninterpreter.cpp
index 23f4b8fb..ded5dbc9 100644
--- a/lib/kross/python/pythoninterpreter.cpp
+++ b/lib/kross/python/pythoninterpreter.cpp
@@ -122,14 +122,14 @@ PythonInterpreter::PythonInterpreter(Kross::Api::InterpreterInfo* info)
// Set the extended sys.path.
PySys_SetPath( (char*) path.latin1() );
- krossdebug(TQString("Python ProgramName: %1").tqarg(Py_GetProgramName()));
- krossdebug(TQString("Python ProgramFullPath: %1").tqarg(Py_GetProgramFullPath()));
- krossdebug(TQString("Python Version: %1").tqarg(Py_GetVersion()));
- krossdebug(TQString("Python Platform: %1").tqarg(Py_GetPlatform()));
- krossdebug(TQString("Python Prefix: %1").tqarg(Py_GetPrefix()));
- krossdebug(TQString("Python ExecPrefix: %1").tqarg(Py_GetExecPrefix()));
- krossdebug(TQString("Python Path: %1").tqarg(Py_GetPath()));
- krossdebug(TQString("Python System Path: %1").tqarg(path));
+ krossdebug(TQString("Python ProgramName: %1").arg(Py_GetProgramName()));
+ krossdebug(TQString("Python ProgramFullPath: %1").arg(Py_GetProgramFullPath()));
+ krossdebug(TQString("Python Version: %1").arg(Py_GetVersion()));
+ krossdebug(TQString("Python Platform: %1").arg(Py_GetPlatform()));
+ krossdebug(TQString("Python Prefix: %1").arg(Py_GetPrefix()));
+ krossdebug(TQString("Python ExecPrefix: %1").arg(Py_GetExecPrefix()));
+ krossdebug(TQString("Python Path: %1").arg(Py_GetPath()));
+ krossdebug(TQString("Python System Path: %1").arg(path));
// Initialize the main module.
d->mainmodule = new PythonModule(this);
@@ -179,7 +179,7 @@ PythonInterpreter::PythonInterpreter(Kross::Api::InterpreterInfo* info)
PyObject* pyrun = PyRun_String(s.latin1(), Py_file_input, moduledict.ptr(), moduledict.ptr());
if(! pyrun) {
Py::Object errobj = Py::value(Py::Exception()); // get last error
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to prepare the __main__ module: %1").tqarg(errobj.as_string().c_str())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to prepare the __main__ module: %1").arg(errobj.as_string().c_str())) );
}
Py_XDECREF(pyrun); // free the reference.
diff --git a/lib/kross/python/pythonmodule.cpp b/lib/kross/python/pythonmodule.cpp
index 24b43159..48131bb8 100644
--- a/lib/kross/python/pythonmodule.cpp
+++ b/lib/kross/python/pythonmodule.cpp
@@ -65,7 +65,7 @@ PythonModule::PythonModule(PythonInterpreter* interpreter)
PythonModule::~PythonModule()
{
#ifdef KROSS_PYTHON_MODULE_DEBUG
- krossdebug( TQString("Kross::Python::PythonModule::Destructor name='%1'").tqarg(name().c_str()) );
+ krossdebug( TQString("Kross::Python::PythonModule::Destructor name='%1'").arg(name().c_str()) );
#endif
delete d;
@@ -82,16 +82,16 @@ Py::Object PythonModule::import(const Py::Tuple& args)
TQString modname = args[0].as_string().c_str();
if(modname.startsWith("kross")) {
#ifdef KROSS_PYTHON_MODULE_DEBUG
- krossdebug( TQString("Kross::Python::PythonModule::import() module=%1").tqarg(modname) );
+ krossdebug( TQString("Kross::Python::PythonModule::import() module=%1").arg(modname) );
#endif
if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) {
- krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) );
+ krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").arg(modname) );
}
else {
Kross::Api::Module::Ptr module = Kross::Api::Manager::scriptManager()->loadModule(modname);
if(module)
return PythonExtension::toPyObject( Kross::Api::Object::Ptr(module) );
- krosswarning( TQString("Loading of Kross module '%1' failed.").tqarg(modname) );
+ krosswarning( TQString("Loading of Kross module '%1' failed.").arg(modname) );
}
}
diff --git a/lib/kross/python/pythonobject.cpp b/lib/kross/python/pythonobject.cpp
index 9689d222..e72ad0bb 100644
--- a/lib/kross/python/pythonobject.cpp
+++ b/lib/kross/python/pythonobject.cpp
@@ -46,7 +46,7 @@ PythonObject::PythonObject(const Py::Object& object)
if(o.isSequence()) t += "isSequence ";
if(o.isTrue()) t += "isTrue ";
if(o.isInstance()) t += "isInstance ";
- krossdebug( TQString("PythonObject::PythonObject() method '%1' (%2)").tqarg( (*i).str().as_string().c_str() ).tqarg(t) );
+ krossdebug( TQString("PythonObject::PythonObject() method '%1' (%2)").arg( (*i).str().as_string().c_str() ).arg(t) );
if(o.isCallable())
m_calls.append( (*i).str().as_string().c_str() );
@@ -64,7 +64,7 @@ const TQString PythonObject::getClassName() const
Kross::Api::Object::Ptr PythonObject::call(const TQString& name, Kross::Api::List::Ptr arguments)
{
- krossdebug( TQString("PythonObject::call(%1)").tqarg(name) );
+ krossdebug( TQString("PythonObject::call(%1)").arg(name) );
if(m_pyobject.isInstance()) {
//if(! m_calls.contains(n)) throw ...
@@ -72,11 +72,11 @@ Kross::Api::Object::Ptr PythonObject::call(const TQString& name, Kross::Api::Lis
PyObject* r = PyObject_CallMethod(m_pyobject.ptr(), (char*) name.latin1(), 0);
if(! r) { //FIXME happens too if e.g. number of arguments doesn't match !!!
Py::Object errobj = Py::value(Py::Exception()); // get last error
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to call method '%1': %2").tqarg(name).tqarg(errobj.as_string().c_str())) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to call method '%1': %2").arg(name).arg(errobj.as_string().c_str())) );
}
Py::Object result(r, true);
- //krossdebug( TQString("PythonObject::call(%1) call return value = '%2'").tqarg(name).tqarg(result.as_string().c_str()) );
+ //krossdebug( TQString("PythonObject::call(%1) call return value = '%2'").arg(name).arg(result.as_string().c_str()) );
return PythonExtension::toObject(result);
}
/*TODO??? ELSE create class instance for class-definitions???
diff --git a/lib/kross/python/pythonscript.cpp b/lib/kross/python/pythonscript.cpp
index 2329a1d1..8887e13d 100644
--- a/lib/kross/python/pythonscript.cpp
+++ b/lib/kross/python/pythonscript.cpp
@@ -88,7 +88,7 @@ void PythonScript::initialize()
try {
if(m_scriptcontainer->getCode().isNull())
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid scripting code for script '%1'").tqarg( m_scriptcontainer->getName() )) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid scripting code for script '%1'").arg( m_scriptcontainer->getName() )) );
if(m_scriptcontainer->getName().isNull())
throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Name for the script is invalid!")) );
@@ -96,10 +96,10 @@ void PythonScript::initialize()
PyObject* pymod = PyModule_New( (char*) m_scriptcontainer->getName().latin1() );
d->m_module = new Py::Module(pymod, true);
if(! d->m_module)
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize local module context for script '%1'").tqarg( m_scriptcontainer->getName() )) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize local module context for script '%1'").arg( m_scriptcontainer->getName() )) );
#ifdef KROSS_PYTHON_SCRIPT_INIT_DEBUG
- krossdebug( TQString("PythonScript::initialize() module='%1' refcount='%2'").tqarg(d->m_module->as_string().c_str()).tqarg(d->m_module->reference_count()) );
+ krossdebug( TQString("PythonScript::initialize() module='%1' refcount='%2'").arg(d->m_module->as_string().c_str()).arg(d->m_module->reference_count()) );
#endif
// Set the "self" variable to point to the ScriptContainer
@@ -131,7 +131,7 @@ void PythonScript::initialize()
PyObject* code = 0;
bool restricted = m_scriptcontainer->getOption("restricted", TQVariant(false,0), true).toBool();
- krossdebug( TQString("PythonScript::initialize() name=%1 restricted=%2").tqarg(m_scriptcontainer->getName()).tqarg(restricted) );
+ krossdebug( TQString("PythonScript::initialize() name=%1 restricted=%2").arg(m_scriptcontainer->getName()).arg(restricted) );
if(restricted) {
// Use the RestrictedPython module wrapped by the PythonSecurity class.
@@ -160,7 +160,7 @@ void PythonScript::initialize()
}
catch(Py::Exception& e) {
TQString err = Py::value(e).as_string().c_str();
- Kross::Api::Exception::Ptr exception = toException( TQString("Failed to compile python code: %1").tqarg(err) );
+ Kross::Api::Exception::Ptr exception = toException( TQString("Failed to compile python code: %1").arg(err) );
e.clear(); // exception is handled. clear it now.
throw exception;
}
@@ -170,7 +170,7 @@ void PythonScript::finalize()
{
#ifdef KROSS_PYTHON_SCRIPT_FINALIZE_DEBUG
if(d->m_module)
- krossdebug( TQString("PythonScript::finalize() module='%1' refcount='%2'").tqarg(d->m_module->as_string().c_str()).tqarg(d->m_module->reference_count()) );
+ krossdebug( TQString("PythonScript::finalize() module='%1' refcount='%2'").arg(d->m_module->as_string().c_str()).arg(d->m_module->reference_count()) );
#endif
delete d->m_module; d->m_module = 0;
@@ -205,7 +205,7 @@ Kross::Api::Exception::Ptr PythonScript::toException(const TQString& error)
catch(Py::Exception& e) {
TQString err = Py::value(e).as_string().c_str();
e.clear(); // exception is handled. clear it now.
- krosswarning( TQString("Kross::Python::PythonScript::toException() Failed to fetch a traceback: %1").tqarg(err) );
+ krosswarning( TQString("Kross::Python::PythonScript::toException() Failed to fetch a traceback: %1").arg(err) );
}
PyObject *next;
@@ -226,7 +226,7 @@ Kross::Api::Exception::Ptr PythonScript::toException(const TQString& error)
//const char* filename = PyString_AsString(frame->f_code->co_filename);
//const char* name = PyString_AsString(frame->f_code->co_name);
- //errorlist.append( TQString("%1#%2: \"%3\"").tqarg(filename).tqarg(lineno).tqarg(name) );
+ //errorlist.append( TQString("%1#%2: \"%3\"").arg(filename).arg(lineno).arg(name) );
next = PyObject_GetAttrString(traceback, "tb_next");
Py_DECREF(traceback);
@@ -318,20 +318,20 @@ Kross::Api::Object::Ptr PythonScript::execute()
Py::Object result(pyresult, true);
#ifdef KROSS_PYTHON_SCRIPT_EXEC_DEBUG
- krossdebug( TQString("PythonScript::execute() result=%1").tqarg(result.as_string().c_str()) );
+ krossdebug( TQString("PythonScript::execute() result=%1").arg(result.as_string().c_str()) );
#endif
for(Py::Dict::iterator it = moduledict.begin(); it != moduledict.end(); ++it) {
Py::Dict::value_type vt(*it);
if(PyClass_Check( vt.second.ptr() )) {
#ifdef KROSS_PYTHON_SCRIPT_EXEC_DEBUG
- krossdebug( TQString("PythonScript::execute() class '%1' added.").tqarg(vt.first.as_string().c_str()) );
+ krossdebug( TQString("PythonScript::execute() class '%1' added.").arg(vt.first.as_string().c_str()) );
#endif
d->m_classes.append( vt.first.as_string().c_str() );
}
else if(vt.second.isCallable()) {
#ifdef KROSS_PYTHON_SCRIPT_EXEC_DEBUG
- krossdebug( TQString("PythonScript::execute() function '%1' added.").tqarg(vt.first.as_string().c_str()) );
+ krossdebug( TQString("PythonScript::execute() function '%1' added.").arg(vt.first.as_string().c_str()) );
#endif
d->m_functions.append( vt.first.as_string().c_str() );
}
@@ -347,13 +347,13 @@ Kross::Api::Object::Ptr PythonScript::execute()
errobj = Py::type(e);
TQString err = errobj.as_string().c_str();
- Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").tqarg(err) );
+ Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").arg(err) );
e.clear(); // exception is handled. clear it now.
setException( exception );
}
catch(Py::Exception& e) {
TQString err = Py::value(e).as_string().c_str();
- Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").tqarg(err) );
+ Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").arg(err) );
e.clear(); // exception is handled. clear it now.
setException( exception );
}
@@ -369,8 +369,8 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross::
{
#ifdef KROSS_PYTHON_SCRIPT_CALLFUNC_DEBUG
krossdebug( TQString("PythonScript::callFunction(%1, %2)")
- .tqarg(name)
- .tqarg(args ? TQString::number(args->count()) : TQString("NULL")) );
+ .arg(name)
+ .arg(args ? TQString::number(args->count()) : TQString("NULL")) );
#endif
if(hadException()) return 0; // abort if we had an unresolved exception.
@@ -387,7 +387,7 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross::
PyObject* func = PyDict_GetItemString(moduledict.ptr(), name.latin1());
if( (! d->m_functions.contains(name)) || (! func) )
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").tqarg(name)) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").arg(name)) );
Py::Callable funcobject(func, true); // the funcobject takes care of freeing our func pyobject.
@@ -402,7 +402,7 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross::
catch(Py::Exception& e) {
TQString err = Py::value(e).as_string().c_str();
e.clear(); // exception is handled. clear it now.
- setException( new Kross::Api::Exception(TQString("Python Exception: %1").tqarg(err)) );
+ setException( new Kross::Api::Exception(TQString("Python Exception: %1").arg(err)) );
}
catch(Kross::Api::Exception::Ptr e) {
setException(e);
@@ -433,16 +433,16 @@ Kross::Api::Object::Ptr PythonScript::classInstance(const TQString& name)
// Try to determinate the class.
PyObject* pyclass = PyDict_GetItemString(moduledict.ptr(), name.latin1());
if( (! d->m_classes.contains(name)) || (! pyclass) )
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such class '%1'.").tqarg(name)) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such class '%1'.").arg(name)) );
PyObject *pyobj = PyInstance_New(pyclass, 0, 0);//aclarg, 0);
if(! pyobj)
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to create instance of class '%1'.").tqarg(name)) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to create instance of class '%1'.").arg(name)) );
Py::Object classobject(pyobj, true);
#ifdef KROSS_PYTHON_SCRIPT_CLASSINSTANCE_DEBUG
- krossdebug( TQString("PythonScript::classInstance() inst='%1'").tqarg(classobject.as_string().c_str()) );
+ krossdebug( TQString("PythonScript::classInstance() inst='%1'").arg(classobject.as_string().c_str()) );
#endif
return PythonExtension::toObject(classobject);
}
diff --git a/lib/kross/python/pythonsecurity.cpp b/lib/kross/python/pythonsecurity.cpp
index 941ed0c6..9a7712cb 100644
--- a/lib/kross/python/pythonsecurity.cpp
+++ b/lib/kross/python/pythonsecurity.cpp
@@ -90,7 +90,7 @@ void PythonSecurity::initRestrictedPython()
catch(Py::Exception& e) {
TQString err = Py::value(e).as_string().c_str();
e.clear();
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize PythonSecurity module: %1").tqarg(err) ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize PythonSecurity module: %1").arg(err) ) );
}
}
@@ -115,12 +115,12 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr
PyObject* func = PyDict_GetItemString(m_pymodule->getDict().ptr(), "compile_restricted");
if(! func)
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").tqarg("compile_restricted")) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").arg("compile_restricted")) );
Py::Callable funcobject(func, true); // the funcobject takes care of freeing our func pyobject.
if(! funcobject.isCallable())
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' is not callable.").tqarg("compile_restricted")) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' is not callable.").arg("compile_restricted")) );
Py::Tuple args(3);
args[0] = Py::String(source.utf8());
@@ -140,17 +140,17 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr
/*
Py::List ml = mainmoduledict;
for(Py::List::size_type mi = 0; mi < ml.length(); ++mi) {
- krossdebug( TQString("dir() = %1").tqarg( ml[mi].str().as_string().c_str() ) );
- //krossdebug( TQString("dir().dir() = %1").tqarg( Py::Object(ml[mi]).dir().as_string().c_str() ) );
+ krossdebug( TQString("dir() = %1").arg( ml[mi].str().as_string().c_str() ) );
+ //krossdebug( TQString("dir().dir() = %1").arg( Py::Object(ml[mi]).dir().as_string().c_str() ) );
}
*/
Py::Object code(pycode);
- krossdebug( TQString("%1 callable=%2").tqarg(code.as_string().c_str()).tqarg(PyCallable_Check(code.ptr())) );
+ krossdebug( TQString("%1 callable=%2").arg(code.as_string().c_str()).arg(PyCallable_Check(code.ptr())) );
Py::List l = code.dir();
for(Py::List::size_type i = 0; i < l.length(); ++i) {
- krossdebug( TQString("dir() = %1").tqarg( l[i].str().as_string().c_str() ) );
- //krossdebug( TQString("dir().dir() = %1").tqarg( Py::Object(l[i]).dir().as_string().c_str() ) );
+ krossdebug( TQString("dir() = %1").arg( l[i].str().as_string().c_str() ) );
+ //krossdebug( TQString("dir().dir() = %1").arg( Py::Object(l[i]).dir().as_string().c_str() ) );
}
return pycode;
@@ -158,7 +158,7 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr
catch(Py::Exception& e) {
TQString err = Py::value(e).as_string().c_str();
e.clear();
- throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' failed with python exception: %2").tqarg("compile_restricted").tqarg(err) ) );
+ throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' failed with python exception: %2").arg("compile_restricted").arg(err) ) );
}
}
diff --git a/lib/kross/ruby/rubyextension.cpp b/lib/kross/ruby/rubyextension.cpp
index 6c2cb40f..98474bf6 100644
--- a/lib/kross/ruby/rubyextension.cpp
+++ b/lib/kross/ruby/rubyextension.cpp
@@ -66,7 +66,7 @@ VALUE RubyExtension::call_method( Kross::Api::Object::Ptr object, int argc, VALU
TQString funcname = rb_id2name(SYM2ID(argv[0]));
TQValueList<Api::Object::Ptr> argsList;
#ifdef KROSS_RUBY_EXTENSION_DEBUG
- krossdebug(TQString("Building arguments list for function: %1 there are %2 arguments.").tqarg(funcname).tqarg(argc-1));
+ krossdebug(TQString("Building arguments list for function: %1 there are %2 arguments.").arg(funcname).arg(argc-1));
#endif
for(int i = 1; i < argc; i++)
{
@@ -79,13 +79,13 @@ VALUE RubyExtension::call_method( Kross::Api::Object::Ptr object, int argc, VALU
Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(object.data());
if(callable && callable->hasChild(funcname)) {
#ifdef KROSS_RUBY_EXTENSION_DEBUG
- krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing name='%1' is a child object of '%2'.").tqarg(funcname).tqarg(object->getName()) );
+ krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing name='%1' is a child object of '%2'.").arg(funcname).arg(object->getName()) );
#endif
result = callable->getChild(funcname)->call(TQString(), new Api::List(argsList));
}
else {
#ifdef KROSS_RUBY_EXTENSION_DEBUG
- krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing try to call function with name '%1' in object '%2'.").tqarg(funcname).tqarg(object->getName()) );
+ krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing try to call function with name '%1' in object '%2'.").arg(funcname).arg(object->getName()) );
#endif
result = object->call(funcname, new Api::List(argsList));
}
@@ -184,7 +184,7 @@ VALUE RubyExtension::convertFromException(Kross::Api::Exception::Ptr exc)
Kross::Api::Object::Ptr RubyExtension::toObject(VALUE value)
{
#ifdef KROSS_RUBY_EXTENSION_DEBUG
- krossdebug(TQString("RubyExtension::toObject of type %1").tqarg(TYPE(value)));
+ krossdebug(TQString("RubyExtension::toObject of type %1").arg(TYPE(value)));
#endif
switch( TYPE( value ) )
{
@@ -251,7 +251,7 @@ Kross::Api::Object::Ptr RubyExtension::toObject(VALUE value)
case T_MODULE:
case T_ICLASS:
case T_CLASS:
- krosswarning(TQString("This ruby type '%1' cannot be converted to a Kross::Api::Object").tqarg(TYPE(value)));
+ krosswarning(TQString("This ruby type '%1' cannot be converted to a Kross::Api::Object").arg(TYPE(value)));
default:
case T_NIL:
return 0;
@@ -329,7 +329,7 @@ VALUE RubyExtension::toVALUE(const TQVariant& variant)
case TQVariant::ULongLong:
return UINT2NUM((unsigned long)variant.toULongLong());
default: {
- krosswarning( TQString("Kross::Ruby::RubyExtension::toVALUE(TQVariant) Not possible to convert the TQVariant type '%1' to a VALUE.").tqarg(variant.typeName()) );
+ krosswarning( TQString("Kross::Ruby::RubyExtension::toVALUE(TQVariant) Not possible to convert the TQVariant type '%1' to a VALUE.").arg(variant.typeName()) );
return Qundef;
}
}
diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp
index 4a4df32f..6af8ecbe 100644
--- a/lib/kross/ruby/rubyinterpreter.cpp
+++ b/lib/kross/ruby/rubyinterpreter.cpp
@@ -121,9 +121,9 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name)
#endif
TQString modname = StringValuePtr(name);
if(modname.startsWith("kross")) {
- krossdebug( TQString("RubyInterpreter::require() module=%1").tqarg(modname) );
+ krossdebug( TQString("RubyInterpreter::require() module=%1").arg(modname) );
if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) {
- krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) );
+ krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").arg(modname) );
}
else {
Kross::Api::Module::Ptr module = Kross::Api::Manager::scriptManager()->loadModule(modname);
@@ -136,7 +136,7 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name)
// rb_define_variable( ("$" + modname).ascii(), & RubyInterpreter::d->m_modules.insert( mStrVALUE::value_type( modname, rm) ).first->second );
return Qtrue;
}
- krosswarning( TQString("Loading of Kross module '%1' failed.").tqarg(modname) );
+ krosswarning( TQString("Loading of Kross module '%1' failed.").arg(modname) );
}
} else {
return rb_f_require(obj, name);
diff --git a/lib/kross/ruby/rubymodule.cpp b/lib/kross/ruby/rubymodule.cpp
index 73012b89..948a10ee 100644
--- a/lib/kross/ruby/rubymodule.cpp
+++ b/lib/kross/ruby/rubymodule.cpp
@@ -37,7 +37,7 @@ RubyModule::RubyModule(Kross::Api::Module::Ptr mod, TQString modname) : d(new Ru
{
d->m_module = mod;
modname = modname.left(1).upper() + modname.right(modname.length() - 1 );
- krossdebug(TQString("Module: %1").tqarg(modname));
+ krossdebug(TQString("Module: %1").arg(modname));
VALUE rmodule = rb_define_module(modname.ascii());
rb_define_module_function(rmodule,"method_missing", (VALUE (*)(...))RubyModule::method_missing, -1);
VALUE rm = RubyExtension::toVALUE( mod.data() );
@@ -52,7 +52,7 @@ VALUE RubyModule::method_missing(int argc, VALUE *argv, VALUE self)
{
#ifdef KROSS_RUBY_MODULE_DEBUG
TQString funcname = rb_id2name(SYM2ID(argv[0]));
- krossdebug(TQString("Function %1 missing in a module").tqarg(funcname));
+ krossdebug(TQString("Function %1 missing in a module").arg(funcname));
#endif
VALUE rubyObjectModule = rb_funcall( self, rb_intern("const_get"), 1, ID2SYM(rb_intern("MODULEOBJ")) );
diff --git a/lib/kross/ruby/rubyscript.cpp b/lib/kross/ruby/rubyscript.cpp
index dc0fbb16..370d4aa7 100644
--- a/lib/kross/ruby/rubyscript.cpp
+++ b/lib/kross/ruby/rubyscript.cpp
@@ -87,7 +87,7 @@ void RubyScript::compile()
#ifdef KROSS_RUBY_SCRIPT_DEBUG
krossdebug("Compilation has failed");
#endif
- setException( new Kross::Api::Exception(TQString("Failed to compile ruby code: %1").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error
+ setException( new Kross::Api::Exception(TQString("Failed to compile ruby code: %1").arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error
d->m_compile = 0;
}
#ifdef KROSS_RUBY_SCRIPT_DEBUG
@@ -133,7 +133,7 @@ Kross::Api::Object::Ptr RubyScript::execute()
#endif
setException( RubyExtension::convertToException( ruby_errinfo ) );
} else {
- setException( new Kross::Api::Exception(TQString("Failed to execute ruby code: %1").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error
+ setException( new Kross::Api::Exception(TQString("Failed to execute ruby code: %1").arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error
}
}
diff --git a/lib/kross/runner/main.cpp b/lib/kross/runner/main.cpp
index 570e2610..1093a47b 100644
--- a/lib/kross/runner/main.cpp
+++ b/lib/kross/runner/main.cpp
@@ -82,13 +82,13 @@ int runScriptFile(const TQString& scriptfile)
// We had an exception.
TQString errormessage = scriptcontainer->getException()->getError();
TQString tracedetails = scriptcontainer->getException()->getTrace();
- std::cerr << TQString("%2\n%1").tqarg(tracedetails).tqarg(errormessage).latin1() << std::endl;
+ std::cerr << TQString("%2\n%1").arg(tracedetails).arg(errormessage).latin1() << std::endl;
return ERROR_EXCEPTION;
}
}
catch(Kross::Api::Exception::Ptr e) {
// Normaly that shouldn't be the case...
- std::cerr << TQString("EXCEPTION %1").tqarg(e->toString()).latin1() << std::endl;
+ std::cerr << TQString("EXCEPTION %1").arg(e->toString()).latin1() << std::endl;
return ERROR_UNHALDEDEXCEPTION;
}
return ERROR_OK;
diff --git a/lib/kross/test/main.cpp b/lib/kross/test/main.cpp
index 42198201..7f304ba6 100644
--- a/lib/kross/test/main.cpp
+++ b/lib/kross/test/main.cpp
@@ -107,7 +107,7 @@ void runInterpreter(const TQString& interpretername, const TQString& scriptcode)
if(testclassinstance) {
TQValueList<Kross::Api::Object*> ll;
Kross::Api::Object* instancecallresult = testclassinstance->call("testClassFunction1", Kross::Api::List::create(ll));
- //krossdebug( TQString("testClass.testClassFunction1 returnvalue => '%1'").tqarg( instancecallresult.toString() ) );
+ //krossdebug( TQString("testClass.testClassFunction1 returnvalue => '%1'").arg( instancecallresult.toString() ) );
}
*/
@@ -121,7 +121,7 @@ void runInterpreter(const TQString& interpretername, const TQString& scriptcode)
*/
}
catch(Kross::Api::Exception::Ptr e) {
- std::cout << TQString("EXCEPTION %1").tqarg(e->toString()).latin1() << std::endl;
+ std::cout << TQString("EXCEPTION %1").arg(e->toString()).latin1() << std::endl;
}
/*TESTCASE
@@ -132,7 +132,7 @@ void runInterpreter(const TQString& interpretername, const TQString& scriptcode)
sc2->execute();
}
catch(Kross::Api::Exception& e) {
- krossdebug( TQString("EXCEPTION type='%1' description='%2'").tqarg(e.type()).tqarg(e.description()) );
+ krossdebug( TQString("EXCEPTION type='%1' description='%2'").arg(e.type()).arg(e.description()) );
}
//delete sc2;
*/
@@ -181,7 +181,7 @@ int main(int argc, char **argv)
}
}
else {
- Kross::krosswarning( TQString("Failed to load scriptfile: %1").tqarg(scriptfilename) );
+ Kross::krosswarning( TQString("Failed to load scriptfile: %1").arg(scriptfilename) );
result = -1;
}
diff --git a/lib/kross/test/testobject.cpp b/lib/kross/test/testobject.cpp
index eb687d02..884e7e37 100644
--- a/lib/kross/test/testobject.cpp
+++ b/lib/kross/test/testobject.cpp
@@ -48,24 +48,24 @@ TestObject::~TestObject()
uint TestObject::func1(uint i)
{
- Kross::krossdebug(TQString("CALLED => TestObject::func1 i=%1").tqarg(i) );
+ Kross::krossdebug(TQString("CALLED => TestObject::func1 i=%1").arg(i) );
return i;
}
void TestObject::func2(TQString s, int i)
{
- Kross::krossdebug(TQString("CALLED => TestObject::func2 s=%1 i=%2").tqarg(s).tqarg(i));
+ Kross::krossdebug(TQString("CALLED => TestObject::func2 s=%1 i=%2").arg(s).arg(i));
}
TQString TestObject::func3(TQString s, int i)
{
- Kross::krossdebug(TQString("CALLED => TestObject::func3 s=%1 i=%2").tqarg(s).tqarg(i));
+ Kross::krossdebug(TQString("CALLED => TestObject::func3 s=%1 i=%2").arg(s).arg(i));
return s;
}
const TQString& TestObject::func4(const TQString& s, int i) const
{
- Kross::krossdebug(TQString("CALLED => TestObject::func4 s=%1 i=%2").tqarg(s).tqarg(i));
+ Kross::krossdebug(TQString("CALLED => TestObject::func4 s=%1 i=%2").arg(s).arg(i));
return s;
}
@@ -83,13 +83,13 @@ void TestObject::testSlot2()
void TestObject::stdoutSlot(const TQString& s)
{
- Kross::krossdebug(TQString("stdout: %1").tqarg(s));
+ Kross::krossdebug(TQString("stdout: %1").arg(s));
//std::cout << "<stdout> " << s.latin1() << std::endl;
}
void TestObject::stderrSlot(const TQString& s)
{
- Kross::krossdebug(TQString("stderr: %1").tqarg(s));
+ Kross::krossdebug(TQString("stderr: %1").arg(s));
//std::cout << "<stderr> " << s.latin1() << std::endl;
}
diff --git a/lib/kross/test/testwindow.cpp b/lib/kross/test/testwindow.cpp
index 5aa33958..ec2960b0 100644
--- a/lib/kross/test/testwindow.cpp
+++ b/lib/kross/test/testwindow.cpp
@@ -53,7 +53,7 @@ TestWindow::TestWindow(const TQString& interpretername, const TQString& scriptco
file = TQDir(TQDir::currentDirPath()).filePath("testscripting.rc");
else Kross::krossdebug("-------------------------222222");
- Kross::krossdebug(TQString("XML-file: %1").tqarg(file));
+ Kross::krossdebug(TQString("XML-file: %1").arg(file));
m_scriptextension->setXMLFile(file);
//menuFile->insertSeparator();
@@ -99,11 +99,11 @@ void TestWindow::execute()
m_scriptcontainer->setCode(m_codeedit->text());
Kross::Api::Object::Ptr result = m_scriptcontainer->execute();
if(m_scriptcontainer->hadException()) {
- Kross::krossdebug( TQString("EXCEPTION => %1").tqarg(m_scriptcontainer->getException()->toString()) );
+ Kross::krossdebug( TQString("EXCEPTION => %1").arg(m_scriptcontainer->getException()->toString()) );
}
else {
TQString s = result ? result->toString() : TQString();
- Kross::krossdebug( TQString("DONE => %1").tqarg(s) );
+ Kross::krossdebug( TQString("DONE => %1").arg(s) );
}
}