path: root/tests
diff options
authorGiuseppe D'Angelo <>2021-02-25 12:49:21 +0100
committerGiuseppe D'Angelo <>2021-03-04 06:49:02 +0100
commitfe9d7bf759d116f99131d14ac8b1fb44b2bc62fd (patch)
treea5ca60d3af44dcf5442a91abf9b007ac18c7203d /tests
parent712117f8b89cdb2578d6aaa424141da216799fe9 (diff)
QScopedPointer: deprecate swap
Follow up of 612a01be6513894ab1ec5a36b699a2142ba7f35c (deprecating QSP::take()): for the same reasons, swap() functions do not belong to QScopedPointer, or they would allow the pointer to escape: QScopedPointer a; { QScopedPointer b = ~~~; qSwap(a, b); } // b's pointer escaped its scope Deprecate them as well. [ChangeLog][QtCore][QScopedPointer] QScopedPointer swapping functions have been deprecated, as they would allow the managed pointer to escape the scope. If you need those semantics, use std::unique_ptr instead. Change-Id: I2b0938b62f2ef5a3561f61f595a3fb4c505a8f08 Reviewed-by: Allan Sandfeld Jensen <> Reviewed-by: Volker Hilsheimer <>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions