summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-11-08 10:44:39 -0800
committerThiago Macieira <thiago.macieira@intel.com>2023-12-07 14:55:07 -0800
commitdb991cb4e12bca2e4ae72e03c8f078b27517f4e9 (patch)
tree140e8de01bca57f00258698ffa3931b60b5033a3 /tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
parent9b176281df15c6479510e5c13e12dba24ba31697 (diff)
QBitArray: replace the member operator~ with a hidden friend
Which takes the array to be inverted by value, so we get free move semantics and allowing us to perform the negation in-place. [ChangeLog][Potentially Source-Incompatible Changes] The bitwise AND, OR, XOR, and NOT operator functions on QBitArray are now hidden friends. This may cause source-incompatibility in unusual coding styles (like 'array.operator~()') or with classes that have a casting 'operator QBitArray()'. Change-Id: I85b3fc2dd45c4693be13fffd1795ba1fbaf23769 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp')
-rw-r--r--tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
index b205bb76ee..1431221fd5 100644
--- a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
+++ b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp
@@ -454,6 +454,7 @@ void tst_QBitArray::operator_neg()
input = ~input;
QCOMPARE(input, res);
+ QCOMPARE(~~input, res); // performs two in-place negations
}
void tst_QBitArray::datastream_data()