diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2021-05-04 15:15:13 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2021-05-04 16:21:50 +0200 |
commit | 48931167fb5341dc26e27dae03b2112d83daa3b6 (patch) | |
tree | ebbdef272f98906344ae2f882fd0fb0d82355c1d /tests/auto/tools/moc | |
parent | 07516c0811bf0ea02d1a8b4efc7ab7e9d63868f0 (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
Pick-to: 5.15 6.1
Change-Id: Ib790d4bcb33c4b9f2a55a784b852275b59debde9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/tools/moc')
-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: |