rbutil: Use QT_NO_USE_NODISCARD_FILE_OPEN everywhere

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Fri, 26 Jun 2026 21:39:29 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 5d3723bbf47cba1d0c48b1fe0a1fd553e3e7aa58
Author: Solomon Peachy <[email protected]>
Date:   Fri Jun 26 21:37:22 2026 -0400

    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

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
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs