summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros/lib/metaobject.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/plugins/macros/lib/metaobject.cpp
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/macros/lib/metaobject.cpp')
-rw-r--r--kexi/plugins/macros/lib/metaobject.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/kexi/plugins/macros/lib/metaobject.cpp b/kexi/plugins/macros/lib/metaobject.cpp
index 000f4181..e9e56b44 100644
--- a/kexi/plugins/macros/lib/metaobject.cpp
+++ b/kexi/plugins/macros/lib/metaobject.cpp
@@ -22,8 +22,8 @@
#include "variable.h"
#include "exception.h"
-#include <qguardedptr.h>
-#include <qmetaobject.h>
+#include <tqguardedptr.h>
+#include <tqmetaobject.h>
#include <kdebug.h>
@@ -40,14 +40,14 @@ namespace KoMacro {
public:
/**
- * The QObject instance this @a MetaObject belongs to.
+ * The TQObject instance this @a MetaObject belongs to.
*/
- QGuardedPtr<QObject> const object;
+ TQGuardedPtr<TQObject> const object;
/**
* Constructor.
*/
- Private(QObject* const object)
+ Private(TQObject* const object)
: object(object)
{
}
@@ -55,7 +55,7 @@ namespace KoMacro {
}
-MetaObject::MetaObject(QObject* const object)
+MetaObject::MetaObject(TQObject* const object)
: KShared()
, d( new Private(object) ) // create the private d-pointer instance.
{
@@ -66,66 +66,66 @@ MetaObject::~MetaObject()
delete d;
}
-QObject* const MetaObject::object() const
+TQObject* const MetaObject::object() const
{
if(! d->object) {
- throw Exception(QString("Object is undefined."));
+ throw Exception(TQString("Object is undefined."));
}
return d->object;
}
/*
-QStrList MetaObject::signalNames() const
+TQStrList MetaObject::signalNames() const
{
- return object()->metaObject()->signalNames();
+ return object()->tqmetaObject()->signalNames();
}
-QStrList MetaObject::slotNames() const
+TQStrList MetaObject::slotNames() const
{
- return object()->metaObject()->slotNames();
+ return object()->tqmetaObject()->slotNames();
}
*/
int MetaObject::indexOfSignal(const char* signal) const
{
- QMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int signalid = metaobject->findSignal(signal, false);
if(signalid < 0) {
- throw Exception(QString("Invalid signal \"%1\"").arg(signal));
+ throw Exception(TQString("Invalid signal \"%1\"").tqarg(signal));
}
return signalid;
}
int MetaObject::indexOfSlot(const char* slot) const
{
- QMetaObject* metaobject = object()->metaObject();
+ TQMetaObject* metaobject = object()->tqmetaObject();
int slotid = metaobject->findSlot(slot, false);
if(slotid < 0) {
- throw Exception(QString("Invalid slot \"%1\"").arg(slot));
+ throw Exception(TQString("Invalid slot \"%1\"").tqarg(slot));
}
return slotid;
}
KSharedPtr<MetaMethod> MetaObject::method(int index)
{
- QObject* obj = object();
+ TQObject* obj = object();
MetaMethod::Type type = MetaMethod::Slot;
- QMetaObject* metaobject = obj->metaObject();
+ TQMetaObject* metaobject = obj->tqmetaObject();
- const QMetaData* metadata = metaobject->slot(index, true);
+ const TQMetaData* metadata = metaobject->slot(index, true);
if(! metadata) {
// Try to get a signal with that index iff we failed to determinate
// a matching slot.
metadata = metaobject->signal(index, true);
if(! metadata) {
- throw Exception(QString("Invalid method index \"%1\" in object \"%2\"").arg(index).arg(obj->name()));
+ throw Exception(TQString("Invalid method index \"%1\" in object \"%2\"").tqarg(index).tqarg(obj->name()));
}
type = MetaMethod::Signal;
}
- if(metadata->access != QMetaData::Public) {
- throw Exception(QString("Not allowed to access method \"%1\" in object \"%2\"").arg(metadata->name).arg(obj->name()));
+ if(metadata->access != TQMetaData::Public) {
+ throw Exception(TQString("Not allowed to access method \"%1\" in object \"%2\"").tqarg(metadata->name).tqarg(obj->name()));
}
return new MetaMethod(metadata->name, type, this);