diff options
| -rw-r--r-- | src/corelib/Qt6CoreDeploySupport.cmake | 2 | ||||
| -rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 74 | ||||
| -rw-r--r-- | src/network/socket/qabstractsocketengine.cpp | 2 | ||||
| -rw-r--r-- | src/network/socket/qabstractsocketenginereceiver_p.h | 4 |
4 files changed, 54 insertions, 28 deletions
diff --git a/src/corelib/Qt6CoreDeploySupport.cmake b/src/corelib/Qt6CoreDeploySupport.cmake index 632d7a0f6ba..175a82ff095 100644 --- a/src/corelib/Qt6CoreDeploySupport.cmake +++ b/src/corelib/Qt6CoreDeploySupport.cmake @@ -771,6 +771,8 @@ function(qt6_deploy_runtime_dependencies) # Specify path to target Qt's qtpaths .exe or .bat file, so windeployqt deploys the correct # libraries when cross-compiling from x86_64 to arm64 windows. + # We need to point to a qtpaths that will give info about the target platform, but which + # can run on the host. if(__QT_DEPLOY_TARGET_QT_PATHS_PATH AND EXISTS "${__QT_DEPLOY_TARGET_QT_PATHS_PATH}") list(APPEND tool_options --qtpaths "${__QT_DEPLOY_TARGET_QT_PATHS_PATH}") else() diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 507beca4380..6f3a9fd05f5 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -3212,41 +3212,63 @@ function(_qt_internal_setup_deploy_support) endif() endif() - # Generate path to the target (not host) qtpaths file. Needed for windeployqt when - # cross-compiling from an x86_64 host to an arm64 target, so it knows which architecture - # libraries should be deployed. - if(CMAKE_HOST_WIN32) - if(CMAKE_CROSSCOMPILING) - set(qt_paths_ext ".bat") + # Generate path to the qtpaths executable or script, that will give info about the target + # platform, but which can run on the host. Needed for windeployqt when cross-compiling from + # an x86_64 host to an arm64 target, so it knows which architecture libraries should be + # deployed. + set(base_name "qtpaths") + set(base_names "") + + get_property(qt_major_version TARGET "${target}" PROPERTY INTERFACE_QT_MAJOR_VERSION) + if(qt_major_version) + list(APPEND base_names "${base_name}${qt_major_version}") + endif() + list(APPEND base_names "${base_name}") + + set(qtpaths_name_candidates "") + foreach(base_name IN LISTS base_names) + if(CMAKE_HOST_WIN32) + if(CMAKE_CROSSCOMPILING) + set(qt_paths_ext ".bat") + # Depending on whether QT_FORCE_BUILD_TOOLS was set when building Qt, a 'host-' + # prefix is prepended to the created qtpaths wrapper, not to collide with the + # cross-compiled excutable. + # Rather than exporting that QT_FORCE_BUILD_TOOLS to be available during user + # project configuration, search for both, with the bare one searched first. + list(APPEND qtpaths_name_candidates "${base_name}${qt_paths_ext}") + list(APPEND qtpaths_name_candidates "host-${base_name}${qt_paths_ext}") + else() + set(qt_paths_ext ".exe") + list(APPEND qtpaths_name_candidates "${base_name}${qt_paths_ext}") + endif() else() - set(qt_paths_ext ".exe") + list(APPEND qtpaths_name_candidates "${base_name}") endif() - else() - set(qt_paths_ext "") - endif() + endforeach() + set(qtpaths_prefix "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_BINS}") + set(candidate_paths "") + foreach(qtpaths_name_candidate IN LISTS qtpaths_name_candidates) + set(candidate_path "${qtpaths_prefix}/${qtpaths_name_candidate}") + list(APPEND candidate_paths "${candidate_path}") + endforeach() set(target_qtpaths_path "") - set(qtpaths_prefix "${QT6_INSTALL_PREFIX}/${QT6_INSTALL_BINS}") - get_property(qt_major_version TARGET "${target}" PROPERTY INTERFACE_QT_MAJOR_VERSION) - if(qt_major_version) - set(target_qtpaths_with_major_version_path - "${qtpaths_prefix}/qtpaths${qt_major_version}${qt_paths_ext}") - if(EXISTS "${target_qtpaths_with_major_version_path}") - set(target_qtpaths_path "${target_qtpaths_with_major_version_path}") + foreach(candidate_path IN LISTS candidate_paths) + if(EXISTS "${candidate_path}") + set(target_qtpaths_path "${candidate_path}") + break() endif() - endif() + endforeach() - if(NOT target_qtpaths_path) - set(target_qtpaths_path_without_version "${qtpaths_prefix}/qtpaths${qt_paths_ext}") - if(EXISTS "${target_qtpaths_path_without_version}") - set(target_qtpaths_path "${target_qtpaths_path_without_version}") - endif() - endif() + list(JOIN candidate_paths "\n " candidate_paths_joined) - if(NOT target_qtpaths_path) - message(DEBUG "No qtpaths executable found for deployment purposes.") + if(NOT QT_NO_QTPATHS_DEPLOYMENT_WARNING AND NOT target_qtpaths_path) + message(WARNING + "No qtpaths executable found for deployment purposes. Candidates searched: \n " + "${candidate_paths_joined}" + ) endif() file(GENERATE OUTPUT "${QT_DEPLOY_SUPPORT}" CONTENT diff --git a/src/network/socket/qabstractsocketengine.cpp b/src/network/socket/qabstractsocketengine.cpp index 94c4e553123..3e7e8199507 100644 --- a/src/network/socket/qabstractsocketengine.cpp +++ b/src/network/socket/qabstractsocketengine.cpp @@ -11,6 +11,8 @@ QT_BEGIN_NAMESPACE +QAbstractSocketEngineReceiver::~QAbstractSocketEngineReceiver() = default; + class QSocketEngineHandlerList : public QList<QSocketEngineHandler*> { public: diff --git a/src/network/socket/qabstractsocketenginereceiver_p.h b/src/network/socket/qabstractsocketenginereceiver_p.h index d66f0ab01d1..35e88e2df4c 100644 --- a/src/network/socket/qabstractsocketenginereceiver_p.h +++ b/src/network/socket/qabstractsocketenginereceiver_p.h @@ -26,9 +26,9 @@ QT_BEGIN_NAMESPACE class QAuthenticator; class QNetworkProxy; -class QAbstractSocketEngineReceiver { +class Q_NETWORK_EXPORT QAbstractSocketEngineReceiver { public: - virtual ~QAbstractSocketEngineReceiver(){} + virtual ~QAbstractSocketEngineReceiver() = 0; // impl. in qabstractsocketengine.cpp virtual void readNotification()= 0; virtual void writeNotification()= 0; virtual void closeNotification()= 0; |
