From 4776260a451b7a5dcb67cca20e87ad317ff478e1 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Fri, 23 Dec 2022 13:38:22 +0800 Subject: [PATCH] windeployqt: a little readability improvement Break the long sentence to improve the logic readability a bit. Change-Id: I3d0227e616a3c47e14ae7b5cfe4b47a39d778e5e Reviewed-by: Oliver Wolff (cherry picked from commit 21baa7623025308a39577e7582c023b1d3ae11d6) Reviewed-by: Qt Cherry-pick Bot --- src/tools/windeployqt/utils.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/windeployqt/utils.cpp b/src/tools/windeployqt/utils.cpp index 7f4763a850f..432d13d5da0 100644 --- a/src/tools/windeployqt/utils.cpp +++ b/src/tools/windeployqt/utils.cpp @@ -737,7 +737,11 @@ inline void determineDebugAndDependentLibs(const ImageNtHeader *nth, const void } else { // When an MSVC debug entry is present, check whether the debug runtime // is actually used to detect -release / -force-debug-info builds. - *isDebugIn = hasDebugEntry && checkMsvcDebugRuntime(dependentLibraries) != MsvcReleaseRuntime; + const MsvcDebugRuntimeResult msvcrt = checkMsvcDebugRuntime(dependentLibraries); + if (msvcrt == NoMsvcRuntime) + *isDebugIn = hasDebugEntry; + else + *isDebugIn = hasDebugEntry && msvcrt == MsvcDebugRuntime; } } }