summaryrefslogtreecommitdiffstats
path: root/lib/kross/api
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:56:31 -0600
commitc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch)
tree1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /lib/kross/api
parent94844816550ad672ccfcdc25659c625546239998 (diff)
downloadkoffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz
koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'lib/kross/api')
-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.cpp6
-rw-r--r--lib/kross/api/eventslot.cpp26
-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.cpp38
-rw-r--r--lib/kross/api/variant.cpp18
15 files changed, 82 insertions, 82 deletions
diff --git a/lib/kross/api/callable.cpp b/lib/kross/api/callable.cpp
index b85aa4cd..f095f596 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_children.contains(name);
+ return m_tqchildren.contains(name);
}
Object::Ptr Callable::getChild(const TQString& name) const
{
- return m_children[name];
+ return m_tqchildren[name];
}
TQMap<TQString, Object::Ptr> Callable::getChildren() const
{
- return m_children;
+ return m_tqchildren;
}
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'")
- .arg(name).arg(object->getClassName()) );
+ .tqarg(name).tqarg(object->getClassName()) );
#endif
- m_children.replace(name, Object::Ptr(object));
+ m_tqchildren.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'").arg(name) );
+ krossdebug( TQString("Kross::Api::Callable::removeChild() name='%1'").tqarg(name) );
#endif
- m_children.remove(name);
+ m_tqchildren.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_children.clear();
+ m_tqchildren.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").arg(name).arg(getName()).arg(args ? args->toString() : TQString("")) );
+ krossdebug( TQString("Kross::Api::Callable::call() name=%1 getName()=%2 arguments=%3").tqarg(name).tqarg(getName()).tqarg(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'").arg(getName()).arg(s)) );
+ throw Exception::Ptr( new Exception(TQString("The object '%1' has no child object '%2'").tqarg(getName()).tqarg(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> children = getChildren();
- TQMap<TQString, Object::Ptr>::Iterator it( children.begin() );
- for(; it != children.end(); ++it)
+ TQMap<TQString, Object::Ptr> tqchildren = getChildren();
+ TQMap<TQString, Object::Ptr>::Iterator it( tqchildren.begin() );
+ for(; it != tqchildren.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'.").arg(getName()).arg(name) );
+ krossdebug( TQString("Object '%1' has no callable object named '%2'.").tqarg(getName()).tqarg(name) );
return 0;
}
diff --git a/lib/kross/api/callable.h b/lib/kross/api/callable.h
index 0e3dd3a6..63edb067 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 children.
+ * Return all tqchildren.
*
- * \return A \a ObjectMap of children this Object has.
+ * \return A \a ObjectMap of tqchildren this Object has.
*/
TQMap<TQString, Object::Ptr> getChildren() const;
@@ -125,7 +125,7 @@ namespace Kross { namespace Api {
void removeChild(const TQString& name);
/**
- * Remove all children.
+ * Remove all tqchildren.
*/
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_children;
+ TQMap<TQString, Object::Ptr> m_tqchildren;
};
}}
diff --git a/lib/kross/api/class.h b/lib/kross/api/class.h
index 6224a61a..de1d898c 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)").arg(name) );
+ krossdebug( TQString("Class::call(%1)").tqarg(name) );
return Event<T>::call(name, arguments);
}
*/
diff --git a/lib/kross/api/event.h b/lib/kross/api/event.h
index b75107f7..26a92117 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'").arg(name).arg(getName()) );
+ krossdebug( TQString("Event::call() name='%1' getName()='%2'").tqarg(name).tqarg(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.").arg(name) );
+ krossdebug( TQString("Event::call() name='%1' is a builtin function.").tqarg(name) );
#endif
return function->call(arguments);
}
diff --git a/lib/kross/api/eventscript.cpp b/lib/kross/api/eventscript.cpp
index f9fe9f9a..43c4c1cb 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").arg(name).arg(arguments->toString()) );
+ krossdebug( TQString("EventScript::call() name=%1 arguments=%2").tqarg(name).tqarg(arguments->toString()) );
//TODO
return 0;
}
diff --git a/lib/kross/api/eventsignal.cpp b/lib/kross/api/eventsignal.cpp
index 8f4d2c50..e3a8e54f 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").arg(m_signal).arg(arguments->toString()) );
+ krossdebug( TQString("EventSignal::call() m_signal=%1 arguments=%2").tqarg(m_signal).tqarg(arguments->toString()) );
#endif
TQString n = m_signal;
@@ -54,9 +54,9 @@ Object::Ptr EventSignal::call(const TQString& /*name*/, KSharedPtr<List> argumen
if(n.startsWith("2")) // Remove prefix of SIGNAL-macros
n.remove(0,1);
- int signalid = m_sender->metaObject()->findSignal(n.latin1(), false);
+ int signalid = m_sender->tqmetaObject()->findSignal(n.latin1(), false);
if(signalid < 0)
- throw new Exception(TQString("No such signal '%1'.").arg(n));
+ throw new Exception(TQString("No such signal '%1'.").tqarg(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 3f6482db..fd566d31 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").arg(m_slot).arg(arguments->toString()) );
+ krossdebug( TQString("EventSlot::call() m_slot=%1 arguments=%2").tqarg(m_slot).tqarg(arguments->toString()) );
#endif
TQString n = m_slot; //TODO name; //Variant::toString(args->item(0));
@@ -54,9 +54,9 @@ Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments)
if(n.startsWith("1")) // Remove prefix of SLOT-macros
n.remove(0,1);
- int slotid = m_receiver->metaObject()->findSlot(n.latin1(), false);
+ int slotid = m_receiver->tqmetaObject()->findSlot(n.latin1(), false);
if(slotid < 0)
- throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").arg(n)) );
+ throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(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.").arg(signal) );
+ krosswarning( TQString("EventSlot::getSlot(%1) Invalid signal.").tqarg(signal) );
return TQCString();
}
TQString signalname = signature.left(startpos);
@@ -80,16 +80,16 @@ TQCString EventSlot::getSlot(const TQCString& signal)
//TQStringList paramlist = TQStringList::split(",", params);
TQCString slot = TQString("callback(" + params + ")").latin1(); //normalizeSignalSlot();
- TQMetaObject* mo = metaObject();
+ TQMetaObject* mo = tqmetaObject();
int slotid = mo->findSlot(slot, false);
if(slotid < 0) {
- krossdebug( TQString("EventSlot::getSlot(%1) No such slot '%2' avaiable.").arg(signal).arg(slot) );
+ krossdebug( TQString("EventSlot::getSlot(%1) No such slot '%2' avaiable.").tqarg(signal).tqarg(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.").arg(signal).arg(slot) );
+ krossdebug( TQString("EventSlot::getSlot(%1) The slot '%2' is not public.").tqarg(signal).tqarg(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")
- .arg(signal).arg(slot).arg(slotid).arg(params).arg(md->name) );
+ .tqarg(signal).tqarg(slot).tqarg(slotid).tqarg(params).tqarg(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 !!!").arg(senderobj->name()).arg(signal).arg(function) );
+ krossdebug( TQString("EventSlot::connect(%1, %2, %3) added child EventSlot !!!").tqarg(senderobj->name()).tqarg(signal).tqarg(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.").arg(senderobj->name()).arg(signal).arg(function) );
+ krossdebug( TQString("EventSlot::connect(%1, %2, %3) failed.").tqarg(senderobj->name()).tqarg(signal).tqarg(function) );
return false;
}
- krossdebug( TQString("EventSlot::connect(%1, %2, %3) successfully connected.").arg(senderobj->name()).arg(signal).arg(function) );
+ krossdebug( TQString("EventSlot::connect(%1, %2, %3) successfully connected.").tqarg(senderobj->name()).tqarg(signal).tqarg(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'")
- .arg(m_sender->name()).arg(m_signal).arg(m_function) );
+ .tqarg(m_sender->name()).tqarg(m_signal).tqarg(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'").arg(variant.toString()).arg(e.type()).arg(e.description()) );
+ krossdebug( TQString("EXCEPTION in EventSlot::call('%1') type='%2' description='%3'").tqarg(variant.toString()).tqarg(e.type()).tqarg(e.description()) );
}
}
diff --git a/lib/kross/api/exception.cpp b/lib/kross/api/exception.cpp
index cb0125c4..c6a0198f 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'").arg(m_error).arg(m_lineno) );
+ krosswarning( TQString("Kross::Api::Exception error='%1' lineno='%3'").tqarg(m_error).tqarg(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").arg(m_lineno).arg(m_error)
- : TQString("Exception: %1").arg(m_error);
+ ? TQString("Exception at line %1: %2").tqarg(m_lineno).tqarg(m_error)
+ : TQString("Exception: %1").tqarg(m_error);
}
const TQString Exception::getError() const
diff --git a/lib/kross/api/interpreter.cpp b/lib/kross/api/interpreter.cpp
index 86eae479..8d266930 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").arg(m_interpretername) );
+ krossdebug( TQString("Loading the interpreter library for %1").tqarg(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.").arg(m_library).arg(m_interpretername) )
+ new Exception( 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) );
+ krosswarning( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").tqarg(m_library).tqarg(m_interpretername) );
return 0;
}
diff --git a/lib/kross/api/list.cpp b/lib/kross/api/list.cpp
index 9e2baf52..3d894116 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.").arg(idx) );
- throw Exception::Ptr( new Exception(TQString("List-index %1 out of bounds.").arg(idx)) );
+ 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)) );
}
return list[idx];
}
diff --git a/lib/kross/api/module.h b/lib/kross/api/module.h
index f27bdf5c..3e58305a 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").arg(name) );
+ krossdebug( TQString("Kross::Api::Module %1 created").tqarg(name) );
}
/**
@@ -59,7 +59,7 @@ namespace Kross { namespace Api {
*/
virtual ~Module()
{
- krossdebug( TQString("Kross::Api::Module %1 destroyed").arg(getName()) );
+ krossdebug( TQString("Kross::Api::Module %1 destroyed").tqarg(getName()) );
}
/**
diff --git a/lib/kross/api/object.cpp b/lib/kross/api/object.cpp
index 43fa8b4b..06ec55d5 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'").arg(m_name).arg(_KShared_count()) );
+ krossdebug( TQString("Kross::Api::Object::Constructor() name='%1' refcount='%2'").tqarg(m_name).tqarg(_KShared_count()) );
#endif
}
Object::~Object()
{
#ifdef KROSS_API_OBJECT_DTOR_DEBUG
- krossdebug( TQString("Kross::Api::Object::Destructor() name='%1' refcount='%2'").arg(m_name).arg(_KShared_count()) );
+ krossdebug( TQString("Kross::Api::Object::Destructor() name='%1' refcount='%2'").tqarg(m_name).tqarg(_KShared_count()) );
#endif
//removeAllChildren(); // not needed cause we use KShared to handle ref-couting and freeing.
}
const TQString Object::toString()
{
- return TQString("%1").arg(getClassName());
+ return TQString("%1").tqarg(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").arg(name).arg(getName()).arg(getClassName()) );
+ krossdebug( TQString("Kross::Api::Object::call(%1) name=%2 class=%3").tqarg(name).tqarg(getName()).tqarg(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'").arg(name)) );
+ throw Exception::Ptr( new Exception(TQString("No callable object named '%2'").tqarg(name)) );
}
diff --git a/lib/kross/api/object.h b/lib/kross/api/object.h
index f23a6179..87bd2132 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.").arg(object ? object->getClassName() : "")) );
+ throw KSharedPtr<Exception>( new Exception(TQString("Object \"%1\" invalid.").tqarg(object ? object->getClassName() : "")) );
return t;
}
diff --git a/lib/kross/api/qtobject.cpp b/lib/kross/api/qtobject.cpp
index 5fc1a36a..243f0503 100644
--- a/lib/kross/api/qtobject.cpp
+++ b/lib/kross/api/qtobject.cpp
@@ -42,13 +42,13 @@ QtObject::QtObject(TQObject* object, const TQString& name)
// Walk through the signals and slots the TQObject has
// and attach them as events to this QtObject.
- TQStrList slotnames = m_object->metaObject()->slotNames(false);
+ TQStrList slotnames = m_object->tqmetaObject()->slotNames(false);
for(char* c = slotnames.first(); c; c = slotnames.next()) {
TQCString s = c;
addChild(s, new EventSlot(s, object, s) );
}
- TQStrList signalnames = m_object->metaObject()->signalNames(false);
+ TQStrList signalnames = m_object->tqmetaObject()->signalNames(false);
for(char* c = signalnames.first(); c; c = signalnames.next()) {
TQCString s = c;
addChild(s, new EventSignal(s, object, s) );
@@ -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'").arg(signature)) );
+ throw Exception::Ptr( new Exception(TQString("Invalid TQt signal or slot signature '%1'").tqarg(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").arg(argcount).arg(t) );
+//krossdebug( TQString("1 ---------------------: (%1) %2").tqarg(argcount).tqarg(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").arg(s));
+ //krossdebug(TQString("EventSlot::toTQUObject s=%1").tqarg(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'.").arg(paramlist[i]).arg(signature)) );
+ throw Exception::Ptr( new Exception(TQString("Unknown TQt signal or slot argument '%1' in signature '%2'.").tqarg(paramlist[i]).tqarg(signature)) );
}
}
@@ -129,13 +129,13 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments)
Kross::Api::Object::Ptr QtObject::propertyNames(Kross::Api::List::Ptr)
{
return new Kross::Api::Variant(
- TQStringList::fromStrList(m_object->metaObject()->propertyNames(false)));
+ TQStringList::fromStrList(m_object->tqmetaObject()->propertyNames(false)));
}
Kross::Api::Object::Ptr QtObject::hasProperty(Kross::Api::List::Ptr args)
{
return new Kross::Api::Variant(
- m_object->metaObject()->findProperty(Kross::Api::Variant::toString(args->item(0)).latin1(), false));
+ m_object->tqmetaObject()->findProperty(Kross::Api::Variant::toString(args->item(0)).latin1(), false));
}
Kross::Api::Object::Ptr QtObject::getProperty(Kross::Api::List::Ptr args)
@@ -158,13 +158,13 @@ Kross::Api::Object::Ptr QtObject::setProperty(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr QtObject::slotNames(Kross::Api::List::Ptr)
{
return new Kross::Api::Variant(
- TQStringList::fromStrList(m_object->metaObject()->slotNames(false)));
+ TQStringList::fromStrList(m_object->tqmetaObject()->slotNames(false)));
}
Kross::Api::Object::Ptr QtObject::hasSlot(Kross::Api::List::Ptr args)
{
return new Kross::Api::Variant(
- bool(m_object->metaObject()->slotNames(false).find(
+ bool(m_object->tqmetaObject()->slotNames(false).find(
Kross::Api::Variant::toString(args->item(0)).latin1()
) != -1));
}
@@ -173,9 +173,9 @@ Kross::Api::Object::Ptr QtObject::callSlot(Kross::Api::List::Ptr args)
{
//TODO just call the child event ?!
TQString name = Kross::Api::Variant::toString(args->item(0));
- int slotid = m_object->metaObject()->findSlot(name.latin1(), false);
+ int slotid = m_object->tqmetaObject()->findSlot(name.latin1(), false);
if(slotid < 0)
- throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").arg(name)) );
+ throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(name)) );
TQUObject* uo = QtObject::toTQUObject(name, args);
m_object->qt_invoke(slotid, uo);
@@ -187,13 +187,13 @@ Kross::Api::Object::Ptr QtObject::callSlot(Kross::Api::List::Ptr args)
Kross::Api::Object::Ptr QtObject::signalNames(Kross::Api::List::Ptr)
{
return new Kross::Api::Variant(
- TQStringList::fromStrList(m_object->metaObject()->signalNames(false)));
+ TQStringList::fromStrList(m_object->tqmetaObject()->signalNames(false)));
}
Kross::Api::Object::Ptr QtObject::hasSignal(Kross::Api::List::Ptr args)
{
return new Kross::Api::Variant(
- bool(m_object->metaObject()->signalNames(false).find(
+ bool(m_object->tqmetaObject()->signalNames(false).find(
Kross::Api::Variant::toString(args->item(0)).latin1()
) != -1));
}
@@ -201,9 +201,9 @@ Kross::Api::Object::Ptr QtObject::hasSignal(Kross::Api::List::Ptr args)
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);
+ int signalid = m_object->tqmetaObject()->findSignal(name.latin1(), false);
if(signalid < 0)
- throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").arg(name)) );
+ throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").tqarg(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").arg(signalname);
+ TQString signalsignatur = TQString("2%1").tqarg(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'.").arg(obj->getName())) );
+ throw Exception::Ptr( new Exception(TQString("No such TQObject receiver in '%1'.").tqarg(obj->getName())) );
TQString slotname = Kross::Api::Variant::toString(args->item(2));
- TQString slotsignatur = TQString("1%1").arg(slotname);
+ TQString slotsignatur = TQString("1%1").tqarg(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 54e8ed7e..e8d8bc1b 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.").arg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::String expected, but got %1.").tqarg(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.").arg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Int expected, but got %1.").tqarg(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.").arg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::UInt expected, but got %1.").tqarg(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.").arg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Double expected, but got %1.").tqarg(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.").arg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::LLONG expected, but got %1.").tqarg(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.").arg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::ULLONG expected, but got %1.").tqarg(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.").arg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Bool expected, but got %1.").tqarg(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'.").arg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(TQString("Kross::Api::Variant::StringList expected, but got '%1'.").tqarg(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'.").arg(variant.typeName()).latin1()) );
+ throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::List expected, but got '%1'.").tqarg(variant.typeName()).latin1()) );
return variant.toList();
}