Rework constructors of the API classes
Make the QObject constructor explicit and remove a default
nullptr value.
Add an implicit default constructor and use c-tor delegation
to call a QObject c-tor with nullptr.
This achieves two things:
- we allow brace-initialization for default constructors
- we forbid implicit constructors from QObject
Change-Id: I5eae3f973e75054da4a88567cfc7a473423e315d
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
| commit | 0170ac36e83bd0ba11c6592a1c762c054a8aa221 |
| parent | c2d63ed19dc8ee51bfed10bce03a3b14300c756c |
| author | Ivan Solovev <ivan.solovev@qt.io> |
| committer | Ivan Solovev <ivan.solovev@qt.io> |
| commit time | Wed, 6 Aug 2025 09:33:21 +0200 |
- M src/main/resources/cpp-qt6-client/api-base-header.mustache
- M src/main/resources/cpp-qt6-client/api-header.mustache
- M tests/auto/colorpalette/client/client/OAIBaseApi.h
- M tests/auto/colorpalette/client/client/OAIColorsApi.h
- M tests/auto/colorpalette/client/client/OAIDefaultApi.h
- M tests/auto/colorpalette/client/client/OAIRegisterApi.h
- M tests/auto/colorpalette/client/client/OAIUsersApi.h
- M tests/auto/colorpalette/qmlclient/client/OAIBaseApi.h
- M tests/auto/colorpalette/qmlclient/client/OAIColorsApi.h
- M tests/auto/colorpalette/qmlclient/client/OAIDefaultApi.h
- M tests/auto/colorpalette/qmlclient/client/OAIRegisterApi.h
- M tests/auto/colorpalette/qmlclient/client/OAIUsersApi.h
- M tests/auto/operation-parameters/client/client/OAIBaseApi.h
- M tests/auto/operation-parameters/client/client/OAITestApi.h
- M tests/auto/petstore/client/client/OAIBaseApi.h
- M tests/auto/petstore/client/client/OAIPetApi.h
- M tests/auto/petstore/client/client/OAIStoreApi.h
- M tests/auto/petstore/client/client/OAIUserApi.h
- M tests/auto/petstore/qmlclient/client/OAIBaseApi.h
- M tests/auto/petstore/qmlclient/client/OAIPetApi.h
- M tests/auto/petstore/qmlclient/client/OAIStoreApi.h
- M tests/auto/petstore/qmlclient/client/OAIUserApi.h