summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2022-04-07 11:38:18 +0200
committerMichal Klocek <michal.klocek@qt.io>2022-04-30 20:08:54 +0200
commitef86f293d2d3778301536da1548884e9e2ca2093 (patch)
tree2db8cca189490e94ef4de9e9b9c813be2b7bd50e /src/core
parentba74eaba11b2df9d6c2b23f7595e7bb1a03e911e (diff)
Fix missing dictionaries in case of user bundles
If user creates bundle dictionaries should be copied to Resources in the bundle. Note our spellchecker unit test only covers non bundle case. Fixes: QTBUG-100799 Pick-to: 6.3 Change-Id: I5d4c0f7c1c21d35601a6e01dec1ecdb43202469f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/api/Qt6WebEngineCoreMacros.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/api/Qt6WebEngineCoreMacros.cmake b/src/core/api/Qt6WebEngineCoreMacros.cmake
index af71063f2..efb34882b 100644
--- a/src/core/api/Qt6WebEngineCoreMacros.cmake
+++ b/src/core/api/Qt6WebEngineCoreMacros.cmake
@@ -14,11 +14,18 @@ function(qt6_add_webengine_dictionary)
endif()
get_property(isMultiConfig GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
+ get_target_property(isBundle ${ARGS_TARGET} MACOSX_BUNDLE)
if(isMultiConfig)
set(spellcheckerDir ${ARGS_OUTPUT_DIRECTORY}/dict/qtwebengine_dictionaries)
set(copyCommand COMMAND ${CMAKE_COMMAND} -E copy_directory ${ARGS_OUTPUT_DIRECTORY}/dict
${ARGS_OUTPUT_DIRECTORY}/$<CONFIG>
)
+ elseif(isBundle)
+ get_target_property(outputName ${ARGS_TARGET} OUTPUT_NAME)
+ if(NOT outputName)
+ set(outputName ${ARGS_TARGET})
+ endif()
+ set(spellcheckerDir "${ARGS_OUTPUT_DIRECTORY}/${outputName}.app/Contents/Resources/qtwebengine_dictionaries")
else()
set(spellcheckerDir ${ARGS_OUTPUT_DIRECTORY}/qtwebengine_dictionaries)
endif()