From 5d3723bbf47cba1d0c48b1fe0a1fd553e3e7aa58 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Fri, 26 Jun 2026 21:37:22 -0400 Subject: [PATCH] rbutil: Use QT_NO_USE_NODISCARD_FILE_OPEN everywhere Not sure why we needed to specify this in three different places, but eh Change-Id: If8d7304971f176bcfca839f5d6da626908621be4 --- utils/CMakeLists.txt | 3 +-- utils/rbutilqt/CMakeLists.txt | 1 + utils/themeeditor/CMakeLists.txt | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index c956532ce5..2d0541f89f 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -49,7 +49,7 @@ find_package(QT NAMES Qt6 REQUIRED) find_package(Qt6 REQUIRED COMPONENTS Core Core5Compat Widgets Svg Network LinguistTools SvgWidgets OPTIONAL_COMPONENTS Multimedia Test) - ## note Core5Compat is only used for QuaZip + ## note Core5Compat is only needed for QuaZip get_target_property(_moc_executable Qt${QT_VERSION_MAJOR}::moc IMPORTED_LOCATION) get_filename_component(QT_BINDIR "${_moc_executable}" DIRECTORY) message("-- Found Qt${QT_VERSION_MAJOR}: ${Qt${QT_VERSION_MAJOR}_DIR}") @@ -59,7 +59,6 @@ else() message("-- QT::Multimedia not found, TTS preview not available") endif() -# Added in QT 6.10 add_compile_options(-DQT_NO_USE_NODISCARD_FILE_OPEN) # If we're on Linux, try to find the used libs in the system. diff --git a/utils/rbutilqt/CMakeLists.txt b/utils/rbutilqt/CMakeLists.txt index 0c12ec0a91..fea6c30010 100644 --- a/utils/rbutilqt/CMakeLists.txt +++ b/utils/rbutilqt/CMakeLists.txt @@ -103,6 +103,7 @@ add_executable(RockboxUtility WIN32 MACOSX_BUNDLE ) target_compile_features(RockboxUtility PRIVATE cxx_std_17 c_std_11) +target_compile_options(RockboxUtility PRIVATE -DQT_NO_USE_NODISCARD_FILE_OPEN) if(WIN32) target_sources(RockboxUtility PRIVATE diff --git a/utils/themeeditor/CMakeLists.txt b/utils/themeeditor/CMakeLists.txt index a6d6aa0fb1..dae09d6d0c 100644 --- a/utils/themeeditor/CMakeLists.txt +++ b/utils/themeeditor/CMakeLists.txt @@ -111,6 +111,7 @@ set_target_properties(RockboxThemeEditor PROPERTIES AUTORCC ON) set_target_properties(RockboxThemeEditor PROPERTIES AUTOUIC ON) target_compile_features(RockboxThemeEditor PRIVATE cxx_std_17 c_std_11) +target_compile_options(RockboxThemeEditor PRIVATE -DQT_NO_USE_NODISCARD_FILE_OPEN) target_link_libraries(RockboxThemeEditor Qt${QT_VERSION_MAJOR}::Network Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Core