diff options
author | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2021-05-04 15:15:13 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-05-04 18:46:14 +0000 |
commit | db1b88e51665006f87e3650912978defb5824ef0 (patch) | |
tree | 5d5239f9ef4aead856137293ec2eb4438d789d34 /tests | |
parent | 4fd10b68d4ec813b031415872e2ab296a062fb6f (diff) |
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 <fabian.kosmale@qt.io>
(cherry picked from commit 48931167fb5341dc26e27dae03b2112d83daa3b6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/tools/moc/cxx11-trailing-return.h | 4 |
1 files changed, 2 insertions, 2 deletions
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: |