diff options
author | Alexander Lohnau <alexander.lohnau@gmx.de> | 2024-02-04 12:34:11 +0100 |
---|---|---|
committer | Alexander Lohnau <alexander.lohnau@gmx.de> | 2024-02-04 16:42:42 +0100 |
commit | a7733b63622c67983b306db2bbd7594896ab726b (patch) | |
tree | 7bfb1012c9ade67a955f0b1e0611f92ee4b3643e | |
parent | c2c66740434fa628b425efe4426731612a268c63 (diff) |
fully-qualified-moc-types: Show issues of current implementation in testcase
-rw-r--r-- | tests/fully-qualified-moc-types/main.cpp | 6 | ||||
-rw-r--r-- | tests/fully-qualified-moc-types/main.cpp.expected | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/fully-qualified-moc-types/main.cpp b/tests/fully-qualified-moc-types/main.cpp index 64e8eb64..54bdce12 100644 --- a/tests/fully-qualified-moc-types/main.cpp +++ b/tests/fully-qualified-moc-types/main.cpp @@ -1,6 +1,6 @@ #include <QtCore/QObject> #include <QtDBus/QDBusPendingReply> - +#include <memory> struct A {}; struct NonNamespacedGadget { Q_GADGET @@ -87,7 +87,9 @@ public Q_SLOTS: inline QDBusPendingReply<QualMe> unqualGenericDbusReply() {return {};} // WARN inline QDBusPendingReply<bool> boolDbusReply() {return {};} // OK inline QDBusPendingReply<> voidDbusReply() {return {};} // OK - inline QDBusPendingReply<MyList> typedefInGeneric() {return {};} // OK + inline QDBusPendingReply<MyList> typedefInGeneric() {return {};} // WARN + inline QDBusPendingReply<std::shared_ptr<MyObj2>> nestedGeneric() {return {};} // OK + inline QDBusPendingReply<std::shared_ptr<MyList>> nestedNotFullyQualifiedGeneric() {return {};} // WARN }; Q_DECLARE_METATYPE(MyObj2::QualMe); diff --git a/tests/fully-qualified-moc-types/main.cpp.expected b/tests/fully-qualified-moc-types/main.cpp.expected index c9b92d34..9be09be3 100644 --- a/tests/fully-qualified-moc-types/main.cpp.expected +++ b/tests/fully-qualified-moc-types/main.cpp.expected @@ -8,4 +8,5 @@ fully-qualified-moc-types/main.cpp:82:5: warning: slot return types need to be f fully-qualified-moc-types/main.cpp:83:5: warning: slot return types need to be fully-qualified (QList<MyObj2::QualMe> instead of QList<QualMe>) [-Wclazy-fully-qualified-moc-types] fully-qualified-moc-types/main.cpp:87:5: warning: slot return types need to be fully-qualified (QDBusPendingReply<MyObj2::QualMe> instead of QDBusPendingReply<QualMe>) [-Wclazy-fully-qualified-moc-types] fully-qualified-moc-types/main.cpp:90:5: warning: slot return types need to be fully-qualified (QDBusPendingReply<MyObj2::MyList> instead of QDBusPendingReply<MyList>) [-Wclazy-fully-qualified-moc-types] +fully-qualified-moc-types/main.cpp:92:5: warning: slot return types need to be fully-qualified (QDBusPendingReply<std::shared_ptr<MyObj2::MyList>> instead of QDBusPendingReply<std::shared_ptr<MyList>>) [-Wclazy-fully-qualified-moc-types] fully-qualified-moc-types/main.cpp:18:5: warning: Q_PROPERTY of type NamespacedGadget should use full qualification (NS::NamespacedGadget) [-Wclazy-fully-qualified-moc-types] |