From b8069f0a4783cd80c1b2c44053e054607b066d79 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Fri, 6 Nov 2020 11:00:28 +0100 Subject: 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 --- src/corelib/kernel/qpropertyprivate.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/corelib/kernel') 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(f); return std::invoke(*untypedEvaluationFunction, metaType, dataPtr); } else { + Q_UNUSED(metaType); QPropertyData *propertyPtr = static_cast *>(dataPtr); // That is allowed by POSIX even if Callable is a function pointer auto evaluationFunction = static_cast(f); -- cgit v1.2.3