From db1b88e51665006f87e3650912978defb5824ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Tue, 4 May 2021 15:15:13 +0200 Subject: tst_moc: fix returning-reference-to-local warning Although the code is never executed compilers still throw a warning because it's compiled. Amends 12b8283f899ebcf401d974927314b9531334a56e Change-Id: Ib790d4bcb33c4b9f2a55a784b852275b59debde9 Reviewed-by: Fabian Kosmale (cherry picked from commit 48931167fb5341dc26e27dae03b2112d83daa3b6) Reviewed-by: Qt Cherry-pick Bot --- tests/auto/tools/moc/cxx11-trailing-return.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/auto/tools/moc/cxx11-trailing-return.h b/tests/auto/tools/moc/cxx11-trailing-return.h index 26178ff68e..50f341e1c3 100644 --- a/tests/auto/tools/moc/cxx11-trailing-return.h +++ b/tests/auto/tools/moc/cxx11-trailing-return.h @@ -43,12 +43,12 @@ public slots: inline auto constRefReturn() -> const CXX11TrailingReturn & { - return {}; + return *this; } inline auto constConstRefReturn() const -> const CXX11TrailingReturn & { - return {}; + return *this; } signals: -- cgit v1.2.3