diff options
Diffstat (limited to 'libkdegames/kgame/kgamepropertyhandler.cpp')
-rw-r--r-- | libkdegames/kgame/kgamepropertyhandler.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libkdegames/kgame/kgamepropertyhandler.cpp b/libkdegames/kgame/kgamepropertyhandler.cpp index f395fc66..32e831d8 100644 --- a/libkdegames/kgame/kgamepropertyhandler.cpp +++ b/libkdegames/kgame/kgamepropertyhandler.cpp @@ -51,13 +51,13 @@ public: TQPtrQueue<KGamePropertyBase> mSignalQueue; }; -KGamePropertyHandler::KGamePropertyHandler(int id, const TQObject* receiver, const char * sendf, const char *emitf, TQObject* parent) : TQObject(parent) +KGamePropertyHandler::KGamePropertyHandler(int id, const TQObject* receiver, const char * sendf, const char *emitf, TQObject* tqparent) : TQObject(tqparent) { init(); registerHandler(id,receiver,sendf,emitf); } -KGamePropertyHandler::KGamePropertyHandler(TQObject* parent) : TQObject(parent) +KGamePropertyHandler::KGamePropertyHandler(TQObject* tqparent) : TQObject(tqparent) { init(); } @@ -117,7 +117,7 @@ bool KGamePropertyHandler::processMessage(TQDataStream &stream, int id, bool isS int cmd; KGameMessage::extractPropertyCommand(stream, propertyId, cmd); //kdDebug(11001) << k_funcinfo << ": Got COMMAND for id= "<<propertyId <<endl; - p = d->mIdDict.find(propertyId); + p = d->mIdDict.tqfind(propertyId); if (p) { if (!isSender || p->policy()==KGamePropertyBase::PolicyClean) { p->command(stream, cmd, isSender); @@ -127,7 +127,7 @@ bool KGamePropertyHandler::processMessage(TQDataStream &stream, int id, bool isS } return true; } - p = d->mIdDict.find(propertyId); + p = d->mIdDict.tqfind(propertyId); if (p) { //kdDebug(11001) << k_funcinfo << ": Loading " << propertyId << endl; if (!isSender || p->policy()==KGamePropertyBase::PolicyClean) { @@ -151,7 +151,7 @@ bool KGamePropertyHandler::removeProperty(KGamePropertyBase* data) bool KGamePropertyHandler::addProperty(KGamePropertyBase* data, TQString name) { //kdDebug(11001) << k_funcinfo << ": " << data->id() << endl; - if (d->mIdDict.find(data->id())) { + if (d->mIdDict.tqfind(data->id())) { // this id already exists kdError(11001) << " -> cannot add property " << data->id() << endl; return false; @@ -172,15 +172,15 @@ bool KGamePropertyHandler::addProperty(KGamePropertyBase* data, TQString name) TQString KGamePropertyHandler::propertyName(int id) const { TQString s; - if (d->mIdDict.find(id)) { - if (d->mNameMap.contains(id)) { - s = i18n("%1 (%2)").arg(d->mNameMap[id]).arg(id); + if (d->mIdDict.tqfind(id)) { + if (d->mNameMap.tqcontains(id)) { + s = i18n("%1 (%2)").tqarg(d->mNameMap[id]).tqarg(id); } else { - s = i18n("Unnamed - ID: %1").arg(id); + s = i18n("Unnamed - ID: %1").tqarg(id); } } else { // Should _never_ happen - s = i18n("%1 unregistered").arg(id); + s = i18n("%1 unregistered").tqarg(id); } return s; } @@ -195,7 +195,7 @@ bool KGamePropertyHandler::load(TQDataStream &stream) for (i = 0; i < count; i++) { processMessage(stream, id(),false); } - Q_INT16 cookie; + TQ_INT16 cookie; stream >> cookie; if (cookie == KPLAYERHANDLER_LOAD_COOKIE) { kdDebug(11001) << " KGamePropertyHandler loaded propertly"<<endl; @@ -220,7 +220,7 @@ bool KGamePropertyHandler::save(TQDataStream &stream) } ++it; } - stream << (Q_INT16)KPLAYERHANDLER_LOAD_COOKIE; + stream << (TQ_INT16)KPLAYERHANDLER_LOAD_COOKIE; return true; } @@ -326,9 +326,9 @@ bool KGamePropertyHandler::sendProperty(TQDataStream &s) return sent; } -KGamePropertyBase *KGamePropertyHandler::find(int id) +KGamePropertyBase *KGamePropertyHandler::tqfind(int id) { - return d->mIdDict.find(id); + return d->mIdDict.tqfind(id); } void KGamePropertyHandler::clear() @@ -338,7 +338,7 @@ void KGamePropertyHandler::clear() while (it.toFirst()) { KGamePropertyBase* p = it.toFirst(); p->unregisterData(); - if (d->mIdDict.find(p->id())) { + if (d->mIdDict.tqfind(p->id())) { // shouldn't happen - but if mOwner in KGamePropertyBase is NULL // this might be possible removeProperty(p); @@ -371,8 +371,8 @@ TQString KGamePropertyHandler::propertyValue(KGamePropertyBase* prop) } else if (*t == typeid(unsigned long int)) { value = TQString::number(((KGameProperty<unsigned long int> *)prop)->value()); } else if (*t == typeid(TQString)) { - value = ((KGamePropertyQString*)prop)->value(); - } else if (*t == typeid(Q_INT8)) { + value = ((KGamePropertyTQString*)prop)->value(); + } else if (*t == typeid(TQ_INT8)) { value = ((KGamePropertyBool*)prop)->value() ? i18n("True") : i18n("False"); } else { emit signalRequestValue(prop, value); |