src/dbus/qdbusxmlgenerator.cpp
changeset 30 5dc02b23752f
parent 18 2f34d5167611
child 33 3e2da88830cd
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
    46 #include "qdbusabstractadaptor_p.h" // for QCLASSINFO_DBUS_*
    46 #include "qdbusabstractadaptor_p.h" // for QCLASSINFO_DBUS_*
    47 #include "qdbusconnection_p.h"  // for the flags
    47 #include "qdbusconnection_p.h"  // for the flags
    48 #include "qdbusmetatype_p.h"
    48 #include "qdbusmetatype_p.h"
    49 #include "qdbusmetatype.h"
    49 #include "qdbusmetatype.h"
    50 #include "qdbusutil_p.h"
    50 #include "qdbusutil_p.h"
       
    51 
       
    52 #ifndef QT_NO_DBUS
    51 
    53 
    52 QT_BEGIN_NAMESPACE
    54 QT_BEGIN_NAMESPACE
    53 
    55 
    54 extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
    56 extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
    55                                                        const QMetaObject *base, int flags);
    57                                                        const QMetaObject *base, int flags);
   156                        .arg(typeNameToXml(typeName));
   158                        .arg(typeNameToXml(typeName));
   157 
   159 
   158                 // do we need to describe this argument?
   160                 // do we need to describe this argument?
   159                 if (QDBusMetaType::signatureToType(typeName) == QVariant::Invalid)
   161                 if (QDBusMetaType::signatureToType(typeName) == QVariant::Invalid)
   160                     xml += QString::fromLatin1("      <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n")
   162                     xml += QString::fromLatin1("      <annotation name=\"com.trolltech.QtDBus.QtTypeName.Out0\" value=\"%1\"/>\n")
   161                            .arg(typeNameToXml(mm.typeName()));
   163                         .arg(typeNameToXml(QVariant::typeToName(QVariant::Type(typeId))));
   162             } else
   164             } else
   163                 continue;
   165                 continue;
   164         }
   166         }
   165         else if (*mm.typeName())
   167         else if (*mm.typeName())
   166             continue;           // wasn't a valid type
   168             continue;           // wasn't a valid type
   300 }
   302 }
   301 
   303 
   302 #endif
   304 #endif
   303 
   305 
   304 QT_END_NAMESPACE
   306 QT_END_NAMESPACE
       
   307 
       
   308 #endif // QT_NO_DBUS