From 54496f9fe0ac98f63253f08766ee7b6bc60eeefb Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Mon, 9 May 2022 11:39:15 +0800 Subject: [PATCH] lower warning level for msvc Bug reports from users indicate that /W4 causes many warnings for MSVC 2019 and the warnings come from private Qt headers so no way to fix them in FramelessHelper. Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- src/core/CMakeLists.txt | 2 +- src/quick/CMakeLists.txt | 2 +- src/widgets/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index ef5b3bd..884030a 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -101,7 +101,7 @@ if(MSVC) _WIN32_IE=${_WIN32_WINNT_WIN10} NTDDI_VERSION=${NTDDI_WIN10_CO} ) target_compile_options(${SUB_PROJ_NAME} PRIVATE - /utf-8 /W4 /WX + /utf-8 /W3 /WX ) else() target_compile_options(${SUB_PROJ_NAME} PRIVATE diff --git a/src/quick/CMakeLists.txt b/src/quick/CMakeLists.txt index 569255e..1f03fbd 100644 --- a/src/quick/CMakeLists.txt +++ b/src/quick/CMakeLists.txt @@ -94,7 +94,7 @@ if(MSVC) _WIN32_IE=${_WIN32_WINNT_WIN10} NTDDI_VERSION=${NTDDI_WIN10_CO} ) target_compile_options(${SUB_PROJ_NAME} PRIVATE - /utf-8 /W3 /WX # Can't use /W4 here due to the Q_D macro causes warnings. + /utf-8 /W3 /WX ) else() target_compile_options(${SUB_PROJ_NAME} PRIVATE diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index e78a08a..49225c7 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -80,7 +80,7 @@ target_compile_definitions(${SUB_PROJ_NAME} PRIVATE if(MSVC) target_compile_options(${SUB_PROJ_NAME} PRIVATE - /utf-8 /W4 /WX + /utf-8 /W3 /WX ) else() target_compile_options(${SUB_PROJ_NAME} PRIVATE