From d6e8fa64e82e86e845b75ebb8268ba74e1deaf72 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Tue, 27 Aug 2024 11:35:34 +0200 Subject: [PATCH] QStorageInfo: actually make the (in)equality operators noexcept Do not use the getters, as they are not noexcept. Directly access the members of the d_ptr instead. Amends d292648d0bbac50388dae035dc34782accb3807f. Found in 6.8 API review. Change-Id: I69eee9db2274d1e99a4f56e841cfaea223341ced Reviewed-by: Thiago Macieira Reviewed-by: Marc Mutz (cherry picked from commit 495a06a22aef2aa62dd993217e4f4ec099ad4e94) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/io/qstorageinfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qstorageinfo.cpp b/src/corelib/io/qstorageinfo.cpp index 6c4f33a52d4..ab2e22c1ff3 100644 --- a/src/corelib/io/qstorageinfo.cpp +++ b/src/corelib/io/qstorageinfo.cpp @@ -408,7 +408,7 @@ bool comparesEqual(const QStorageInfo &lhs, const QStorageInfo &rhs) noexcept { if (lhs.d == rhs.d) return true; - return lhs.device() == rhs.device() && lhs.rootPath() == rhs.rootPath(); + return lhs.d->device == rhs.d->device && lhs.d->rootPath == rhs.d->rootPath; } #ifndef QT_NO_DEBUG_STREAM