summaryrefslogtreecommitdiffstats
path: root/lib/kross/api/qtobject.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-16 09:56:31 -0600
committerTimothy Pearson <[email protected]>2011-12-16 09:56:31 -0600
commitc9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch)
tree1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /lib/kross/api/qtobject.cpp
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/qtobject.cpp')
-rw-r--r--lib/kross/api/qtobject.cpp38
1 files changed, 19 insertions, 19 deletions
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(