From a2914cf7b1a1582243edd168b3948e95a5e07e61 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Fri, 22 Nov 2024 13:44:45 +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 5b428b50f..1a5031876 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -198,6 +198,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 @@ -308,13 +314,9 @@ add_subdirectory(chatbar) if(UNIX) qt_target_qml_sources(neochat QML_FILES qml/ShareAction.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)