diff --git a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewResources.qrc b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewResources.qrc index 4407b4f20..28d766803 100644 --- a/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewResources.qrc +++ b/qt6-after/qt6-migrated-legatus/TetraIF/LogView/LogViewResources.qrc @@ -15,4 +15,26 @@ image/ShowSend.png image/Wls.png + + ../../Z/src/nglwidgets/icons/16x16/configure.png + ../../Z/src/nglwidgets/icons/16x16/dialog-ok-apply.png + ../../Z/src/nglwidgets/icons/16x16/document-edit.png + ../../Z/src/nglwidgets/icons/16x16/document-import.png + ../../Z/src/nglwidgets/icons/16x16/document-new.png + ../../Z/src/nglwidgets/icons/16x16/document-open-data.png + ../../Z/src/nglwidgets/icons/16x16/document-save.png + ../../Z/src/nglwidgets/icons/16x16/edit-copy.png + ../../Z/src/nglwidgets/icons/16x16/edit-delete.png + ../../Z/src/nglwidgets/icons/16x16/edit-paste.png + ../../Z/src/nglwidgets/icons/16x16/edit-redo.png + ../../Z/src/nglwidgets/icons/16x16/go-down.png + ../../Z/src/nglwidgets/icons/16x16/go-up.png + ../../Z/src/nglwidgets/icons/16x16/list-add.png + ../../Z/src/nglwidgets/icons/16x16/list-remove.png + ../../Z/src/nglwidgets/icons/16x16/mail-send.png + ../../Z/src/nglwidgets/icons/16x16/media-play-normal.png + ../../Z/src/nglwidgets/icons/16x16/media-playback-start.png + ../../Z/src/nglwidgets/icons/16x16/media-playback-stop.png + ../../Z/src/nglwidgets/icons/16x16/rde_16x16.png + diff --git a/qt6-after/qt6-migrated-legatus/Z/src/nglwidgets/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Z/src/nglwidgets/CMakeLists.txt index f048bca8b..6fe823779 100755 --- a/qt6-after/qt6-migrated-legatus/Z/src/nglwidgets/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Z/src/nglwidgets/CMakeLists.txt @@ -83,11 +83,13 @@ NGL_WRAP_UI(nglwidgets_SRCS ) # Collect big resource QRCs -set(oxygen_SRCS nglresources.qrc) +set(oxygen_SRCS) if(TARGET Qt6::Core) - # Use Qt6's CMake helper to generate resource sources so resources are available at runtime - qt_add_resources(RME_LIGHT_RCC rme_light_style.qrc) - list(APPEND oxygen_SRCS ${RME_LIGHT_RCC}) + # Use Qt6's CMake helper to generate resource sources so resources are available at runtime. + # Both qrcs MUST go through qt_add_resources: a raw .qrc left in the source list is not + # compiled (CMAKE_AUTORCC is off), so its resources would be missing at runtime + # (e.g. :icons/16x16/* toolbar/window icons used by LogView). + qt_add_resources(oxygen_SRCS nglresources.qrc rme_light_style.qrc) else() NGL_ADD_BIG_RESOURCES(oxygen_SRCS nglresources.qrc rme_light_style.qrc) endif() diff --git a/qt6-after/qt6-migrated-legatus/cmake/NGLMacros.cmake b/qt6-after/qt6-migrated-legatus/cmake/NGLMacros.cmake index c987b8143..ff2b65e23 100755 --- a/qt6-after/qt6-migrated-legatus/cmake/NGLMacros.cmake +++ b/qt6-after/qt6-migrated-legatus/cmake/NGLMacros.cmake @@ -38,11 +38,20 @@ if(POLICY CMP0177) cmake_policy(SET CMP0177 OLD) endif() -# Compatibility stubs for Qt5 CMake macros when Qt6 is used. -# These stubs allow configure to succeed; actual resource/ui generation should be addressed during source migration. +# Compatibility stubs for Qt5 CMake macros when Qt6 is used (UI/CPP wrapping +# still no-op; resource handling is implemented below). +# QT5_ADD_RESOURCES maps onto Qt6's qt6_add_resources() in the outfiles-variable +# form: the generated qrc_.cpp sources are appended to the given source +# list, so .qrc files are compiled into the targets that reference them +# (e.g. TetraIF/LogView). Without this the resources are silently dropped and +# ":/..." icons render empty at runtime. if(NOT COMMAND QT5_ADD_RESOURCES) macro(QT5_ADD_RESOURCES _out) - set(${_out} "" PARENT_SCOPE) + if(TARGET Qt6::Core) + qt6_add_resources(${_out} ${ARGN}) + else() + message(WARNING "QT5_ADD_RESOURCES stub: Qt6::Core not found, skipping resources: ${ARGN}") + endif() endmacro() endif() if(NOT COMMAND QT5_ADD_BIG_RESOURCES)