diff options
author | Ahmad Samir <[email protected]> | 2025-01-13 15:36:48 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <[email protected]> | 2025-01-19 23:05:30 +0000 |
commit | f4d2babaff258fa56a4c29cce0ee00c8dd880b62 (patch) | |
tree | 8a8e638c6c50a89906ada460674c7f367c803f7d | |
parent | f36cf92db6a608f008666db95b47e4978a76c647 (diff) |
tst_QUniqueHandle: silence GCC/Clang -Wself-move warnings
And remove NOLINT(clang-diagnostic-self-move), silencing the warning for
Clang seems to work for clang-tidy too (tested locally).
Amends 03bd9491491881529ad28cd6d672edfdda9a0065.
Change-Id: Ibdf982a728f2c6150f2911173dc3c9246f3662b8
Reviewed-by: Jøger Hansegård <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
(cherry picked from commit 6f0f39673f5ae9debd9ab59be60c32f00f40c41a)
Reviewed-by: Qt Cherry-pick Bot <[email protected]>
(cherry picked from commit 55f8c072a301c55eda37c2b39dbcb0d579b3f414)
-rw-r--r-- | tests/auto/corelib/tools/quniquehandle/tst_quniquehandle.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/quniquehandle/tst_quniquehandle.cpp b/tests/auto/corelib/tools/quniquehandle/tst_quniquehandle.cpp index 448ea0964fb..1ad41b5d462 100644 --- a/tests/auto/corelib/tools/quniquehandle/tst_quniquehandle.cpp +++ b/tests/auto/corelib/tools/quniquehandle/tst_quniquehandle.cpp @@ -149,7 +149,12 @@ private slots: void moveAssignment_maintainsOwnershipWhenSelfAssigning() const { Handle resource{ GlobalResource::open() }; - resource = std::move(resource); // NOLINT(clang-diagnostic-self-move) + +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wself-move") +QT_WARNING_DISABLE_CLANG("-Wself-move") + resource = std::move(resource); +QT_WARNING_POP QVERIFY(resource.isValid()); QVERIFY(GlobalResource::isOpen(resource.get())); |