From c442d80b15252699ce1e84ca71b88f93143a0140 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 16 Mar 2023 16:55:06 +0100 Subject: Update qbs submodule to HEAD of 2.0 branch Change-Id: I52ec000ac9880d3fb849a71e814186e88f99724b Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: Christian Stenger --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/shared/qbs b/src/shared/qbs index 1a6cfb0af22..33d129352a2 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 1a6cfb0af220926f8b00219c5dd7feb36bcaa0d2 +Subproject commit 33d129352a2674fdc8fc8c26b826a78f10e5f7a6 -- cgit v1.2.3 From 4d82246ab5242b646fbd5f6f0f7f12637ec1d9db Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Fri, 17 Mar 2023 15:35:44 +0100 Subject: auto-setup: Add support for conan 2.0 Fixes: QTCREATORBUG-28865 Change-Id: Ifb801a458b4b18de218dee6604f0555cab13ec75 Reviewed-by: Alessandro Portale --- .../3rdparty/package-manager/auto-setup.cmake | 49 +++-- .../3rdparty/package-manager/conan_support.cmake | 211 +++++++++++++++++++++ 2 files changed, 249 insertions(+), 11 deletions(-) create mode 100644 src/share/3rdparty/package-manager/conan_support.cmake (limited to 'src') diff --git a/src/share/3rdparty/package-manager/auto-setup.cmake b/src/share/3rdparty/package-manager/auto-setup.cmake index ff57ac8d0eb..4689cc98049 100644 --- a/src/share/3rdparty/package-manager/auto-setup.cmake +++ b/src/share/3rdparty/package-manager/auto-setup.cmake @@ -46,6 +46,8 @@ macro(qtc_auto_setup_conan) message(FATAL_ERROR "conan --version failed='${result_code}: ${conan_version_output}") endif() + string(REGEX REPLACE ".*Conan version ([0-9].[0-9]).*" "\\1" conan_version "${conan_version_output}") + set(conanfile_timestamp_file "${CMAKE_BINARY_DIR}/conan-dependencies/conanfile.timestamp") file(TIMESTAMP "${conanfile_txt}" conanfile_timestamp) @@ -68,6 +70,9 @@ macro(qtc_auto_setup_conan) if (do_conan_installation) message(STATUS "Qt Creator: conan package manager auto-setup. " "Skip this step by setting QT_CREATOR_SKIP_CONAN_SETUP to ON.") + + file(COPY "${conanfile_txt}" DESTINATION "${CMAKE_BINARY_DIR}/conan-dependencies/") + file(WRITE "${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake" " set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\") set(CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\") @@ -77,17 +82,39 @@ macro(qtc_auto_setup_conan) "include(\"${CMAKE_TOOLCHAIN_FILE}\")\n") endif() - file(WRITE "${CMAKE_BINARY_DIR}/conan-dependencies/CMakeLists.txt" " - cmake_minimum_required(VERSION 3.15) - project(conan-setup) - include(\"${CMAKE_CURRENT_LIST_DIR}/conan.cmake\") - conan_cmake_run( - CONANFILE \"${conanfile_txt}\" - INSTALL_FOLDER \"${CMAKE_BINARY_DIR}/conan-dependencies\" - GENERATORS cmake_paths json - BUILD ${QT_CREATOR_CONAN_BUILD_POLICY} - ENV CONAN_CMAKE_TOOLCHAIN_FILE=\"${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake\" - )") + file(WRITE "${CMAKE_BINARY_DIR}/conan-dependencies/CMakeLists.txt" " + cmake_minimum_required(VERSION 3.15) + + unset(CMAKE_PROJECT_INCLUDE_BEFORE CACHE) + project(conan-setup) + + if (${conan_version} VERSION_GREATER_EQUAL 2.0) + include(\"${CMAKE_CURRENT_LIST_DIR}/conan_support.cmake\") + conan_profile_detect_default() + detect_host_profile(\"${CMAKE_BINARY_DIR}/conan-dependencies/conan_host_profile\") + + conan_install( + -pr \"${CMAKE_BINARY_DIR}/conan-dependencies/conan_host_profile\" + --build=${QT_CREATOR_CONAN_BUILD_POLICY} + -s build_type=${CMAKE_BUILD_TYPE} + -g CMakeDeps) + if (CONAN_INSTALL_SUCCESS) + file(WRITE \"${CMAKE_BINARY_DIR}/conan-dependencies/conan_paths.cmake\" \" + list(PREPEND CMAKE_PREFIX_PATH \\\"\${CONAN_GENERATORS_FOLDER}\\\") + list(PREPEND CMAKE_MODULE_PATH \\\"\${CONAN_GENERATORS_FOLDER}\\\") + \") + endif() + else() + include(\"${CMAKE_CURRENT_LIST_DIR}/conan.cmake\") + conan_cmake_run( + CONANFILE \"${conanfile_txt}\" + INSTALL_FOLDER \"${CMAKE_BINARY_DIR}/conan-dependencies\" + GENERATORS cmake_paths cmake_find_package json + BUILD ${QT_CREATOR_CONAN_BUILD_POLICY} + ENV CONAN_CMAKE_TOOLCHAIN_FILE=\"${CMAKE_BINARY_DIR}/conan-dependencies/toolchain.cmake\" + ) + endif() + ") execute_process(COMMAND ${CMAKE_COMMAND} -S "${CMAKE_BINARY_DIR}/conan-dependencies/" diff --git a/src/share/3rdparty/package-manager/conan_support.cmake b/src/share/3rdparty/package-manager/conan_support.cmake new file mode 100644 index 00000000000..f1dbccf2aaf --- /dev/null +++ b/src/share/3rdparty/package-manager/conan_support.cmake @@ -0,0 +1,211 @@ +# https://github.com/conan-io/cmake-conan/blob/develop2/conan_support.cmake +# commit: 3e088cd3e1d9d69e04b5250d565c1b8b55b0400b +# +# The MIT License (MIT) +# +# Copyright (c) 2019 JFrog +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +function(detect_os OS) + # it could be cross compilation + message(STATUS "Conan-cmake: cmake_system_name=${CMAKE_SYSTEM_NAME}") + if(CMAKE_SYSTEM_NAME AND NOT CMAKE_SYSTEM_NAME STREQUAL "Generic") + if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") + set(${OS} Macos PARENT_SCOPE) + elseif(${CMAKE_SYSTEM_NAME} STREQUAL "QNX") + set(${OS} Neutrino PARENT_SCOPE) + else() + set(${OS} ${CMAKE_SYSTEM_NAME} PARENT_SCOPE) + endif() + endif() +endfunction() + + +function(detect_cxx_standard CXX_STANDARD) + set(${CXX_STANDARD} ${CMAKE_CXX_STANDARD} PARENT_SCOPE) + if (CMAKE_CXX_EXTENSIONS) + set(${CXX_STANDARD} "gnu${CMAKE_CXX_STANDARD}" PARENT_SCOPE) + endif() +endfunction() + + +function(detect_compiler COMPILER COMPILER_VERSION) + if(DEFINED CMAKE_CXX_COMPILER_ID) + set(_COMPILER ${CMAKE_CXX_COMPILER_ID}) + set(_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) + else() + if(NOT DEFINED CMAKE_C_COMPILER_ID) + message(FATAL_ERROR "C or C++ compiler not defined") + endif() + set(_COMPILER ${CMAKE_C_COMPILER_ID}) + set(_COMPILER_VERSION ${CMAKE_C_COMPILER_VERSION}) + endif() + + message(STATUS "Conan-cmake: CMake compiler=${_COMPILER}") + message(STATUS "Conan-cmake: CMake cmpiler version=${_COMPILER_VERSION}") + + if(_COMPILER MATCHES MSVC) + set(_COMPILER "msvc") + string(SUBSTRING ${MSVC_VERSION} 0 3 _COMPILER_VERSION) + elseif(_COMPILER MATCHES AppleClang) + set(_COMPILER "apple-clang") + string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + list(GET VERSION_LIST 0 _COMPILER_VERSION) + elseif(_COMPILER MATCHES Clang) + set(_COMPILER "clang") + string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + list(GET VERSION_LIST 0 _COMPILER_VERSION) + elseif(_COMPILER MATCHES GNU) + set(_COMPILER "gcc") + string(REPLACE "." ";" VERSION_LIST ${CMAKE_CXX_COMPILER_VERSION}) + list(GET VERSION_LIST 0 _COMPILER_VERSION) + endif() + + message(STATUS "Conan-cmake: [settings] compiler=${_COMPILER}") + message(STATUS "Conan-cmake: [settings] compiler.version=${_COMPILER_VERSION}") + + set(${COMPILER} ${_COMPILER} PARENT_SCOPE) + set(${COMPILER_VERSION} ${_COMPILER_VERSION} PARENT_SCOPE) +endfunction() + +function(detect_build_type BUILD_TYPE) + if(NOT CMAKE_CONFIGURATION_TYPES) + # Only set when we know we are in a single-configuration generator + # Note: we may want to fail early if `CMAKE_BUILD_TYPE` is not defined + set(${BUILD_TYPE} ${CMAKE_BUILD_TYPE} PARENT_SCOPE) + endif() +endfunction() + + +function(detect_host_profile output_file) + detect_os(MYOS) + detect_compiler(MYCOMPILER MYCOMPILER_VERSION) + detect_cxx_standard(MYCXX_STANDARD) + detect_build_type(MYBUILD_TYPE) + + set(PROFILE "") + string(APPEND PROFILE "include(default)\n") + string(APPEND PROFILE "[settings]\n") + if(MYOS) + string(APPEND PROFILE os=${MYOS} "\n") + endif() + if(MYCOMPILER) + string(APPEND PROFILE compiler=${MYCOMPILER} "\n") + endif() + if(MYCOMPILER_VERSION) + string(APPEND PROFILE compiler.version=${MYCOMPILER_VERSION} "\n") + endif() + if(MYCXX_STANDARD) + string(APPEND PROFILE compiler.cppstd=${MYCXX_STANDARD} "\n") + endif() + if(MYBUILD_TYPE) + string(APPEND PROFILE "build_type=${MYBUILD_TYPE}\n") + endif() + + if(NOT DEFINED output_file) + set(_FN "${CMAKE_BINARY_DIR}/profile") + else() + set(_FN ${output_file}) + endif() + + string(APPEND PROFILE "[conf]\n") + string(APPEND PROFILE "tools.cmake.cmaketoolchain:generator=${CMAKE_GENERATOR}\n") + + message(STATUS "Conan-cmake: Creating profile ${_FN}") + file(WRITE ${_FN} ${PROFILE}) + message(STATUS "Conan-cmake: Profile: \n${PROFILE}") +endfunction() + + +function(conan_profile_detect_default) + message(STATUS "Conan-cmake: Checking if a default profile exists") + execute_process(COMMAND conan profile path default + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_stdout + ERROR_VARIABLE conan_stderr + ECHO_ERROR_VARIABLE # show the text output regardless + ECHO_OUTPUT_VARIABLE + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + if(NOT ${return_code} EQUAL "0") + message(STATUS "Conan-cmake: The default profile doesn't exist, detecting it.") + execute_process(COMMAND conan profile detect + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_stdout + ERROR_VARIABLE conan_stderr + ECHO_ERROR_VARIABLE # show the text output regardless + ECHO_OUTPUT_VARIABLE + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + endif() +endfunction() + + +function(conan_install) + cmake_parse_arguments(ARGS CONAN_ARGS ${ARGN}) + set(CONAN_OUTPUT_FOLDER ${CMAKE_BINARY_DIR}/conan) + # Invoke "conan install" with the provided arguments + set(CONAN_ARGS ${CONAN_ARGS} -of=${CONAN_OUTPUT_FOLDER}) + message(STATUS "CMake-conan: conan install ${CMAKE_SOURCE_DIR} ${CONAN_ARGS} ${ARGN}") + execute_process(COMMAND conan install ${CMAKE_SOURCE_DIR} ${CONAN_ARGS} ${ARGN} --format=json + RESULT_VARIABLE return_code + OUTPUT_VARIABLE conan_stdout + ERROR_VARIABLE conan_stderr + ECHO_ERROR_VARIABLE # show the text output regardless + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + if(NOT "${return_code}" STREQUAL "0") + message(FATAL_ERROR "Conan install failed='${return_code}'") + else() + # the files are generated in a folder that depends on the layout used, if + # one if specified, but we don't know a priori where this is. + # TODO: this can be made more robust if Conan can provide this in the json output + string(JSON CONAN_GENERATORS_FOLDER GET ${conan_stdout} graph nodes 0 generators_folder) + # message("conan stdout: ${conan_stdout}") + message(STATUS "CMake-conan: CONAN_GENERATORS_FOLDER=${CONAN_GENERATORS_FOLDER}") + set(CONAN_GENERATORS_FOLDER "${CONAN_GENERATORS_FOLDER}" PARENT_SCOPE) + set(CONAN_INSTALL_SUCCESS TRUE CACHE BOOL "Conan install has been invoked and was successful") + endif() +endfunction() + + +function(conan_provide_dependency package_name) + if(NOT CONAN_INSTALL_SUCCESS) + message(STATUS "CMake-conan: first find_package() found. Installing dependencies with Conan") + conan_profile_detect_default() + detect_host_profile(${CMAKE_BINARY_DIR}/conan_host_profile) + if(NOT CMAKE_CONFIGURATION_TYPES) + message(STATUS "CMake-conan: Installing single configuration ${CMAKE_BUILD_TYPE}") + conan_install(-pr ${CMAKE_BINARY_DIR}/conan_host_profile --build=missing -g CMakeDeps) + else() + message(STATUS "CMake-conan: Installing both Debug and Release") + conan_install(-pr ${CMAKE_BINARY_DIR}/conan_host_profile -s build_type=Release --build=missing -g CMakeDeps) + conan_install(-pr ${CMAKE_BINARY_DIR}/conan_host_profile -s build_type=Debug --build=missing -g CMakeDeps) + endif() + if (CONAN_INSTALL_SUCCESS) + set(CONAN_GENERATORS_FOLDER "${CONAN_GENERATORS_FOLDER}" CACHE PATH "Conan generators folder") + endif() + else() + message(STATUS "CMake-conan: find_package(${package_name}) found, 'conan install' aready ran") + endif() + + if (CONAN_GENERATORS_FOLDER) + list(PREPEND CMAKE_PREFIX_PATH "${CONAN_GENERATORS_FOLDER}") + endif() + + find_package(${ARGN} BYPASS_PROVIDER) +endfunction() -- cgit v1.2.3 From 9ddd1e1d362e259aeb291031c27c0021c7f922bd Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Tue, 21 Mar 2023 11:28:54 +0100 Subject: Utils: Improve DeviceShell error handling In case mktemp or mkfifo fails, the device shell script would incorrectly print both success and failure messages. Also cleaning State enum, removing unnecessary values. Fixes possible crash if creation of master process fails. Fixes: QTCREATORBUG-28928 Change-Id: I75fef54dc791b2b0a403bab19dab6813b62643ac Reviewed-by: hjk --- src/libs/utils/deviceshell.cpp | 24 ++++++++++++++---------- src/libs/utils/deviceshell.h | 2 +- src/libs/utils/scripts/deviceshell.sh | 4 ++-- src/plugins/remotelinux/linuxdevice.cpp | 4 +++- 4 files changed, 20 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/libs/utils/deviceshell.cpp b/src/libs/utils/deviceshell.cpp index 283e9789c00..18e816d38b2 100644 --- a/src/libs/utils/deviceshell.cpp +++ b/src/libs/utils/deviceshell.cpp @@ -62,7 +62,6 @@ DeviceShell::~DeviceShell() */ RunResult DeviceShell::runInShell(const CommandLine &cmd, const QByteArray &stdInData) { - QTC_ASSERT(m_shellProcess, return {}); Q_ASSERT(QThread::currentThread() != &m_thread); return run(cmd, stdInData); @@ -75,7 +74,7 @@ QStringList DeviceShell::missingFeatures() const { return m_missingFeatures; } RunResult DeviceShell::run(const CommandLine &cmd, const QByteArray &stdInData) { // If the script failed to install, use QtcProcess directly instead. - bool useProcess = m_shellScriptState == State::NoScript; + bool useProcess = m_shellScriptState == State::Failed; // Transferring large amounts of stdInData is slow via the shell script. // Use QtcProcess directly if the size exceeds 100kb. @@ -197,10 +196,7 @@ bool DeviceShell::start() return false; } - if (!installShellScript()) { - if (m_shellScriptState == State::FailedToStart) - closeShellProcess(); - } else { + if (installShellScript()) { connect(m_shellProcess.get(), &QtcProcess::readyReadStandardOutput, m_shellProcess.get(), @@ -213,6 +209,10 @@ bool DeviceShell::start() qCWarning(deviceShellLog) << "Received unexpected output on stderr:" << stdErr; }); + } else if (m_shellProcess->isRunning()) { + m_shellProcess->kill(); + m_shellProcess.reset(); + return false; } connect(m_shellProcess.get(), &QtcProcess::done, m_shellProcess.get(), [this] { @@ -247,7 +247,7 @@ bool DeviceShell::checkCommand(const QByteArray &command) } QByteArray out = m_shellProcess->readAllRawStandardOutput(); if (out.contains("")) { - m_shellScriptState = State::NoScript; + m_shellScriptState = State::Failed; qCWarning(deviceShellLog) << "Command" << command << "was not found"; m_missingFeatures.append(QString::fromUtf8(command)); return false; @@ -259,7 +259,7 @@ bool DeviceShell::checkCommand(const QByteArray &command) bool DeviceShell::installShellScript() { if (m_forceFailScriptInstallation) { - m_shellScriptState = State::NoScript; + m_shellScriptState = State::Failed; return false; } @@ -290,15 +290,19 @@ bool DeviceShell::installShellScript() } QByteArray out = m_shellProcess->readAllRawStandardError(); - if (out.contains("SCRIPT_INSTALLED")) { + if (out.contains("SCRIPT_INSTALLED") && !out.contains("ERROR_INSTALL_SCRIPT")) { m_shellScriptState = State::Succeeded; return true; } if (out.contains("ERROR_INSTALL_SCRIPT")) { - m_shellScriptState = State::NoScript; + m_shellScriptState = State::Failed; qCWarning(deviceShellLog) << "Failed installing device shell script"; return false; } + if (!out.isEmpty()) { + qCWarning(deviceShellLog) + << "Unexpected output while installing device shell script:" << out; + } } return true; diff --git a/src/libs/utils/deviceshell.h b/src/libs/utils/deviceshell.h index 713f9f09e2e..83af1db365e 100644 --- a/src/libs/utils/deviceshell.h +++ b/src/libs/utils/deviceshell.h @@ -28,7 +28,7 @@ class QTCREATOR_UTILS_EXPORT DeviceShell : public QObject Q_OBJECT public: - enum class State { FailedToStart = -1, Unknown = 0, Succeeded = 1, NoScript = 2 }; + enum class State { Failed = -1, Unknown = 0, Succeeded = 1 }; enum class ParseType { StdOut, diff --git a/src/libs/utils/scripts/deviceshell.sh b/src/libs/utils/scripts/deviceshell.sh index 7281d550171..6ed7014d79a 100644 --- a/src/libs/utils/scripts/deviceshell.sh +++ b/src/libs/utils/scripts/deviceshell.sh @@ -1,7 +1,7 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 -FINAL_OUT=$(mktemp -u) -mkfifo "$FINAL_OUT" +FINAL_OUT=$(mktemp -u) || exit 2 +mkfifo "$FINAL_OUT" || exit 3 finalOutput() { local fileInputBuffer diff --git a/src/plugins/remotelinux/linuxdevice.cpp b/src/plugins/remotelinux/linuxdevice.cpp index 781147a1e2e..5d0d2d6b92e 100644 --- a/src/plugins/remotelinux/linuxdevice.cpp +++ b/src/plugins/remotelinux/linuxdevice.cpp @@ -222,7 +222,9 @@ void SshSharedConnection::emitConnected() void SshSharedConnection::emitError(QProcess::ProcessError error, const QString &errorString) { m_state = QProcess::NotRunning; - ProcessResultData resultData = m_masterProcess->resultData(); + ProcessResultData resultData{-1, QProcess::CrashExit, QProcess::UnknownError, {}}; + if (m_masterProcess) + resultData = m_masterProcess->resultData(); resultData.m_error = error; resultData.m_errorString = errorString; emit disconnected(resultData); -- cgit v1.2.3 From 20af0711d524a8988465e4ce9f716515398243a8 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 21 Mar 2023 12:35:38 +0100 Subject: Tracing: Fix category label appearance after manual reordering The drag item remained visible although the item height was supposedly set to 0. This fix uses the visibility property in order to show/hide the drag item. Fixes: QTCREATORBUG-28930 Change-Id: I2233eed585f94eab5d71e0aa2743b791390c249c Reviewed-by: Ulf Hermann --- src/libs/tracing/qml/CategoryLabel.qml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/libs/tracing/qml/CategoryLabel.qml b/src/libs/tracing/qml/CategoryLabel.qml index 4226195cbba..58704aa175a 100644 --- a/src/libs/tracing/qml/CategoryLabel.qml +++ b/src/libs/tracing/qml/CategoryLabel.qml @@ -174,9 +174,10 @@ Item { id: dragger property int visualIndex: labelContainer.visualIndex width: labelContainer.width - height: 0 + height: labelContainer.height color: Theme.color(Theme.PanelStatusBarBackgroundColor) opacity: 0.5 + visible: Drag.active anchors.left: parent.left // anchor to top so that it reliably snaps back after dragging @@ -184,16 +185,13 @@ Item { Drag.active: dragArea.drag.active Drag.onActiveChanged: { - // We don't want height or text to be changed when reordering occurs, so we don't make - // them properties. + // We don't want text to be changed when reordering occurs, so we don't make + // it a property draggerText.text = txt.text; - if (Drag.active) { - height = labelContainer.height; + if (Drag.active) labelContainer.dragStarted(); - } else { - height = 0; + else labelContainer.dragStopped(); - } } states: [ -- cgit v1.2.3 From e788d0e8daff48c4505e13b6486431c03f9f9d44 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 21 Mar 2023 13:25:46 +0100 Subject: ProjectExplorer: Make sure all changes to device settings are applied The old "editingFinished on macOS" problem hits again. A cursory glance seems to suggest the required call to updateDeviceFromUi() was missing already in the original patch dff0761406c89ece9a562bbac02323a886ed3e34. Change-Id: Id286417962010bfffe98169b55fb42e3480b03f6 Reviewed-by: Marcus Tillmanns --- src/plugins/projectexplorer/devicesupport/devicesettingswidget.cpp | 1 + src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/plugins/projectexplorer/devicesupport/devicesettingswidget.cpp b/src/plugins/projectexplorer/devicesupport/devicesettingswidget.cpp index 27ad8252ab0..39af4713455 100644 --- a/src/plugins/projectexplorer/devicesupport/devicesettingswidget.cpp +++ b/src/plugins/projectexplorer/devicesupport/devicesettingswidget.cpp @@ -251,6 +251,7 @@ void DeviceSettingsWidget::updateDeviceFromUi() void DeviceSettingsWidget::saveSettings() { + updateDeviceFromUi(); ICore::settings()->setValueWithDefault(LastDeviceIndexKey, currentIndex(), 0); DeviceManager::replaceInstance(); } diff --git a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp index 23534a902fc..50c553437f6 100644 --- a/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp +++ b/src/plugins/remotelinux/genericlinuxdeviceconfigurationwidget.cpp @@ -223,6 +223,7 @@ void GenericLinuxDeviceConfigurationWidget::updateDeviceFromUi() keyFileEditingFinished(); handleFreePortsChanged(); gdbServerEditingFinished(); + qmlRuntimeEditingFinished(); } void GenericLinuxDeviceConfigurationWidget::updatePortsWarningLabel() -- cgit v1.2.3 From 90f2d3376746d25387aa24270929c865d3236fc7 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 21 Mar 2023 10:24:55 +0100 Subject: Update qbs submodule to HEAD of 2.0 branch Change-Id: I3e86c68b7a4b958c5a5d078400b48a5b4251d044 Reviewed-by: Christian Stenger --- src/shared/qbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/shared/qbs b/src/shared/qbs index 33d129352a2..0319b0acc7a 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit 33d129352a2674fdc8fc8c26b826a78f10e5f7a6 +Subproject commit 0319b0acc7a11f9ba84d8708d8e88575470ca75c -- cgit v1.2.3 From 063b1d4b7923d8e422cdc3ff955c06143c90f029 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 21 Mar 2023 15:10:00 +0100 Subject: Update perfparser submodule to version 10.0 Change-Id: I49d445a4210215b0863f6cb410919a6a41f9fcf3 Reviewed-by: Eike Ziller --- src/tools/perfparser | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/tools/perfparser b/src/tools/perfparser index 6c475b413b3..ac05977da71 160000 --- a/src/tools/perfparser +++ b/src/tools/perfparser @@ -1 +1 @@ -Subproject commit 6c475b413b3edb26897cbc1bd19296d497aaee79 +Subproject commit ac05977da7134f78d9b172271c524a32c3176464 -- cgit v1.2.3 From 661eca5968b1fb3550d250e5a4a5e0a138473659 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Tue, 21 Mar 2023 14:16:34 +0100 Subject: LanguageClient: Fix off-by-one error in CallHierarchy Fixes: QTCREATORBUG-28841 Change-Id: I739be37c3de942f5f631ad576a775a441ee8e4cf Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: David Schulz --- src/plugins/languageclient/callhierarchy.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/languageclient/callhierarchy.cpp b/src/plugins/languageclient/callhierarchy.cpp index 069e31b163b..3e0c6589aa7 100644 --- a/src/plugins/languageclient/callhierarchy.cpp +++ b/src/plugins/languageclient/callhierarchy.cpp @@ -58,7 +58,7 @@ public: return QVariant(); const Position start = m_item.selectionRange().start(); return QVariant::fromValue( - Link(m_client->serverUriToHostPath(m_item.uri()), start.line(), start.character())); + Link(m_client->serverUriToHostPath(m_item.uri()), start.line() + 1, start.character())); } case AnnotationRole: if (const std::optional detail = m_item.detail()) -- cgit v1.2.3 From 6deabc4334c1d2e0ebfce13074cb3226237c8656 Mon Sep 17 00:00:00 2001 From: Semih Yavuz Date: Fri, 17 Mar 2023 23:30:23 +0100 Subject: formattexteditor: fix broken formatting In case of unicode character, moving cursor relatively can result in wrong placement of the cursor. Use absolute positions. Fixes: QTCREATORBUG-28859 Change-Id: Idf68481861fc10c24b1eb330220fba92cadf560a Reviewed-by: Eike Ziller Reviewed-by: David Schulz Reviewed-by: --- src/plugins/texteditor/formattexteditor.cpp | 57 ++++++++++++++++++++++++++++- src/plugins/texteditor/texteditorplugin.h | 3 ++ 2 files changed, 58 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/texteditor/formattexteditor.cpp b/src/plugins/texteditor/formattexteditor.cpp index 8f2fc358441..19716e22dd4 100644 --- a/src/plugins/texteditor/formattexteditor.cpp +++ b/src/plugins/texteditor/formattexteditor.cpp @@ -215,7 +215,7 @@ void updateEditorText(QPlainTextEdit *editor, const QString &text) } } } - cursor.movePosition(QTextCursor::Right, QTextCursor::KeepAnchor, d.text.size()); + cursor.setPosition(cursor.position() + d.text.size(), QTextCursor::KeepAnchor); cursor.removeSelectedText(); break; } @@ -223,7 +223,7 @@ void updateEditorText(QPlainTextEdit *editor, const QString &text) case Diff::Equal: // Adjust cursor position charactersInfrontOfCursor -= d.text.size(); - cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, d.text.size()); + cursor.setPosition(cursor.position() + d.text.size(), QTextCursor::MoveAnchor); break; } } @@ -329,3 +329,56 @@ void formatEditorAsync(TextEditorWidget *editor, const Command &command, int sta } } // namespace TextEditor + +#ifdef WITH_TESTS +#include +#include + +namespace TextEditor::Internal { + +void TextEditorPlugin::testFormatting_data() +{ + QTest::addColumn("code"); + QTest::addColumn("result"); + + { + QString code { + "import QtQuick\n\n" + " Item {\n" + " property string cat: [\"πŸ‘©πŸ½β€πŸš’dπŸ‘©πŸ½β€πŸš’dπŸ‘©πŸ½β€πŸš’\"]\n" + " property string dog: cat\n" + "}\n" + }; + + QString result { + "import QtQuick\n\n" + "Item {\n" + " property string cat: [\"πŸ‘©πŸ½β€πŸš’\"]\n" + " property string dog: cat\n" + "}\n" + }; + + QTest::newRow("unicodeCharacterInFormattedCode") << code << result; + } +} + +void TextEditorPlugin::testFormatting() +{ + QFETCH(QString, code); + QFETCH(QString, result); + + QScopedPointer editor(new TextEditorWidget); + QVERIFY(editor.get()); + + QSharedPointer doc(new TextDocument); + doc->setPlainText(code); + editor->setTextDocument(doc); + + TextEditor::updateEditorText(editor.get(), result); + + QCOMPARE(editor->toPlainText(), result); +} + +} // namespace TextEditor::Internal + +#endif diff --git a/src/plugins/texteditor/texteditorplugin.h b/src/plugins/texteditor/texteditorplugin.h index 067e4e96314..3df46c0b578 100644 --- a/src/plugins/texteditor/texteditorplugin.h +++ b/src/plugins/texteditor/texteditorplugin.h @@ -37,6 +37,9 @@ private slots: void testIndentationClean_data(); void testIndentationClean(); + + void testFormatting_data(); + void testFormatting(); #endif }; -- cgit v1.2.3 From 52bc4507908adb065f1a0d45e2bbeecaf41bfad4 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 2 Mar 2023 13:54:10 +0100 Subject: Debugger: Fix error message Change-Id: Idd6b63c8f814f1fbde31ee6cd5c0d4d3c461c895 Reviewed-by: Leena Miettinen Reviewed-by: --- src/plugins/debugger/cdb/cdbengine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/debugger/cdb/cdbengine.cpp b/src/plugins/debugger/cdb/cdbengine.cpp index 450d36b8f04..b95d1c93d52 100644 --- a/src/plugins/debugger/cdb/cdbengine.cpp +++ b/src/plugins/debugger/cdb/cdbengine.cpp @@ -2283,9 +2283,9 @@ void CdbEngine::parseOutputLine(QString line) CheckableMessageBox::doNotShowAgainInformation( Core::ICore::dialogParent(), Tr::tr("Debugger Start Failed"), - Tr::tr("The system prevents loading of %1 which is required for debugging. " + Tr::tr("The system prevents loading of %1, which is required for debugging. " "Make sure that your antivirus solution is up to date and if that does not work " - "consider to add an exception for %1.") + "consider adding an exception for %1.") .arg(m_extensionFileName), Core::ICore::settings(), "SecureInfoCdbextCannotBeLoaded"); -- cgit v1.2.3 From 7a4ef9c1f765b9a574c547e1e21c503f4e1c39f6 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 23 Mar 2023 06:46:33 +0100 Subject: TextEditor: Fix build for real build systems Amends 6deabc4334c1d2e0ebfce13074cb3226237c8656. Change-Id: I237d912041c1db29dabd48ba243731419d8d688c Reviewed-by: David Schulz --- src/plugins/texteditor/formattexteditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/texteditor/formattexteditor.cpp b/src/plugins/texteditor/formattexteditor.cpp index 19716e22dd4..6f1139e057b 100644 --- a/src/plugins/texteditor/formattexteditor.cpp +++ b/src/plugins/texteditor/formattexteditor.cpp @@ -331,7 +331,7 @@ void formatEditorAsync(TextEditorWidget *editor, const Command &command, int sta } // namespace TextEditor #ifdef WITH_TESTS -#include +#include "texteditorplugin.h" #include namespace TextEditor::Internal { -- cgit v1.2.3 From f7639f458a4b87263e96de70f26554a660148bc3 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Fri, 24 Mar 2023 14:28:16 +0100 Subject: Android: Launch "adb track-devices" with explicit working directory Since no working directory was explicitly set, the "bin/" directory of QtC was chosen as working directory. "adb track-devices" leaves the server process alive after terminating, and that server process used QtC's working directory. On Windows, that caused that directory to be undeletable/unmovable as long as the adb server was alive. This change sets the working directory of "adb track-devices" to the parent dir of the adb binary. Task-number: QTCREATORBUG-28932 Change-Id: I3adf52829c9f4bf456d05d2685c04314e1d25a40 Reviewed-by: Assam Boudjelthia --- src/plugins/android/androiddevice.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/plugins/android/androiddevice.cpp b/src/plugins/android/androiddevice.cpp index 252e4ee1fba..4c034c30af1 100644 --- a/src/plugins/android/androiddevice.cpp +++ b/src/plugins/android/androiddevice.cpp @@ -645,6 +645,7 @@ void AndroidDeviceManager::setupDevicesWatcher() const CommandLine command = CommandLine(m_androidConfig.adbToolPath(), {"track-devices"}); m_adbDeviceWatcherProcess->setCommand(command); + m_adbDeviceWatcherProcess->setWorkingDirectory(command.executable().parentDir()); m_adbDeviceWatcherProcess->setEnvironment(AndroidConfigurations::toolsEnvironment(m_androidConfig)); m_adbDeviceWatcherProcess->start(); -- cgit v1.2.3 From 06c4a46a6c1d874dc84fc496180e7e12335b229f Mon Sep 17 00:00:00 2001 From: Karim Abdelrahman Date: Fri, 17 Mar 2023 12:59:50 +0200 Subject: McuSupport: Deregister kits for uninstalled target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before the fix when the user uninstall a target, kits of the target will remain visible on kits screen and can be selected when configuring a project which is not a good user experience. This change will use infobar to notify the user about the existence of kits for uninstalled targets and ask the user if these kits should be removed. The change uses the fact that a kit description file have the naming convention "toolchain-vendor-device" and compare it to the kits exists in profile.xml. If a kit exists in profile.xml but its description file doesn't (which mean the target has been uninstalled), it will be removed from kits. Task-number: QTCREATORBUG-28921 Change-Id: I9d4d1687429f26b6a42b77c5aa398f6bca5455d5 Reviewed-by: Sivert KrΓΈvel Reviewed-by: Yasser Grimes Reviewed-by: Eike Ziller Reviewed-by: Alessandro Portale Reviewed-by: Leena Miettinen --- src/plugins/mcusupport/mcukitmanager.cpp | 63 +++++++++++++++++++++++++++++ src/plugins/mcusupport/mcukitmanager.h | 4 ++ src/plugins/mcusupport/mcusupportplugin.cpp | 33 ++++++++++++++- src/plugins/mcusupport/mcusupportplugin.h | 1 + 4 files changed, 100 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/mcusupport/mcukitmanager.cpp b/src/plugins/mcusupport/mcukitmanager.cpp index 793e02b3230..c951158d832 100644 --- a/src/plugins/mcusupport/mcukitmanager.cpp +++ b/src/plugins/mcusupport/mcukitmanager.cpp @@ -721,5 +721,68 @@ void removeOutdatedKits() KitManager::deregisterKit(kit); } +/* +* using kitQmlImportPath of kit found in profile.xml to get the path to Qul +* installation where description file (.json) of the kit is located. +*/ +static const FilePaths kitsFiles(const Kit *kit) +{ + const FilePath qulRoot = kitDependencyPath(kit, Legacy::Constants::QUL_CMAKE_VAR); + return kitsPath(qulRoot).dirEntries(Utils::FileFilter({"*.json"}, QDir::Files)); +} + +/* +* When file description (.json) of a kit exists in the Qul installation that means +* target is installed. +*/ +static bool anyKitDescriptionFileExists(const FilePaths &jsonFiles, + const QStringList &kitsProperties) +{ + static const QRegularExpression re("(\\w+)-(\\w+)-(.+)\\.json"); + for (const FilePath &jsonFile : jsonFiles) { + const QRegularExpressionMatch match = re.match(jsonFile.fileName()); + QStringList kitsPropertiesFromFileName; + if (match.hasMatch()) { + const QString toolchain = match.captured(1).replace( + "gnu", "gcc"); // kitFileName contains gnu while profiles.xml contains gcc + const QString vendor = match.captured(2); + const QString device = match.captured(3); + + kitsPropertiesFromFileName << toolchain << vendor << device; + } + + if (kitsPropertiesFromFileName == kitsProperties) + return true; + } + return false; +} + +const QList findUninstalledTargetsKits() +{ + QList uninstalledTargetsKits; + for (Kit *kit : KitManager::kits()) { + if (!kit->hasValue(Constants::KIT_MCUTARGET_KITVERSION_KEY)) + continue; + + const QStringList kitsProperties = { + kit->value(Constants::KIT_MCUTARGET_TOOLCHAIN_KEY).toString().toLower(), + kit->value(Constants::KIT_MCUTARGET_VENDOR_KEY).toString().toLower(), + kit->value(Constants::KIT_MCUTARGET_MODEL_KEY).toString().toLower(), + }; + + const FilePaths kitsDescriptionFiles = kitsFiles(kit); + if (!anyKitDescriptionFileExists(kitsDescriptionFiles, kitsProperties)) + uninstalledTargetsKits << kit; + } + + return uninstalledTargetsKits; +} + +void removeUninstalledTargetsKits(const QList uninstalledTargetsKits) +{ + for (const auto &kit : uninstalledTargetsKits) + KitManager::deregisterKit(kit); +} + } // namespace McuKitManager } // namespace McuSupport::Internal diff --git a/src/plugins/mcusupport/mcukitmanager.h b/src/plugins/mcusupport/mcukitmanager.h index 6a82033e9e3..7e949d589c1 100644 --- a/src/plugins/mcusupport/mcukitmanager.h +++ b/src/plugins/mcusupport/mcukitmanager.h @@ -56,6 +56,10 @@ void fixExistingKits(const SettingsHandler::Ptr &); // Outdated kits: void removeOutdatedKits(); +// kits for uninstalled targets: +const QList findUninstalledTargetsKits(); +void removeUninstalledTargetsKits(const QList uninstalledTargetsKits); + } // namespace McuKitManager } // namespace McuSupport::Internal diff --git a/src/plugins/mcusupport/mcusupportplugin.cpp b/src/plugins/mcusupport/mcusupportplugin.cpp index f7622318517..6b4e851c476 100644 --- a/src/plugins/mcusupport/mcusupportplugin.cpp +++ b/src/plugins/mcusupport/mcusupportplugin.cpp @@ -135,6 +135,7 @@ void McuSupportPlugin::extensionsInitialized() McuKitManager::createAutomaticKits(dd->m_settingsHandler); McuKitManager::fixExistingKits(dd->m_settingsHandler); askUserAboutMcuSupportKitsSetup(); + askUserAboutRemovingUninstalledTargetsKits(); }); } @@ -188,4 +189,34 @@ void McuSupportPlugin::askUserAboutMcuSupportKitsUpgrade(const SettingsHandler:: ICore::infoBar()->addInfo(info); } -} // McuSupport::Internal +void McuSupportPlugin::askUserAboutRemovingUninstalledTargetsKits() +{ + const char removeUninstalledKits[] = "RemoveUninstalledKits"; + QList uninstalledTargetsKits; + + if (!ICore::infoBar()->canInfoBeAdded(removeUninstalledKits) + || (uninstalledTargetsKits = McuKitManager::findUninstalledTargetsKits()).isEmpty()) + return; + + Utils::InfoBarEntry + info(removeUninstalledKits, + Tr::tr("Detected %n uninstalled MCU target(s). Remove corresponding kits?", + nullptr, + uninstalledTargetsKits.size()), + Utils::InfoBarEntry::GlobalSuppression::Enabled); + + info.addCustomButton(Tr::tr("Keep"), [removeUninstalledKits] { + ICore::infoBar()->removeInfo(removeUninstalledKits); + }); + + info.addCustomButton(Tr::tr("Remove"), [removeUninstalledKits, uninstalledTargetsKits] { + ICore::infoBar()->removeInfo(removeUninstalledKits); + QTimer::singleShot(0, [uninstalledTargetsKits]() { + McuKitManager::removeUninstalledTargetsKits(uninstalledTargetsKits); + }); + }); + + ICore::infoBar()->addInfo(info); +} + +} // namespace McuSupport::Internal diff --git a/src/plugins/mcusupport/mcusupportplugin.h b/src/plugins/mcusupport/mcusupportplugin.h index 08cfc61f890..cb27b138464 100644 --- a/src/plugins/mcusupport/mcusupportplugin.h +++ b/src/plugins/mcusupport/mcusupportplugin.h @@ -24,6 +24,7 @@ public: void askUserAboutMcuSupportKitsSetup(); static void askUserAboutMcuSupportKitsUpgrade(const SettingsHandler::Ptr &settingsHandler); + static void askUserAboutRemovingUninstalledTargetsKits(); }; } // McuSupport::Internal -- cgit v1.2.3 From 22952c5357588274248a95e9a1c988c13b10d0da Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Tue, 28 Mar 2023 06:49:31 +0200 Subject: McuSupport: Fix missing include Change-Id: Ie7a90edf3e4d6b289512a5bb60bca039b0b10fe3 Reviewed-by: David Schulz --- src/plugins/mcusupport/mcukitmanager.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/plugins/mcusupport/mcukitmanager.cpp b/src/plugins/mcusupport/mcukitmanager.cpp index c951158d832..61f268f0215 100644 --- a/src/plugins/mcusupport/mcukitmanager.cpp +++ b/src/plugins/mcusupport/mcukitmanager.cpp @@ -31,6 +31,7 @@ #include #include +#include using CMakeProjectManager::CMakeConfig; using CMakeProjectManager::CMakeConfigItem; -- cgit v1.2.3 From 22909726ebc4f41fb55d61c8a98eb375d97b430e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sivert=20Kr=C3=B8vel?= Date: Tue, 21 Mar 2023 14:46:15 +0100 Subject: McuSupport: Bring tvii and rh850 kits up to date with latest QUL Bring recently changed kits up to date with QUL repository. Task-number: QTCREATORBUG-28684 Task-number: QTCREATORBUG-28833 Change-Id: Id70268584891a72659930817a5c8458418a9f3b0 Reviewed-by: Yasser Grimes Reviewed-by: Alessandro Portale --- .../test/ghs_rh850_d1m1a_baremetal_json.h | 19 ++++-- .../mcusupport/test/ghs_tviic2d4m_baremetal_json.h | 15 +++-- .../mcusupport/test/ghs_tviic2d6m_baremetal_json.h | 15 +++-- .../mcusupport/test/iar_tviic2d4m_baremetal_json.h | 77 ++++++++++++++++++++++ .../mcusupport/test/iar_tviic2d6m_baremetal_json.h | 19 +++--- 5 files changed, 118 insertions(+), 27 deletions(-) create mode 100644 src/plugins/mcusupport/test/iar_tviic2d4m_baremetal_json.h (limited to 'src') diff --git a/src/plugins/mcusupport/test/ghs_rh850_d1m1a_baremetal_json.h b/src/plugins/mcusupport/test/ghs_rh850_d1m1a_baremetal_json.h index 116018d46f1..983b1fb4aae 100644 --- a/src/plugins/mcusupport/test/ghs_rh850_d1m1a_baremetal_json.h +++ b/src/plugins/mcusupport/test/ghs_rh850_d1m1a_baremetal_json.h @@ -5,7 +5,7 @@ constexpr auto ghs_rh850_d1m1a_baremetal_json = R"( { - "qulVersion": "2.3.0", + "qulVersion": "2.4.0", "compatVersion": "1", "platform": { "id": "RH850-D1M1A-BAREMETAL", @@ -19,17 +19,16 @@ constexpr auto ghs_rh850_d1m1a_baremetal_json = R"( "setting": "FlashProgrammerPath", "label": "Renesas Flash Programmer", "type": "path", - "setting": "RenesasFlashProgrammer", "cmakeVar": "RENESAS_FLASH_PROGRAMMER_PATH", "defaultValue": { - "windows": "%{Env:PROGRAMFILES}/Renesas Electronics/Programming Tools/Renesas Flash Programmer V3.09", - "linux": "%{Env:HOME}" + "linux": "", + "windows": "%{Env:PROGRAMFILES(x86)}/Renesas Electronics/Programming Tools/Renesas Flash Programmer V3.09" }, "detectionPath": { "windows": "rfp-cli.exe", "linux": "rfp-cli" }, - "envVar": "RENESAS_FLASH_PROGRAMMER_PATH", + "envVar": "RenesasFlashProgrammer_PATH", "optional": true, "addToSystemPath": true } @@ -45,6 +44,10 @@ constexpr auto ghs_rh850_d1m1a_baremetal_json = R"( "setting": "GHSToolchain", "label": "Green Hills Compiler", "type": "path", + "defaultValue": { + "linux": "", + "windows": "C:/ghs/comp_201815" + }, "optional": false, "versionDetection": { "filePattern": { @@ -71,12 +74,16 @@ constexpr auto ghs_rh850_d1m1a_baremetal_json = R"( "envVar": "RGL_DIR", "setting": "RGL_DIR", "versions": [ + "2.0.0", "2.0.0a" ], "label": "Renesas Graphics Library", "cmakeVar": "QUL_BOARD_SDK_DIR", "type": "path", - "defaultValue": "/Renesas_Electronics/D1x_RGL/rgl_ghs_D1Mx_obj_V.2.0.0a", + "defaultValue": { + "linux": "", + "windows": "%{Env:PROGRAMFILES(x86)}/Renesas_Electronics/D1x_RGL/rgl_ghs_D1Mx_obj_V.2.0.0a" + }, "versionDetection": { "regex": "\\d+\\.\\d+\\.\\w+" }, diff --git a/src/plugins/mcusupport/test/ghs_tviic2d4m_baremetal_json.h b/src/plugins/mcusupport/test/ghs_tviic2d4m_baremetal_json.h index d4a41cad38a..6d6bd57cb06 100644 --- a/src/plugins/mcusupport/test/ghs_tviic2d4m_baremetal_json.h +++ b/src/plugins/mcusupport/test/ghs_tviic2d4m_baremetal_json.h @@ -5,7 +5,7 @@ constexpr auto ghs_tviic2d4m_baremetal_json = R"( { - "qulVersion": "2.3.0", + "qulVersion": "2.4.0", "compatVersion": "1", "platform": { "id": "TVIIC2D4M-BAREMETAL", @@ -16,9 +16,10 @@ constexpr auto ghs_tviic2d4m_baremetal_json = R"( "cmakeEntries": [ { "id": "INFINEON_AUTO_FLASH_UTILITY_DIR", - "setting": "CypressAutoFlashUtil", - "label": "Cypress Auto Flash Utility", + "setting": "InfineonAutoFlashUtil", + "label": "Infineon Auto Flash Utility", "type": "path", + "defaultValue": "%{Env:PROGRAMFILES(x86)}/Infineon/Auto Flash Utility 1.2", "cmakeVar": "INFINEON_AUTO_FLASH_UTILITY_DIR", "detectionPath": "bin/openocd.exe", "optional": false, @@ -36,8 +37,8 @@ constexpr auto ghs_tviic2d4m_baremetal_json = R"( "label": "Green Hills Compiler for ARM", "cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR", "setting": "GHSArmToolchain", - "detectionPath": "cxarm.exe", "type": "path", + "defaultValue": "C:/ghs/comp_201954", "optional": false, "versionDetection": { "filePattern": "gversion.exe", @@ -59,15 +60,17 @@ constexpr auto ghs_tviic2d4m_baremetal_json = R"( "envVar": "TVII_GRAPHICS_DRIVER_DIR", "setting": "TVII_GRAPHICS_DRIVER_DIR", "versions": [ - "V1e.1.0" + "V1.2.0" ], "id": "TVII_GRAPHICS_DRIVER_DIR", "label": "Graphics Driver for Traveo II Cluster Series", "cmakeVar": "QUL_BOARD_SDK_DIR", "type": "path", + "defaultValue": "C:/TVII-GraphicsDriver", "optional": false, "versionDetection": { - "regex": "V\\w+\\.\\d+\\.\\d+" + "regex": "V\\d+\\.\\d+\\.\\d+" + } } } )"; diff --git a/src/plugins/mcusupport/test/ghs_tviic2d6m_baremetal_json.h b/src/plugins/mcusupport/test/ghs_tviic2d6m_baremetal_json.h index 5e1ff21e2b0..f34065b6321 100644 --- a/src/plugins/mcusupport/test/ghs_tviic2d6m_baremetal_json.h +++ b/src/plugins/mcusupport/test/ghs_tviic2d6m_baremetal_json.h @@ -5,7 +5,7 @@ constexpr auto ghs_tviic2d6m_baremetal_json = R"( { - "qulVersion": "2.3.0", + "qulVersion": "2.4.0", "compatVersion": "1", "platform": { "id": "TVIIC2D6M-BAREMETAL", @@ -16,9 +16,10 @@ constexpr auto ghs_tviic2d6m_baremetal_json = R"( "cmakeEntries": [ { "id": "INFINEON_AUTO_FLASH_UTILITY_DIR", - "setting": "CypressAutoFlashUtil", - "label": "Cypress Auto Flash Utility", + "setting": "InfineonAutoFlashUtil", + "label": "Infineon Auto Flash Utility", "type": "path", + "defaultValue": "%{Env:PROGRAMFILES(x86)}/Infineon/Auto Flash Utility 1.2", "cmakeVar": "INFINEON_AUTO_FLASH_UTILITY_DIR", "detectionPath": "bin/openocd.exe", "optional": false, @@ -36,8 +37,8 @@ constexpr auto ghs_tviic2d6m_baremetal_json = R"( "label": "Green Hills Compiler for ARM", "cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR", "setting": "GHSArmToolchain", - "detectionPath": "cxarm.exe", "type": "path", + "defaultValue": "C:/ghs/comp_201954", "optional": false, "versionDetection": { "filePattern": "gversion.exe", @@ -59,15 +60,17 @@ constexpr auto ghs_tviic2d6m_baremetal_json = R"( "envVar": "TVII_GRAPHICS_DRIVER_DIR", "setting": "TVII_GRAPHICS_DRIVER_DIR", "versions": [ - "V1e.1.0" + "V2e.1.0" ], "id": "TVII_GRAPHICS_DRIVER_DIR", "label": "Graphics Driver for Traveo II Cluster Series", "cmakeVar": "QUL_BOARD_SDK_DIR", "type": "path", + "defaultValue": "C:/TVII-GraphicsDriver", "optional": false, "versionDetection": { - "regex": "V\\w+\\.\\d+\\.\\d+" + "regex": "V\\d+e\\.\\d+\\.\\d+" + } } } )"; diff --git a/src/plugins/mcusupport/test/iar_tviic2d4m_baremetal_json.h b/src/plugins/mcusupport/test/iar_tviic2d4m_baremetal_json.h new file mode 100644 index 00000000000..e9e0a56348f --- /dev/null +++ b/src/plugins/mcusupport/test/iar_tviic2d4m_baremetal_json.h @@ -0,0 +1,77 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +#pragma once + +constexpr auto iar_tviic2d6m_baremetal_json = R"( +{ + "qulVersion": "2.4.0", + "compatVersion": "1", + "platform": { + "id": "TVIIC2D4M-BAREMETAL", + "vendor": "CYPRESS", + "colorDepths": [ + 32 + ], + "cmakeEntries": [ + { + "id": "INFINEON_AUTO_FLASH_UTILITY_DIR", + "setting": "InfineonAutoFlashUtil", + "label": "Infineon Auto Flash Utility", + "type": "path", + "defaultValue": "%{Env:PROGRAMFILES(x86)}/Infineon/Auto Flash Utility 1.2", + "cmakeVar": "INFINEON_AUTO_FLASH_UTILITY_DIR", + "detectionPath": "bin/openocd.exe", + "optional": false, + "addToSystemPath": true + } + ] + }, + "toolchain": { + "id": "iar", + "versions": [ + "8.22.3" + ], + "compiler": { + "id": "IARToolchain", + "setting": "IARToolchain", + "envVar": "IAR_ARM_COMPILER_DIR", + "label": "IAR ARM Compiler", + "cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR", + "type": "path", + "versionDetection": { + "filePattern": "bin/iccarm.exe", + "executableArgs": "--version", + "regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b" + }, + "detectionPath": "bin/iccarm.exe", + "defaultValue": "%{Env:PROGRAMFILES(x86)}/IAR Systems/Embedded Workbench 8.0 EWARM FS 8.22.3/arm", + "optional": false + }, + "file": { + "id": "IAR_CMAKE_TOOLCHAIN_FILE", + "cmakeVar": "CMAKE_TOOLCHAIN_FILE", + "type": "file", + "defaultValue": "%{Qul_ROOT}/lib/cmake/Qul/toolchain/iar.cmake", + "visible": false, + "optional": false + } + }, + "boardSdk": { + "envVar": "TVII_GRAPHICS_DRIVER_DIR", + "setting": "TVII_GRAPHICS_DRIVER_DIR", + "versions": [ + "V1.2.0" + ], + "id": "TVII_GRAPHICS_DRIVER_DIR", + "label": "Graphics Driver for Traveo II Cluster Series", + "cmakeVar": "QUL_BOARD_SDK_DIR", + "type": "path", + "defaultValue": "C:/TVII-GraphicsDriver", + "optional": false, + "versionDetection": { + "regex": "V\\d+\\.\\d+\\.\\d+" + } + } +} +)"; diff --git a/src/plugins/mcusupport/test/iar_tviic2d6m_baremetal_json.h b/src/plugins/mcusupport/test/iar_tviic2d6m_baremetal_json.h index ce4c56fb2da..58f46bf7922 100644 --- a/src/plugins/mcusupport/test/iar_tviic2d6m_baremetal_json.h +++ b/src/plugins/mcusupport/test/iar_tviic2d6m_baremetal_json.h @@ -5,7 +5,7 @@ constexpr auto iar_tviic2d6m_baremetal_json = R"( { - "qulVersion": "2.3.0", + "qulVersion": "2.4.0", "compatVersion": "1", "platform": { "id": "TVIIC2D6M-BAREMETAL", @@ -16,9 +16,10 @@ constexpr auto iar_tviic2d6m_baremetal_json = R"( "cmakeEntries": [ { "id": "INFINEON_AUTO_FLASH_UTILITY_DIR", - "setting": "CypressAutoFlashUtil", - "label": "Cypress Auto Flash Utility", + "setting": "InfineonAutoFlashUtil", + "label": "Infineon Auto Flash Utility", "type": "path", + "defaultValue": "%{Env:PROGRAMFILES(x86)}/Infineon/Auto Flash Utility 1.2", "cmakeVar": "INFINEON_AUTO_FLASH_UTILITY_DIR", "detectionPath": "bin/openocd.exe", "optional": false, @@ -39,14 +40,12 @@ constexpr auto iar_tviic2d6m_baremetal_json = R"( "cmakeVar": "QUL_TARGET_TOOLCHAIN_DIR", "type": "path", "versionDetection": { - "filePattern": { - "windows": "bin/iccarm.exe", - "linux": "bin/iccarm" - }, + "filePattern": "bin/iccarm.exe", "executableArgs": "--version", "regex": "\\bV(\\d+\\.\\d+\\.\\d+)\\.\\d+\\b" }, "detectionPath": "bin/iccarm.exe", + "defaultValue": "%{Env:PROGRAMFILES(x86)}/IAR Systems/Embedded Workbench 8.0 EWARM FS 8.22.3/arm", "optional": false }, "file": { @@ -62,15 +61,17 @@ constexpr auto iar_tviic2d6m_baremetal_json = R"( "envVar": "TVII_GRAPHICS_DRIVER_DIR", "setting": "TVII_GRAPHICS_DRIVER_DIR", "versions": [ - "V1e.1.0" + "V2e.1.0" ], "id": "TVII_GRAPHICS_DRIVER_DIR", "label": "Graphics Driver for Traveo II Cluster Series", "cmakeVar": "QUL_BOARD_SDK_DIR", "type": "path", + "defaultValue": "C:/TVII-GraphicsDriver", "optional": false, "versionDetection": { - "regex": "V\\w+\\.\\d+\\.\\d+" + "regex": "V\\d+e\\.\\d+\\.\\d+" + } } } )"; -- cgit v1.2.3