From 51727dd345ab6c4a8c8e4992c5fe4cf48c8f240d Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 22 Nov 2024 13:45:04 +0000 Subject: [PATCH] Fix ShareActionStub for Windows and Android Apparently, we are supposed to be setting source file properties for our QML files *before* the QML module is created. Doing it after seemed to work until Qt 6.8, where it finally broke. Notably, this makes the Android version work again but might also affect Windows. (cherry picked from commit a39194b2ad418e3a1af2a68b1c5dea4abeabca7b) Co-authored-by: Joshua Goins --- src/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 58ac2a468..9a58ea49b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -200,6 +200,12 @@ set_source_files_properties(qml/OsmLocationPlugin.qml PROPERTIES QT_QML_SINGLETON_TYPE TRUE ) +if(ANDROID OR WIN32) + set_source_files_properties(qml/ShareActionStub.qml PROPERTIES + QT_QML_SOURCE_TYPENAME ShareAction + ) +endif() + ecm_add_qml_module(neochat URI org.kde.neochat GENERATE_PLUGIN_SOURCE OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/org/kde/neochat QML_FILES @@ -311,13 +317,9 @@ if(NOT ANDROID AND NOT WIN32) qml/EditMenu.qml ) else() - set_source_files_properties(qml/ShareActionStub.qml PROPERTIES - QT_RESOURCE_ALIAS qml/ShareAction.qml - ) qt_target_qml_sources(neochat QML_FILES qml/ShareActionStub.qml) endif() - configure_file(config-neochat.h.in ${CMAKE_CURRENT_BINARY_DIR}/config-neochat.h) if(WIN32)