diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2022-07-31 09:14:35 -0700 |
---|---|---|
committer | Thiago Macieira <thiago.macieira@intel.com> | 2022-08-01 14:52:22 -0700 |
commit | 59065a85301376f52e58f944ceaad0e5baaeae64 (patch) | |
tree | e5da7c8020e371cf126bf72386d6ef6460dafedd /tests/auto/tools | |
parent | 3410b1dc9c9d29cab84d471064d8ef1d26a0f98c (diff) |
QMetaType: fix void* parameters
Commit 3695b35dfc427f274e55f8e2a6a9876deb52f1b4 accounted for pointer to
other incomplete types, but pointer-to-void was missed. This caused an
inconsistency in the stored metatype for void*, which is a built-in type
(QMetaType::VoidStar) but no pointer was recorded.
The test in tst_moc hadn't been enabled because the functions in
questions weren't extracted by moc. That is fixed in this commit.
Change-Id: I6f936da6f6e84d649f70fffd1706f613517a75fb
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/tools')
-rw-r--r-- | tests/auto/tools/moc/allmocs_baseline_in.json | 72 | ||||
-rw-r--r-- | tests/auto/tools/moc/pointery_to_incomplete.h | 6 |
2 files changed, 77 insertions, 1 deletions
diff --git a/tests/auto/tools/moc/allmocs_baseline_in.json b/tests/auto/tools/moc/allmocs_baseline_in.json index d362f94c7b..e1c6a5d7d8 100644 --- a/tests/auto/tools/moc/allmocs_baseline_in.json +++ b/tests/auto/tools/moc/allmocs_baseline_in.json @@ -1671,6 +1671,78 @@ "className": "TestPointeeCanBeIncomplete", "object": true, "qualifiedClassName": "TestPointeeCanBeIncomplete", + "slots": [ + { + "access": "public", + "arguments": [ + { + "type": "QPointer<FwdClass>" + } + ], + "name": "setProp1", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QSharedPointer<FwdClass>" + } + ], + "name": "setProp2", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "QWeakPointer<FwdClass>" + } + ], + "name": "setProp3", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "FwdClass*" + } + ], + "name": "setProp4", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "const FwdClass*" + } + ], + "name": "setProp5", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "void*" + } + ], + "name": "setProp6", + "returnType": "void" + }, + { + "access": "public", + "arguments": [ + { + "type": "const void*" + } + ], + "name": "setProp7", + "returnType": "void" + } + ], "superClasses": [ { "access": "public", diff --git a/tests/auto/tools/moc/pointery_to_incomplete.h b/tests/auto/tools/moc/pointery_to_incomplete.h index 38dea13340..46cd04d763 100644 --- a/tests/auto/tools/moc/pointery_to_incomplete.h +++ b/tests/auto/tools/moc/pointery_to_incomplete.h @@ -14,10 +14,14 @@ class FwdClass; class TestPointeeCanBeIncomplete : public QObject { Q_OBJECT -public: +public slots: void setProp1(QPointer<FwdClass>) {} void setProp2(QSharedPointer<FwdClass>) {} void setProp3(const QWeakPointer<FwdClass> &) {} + void setProp4(FwdClass *) {} + void setProp5(const FwdClass *) {} + void setProp6(void *) {} + void setProp7(const void *) {} }; #endif // POINTERY_TO_INCOMPLETE_H |