diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-11-06 11:00:28 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-11-07 09:35:11 +0100 |
commit | b8069f0a4783cd80c1b2c44053e054607b066d79 (patch) | |
tree | a1a15b5a0762311c8bb18f81c7abf4a76607c743 /src/corelib/kernel | |
parent | a6903f3da80418aca511e230d9c5f2f9e423be7d (diff) |
QProperty: Mark metaType as unused in else branch of createFor()
The metaType is only used in the constexpr if branch where the callable
is not std::is_invocable_v. Therefore, we need to mark it as unused in
order to avoid compile errors in code that exercises the other branch.
Change-Id: I46e855b0f4b0a088f15ff41d4929fe010531b97e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qpropertyprivate.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/kernel/qpropertyprivate.h b/src/corelib/kernel/qpropertyprivate.h index df12c1fdb3..6bac03243b 100644 --- a/src/corelib/kernel/qpropertyprivate.h +++ b/src/corelib/kernel/qpropertyprivate.h @@ -177,6 +177,7 @@ struct BindingFunctionVTable auto untypedEvaluationFunction = static_cast<Callable *>(f); return std::invoke(*untypedEvaluationFunction, metaType, dataPtr); } else { + Q_UNUSED(metaType); QPropertyData<PropertyType> *propertyPtr = static_cast<QPropertyData<PropertyType> *>(dataPtr); // That is allowed by POSIX even if Callable is a function pointer auto evaluationFunction = static_cast<Callable *>(f); |