diff options
| author | 2007-04-10 14:45:46 +0000 | |
|---|---|---|
| committer | 2007-04-10 14:45:46 +0000 | |
| commit | a342f3b4b92c888171500af30cccee3baeac2fcd (patch) | |
| tree | 74ddfc9df1d7093565f586c32d2cc2729ef6f40c /src | |
| parent | qt4 fix (diff) | |
| download | KVIrc-a342f3b4b92c888171500af30cccee3baeac2fcd.tar.gz KVIrc-a342f3b4b92c888171500af30cccee3baeac2fcd.tar.bz2 KVIrc-a342f3b4b92c888171500af30cccee3baeac2fcd.zip | |
qt4 fix
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@475 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src')
| -rw-r--r-- | src/kvirc/kvs/kvi_kvs_object.cpp | 40 |
1 files changed, 27 insertions, 13 deletions
diff --git a/src/kvirc/kvs/kvi_kvs_object.cpp b/src/kvirc/kvs/kvi_kvs_object.cpp index fed2cd139..89506bd17 100644 --- a/src/kvirc/kvs/kvi_kvs_object.cpp +++ b/src/kvirc/kvs/kvi_kvs_object.cpp @@ -1022,30 +1022,34 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) const QMetaObject *o = m_pObject->metaObject(); if(!bArray) w->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Properties for Qt class %s"),o->className()); +#ifndef COMPILE_USE_QT4 while(o) { - kvs_int_t idx = 0; -#ifdef COMPILE_USE_QT4 - QMetaProperty prop = o->property(idx); - const QMetaProperty *p = ∝ -#else - const QMetaProperty *p = o->property(idx); #endif + kvs_int_t idx = 0; + #ifdef COMPILE_USE_QT4 + QMetaProperty prop = o->property(idx); + const QMetaProperty *p = ∝ + #else + const QMetaProperty *p = o->property(idx); + #endif + while(p) { QString szOut; QString szName = p->name(); -#ifdef COMPILE_USE_QT4 - QString szType = p->typeName(); -#else + #ifdef COMPILE_USE_QT4 + QString szType = p->typeName(); + #else QString szType = p->type(); -#endif + #endif if(bArray) KviQString::sprintf(szOut,"%Q, %Q",&szName,&szType); else { KviQString::sprintf(szOut,__tr2qs("Property: %c%Q%c, type %Q"),KVI_TEXT_BOLD,&szName,KVI_TEXT_BOLD,&szType); szOut.prepend(" "); } + if(p->isEnumType()) { szOut += ", enum("; @@ -1064,6 +1068,8 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) #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... @@ -1077,16 +1083,24 @@ bool KviKvsObject::function_listProperties(KviKvsObjectFunctionCall * c) else w->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,szOut); #ifdef COMPILE_USE_QT4 - prop = o->property(idx); - p = ∝ + idx++; + if (idx<o->propertyCount()){ + prop = o->property(idx); + p = ∝ + } + else p=0; #else p = o->property(idx); -#endif idx++; +#endif + cnt++; } +#ifndef COMPILE_USE_QT4 o = o->superClass(); } +#endif + } if(bArray) |
