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
This commit is contained in:
Solomon Peachy 2026-06-26 21:37:22 -04:00
parent 3c41d6a1c1
commit 5d3723bbf4
3 changed files with 3 additions and 2 deletions

View file

@ -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.

View file

@ -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

View file

@ -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