diff options
author | Tim Jenssen <tim.jenssen@qt.io> | 2023-08-15 20:55:38 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@qt.io> | 2023-08-15 18:57:48 +0000 |
commit | 91a931dd218fe18ab77bd2b17127c3a52d5f4db1 (patch) | |
tree | 8c40f72aaae3dc4c032a6f3403c5cae0196e89d6 /src/plugins/qmlpreview | |
parent | 0f7462ad24fbeac755b3cc893138f9cbf5be1f99 (diff) |
QmlDesigner: build it only if Qt is GREATER_EQUAL 6.4.3
Change-Id: Iccd05a7d4f4ace47fd9398bdc78584e3919ec595
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/qmlpreview')
-rw-r--r-- | src/plugins/qmlpreview/CMakeLists.txt | 18 | ||||
-rw-r--r-- | src/plugins/qmlpreview/qmldebugtranslationclient.cpp | 7 |
2 files changed, 1 insertions, 24 deletions
diff --git a/src/plugins/qmlpreview/CMakeLists.txt b/src/plugins/qmlpreview/CMakeLists.txt index 40114a7e47c..4c1889143aa 100644 --- a/src/plugins/qmlpreview/CMakeLists.txt +++ b/src/plugins/qmlpreview/CMakeLists.txt @@ -1,7 +1,7 @@ add_qtc_plugin(QmlPreview CONDITION TARGET QmlProjectManager PUBLIC_DEPENDS QmlDebug - DEPENDS QmlJS + DEPENDS QmlJS Qt::QmlPrivate PLUGIN_DEPENDS Core ProjectExplorer QmlJSTools QtSupport ResourceEditor QmlProjectManager @@ -22,19 +22,3 @@ extend_qtc_plugin(QmlPreview tests/qmlpreviewclient_test.cpp tests/qmlpreviewclient_test.h tests/qmlpreviewplugin_test.cpp tests/qmlpreviewplugin_test.h ) - -if(TARGET Qt6::QmlPrivate) - get_target_property(qmldebugprivate_include_directories - Qt6::QmlPrivate - INTERFACE_INCLUDE_DIRECTORIES - ) - find_file(have_qml_debug_translation_protocol - NAMES private/qqmldebugtranslationprotocol_p.h - PATHS ${qmldebugprivate_include_directories} - ) - extend_qtc_plugin(QmlPreview - CONDITION have_qml_debug_translation_protocol - PUBLIC_DEPENDS Qt::QmlPrivate - PUBLIC_DEFINES "FOUND_QML_DEBUG_TRANSLATION_PROTOCOL" - ) -endif() diff --git a/src/plugins/qmlpreview/qmldebugtranslationclient.cpp b/src/plugins/qmlpreview/qmldebugtranslationclient.cpp index d0cfc2d96ed..fc3018018eb 100644 --- a/src/plugins/qmlpreview/qmldebugtranslationclient.cpp +++ b/src/plugins/qmlpreview/qmldebugtranslationclient.cpp @@ -6,9 +6,7 @@ #include <QUrl> -#ifdef FOUND_QML_DEBUG_TRANSLATION_PROTOCOL #include <private/qqmldebugtranslationprotocol_p.h> -#endif namespace QmlPreview { @@ -20,14 +18,9 @@ QmlDebugTranslationClient::QmlDebugTranslationClient(QmlDebug::QmlDebugConnectio void QmlDebugTranslationClient::changeLanguage(const QUrl &url, const QString &localeIsoCode) { QmlDebug::QPacket packet(dataStreamVersion()); -#ifdef FOUND_QML_DEBUG_TRANSLATION_PROTOCOL - sendMessage(QQmlDebugTranslation::createChangeLanguageRequest(packet, url, localeIsoCode)); -#else const int request_change_language = 1; packet << request_change_language << url << localeIsoCode; sendMessage(packet.data()); -#endif - } void QmlDebugTranslationClient::stateChanged(QmlDebug::QmlDebugClient::State state) |