QmlCompiler: Mark dataPtr as unused for void AOT functions

Otherwise we get lots of "unused" warnings from the compiler.

Change-Id: I7744715c476350dd3bba34500589cb1c62672c9f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Ulf Hermann 2020-11-13 09:06:36 +01:00
parent cc5669bd45
commit 70ed83007f
1 changed files with 1 additions and 0 deletions

View File

@ -457,6 +457,7 @@ bool qSaveQmlJSUnitAsCpp(const QString &inputFileName, const QString &outputFile
void wrapCall(QQmlContext *context, QObject *scopeObject, void *dataPtr, Binding &&binding) {
using return_type = std::invoke_result_t<Binding, QQmlContext*, QObject*>;
if constexpr (std::is_same_v<return_type, void>) {
Q_UNUSED(dataPtr);
binding(context, scopeObject);
} else {
auto result = binding(context, scopeObject);