diff options
Diffstat (limited to 'src/kvirc/kvs/kvi_kvs_object.cpp')
-rw-r--r-- | src/kvirc/kvs/kvi_kvs_object.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/src/kvirc/kvs/kvi_kvs_object.cpp b/src/kvirc/kvs/kvi_kvs_object.cpp index 46f6efbf..3bfca497 100644 --- a/src/kvirc/kvs/kvi_kvs_object.cpp +++ b/src/kvirc/kvs/kvi_kvs_object.cpp @@ -1017,10 +1017,7 @@ bool KviKvsObject::function_killTimer(KviKvsObjectFunctionCall * c) bool KviKvsObject::function_killTimers(KviKvsObjectFunctionCall * c) { - // FIXME: QT4 does not seem to have TQObject::killTimers() -#ifndef COMPILE_USE_QT4 killTimers(); -#endif return true; } @@ -1045,27 +1042,16 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) const TQMetaObject *o = m_pObject->metaObject(); if(!bArray) w->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Properties for TQt class %s"),o->className()); -#ifndef COMPILE_USE_QT4 while(o) { -#endif kvs_int_t idx = 0; - #ifdef COMPILE_USE_QT4 - TQMetaProperty prop = o->property(idx); - const TQMetaProperty *p = ∝ - #else const TQMetaProperty *p = o->property(idx); - #endif while(p) { TQString szOut; TQString szName = p->name(); - #ifdef COMPILE_USE_QT4 - TQString szType = p->typeName(); - #else TQString szType = p->type(); - #endif if(bArray) KviTQString::sprintf(szOut,"%Q, %Q",&szName,&szType); else { @@ -1076,7 +1062,6 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) if(p->isEnumType()) { szOut += ", enum("; -#ifndef COMPILE_USE_QT4 // FIXME: TQt 4.x needs TQMetaEnum for this loop TQStrList le = p->enumKeys(); int i = 0; @@ -1088,41 +1073,23 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) szOut.append(", "); szOut.append(c2); } -#endif szOut += ")"; } -#ifdef COMPILE_USE_QT4 - // FIXME: QT4 Need to read better the docs and check the changes: there seem to be too many - // for me to fix now. Actually I need to get the whole executable working... - if(p->isWritable())szOut += ", writable"; -#else if(p->isSetType())szOut += ", set"; if(p->writable())szOut += ", writable"; -#endif if(bArray) a->set(cnt,new KviKvsVariant(szOut)); else w->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,szOut); -#ifdef COMPILE_USE_QT4 - idx++; - if (idx<o->propertyCount()){ - prop = o->property(idx); - p = ∝ - } - else p=0; -#else p = o->property(idx); idx++; -#endif cnt++; } -#ifndef COMPILE_USE_QT4 o = o->superClass(); } -#endif } @@ -1153,22 +1120,13 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) return true; } -#ifdef COMPILE_USE_QT4 - int idx = m_pObject->metaObject()->indexOfProperty(szName); -#else int idx = m_pObject->metaObject()->findProperty(szName,true); -#endif if(idx < 0) { c->warning(__tr2qs("No TQt property named \"%Q\" for object named \"%Q\" of class %Q"),&szName,&m_szName,&(m_pClass->name())); return true; } -#ifdef COMPILE_USE_QT4 - TQMetaProperty prop = m_pObject->metaObject()->property(idx); - const TQMetaProperty * p = ∝ -#else const TQMetaProperty * p = m_pObject->metaObject()->property(idx,true); -#endif if(!p) { c->warning(__tr2qs("Can't find property named \"%Q\" for object named \"%Q\" of class %Q: the property is indexed but it doesn't really exist"),&szName,&m_szName,&(m_pClass->name())); @@ -1186,11 +1144,7 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) { TQString szKey; v->asString(szKey); -#ifdef COMPILE_USE_QT4 - int val = p->enumerator().keyToValue(szKey); -#else int val = p->keyToValue(szKey); -#endif TQVariant var(val); m_pObject->setProperty(szName,var); return true; @@ -1274,8 +1228,6 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) m_pObject->setProperty(szName,TQVariant(TQRect(iX,iY,iW,iH))); } break; -#ifndef COMPILE_USE_QT4 - // FIXME: QT4 ???? case TQVariant::Color: { if(!v->isArray())WRONG_TYPE("array(integer,integer,integer)") @@ -1354,7 +1306,6 @@ bool KviKvsObject::function_setProperty(KviKvsObjectFunctionCall * c) } } break; -#endif default: c->warning(__tr2qs("Property \"%Q\" for object named \"%Q\" of class %Q has an unsupported data type"),&szName,&m_szName,&(m_pClass->name())); c->returnValue()->setNothing(); @@ -1384,11 +1335,7 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) return true; } -#ifdef COMPILE_USE_QT4 - int idx = m_pObject->metaObject()->indexOfProperty(szName); -#else int idx = m_pObject->metaObject()->findProperty(szName,true); -#endif if(idx < 0) { if (bNoerror) c->returnValue()->setString("No TQt properties"); @@ -1399,12 +1346,7 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) } return true; } -#ifdef COMPILE_USE_QT4 - TQMetaProperty prop = m_pObject->metaObject()->property(idx); - const TQMetaProperty * p = ∝ -#else const TQMetaProperty * p = m_pObject->metaObject()->property(idx,true); -#endif if(!p) { c->warning(__tr2qs("Can't find property named \"%Q\" for object named \"%Q\" of class %Q: the property is indexed but it doesn't really exist"),&szName,&m_szName,&(m_pClass->name())); @@ -1422,11 +1364,7 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) if(p->isEnumType()) { -#ifdef COMPILE_USE_QT4 - c->returnValue()->setString(p->enumerator().valueToKey(v.toInt())); -#else c->returnValue()->setString(p->valueToKey(v.toInt())); -#endif return true; } @@ -1476,8 +1414,6 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) c->returnValue()->setArray(a); } break; -#ifndef COMPILE_USE_QT4 - // FIXME: QT4 ? case TQVariant::Color: { TQColor clr = v.toColor(); @@ -1505,7 +1441,6 @@ bool KviKvsObject::function_property(KviKvsObjectFunctionCall * c) c->returnValue()->setString(szFlags); } break; -#endif default: if (bNoerror) c->returnValue()->setString("Unsupported_data_type"); else |