Skip to content

Commit

Permalink
sync: from linuxdeepin/dtkcore
Browse files Browse the repository at this point in the history
Synchronize source files from linuxdeepin/dtkcore.

Source-pull-request: linuxdeepin/dtkcore#414
  • Loading branch information
deepin-ci-robot authored and kegechen committed May 13, 2024
1 parent 6b84162 commit c630cfa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/qdbusxml2cpp/qdbusxml2cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -717,12 +717,20 @@ static void writeProxy(const QString &filename, const QDBusIntrospection::Interf

for (const QString &annotation : annotations) {
if (annotation.indexOf('<') != -1) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
cs << " if (QMetaType::fromName(\"" << annotation << "\").id() == QMetaType::UnknownType) {" << endl;
#else
cs << " if (QMetaType::type(\"" << annotation << "\") == QMetaType::UnknownType) {" << endl;
#endif
cs << " qRegisterMetaType< " << annotation << " >(\"" << annotation << "\");" << endl;
cs << " qDBusRegisterMetaType< " << annotation << " >();" << endl;
cs << " }" << endl;
} else {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
cs << " if (QMetaType::fromName(\"" << annotation << "\").id() == QMetaType::UnknownType)" << endl;
#else
cs << " if (QMetaType::type(\"" << annotation << "\") == QMetaType::UnknownType)" << endl;
#endif
cs << " register" << annotation << "MetaType();" << endl;
}
}
Expand Down

0 comments on commit c630cfa

Please sign in to comment.