Merge remote-tracking branch 'origin/16.0' into qds/dev

Resolve conflict in src/plugins/coreplugin/systemsettings.cpp
(with current master version)

Change-Id: Ie8599e93f2b5eb5b1d61a10e674874b37a24ae2a
This commit is contained in:
Tim Jenssen
2025-04-24 12:29:36 +02:00
64 changed files with 63693 additions and 240 deletions

View File

@@ -7,7 +7,7 @@ on:
- 'doc/**' - 'doc/**'
env: env:
QT_VERSION: 6.8.2 QT_VERSION: 6.8.3
MACOS_DEPLOYMENT_TARGET: 11.0 MACOS_DEPLOYMENT_TARGET: 11.0
CLANG_VERSION: 19.1.6 CLANG_VERSION: 19.1.6
ELFUTILS_VERSION: 0.175 ELFUTILS_VERSION: 0.175

View File

@@ -136,6 +136,32 @@ if(CRASHPAD_BACKEND_URL AND (WIN32 OR APPLE)) # Linux is not supported for now
endif() endif()
add_feature_info("Build with Crashpad" ${BUILD_WITH_CRASHPAD} "") add_feature_info("Build with Crashpad" ${BUILD_WITH_CRASHPAD} "")
set(SENTRY_DSN "$ENV{QTC_SENTRY_DSN}" CACHE STRING "Data Source Name to use for sending Sentry events.")
set(SENTRY_PROJECT "" CACHE STRING "Project ID to use for sending Sentry events.")
set(BUILD_WITH_SENTRY OFF)
if(SENTRY_DSN AND SENTRY_PROJECT)
find_package(sentry QUIET)
if(TARGET sentry::sentry)
set(BUILD_WITH_SENTRY ON)
get_target_property(__sentry_configs sentry::sentry IMPORTED_CONFIGURATIONS)
get_target_property(__sentry_lib sentry::sentry IMPORTED_LOCATION_${__sentry_configs})
install(FILES ${__sentry_lib}
DESTINATION "${IDE_LIBRARY_ARCHIVE_PATH}"
COMPONENT Dependencies
EXCLUDE_FROM_ALL
)
if (TARGET sentry_crashpad::crashpad_handler)
get_target_property(SENTRY_CRASHPAD_PATH sentry_crashpad::crashpad_handler IMPORTED_LOCATION_${__sentry_configs})
install(PROGRAMS ${SENTRY_CRASHPAD_PATH}
DESTINATION "${IDE_LIBEXEC_PATH}"
COMPONENT Dependencies
EXCLUDE_FROM_ALL
)
endif()
endif()
endif()
add_feature_info("Build with Sentry" ${BUILD_WITH_SENTRY} "")
function (set_if_target var target) function (set_if_target var target)
if (TARGET "${target}") if (TARGET "${target}")
set(_result ON) set(_result ON)

View File

@@ -1,6 +1,6 @@
set(IDE_VERSION "16.0.1") # The IDE version. set(IDE_VERSION "16.0.2") # The IDE version.
set(IDE_VERSION_COMPAT "16.0.0") # The IDE Compatibility version. set(IDE_VERSION_COMPAT "16.0.0") # The IDE Compatibility version.
set(IDE_VERSION_DISPLAY "16.0.1") # The IDE display version. set(IDE_VERSION_DISPLAY "16.0.2") # The IDE display version.
set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation. set(IDE_SETTINGSVARIANT "QtProject") # The IDE settings variation.
set(IDE_DISPLAY_NAME "Qt Creator") # The IDE display name. set(IDE_DISPLAY_NAME "Qt Creator") # The IDE display name.

View File

@@ -60,8 +60,40 @@ function(_extract_ts_data_from_targets outprefix)
set("${outprefix}_includes" "${_includes}" PARENT_SCOPE) set("${outprefix}_includes" "${_includes}" PARENT_SCOPE)
endfunction() endfunction()
function(_create_lupdate_response_file response_file)
set(no_value_options "")
set(single_value_options "")
set(multi_value_options SOURCES INCLUDES)
cmake_parse_arguments(PARSE_ARGV 1 arg
"${no_value_options}" "${single_value_options}" "${multi_value_options}"
)
if(arg_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Unexpected arguments: ${arg_UNPARSED_ARGUMENTS}")
endif()
set(sources "${arg_SOURCES}")
list(SORT sources)
set(includes "${arg_INCLUDES}")
list(REMOVE_DUPLICATES sources)
list(REMOVE_DUPLICATES includes)
list(REMOVE_ITEM sources "")
list(REMOVE_ITEM includes "")
list(TRANSFORM includes PREPEND "-I")
string(REPLACE ";" "\n" sources_str "${sources}")
string(REPLACE ";" "\n" includes_str "${includes}")
file(WRITE "${response_file}" "${sources_str}\n${includes_str}")
endfunction()
function(_create_ts_custom_target name) function(_create_ts_custom_target name)
cmake_parse_arguments(_arg "EXCLUDE_FROM_ALL" "FILE_PREFIX;TS_TARGET_PREFIX" "SOURCES;INCLUDES" ${ARGN}) cmake_parse_arguments(_arg "" "FILE_PREFIX;LUPDATE_RESPONSE_FILE;TS_TARGET_PREFIX"
"DEPENDS;LANGUAGES" ${ARGN}
)
if (_arg_UNPARSED_ARGUMENTS) if (_arg_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Invalid parameters to _create_ts_custom_target: ${_arg_UNPARSED_ARGUMENTS}.") message(FATAL_ERROR "Invalid parameters to _create_ts_custom_target: ${_arg_UNPARSED_ARGUMENTS}.")
endif() endif()
@@ -70,77 +102,58 @@ function(_create_ts_custom_target name)
set(_arg_TS_TARGET_PREFIX "ts_") set(_arg_TS_TARGET_PREFIX "ts_")
endif() endif()
set(ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_FILE_PREFIX}_${name}.ts") set(languages "${name}")
if(DEFINED _arg_LANGUAGES)
set(languages ${_arg_LANGUAGES})
endif()
set(_sources "${_arg_SOURCES}") set(ts_files "")
list(SORT _sources) foreach(language IN LISTS languages)
list(APPEND ts_files "${CMAKE_CURRENT_SOURCE_DIR}/${_arg_FILE_PREFIX}_${language}.ts")
set(_includes "${_arg_INCLUDES}")
list(REMOVE_DUPLICATES _sources)
list(REMOVE_DUPLICATES _includes)
list(REMOVE_ITEM _sources "")
list(REMOVE_ITEM _includes "")
set(_prepended_includes)
foreach(include IN LISTS _includes)
list(APPEND _prepended_includes "-I${include}")
endforeach() endforeach()
set(_includes "${_prepended_includes}")
string(REPLACE ";" "\n" _sources_str "${_sources}") set(common_comment "Generate .ts file")
string(REPLACE ";" "\n" _includes_str "${_includes}") list(LENGTH languages languages_length)
if(languages_length GREATER 1)
set(ts_file_list "${CMAKE_CURRENT_BINARY_DIR}/ts_${name}.lst") string(APPEND common_comment "s")
file(WRITE "${ts_file_list}" "${_sources_str}\n${_includes_str}\n") endif()
string(APPEND common_comment " (${name})")
set(response_file ${_arg_LUPDATE_RESPONSE_FILE})
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}" add_custom_target("${_arg_TS_TARGET_PREFIX}${name}"
COMMAND Qt::lupdate -locations relative -no-ui-lines "@${ts_file_list}" -ts ${ts_file} COMMAND Qt::lupdate -locations relative -no-ui-lines "@${response_file}" -ts ${ts_files}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Generate .ts file (${name}), with obsolete translations and files and line numbers" COMMENT "${common_comment}, with obsolete translations and files and line numbers"
DEPENDS ${_sources} DEPENDS ${_arg_DEPENDS}
VERBATIM) VERBATIM)
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_no_locations" add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_no_locations"
COMMAND Qt::lupdate -locations none -no-ui-lines "@${ts_file_list}" -ts ${ts_file} COMMAND Qt::lupdate -locations none -no-ui-lines "@${response_file}" -ts ${ts_files}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Generate .ts file (${name}), with obsolete translations, without files and line numbers" COMMENT "${common_comment}, with obsolete translations, without files and line numbers"
DEPENDS ${_sources} DEPENDS ${_arg_DEPENDS}
VERBATIM) VERBATIM)
# Uses lupdate + convert instead of just lupdate with '-locations none -no-obsolete' # Uses lupdate + convert instead of just lupdate with '-locations none -no-obsolete'
# to keep the same sorting as the non-'cleaned' target and therefore keep the diff small # to keep the same sorting as the non-'cleaned' target and therefore keep the diff small
# get path for lconvert... set(lconvert_commands "")
get_target_property(_lupdate_binary Qt::lupdate IMPORTED_LOCATION) foreach(ts_file IN LISTS ts_files)
get_filename_component(_bin_dir ${_lupdate_binary} DIRECTORY) list(APPEND lconvert_commands
COMMAND Qt::lconvert -locations none -no-ui-lines -no-obsolete ${ts_file} -o ${ts_file}
)
endforeach()
add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_cleaned" add_custom_target("${_arg_TS_TARGET_PREFIX}${name}_cleaned"
COMMAND Qt::lupdate -locations relative -no-ui-lines "@${ts_file_list}" -ts ${ts_file} COMMAND Qt::lupdate -locations relative -no-ui-lines "@${response_file}" -ts ${ts_files}
COMMAND ${_bin_dir}/lconvert -locations none -no-ui-lines -no-obsolete ${ts_file} -o ${ts_file} ${lconvert_commands}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Generate .ts file (${name}), remove obsolete and vanished translations, and do not add files and line number" COMMENT "${common_comment}, remove obsolete and vanished translations, and do not add files and line number"
DEPENDS ${_sources} DEPENDS ${_arg_DEPENDS}
VERBATIM) VERBATIM)
if (NOT _arg_EXCLUDE_FROM_ALL)
if (NOT TARGET ts_all_cleaned)
add_custom_target(ts_all_cleaned
COMMENT "Generate .ts files, remove obsolete and vanished translations, and do not add files and line numbers")
add_custom_target(ts_all
COMMENT "Generate .ts files, with obsolete translations and files and line numbers")
add_custom_target(ts_all_no_locations
COMMENT "Generate .ts files, with obsolete translations, without files and line numbers")
endif()
add_dependencies(ts_all_cleaned ${_arg_TS_TARGET_PREFIX}${name}_cleaned)
add_dependencies(ts_all ${_arg_TS_TARGET_PREFIX}${name})
add_dependencies(ts_all_no_locations ${_arg_TS_TARGET_PREFIX}${name}_no_locations)
endif()
endfunction() endfunction()
function(add_translation_targets file_prefix) function(add_translation_targets file_prefix)
if (NOT TARGET Qt::lrelease OR NOT TARGET Qt::lupdate) if(NOT TARGET Qt::lrelease OR NOT TARGET Qt::lupdate OR NOT TARGET Qt::lconvert)
# No Qt translation tools were found: Skip this directory # No Qt translation tools were found: Skip this directory
message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt6 COMPONENTS LinguistTools) to CMake to enable.") message(WARNING "No Qt translation tools found, skipping translation targets. Add find_package(Qt6 COMPONENTS LinguistTools) to CMake to enable.")
return() return()
@@ -148,7 +161,7 @@ function(add_translation_targets file_prefix)
cmake_parse_arguments(_arg "" cmake_parse_arguments(_arg ""
"OUTPUT_DIRECTORY;INSTALL_DESTINATION;TS_TARGET_PREFIX;QM_TARGET_PREFIX;ALL_QM_TARGET" "OUTPUT_DIRECTORY;INSTALL_DESTINATION;TS_TARGET_PREFIX;QM_TARGET_PREFIX;ALL_QM_TARGET"
"LANGUAGES;TARGETS;SOURCES;INCLUDES" ${ARGN}) "TS_LANGUAGES;QM_LANGUAGES;TARGETS;SOURCES;INCLUDES" ${ARGN})
if (_arg_UNPARSED_ARGUMENTS) if (_arg_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "Invalid parameters to add_translation_targets: ${_arg_UNPARSED_ARGUMENTS}.") message(FATAL_ERROR "Invalid parameters to add_translation_targets: ${_arg_UNPARSED_ARGUMENTS}.")
endif() endif()
@@ -175,10 +188,29 @@ function(add_translation_targets file_prefix)
_extract_ts_data_from_targets(_to_process "${_arg_TARGETS}") _extract_ts_data_from_targets(_to_process "${_arg_TARGETS}")
_create_ts_custom_target(untranslated set(lupdate_response_file "${CMAKE_CURRENT_BINARY_DIR}/lupdate-args.lst")
_create_lupdate_response_file(${lupdate_response_file}
SOURCES ${_to_process_sources} ${_arg_SOURCES}
INCLUDES ${_to_process_includes} ${_arg_INCLUDES}
)
set(ts_languages untranslated ${_arg_TS_LANGUAGES})
foreach(language IN LISTS ts_languages)
_create_ts_custom_target(${language}
FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}" FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}"
SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES} LUPDATE_RESPONSE_FILE "${lupdate_response_file}"
EXCLUDE_FROM_ALL) DEPENDS ${_arg_SOURCES}
)
endforeach()
# Create ts_all* targets.
_create_ts_custom_target(all
LANGUAGES ${ts_languages}
FILE_PREFIX "${file_prefix}"
TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}"
LUPDATE_RESPONSE_FILE "${lupdate_response_file}"
DEPENDS ${_arg_SOURCES}
)
if (NOT TARGET "${_arg_ALL_QM_TARGET}") if (NOT TARGET "${_arg_ALL_QM_TARGET}")
add_custom_target("${_arg_ALL_QM_TARGET}" ALL COMMENT "Generate .qm-files") add_custom_target("${_arg_ALL_QM_TARGET}" ALL COMMENT "Generate .qm-files")
@@ -186,13 +218,10 @@ function(add_translation_targets file_prefix)
file(MAKE_DIRECTORY ${_arg_OUTPUT_DIRECTORY}) file(MAKE_DIRECTORY ${_arg_OUTPUT_DIRECTORY})
foreach(l IN ITEMS ${_arg_LANGUAGES}) foreach(l IN LISTS _arg_QM_LANGUAGES)
set(_ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_prefix}_${l}.ts") set(_ts_file "${CMAKE_CURRENT_SOURCE_DIR}/${file_prefix}_${l}.ts")
set(_qm_file "${_arg_OUTPUT_DIRECTORY}/${file_prefix}_${l}.qm") set(_qm_file "${_arg_OUTPUT_DIRECTORY}/${file_prefix}_${l}.qm")
_create_ts_custom_target("${l}" FILE_PREFIX "${file_prefix}" TS_TARGET_PREFIX "${_arg_TS_TARGET_PREFIX}"
SOURCES ${_to_process_sources} ${_arg_SOURCES} INCLUDES ${_to_process_includes} ${_arg_INCLUDES})
add_custom_command(OUTPUT "${_qm_file}" add_custom_command(OUTPUT "${_qm_file}"
COMMAND Qt::lrelease "${_ts_file}" -qm "${_qm_file}" COMMAND Qt::lrelease "${_ts_file}" -qm "${_qm_file}"
MAIN_DEPENDENCY "${_ts_file}" MAIN_DEPENDENCY "${_ts_file}"

View File

@@ -7,7 +7,7 @@ instructions:
instructions: instructions:
- type: EnvironmentVariable - type: EnvironmentVariable
variableName: QTC_QT_BASE_URL variableName: QTC_QT_BASE_URL
variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/qt/6.8.2/release_content/" variableValue: "https://ci-files02-hki.ci.qt.io/packages/jenkins/qt/6.8.3/release_content/"
- type: EnvironmentVariable - type: EnvironmentVariable
variableName: MACOSX_DEPLOYMENT_TARGET variableName: MACOSX_DEPLOYMENT_TARGET
variableValue: 12.0 variableValue: 12.0

119
dist/changelog/changes-16.0.1.md vendored Normal file
View File

@@ -0,0 +1,119 @@
Qt Creator 16.0.1
=================
Qt Creator version 16.0.1 contains bug fixes.
It is a free upgrade for commercial license holders.
The most important changes are listed in this document. For a complete list of
changes, see the Git log for the Qt Creator sources that you can check out from
the public Git repository or view online at
<https://code.qt.io/cgit/qt-creator/qt-creator.git/log/?id=v16.0.0..v16.0.1>
Editing
-------
* Fixed that formatting code with the Beautifier plugin broke the text encoding
([QTCREATORBUG-32668](https://bugreports.qt.io/browse/QTCREATORBUG-32668))
* Fixed that jumping to a column that doesn't exist jumped to a different line
([QTCREATORBUG-32592](https://bugreports.qt.io/browse/QTCREATORBUG-32592))
### C++
* Fixed that autodetection of tab settings was turned on for the built-in
code styles
([QTCREATORBUG-32664](https://bugreports.qt.io/browse/QTCREATORBUG-32664))
### QML
* Fixed that `Follow Symbol Under Cursor` could open a copy in the build folder
([QTCREATORBUG-32652](https://bugreports.qt.io/browse/QTCREATORBUG-32652))
### Language Server Protocol
* Fixed the sorting in `Type Hierarchy`
Projects
--------
* Fixed a possible crash when renaming files
* Fixed a crash when canceling the download of SDKs
([QTCREATORBUG-32746](https://bugreports.qt.io/browse/QTCREATORBUG-32746))
### CMake
* Improved the detection of Ninja on macOS
([QTCREATORBUG-32331](https://bugreports.qt.io/browse/QTCREATORBUG-32331))
* Fixed a crash when adding files
([QTCREATORBUG-32745](https://bugreports.qt.io/browse/QTCREATORBUG-32745))
* Fixed `Package manager auto setup` for CMake older than 3.19
([QTCREATORBUG-32636](https://bugreports.qt.io/browse/QTCREATORBUG-32636))
Debugging
---------
* Fixed `Open Memory Editor Showing Stack Layout`
([QTCREATORBUG-32542](https://bugreports.qt.io/browse/QTCREATORBUG-32542))
### QML
Fixed that variable values in `Locals` view were not marked as changed
([QTCREATORBUG-29344](https://bugreports.qt.io/browse/QTCREATORBUG-29344))
* Fixed the re-enabling of breakpoints
([QTCREATORBUG-17294](https://bugreports.qt.io/browse/QTCREATORBUG-17294))
Analyzer
--------
### QML Profiler
* Fixed attaching to a running external application
([QTCREATORBUG-32617](https://bugreports.qt.io/browse/QTCREATORBUG-32617))
### Perf
* Fixed stopping profiling with the tool button
Terminal
--------
* Fixed issues with the `PATH` environment variable
([QTCREATORBUG-32647](https://bugreports.qt.io/browse/QTCREATORBUG-32647))
* Fixed `Enable mouse tracking`
Version Control Systems
-----------------------
### Git
* Guarded against crashes in `Branches` view
([QTCREATORBUG-32186](https://bugreports.qt.io/browse/QTCREATORBUG-32186))
Platforms
---------
### iOS
* Fixed running on iOS 17+ devices with Xcode 15.4
([QTCREATORBUG-32637](https://bugreports.qt.io/browse/QTCREATORBUG-32637))
Credits for these changes go to:
--------------------------------
Alessandro Portale
Andre Hartmann
Aurélien Brooke
Christian Kandeler
Christian Stenger
Cristian Adam
David Schulz
Eike Ziller
Jaroslaw Kobus
Jörg Bornemann
Krzysztof Chrusciel
Leena Miettinen
Lukasz Papierkowski
Marcus Tillmanns
Orgad Shaneh
Robert Löhning
Sami Shalayel
Thiago Macieira

View File

@@ -95,6 +95,8 @@ Analyzer
### Valgrind ### Valgrind
### Perf
### Cppcheck ### Cppcheck
Terminal Terminal

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -78,6 +78,8 @@
\li \c codellama:7b-code \li \c codellama:7b-code
\li \c deepseek-coder-v2:lite \li \c deepseek-coder-v2:lite
\li \c starcoder2:7b \li \c starcoder2:7b
\li \c theqtcompany/codellama-7b-qml
\li \c theqtcompany/codellama-13b-qml
\endlist \endlist
\section2 Custom models \section2 Custom models
@@ -86,6 +88,7 @@
You can use the following custom models: You can use the following custom models:
\list \list
\li \l {https://huggingface.co/QtGroup/CodeLlama-7B-QML}{codellama:7b-code-qml}
\li \l {https://huggingface.co/QtGroup/CodeLlama-13B-QML}{codellama:13b-code-qml} \li \l {https://huggingface.co/QtGroup/CodeLlama-13B-QML}{codellama:13b-code-qml}
\endlist \endlist
@@ -98,13 +101,17 @@
of your choice) of your choice)
\li Meta Code Llama 13B (for Qt 5, running in a cloud deployment of your \li Meta Code Llama 13B (for Qt 5, running in a cloud deployment of your
choice) choice)
\li Meta Code Llama 13 QML through Ollama (running locally on your
computer)
\li Meta Llama 3.3 70B QML (running in a cloud deployment of your choice) \li Meta Llama 3.3 70B QML (running in a cloud deployment of your choice)
\li Anthropic Claude 3.5 Sonnet (provided as subscription-based service \li Anthropic Claude 3.5 Sonnet (provided by Anthropic, remember that you
by Anthropic) need to have a token-based billing payment method configured for your
\li OpenAI GPT-4o (provided as subscription-based service by OpenAI) Anthropic account: \l {https://console.anthropic.com/}{console.anthropic.com})
\li OpenAI GPT-4o (provided by OpenAI, remember that you need to have a
token-based billing payment method configured for your OpenAI account:
\l {https://platform.openai.com/}{platform.openai.com})
\li Meta Code Llama 13B QML through Ollama (running locally on your computer)
\li Meta Code Llama 7B QML through Ollama (running locally on your computer)
\li Meta Code Llama 7B through Ollama (running locally on your computer) \li Meta Code Llama 7B through Ollama (running locally on your computer)
\li DeepSeek Coder V2 Lite through Ollama (running locally on your computer)
\li BigCode StarCoder2 through Ollama (running locally on your computer) \li BigCode StarCoder2 through Ollama (running locally on your computer)
\endlist \endlist

View File

@@ -1,39 +0,0 @@
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page qt-design-viewer.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-design
\title Preview UI prototypes in browsers
\image qt-design-viewer.png
Run Qt Quick UI Prototype projects in web browsers, such as Apple Safari,
Google Chrome, Microsoft Edge, and Mozilla Firefox, with \QDV.
The startup and compilation time depend on your browser and configuration.
Once started, the application performs the same as when running on the
desktop.
The .qmlproject configuration file defines the main QML file and the import
paths. Compress the project folder into a ZIP file that you upload to \QDV.
The loaded applications remain locally in your browser. No data is uploaded
into the cloud.
To preview an application in a web browser:
\list 1
\li In the browser, open \l{ https://designviewer.qt.io/}{\QDV}.
\li Drag your application package to \QDV, or select the load
icon to browse for your file.
\endlist
Your application is compiled and run on \QDV.
\sa {Create Qt Quick UI Prototypes}, {Design UIs}{How To: Design UIs},
{UI Design}
*/

View File

@@ -4,10 +4,10 @@ import qbs.FileInfo
import qbs.Utilities import qbs.Utilities
Module { Module {
property string qtcreator_display_version: '16.0.1' property string qtcreator_display_version: '16.0.2'
property string ide_version_major: '16' property string ide_version_major: '16'
property string ide_version_minor: '0' property string ide_version_minor: '0'
property string ide_version_release: '1' property string ide_version_release: '2'
property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.' property string qtcreator_version: ide_version_major + '.' + ide_version_minor + '.'
+ ide_version_release + ide_version_release

View File

@@ -1,4 +1,4 @@
set(languages cs da de en fr hr ja pl ru sl uk zh_CN zh_TW) set(languages cs da de fr hr ja pl ru sl uk zh_CN zh_TW)
set(bad_languages hu) # Fix these before including them in languages! set(bad_languages hu) # Fix these before including them in languages!
find_package(Python3 COMPONENTS Interpreter) find_package(Python3 COMPONENTS Interpreter)
@@ -45,7 +45,8 @@ else()
endif() endif()
add_translation_targets(qtcreator add_translation_targets(qtcreator
LANGUAGES ${languages} TS_LANGUAGES ${languages}
QM_LANGUAGES ${languages} en
OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}/translations" OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/${IDE_DATA_PATH}/translations"
INSTALL_DESTINATION "${IDE_DATA_PATH}/translations" INSTALL_DESTINATION "${IDE_DATA_PATH}/translations"
TARGETS "${__QTC_LIBRARIES}" "${__QTC_PLUGINS}" TARGETS "${__QTC_LIBRARIES}" "${__QTC_PLUGINS}"

View File

@@ -59705,7 +59705,7 @@ Influence lindentation des lignes de continuation.
</message> </message>
<message> <message>
<source>Swap Views</source> <source>Swap Views</source>
<translation>Afficher les vues</translation> <translation>Intervertir les vues</translation>
</message> </message>
<message> <message>
<source>JSON Editor</source> <source>JSON Editor</source>
@@ -60490,7 +60490,7 @@ Les données de la trace sont perdues.</translation>
</message> </message>
<message> <message>
<source>The command &quot;%1&quot; terminated with exit code %2.</source> <source>The command &quot;%1&quot; terminated with exit code %2.</source>
<translation>La commande «&#xa0;%1&#xa0;» sest terminée avec le code de sortie %1.</translation> <translation>La commande «&#xa0;%1&#xa0;» sest terminée avec le code de sortie %2.</translation>
</message> </message>
<message> <message>
<source>The command &quot;%1&quot; terminated abnormally.</source> <source>The command &quot;%1&quot; terminated abnormally.</source>

File diff suppressed because it is too large Load Diff

View File

@@ -157,6 +157,20 @@ if(BUILD_WITH_CRASHPAD)
) )
endif() endif()
extend_qtc_executable(qtcreator
CONDITION BUILD_WITH_SENTRY
DEFINES
SENTRY_DSN="${SENTRY_DSN}"
SENTRY_PROJECT="${SENTRY_PROJECT}"
ENABLE_SENTRY
DEPENDS sentry::sentry
)
extend_qtc_executable(qtcreator
CONDITION DEFINED SENTRY_CRASHPAD_PATH
DEFINES
SENTRY_CRASHPAD_PATH="${SENTRY_CRASHPAD_PATH}"
)
if ((NOT WIN32) AND (NOT APPLE)) if ((NOT WIN32) AND (NOT APPLE))
# install logo # install logo
foreach(size 16 24 32 48 64 128 256 512) foreach(size 16 24 32 48 64 128 256 512)

View File

@@ -54,6 +54,12 @@
#include "client/settings.h" #include "client/settings.h"
#endif #endif
#ifdef ENABLE_SENTRY
#include <sentry.h>
Q_LOGGING_CATEGORY(sentryLog, "qtc.sentry", QtWarningMsg)
#endif
using namespace ExtensionSystem; using namespace ExtensionSystem;
using namespace Utils; using namespace Utils;
@@ -496,6 +502,35 @@ void startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled)
} }
#endif #endif
#ifdef ENABLE_SENTRY
void configureSentry(const AppInfo &appInfo, bool crashReportingEnabled)
{
if (!crashReportingEnabled)
return;
sentry_options_t *options = sentry_options_new();
sentry_options_set_dsn(options, SENTRY_DSN);
#ifdef Q_OS_WIN
sentry_options_set_database_pathw(options, appInfo.crashReports.nativePath().toStdWString().c_str());
#else
sentry_options_set_database_path(options, appInfo.crashReports.nativePath().toUtf8().constData());
#endif
#ifdef SENTRY_CRASHPAD_PATH
if (const FilePath handlerpath = appInfo.libexec / "crashpad_handler"; handlerpath.exists()) {
sentry_options_set_handler_path(options, handlerpath.nativePath().toUtf8().constData());
} else if (const auto fallback = FilePath::fromString(SENTRY_CRASHPAD_PATH); fallback.exists()) {
sentry_options_set_handler_path(options, fallback.nativePath().toUtf8().constData());
} else {
qCWarning(sentryLog) << "Failed to find crashpad_handler for Sentry crash reports.";
}
#endif
const QString release = QString(SENTRY_PROJECT) + "@" + QCoreApplication::applicationVersion();
sentry_options_set_release(options, release.toUtf8().constData());
sentry_options_set_debug(options, sentryLog().isDebugEnabled() ? 1 : 0);
sentry_init(options);
}
#endif
class ShowInGuiHandler class ShowInGuiHandler
{ {
public: public:
@@ -792,10 +827,15 @@ int main(int argc, char **argv)
CrashHandlerSetup setupCrashHandler( CrashHandlerSetup setupCrashHandler(
Core::Constants::IDE_DISPLAY_NAME, CrashHandlerSetup::EnableRestart, info.libexec.path()); Core::Constants::IDE_DISPLAY_NAME, CrashHandlerSetup::EnableRestart, info.libexec.path());
#ifdef ENABLE_CRASHPAD
// depends on AppInfo and QApplication being created // depends on AppInfo and QApplication being created
bool crashReportingEnabled = settings->value("CrashReportingEnabled", false).toBool(); const bool crashReportingEnabled = settings->value("CrashReportingEnabled", false).toBool();
#if defined(ENABLE_CRASHPAD)
startCrashpad(info, crashReportingEnabled); startCrashpad(info, crashReportingEnabled);
#elif defined(ENABLE_SENTRY)
configureSentry(info, crashReportingEnabled);
#else
Q_UNUSED(crashReportingEnabled)
#endif #endif
PluginManager pluginManager; PluginManager pluginManager;
@@ -983,5 +1023,9 @@ int main(int argc, char **argv)
QApplication::setEffectEnabled(Qt::UI_AnimateMenu, false); QApplication::setEffectEnabled(Qt::UI_AnimateMenu, false);
} }
return restarter.restartOrExit(app.exec()); const int exitCode = restarter.restartOrExit(app.exec());
#ifdef ENABLE_SENTRY
sentry_close();
#endif
return exitCode;
} }

View File

@@ -51,7 +51,7 @@ void NetworkQuery::start()
NetworkQuery::~NetworkQuery() NetworkQuery::~NetworkQuery()
{ {
if (m_reply) { if (m_reply) {
disconnect(m_reply.get(), &QNetworkReply::finished, this, nullptr); disconnect(m_reply.get(), nullptr, this, nullptr);
m_reply->abort(); m_reply->abort();
} }
} }

View File

@@ -192,7 +192,6 @@ struct TerminalSurfacePrivate
vterm_state_set_palette_color(vts, i, &col); vterm_state_set_palette_color(vts, i, &col);
} }
vterm_screen_enable_reflow(m_vtermScreen, true);
vterm_screen_reset(m_vtermScreen, 1); vterm_screen_reset(m_vtermScreen, 1);
} }

View File

@@ -278,6 +278,11 @@ void TerminalView::setPasswordMode(bool passwordMode)
} }
} }
void TerminalView::enableMouseTracking(bool enable)
{
d->m_allowMouseTracking = enable;
}
void TerminalView::setFont(const QFont &font) void TerminalView::setFont(const QFont &font)
{ {
QAbstractScrollArea::setFont(font); QAbstractScrollArea::setFont(font);

View File

@@ -55,6 +55,8 @@ public:
void setFont(const QFont &font); void setFont(const QFont &font);
void enableMouseTracking(bool enable);
void copyToClipboard(); void copyToClipboard();
void pasteFromClipboard(); void pasteFromClipboard();
void copyLinkToClipboard(); void copyLinkToClipboard();

View File

@@ -29,6 +29,8 @@
#include <QTextBlock> #include <QTextBlock>
#include <QTextBrowser> #include <QTextBrowser>
#include <QTextDocument> #include <QTextDocument>
#include <QTextDocumentFragment>
#include <QTextDocumentWriter>
#include <QTextObjectInterface> #include <QTextObjectInterface>
namespace Utils { namespace Utils {
@@ -862,6 +864,31 @@ void MarkdownBrowser::mousePressEvent(QMouseEvent *event)
QTextBrowser::mousePressEvent(event); QTextBrowser::mousePressEvent(event);
} }
QMimeData *MarkdownBrowser::createMimeDataFromSelection() const
{
// Basically a copy of QTextEditMimeData::setup, just replacing the object markers.
QMimeData *mimeData = new QMimeData;
QTextDocumentFragment fragment(textCursor());
static const auto removeObjectChar = [](QString &&text) {
return text.replace(QChar::ObjectReplacementCharacter, "");
};
mimeData->setData("text/html", removeObjectChar(fragment.toHtml()).toUtf8());
mimeData->setData("text/markdown", removeObjectChar(fragment.toMarkdown()).toUtf8());
{
QBuffer buffer;
QTextDocumentWriter writer(&buffer, "ODF");
if (writer.write(fragment)) {
buffer.close();
mimeData->setData("application/vnd.oasis.opendocument.text", buffer.data());
}
}
mimeData->setText(removeObjectChar(fragment.toPlainText()));
return mimeData;
}
} // namespace Utils } // namespace Utils
#include "markdownbrowser.moc" #include "markdownbrowser.moc"

View File

@@ -42,6 +42,8 @@ protected:
void changeEvent(QEvent *event) override; void changeEvent(QEvent *event) override;
void mousePressEvent(QMouseEvent *event) override; void mousePressEvent(QMouseEvent *event) override;
QMimeData *createMimeDataFromSelection() const override;
private: private:
void handleAnchorClicked(const QUrl &link); void handleAnchorClicked(const QUrl &link);
void postProcessDocument(bool firstTime); void postProcessDocument(bool firstTime);

View File

@@ -95,6 +95,7 @@ GroupItem downloadSdkRecipe()
progressDialog.reset(new QProgressDialog(Tr::tr("Downloading SDK Tools package..."), progressDialog.reset(new QProgressDialog(Tr::tr("Downloading SDK Tools package..."),
Tr::tr("Cancel"), 0, 100, Core::ICore::dialogParent())); Tr::tr("Cancel"), 0, 100, Core::ICore::dialogParent()));
progressDialog->setWindowModality(Qt::ApplicationModal); progressDialog->setWindowModality(Qt::ApplicationModal);
progressDialog->setMinimumDuration(INT_MAX); // In order to suppress calls to processEvents() from setValue()
progressDialog->setWindowTitle(dialogTitle()); progressDialog->setWindowTitle(dialogTitle());
progressDialog->setFixedSize(progressDialog->sizeHint()); progressDialog->setFixedSize(progressDialog->sizeHint());
progressDialog->setAutoClose(false); progressDialog->setAutoClose(false);

View File

@@ -504,7 +504,7 @@ static bool sdkManagerCommand(const QStringList &args, QString *output)
proc.setCommand({AndroidConfig::sdkManagerToolPath(), newArgs}); proc.setCommand({AndroidConfig::sdkManagerToolPath(), newArgs});
qCDebug(sdkManagerLog).noquote() << "Running SDK Manager command (sync):" qCDebug(sdkManagerLog).noquote() << "Running SDK Manager command (sync):"
<< proc.commandLine().toUserOutput(); << proc.commandLine().toUserOutput();
proc.runBlocking(60s, EventLoopMode::On); proc.runBlocking(60s);
if (output) if (output)
*output = proc.allOutput(); *output = proc.allOutput();
return proc.result() == ProcessResult::FinishedWithSuccess; return proc.result() == ProcessResult::FinishedWithSuccess;

View File

@@ -317,6 +317,7 @@ void AvdDialog::createAvd()
progressDialog.reset(new QProgressDialog(Core::ICore::dialogParent())); progressDialog.reset(new QProgressDialog(Core::ICore::dialogParent()));
progressDialog->setRange(0, 0); progressDialog->setRange(0, 0);
progressDialog->setWindowModality(Qt::ApplicationModal); progressDialog->setWindowModality(Qt::ApplicationModal);
progressDialog->setMinimumDuration(INT_MAX); // In order to suppress calls to processEvents() from setValue()
progressDialog->setWindowTitle("Create new AVD"); progressDialog->setWindowTitle("Create new AVD");
progressDialog->setLabelText(Tr::tr("Creating new AVD device...")); progressDialog->setLabelText(Tr::tr("Creating new AVD device..."));
progressDialog->setFixedSize(progressDialog->sizeHint()); progressDialog->setFixedSize(progressDialog->sizeHint());

View File

@@ -174,7 +174,7 @@ public:
m_error->setVisible(!text.isEmpty()); m_error->setVisible(!text.isEmpty());
m_error->setText(text); m_error->setText(text);
m_error->setType(type == Warning ? InfoLabel::Warning : InfoLabel::Error); m_error->setType(type == Warning ? InfoLabel::Warning : InfoLabel::Error);
m_error->disconnect(); disconnect(m_error, &QLabel::linkActivated, this, nullptr);
if (linkAction) if (linkAction)
connect(m_error, &QLabel::linkActivated, this, linkAction); connect(m_error, &QLabel::linkActivated, this, linkAction);
evaluateVisibility(); evaluateVisibility();

View File

@@ -697,6 +697,11 @@ bool CMakeBuildSystem::addSrcFiles(Node *context, const FilePaths &filePaths, Fi
<< "could not be found at" << targetDefinitionLine; << "could not be found at" << targetDefinitionLine;
return false; return false;
} }
if (function->Arguments().size() == 0) {
qCCritical(cmakeBuildSystemLog) << "Function that defined the target" << targetName
<< "has zero arguments.";
return false;
}
const bool haveGlobbing = isGlobbingFunction(*cmakeListFile, *function); const bool haveGlobbing = isGlobbingFunction(*cmakeListFile, *function);
n->setVisibleAfterAddFileAction(!haveGlobbing); n->setVisibleAfterAddFileAction(!haveGlobbing);

View File

@@ -708,8 +708,12 @@ bool CMakeGeneratorKitAspectFactory::isNinjaPresent(const Kit *k, const CMakeToo
return true; return true;
if (Internal::settings(nullptr).ninjaPath().isEmpty()) { if (Internal::settings(nullptr).ninjaPath().isEmpty()) {
auto findNinja = [](const Environment &env) -> bool { FilePaths extraDirs;
return !env.searchInPath("ninja").isEmpty(); if (tool->filePath().osType() == OsTypeMac)
extraDirs << tool->filePath().parentDir();
auto findNinja = [extraDirs](const Environment &env) -> bool {
return !env.searchInPath("ninja", extraDirs).isEmpty();
}; };
if (!findNinja(tool->filePath().deviceEnvironment())) if (!findNinja(tool->filePath().deviceEnvironment()))
return findNinja(k->buildEnvironment()); return findNinja(k->buildEnvironment());

View File

@@ -322,8 +322,13 @@ extend_qtc_plugin(Core
) )
extend_qtc_plugin(Core extend_qtc_plugin(Core
CONDITION BUILD_WITH_CRASHPAD CONDITION BUILD_WITH_CRASHPAD OR BUILD_WITH_SENTRY
DEFINES ENABLE_CRASHPAD DEFINES ENABLE_CRASHREPORTING
)
extend_qtc_plugin(Core
CONDITION BUILD_WITH_CRASHPAD OR (BUILD_WITH_SENTRY AND SENTRY_CRASHPAD_PATH)
DEFINES CRASHREPORTING_USES_CRASHPAD
) )
set(FONTS_BASE "${QtCreator_SOURCE_DIR}/src/share/3rdparty/studiofonts/") set(FONTS_BASE "${QtCreator_SOURCE_DIR}/src/share/3rdparty/studiofonts/")

View File

@@ -551,6 +551,7 @@ ActionManager::ActionManager(QObject *parent)
ActionManager::~ActionManager() ActionManager::~ActionManager()
{ {
delete d; delete d;
d = nullptr;
} }
/*! /*!
@@ -734,6 +735,8 @@ QList<Command *> ActionManager::commands()
*/ */
void ActionManager::unregisterAction(QAction *action, Id id) void ActionManager::unregisterAction(QAction *action, Id id)
{ {
if (!d) // stray call during shutdown
return;
Command *cmd = d->m_idCmdMap.value(id, nullptr); Command *cmd = d->m_idCmdMap.value(id, nullptr);
if (!cmd) { if (!cmd) {
qWarning() << "unregisterAction: id" << id.name() qWarning() << "unregisterAction: id" << id.name()

View File

@@ -359,8 +359,12 @@ bool CorePlugin::initialize(const QStringList &arguments, QString *errorMessage)
Utils::PathChooser::setAboutToShowContextMenuHandler(&addToPathChooserContextMenu); Utils::PathChooser::setAboutToShowContextMenuHandler(&addToPathChooserContextMenu);
#ifdef ENABLE_CRASHPAD #ifdef ENABLE_CRASHREPORTING
connect(ICore::instance(), &ICore::coreOpened, this, &CorePlugin::warnAboutCrashReporing, connect(
ICore::instance(),
&ICore::coreOpened,
this,
&CorePlugin::warnAboutCrashReporing,
Qt::QueuedConnection); Qt::QueuedConnection);
#endif #endif
@@ -542,19 +546,33 @@ void CorePlugin::warnAboutCrashReporing()
// static // static
QString CorePlugin::msgCrashpadInformation() QString CorePlugin::msgCrashpadInformation()
{ {
return Tr::tr("%1 uses Google Crashpad for collecting crashes and sending them to Sentry " #if ENABLE_CRASHREPORTING
"for processing. Crashpad may capture arbitrary contents from crashed process " #if CRASHREPORTING_USES_CRASHPAD
const QString backend = "Google Crashpad";
const QString url
= "https://chromium.googlesource.com/crashpad/crashpad/+/master/doc/overview_design.md";
#else
const QString backend = "Google Breakpad";
const QString url
= "https://chromium.googlesource.com/breakpad/breakpad/+/HEAD/docs/client_design.md";
#endif
//: %1 = application name, %2 crash backend name (Google Crashpad or Google Breakpad)
return Tr::tr("%1 uses %2 for collecting crashes and sending them to Sentry "
"for processing. %2 may capture arbitrary contents from crashed process "
"memory, including user sensitive information, URLs, and whatever other content " "memory, including user sensitive information, URLs, and whatever other content "
"users have trusted %1 with. The collected crash reports are however only used " "users have trusted %1 with. The collected crash reports are however only used "
"for the sole purpose of fixing bugs.") "for the sole purpose of fixing bugs.")
.arg(QGuiApplication::applicationDisplayName()) .arg(QGuiApplication::applicationDisplayName(), backend)
+ "<br><br>" + Tr::tr("More information:") + "<br><br>" + Tr::tr("More information:") + "<br><a href='" + url
+ "<br><a href='https://chromium.googlesource.com/crashpad/crashpad/+/master/doc/" + "'>"
"overview_design.md'>" //: %1 = crash backend name (Google Crashpad or Google Breakpad)
+ Tr::tr("Crashpad Overview") + Tr::tr("%1 Overview").arg(backend)
+ "</a>" + "</a>"
"<br><a href='https://sentry.io/security/'>" "<br><a href='https://sentry.io/security/'>"
+ Tr::tr("%1 security policy").arg("Sentry.io") + "</a>"; + Tr::tr("%1 security policy").arg("Sentry.io") + "</a>";
#else
return {};
#endif
} }
ExtensionSystem::IPlugin::ShutdownFlag CorePlugin::aboutToShutdown() ExtensionSystem::IPlugin::ShutdownFlag CorePlugin::aboutToShutdown()

View File

@@ -12,7 +12,7 @@
#include "iversioncontrol.h" // sic! #include "iversioncontrol.h" // sic!
#include "vcsmanager.h" #include "vcsmanager.h"
#ifdef ENABLE_CRASHPAD #ifdef ENABLE_CRASHREPORTING
#include "coreplugin.h" #include "coreplugin.h"
#endif #endif
@@ -42,7 +42,7 @@ using namespace Layouting;
namespace Core::Internal { namespace Core::Internal {
#ifdef ENABLE_CRASHPAD #ifdef CRASHREPORTING_USES_CRASHPAD
// TODO: move to somewhere in Utils // TODO: move to somewhere in Utils
static QString formatSize(qint64 size) static QString formatSize(qint64 size)
{ {
@@ -57,7 +57,7 @@ static QString formatSize(qint64 size)
return i == 0 ? QString("%0 %1").arg(outputSize).arg(units[i]) // Bytes return i == 0 ? QString("%0 %1").arg(outputSize).arg(units[i]) // Bytes
: QString("%0 %1").arg(outputSize, 0, 'f', 2).arg(units[i]); // KB, MB, GB, TB : QString("%0 %1").arg(outputSize, 0, 'f', 2).arg(units[i]); // KB, MB, GB, TB
} }
#endif // ENABLE_CRASHPAD #endif // CRASHREPORTING_USES_CRASHPAD
SystemSettings &systemSettings() SystemSettings &systemSettings()
{ {
@@ -147,15 +147,17 @@ SystemSettings::SystemSettings()
askBeforeExit.setLabelText(Tr::tr("Ask for confirmation before exiting")); askBeforeExit.setLabelText(Tr::tr("Ask for confirmation before exiting"));
askBeforeExit.setLabelPlacement(BoolAspect::LabelPlacement::Compact); askBeforeExit.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
#ifdef ENABLE_CRASHPAD #ifdef ENABLE_CRASHREPORTING
enableCrashReporting.setSettingsKey("CrashReportingEnabled"); enableCrashReporting.setSettingsKey("CrashReportingEnabled");
enableCrashReporting.setLabelPlacement(BoolAspect::LabelPlacement::Compact); enableCrashReporting.setLabelPlacement(BoolAspect::LabelPlacement::Compact);
enableCrashReporting.setLabelText(Tr::tr("Enable crash reporting")); enableCrashReporting.setLabelText(Tr::tr("Enable crash reporting"));
enableCrashReporting.setToolTip( enableCrashReporting.setToolTip(
Tr::tr("Allow crashes to be automatically reported. Collected reports are " "<p>"
"used for the sole purpose of fixing bugs.")); + Tr::tr("Allow crashes to be automatically reported. Collected reports are "
"used for the sole purpose of fixing bugs.")
#endif + "</p><p>"
+ Tr::tr("Crash reports are saved in \"%1\".").arg(appInfo().crashReports.toUserOutput()));
#endif // ENABLE_CRASHREPORTING
readSettings(); readSettings();
autoSaveInterval.setEnabler(&autoSaveModifiedFiles); autoSaveInterval.setEnabler(&autoSaveModifiedFiles);
@@ -176,7 +178,7 @@ public:
, m_terminalOpenArgs(new QLineEdit) , m_terminalOpenArgs(new QLineEdit)
, m_terminalExecuteArgs(new QLineEdit) , m_terminalExecuteArgs(new QLineEdit)
, m_environmentChangesLabel(new Utils::ElidingLabel) , m_environmentChangesLabel(new Utils::ElidingLabel)
#ifdef ENABLE_CRASHPAD #ifdef CRASHREPORTING_USES_CRASHPAD
, m_crashReportsMenuButton(new QPushButton(Tr::tr("Manage"), this)) , m_crashReportsMenuButton(new QPushButton(Tr::tr("Manage"), this))
, m_crashReportsSizeText(new QLabel(this)) , m_crashReportsSizeText(new QLabel(this))
#endif #endif
@@ -201,9 +203,12 @@ public:
resetFileBrowserButton->setToolTip(Tr::tr("Reset to default.")); resetFileBrowserButton->setToolTip(Tr::tr("Reset to default."));
auto helpExternalFileBrowserButton = new QToolButton; auto helpExternalFileBrowserButton = new QToolButton;
helpExternalFileBrowserButton->setText(Tr::tr("?")); helpExternalFileBrowserButton->setText(Tr::tr("?"));
#ifdef ENABLE_CRASHPAD #ifdef ENABLE_CRASHREPORTING
auto helpCrashReportingButton = new QToolButton(this); auto helpCrashReportingButton = new QToolButton(this);
helpCrashReportingButton->setText(Tr::tr("?")); helpCrashReportingButton->setText(Tr::tr("?"));
connect(helpCrashReportingButton, &QAbstractButton::clicked, this, [this] {
showHelpDialog(Tr::tr("Crash Reporting"), CorePlugin::msgCrashpadInformation());
});
#endif #endif
auto resetTerminalButton = new QPushButton(Tr::tr("Reset")); auto resetTerminalButton = new QPushButton(Tr::tr("Reset"));
resetTerminalButton->setToolTip(Tr::tr("Reset to default.", "Terminal")); resetTerminalButton->setToolTip(Tr::tr("Reset to default.", "Terminal"));
@@ -243,15 +248,16 @@ public:
grid.addRow({Tr::tr("Maximum number of entries in \"Recent Files\":"), grid.addRow({Tr::tr("Maximum number of entries in \"Recent Files\":"),
Row{s.maxRecentFiles, st}}); Row{s.maxRecentFiles, st}});
grid.addRow({s.askBeforeExit}); grid.addRow({s.askBeforeExit});
#ifdef ENABLE_CRASHPAD #ifdef ENABLE_CRASHREPORTING
const QString toolTip = Tr::tr("Crash reports are saved in \"%1\".") Row crashDetails;
.arg(appInfo().crashReports.toUserOutput()); #ifdef CRASHREPORTING_USES_CRASHPAD
m_crashReportsMenuButton->setToolTip(toolTip); m_crashReportsMenuButton->setToolTip(s.enableCrashReporting.toolTip());
m_crashReportsSizeText->setToolTip(toolTip); m_crashReportsSizeText->setToolTip(s.enableCrashReporting.toolTip());
auto crashReportsMenu = new QMenu(m_crashReportsMenuButton); auto crashReportsMenu = new QMenu(m_crashReportsMenuButton);
m_crashReportsMenuButton->setMenu(crashReportsMenu); m_crashReportsMenuButton->setMenu(crashReportsMenu);
Row crashDetails crashDetails.addItems({m_crashReportsMenuButton, m_crashReportsSizeText});
= Row{m_crashReportsMenuButton, m_crashReportsSizeText, helpCrashReportingButton, st}; #endif // CRASHREPORTING_USES_CRASHPAD
crashDetails.addItem(helpCrashReportingButton);
if (qtcEnvironmentVariableIsSet("QTC_SHOW_CRASHBUTTON")) { if (qtcEnvironmentVariableIsSet("QTC_SHOW_CRASHBUTTON")) {
auto crashButton = new QPushButton("CRASH!!!"); auto crashButton = new QPushButton("CRASH!!!");
connect(crashButton, &QPushButton::clicked, [] { connect(crashButton, &QPushButton::clicked, [] {
@@ -261,6 +267,7 @@ public:
}); });
crashDetails.addItem(crashButton); crashDetails.addItem(crashButton);
} }
crashDetails.addItem(st);
grid.addRow({s.enableCrashReporting, crashDetails}); grid.addRow({s.enableCrashReporting, crashDetails});
#endif #endif
@@ -287,19 +294,19 @@ public:
m_externalFileBrowserEdit->setText(UnixUtils::fileBrowser(ICore::settings())); m_externalFileBrowserEdit->setText(UnixUtils::fileBrowser(ICore::settings()));
} }
#ifdef ENABLE_CRASHPAD #if defined(ENABLE_CRASHREPORTING) && defined(CRASHREPORTING_USES_CRASHPAD)
connect(helpCrashReportingButton, &QAbstractButton::clicked, this, [this] { const FilePaths reportsPaths
showHelpDialog(Tr::tr("Crash Reporting"), CorePlugin::msgCrashpadInformation()); = {ICore::crashReportsPath() / "completed",
}); ICore::crashReportsPath() / "reports",
ICore::crashReportsPath() / "attachments",
const FilePath reportsPath = ICore::crashReportsPath() ICore::crashReportsPath() / "pending",
/ QLatin1String( ICore::crashReportsPath() / "new"};
HostOsInfo::isMacHost() ? "completed" : "reports");
auto openLocationAction = new QAction(Tr::tr("Go to crash reports")); auto openLocationAction = new QAction(Tr::tr("Go to crash reports"));
connect(openLocationAction, &QAction::triggered, this, [this, reportsPath] { connect(openLocationAction, &QAction::triggered, this, [reportsPaths] {
if (!QDesktopServices::openUrl(reportsPath.toUrl())) { const FilePath path = reportsPaths.first().parentDir();
qWarning() << "Failed to open path:" << reportsPath; if (!QDesktopServices::openUrl(path.toUrl())) {
qWarning() << "Failed to open path:" << path;
} }
}); });
crashReportsMenu->addAction(openLocationAction); crashReportsMenu->addAction(openLocationAction);
@@ -307,12 +314,16 @@ public:
auto clearAction = new QAction(Tr::tr("Clear crash reports")); auto clearAction = new QAction(Tr::tr("Clear crash reports"));
crashReportsMenu->addAction(clearAction); crashReportsMenu->addAction(clearAction);
const auto updateClearCrashWidgets = [this, reportsPath] { const auto updateClearCrashWidgets = [this, reportsPaths] {
qint64 size = 0; qint64 size = 0;
const FilePaths crashFiles = reportsPath.dirEntries(QDir::Files); FilePath::iterateDirectories(
for (const FilePath &file : crashFiles) reportsPaths,
size += file.fileSize(); [&size](const FilePath &item) {
m_crashReportsMenuButton->setEnabled(!crashFiles.isEmpty()); size += item.fileSize();
return IterationPolicy::Continue;
},
FileFilter({}, QDir::Files, QDirIterator::Subdirectories));
m_crashReportsMenuButton->setEnabled(size > 0);
m_crashReportsSizeText->setText(formatSize(size)); m_crashReportsSizeText->setText(formatSize(size));
}; };
updateClearCrashWidgets(); updateClearCrashWidgets();
@@ -320,13 +331,17 @@ public:
clearAction, clearAction,
&QAction::triggered, &QAction::triggered,
this, this,
[updateClearCrashWidgets, reportsPath] { [updateClearCrashWidgets, reportsPaths] {
const FilePaths &crashFiles = reportsPath.dirEntries(QDir::Files); FilePath::iterateDirectories(
for (const FilePath &file : crashFiles) reportsPaths,
file.removeFile(); [](const FilePath &item) {
item.removeRecursively();
return IterationPolicy::Continue;
},
FileFilter({}, QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot));
updateClearCrashWidgets(); updateClearCrashWidgets();
}); });
#endif #endif // ENABLE_CRASHREPORTING && CRASHREPORTING_USES_CRASHPAD
if (HostOsInfo::isAnyUnixHost()) { if (HostOsInfo::isAnyUnixHost()) {
connect(resetTerminalButton, connect(resetTerminalButton,
@@ -405,7 +420,7 @@ private:
QLineEdit *m_terminalOpenArgs; QLineEdit *m_terminalOpenArgs;
QLineEdit *m_terminalExecuteArgs; QLineEdit *m_terminalExecuteArgs;
Utils::ElidingLabel *m_environmentChangesLabel; Utils::ElidingLabel *m_environmentChangesLabel;
#ifdef ENABLE_CRASHPAD #ifdef CRASHREPORTING_USES_CRASHPAD
QPushButton *m_crashReportsMenuButton; QPushButton *m_crashReportsMenuButton;
QLabel *m_crashReportsSizeText; QLabel *m_crashReportsSizeText;
#endif #endif

View File

@@ -34,7 +34,7 @@ public:
Utils::SelectionAspect reloadSetting{this}; Utils::SelectionAspect reloadSetting{this};
#ifdef ENABLE_CRASHPAD #ifdef ENABLE_CRASHREPORTING
Utils::BoolAspect enableCrashReporting{this}; Utils::BoolAspect enableCrashReporting{this};
#endif #endif

View File

@@ -22,6 +22,7 @@
#include <coreplugin/messagemanager.h> #include <coreplugin/messagemanager.h>
#include <extensionsystem/iplugin.h> #include <extensionsystem/iplugin.h>
#include <extensionsystem/pluginmanager.h>
#include <utils/algorithm.h> #include <utils/algorithm.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
@@ -74,6 +75,7 @@ class CodePasterPluginPrivate : public QObject
{ {
public: public:
CodePasterPluginPrivate(); CodePasterPluginPrivate();
~CodePasterPluginPrivate();
void post(PasteSource pasteSources); void post(PasteSource pasteSources);
void post(QString data, const QString &mimeType); void post(QString data, const QString &mimeType);
@@ -173,6 +175,13 @@ CodePasterPluginPrivate::CodePasterPluginPrivate()
.setText(Tr::tr("Fetch from URL...")) .setText(Tr::tr("Fetch from URL..."))
.addToContainer(menu) .addToContainer(menu)
.addOnTriggered(this, &CodePasterPluginPrivate::fetchUrl); .addOnTriggered(this, &CodePasterPluginPrivate::fetchUrl);
ExtensionSystem::PluginManager::addObject(&m_service);
}
CodePasterPluginPrivate::~CodePasterPluginPrivate()
{
ExtensionSystem::PluginManager::removeObject(&m_service);
} }
static inline void textFromCurrentEditor(QString *text, QString *mimeType) static inline void textFromCurrentEditor(QString *text, QString *mimeType)

View File

@@ -355,6 +355,7 @@ void KitDetectorPrivate::autoDetect()
RunDeviceTypeKitAspect::setDeviceTypeId(k, m_device->type()); RunDeviceTypeKitAspect::setDeviceTypeId(k, m_device->type());
RunDeviceKitAspect::setDevice(k, m_device); RunDeviceKitAspect::setDevice(k, m_device);
BuildDeviceTypeKitAspect::setDeviceTypeId(k, m_device->type());
BuildDeviceKitAspect::setDevice(k, m_device); BuildDeviceKitAspect::setDevice(k, m_device);
const Toolchains toolchainCandidates = ToolchainManager::toolchains( const Toolchains toolchainCandidates = ToolchainManager::toolchains(

View File

@@ -697,6 +697,7 @@ void ExtensionManagerWidget::fetchAndInstallPlugin(const QUrl &url, const QStrin
Tr::tr("Downloading..."), Tr::tr("Cancel"), 0, 0, ICore::dialogParent())); Tr::tr("Downloading..."), Tr::tr("Cancel"), 0, 0, ICore::dialogParent()));
progressDialog->setWindowTitle(Tr::tr("Download Extension")); progressDialog->setWindowTitle(Tr::tr("Download Extension"));
progressDialog->setWindowModality(Qt::ApplicationModal); progressDialog->setWindowModality(Qt::ApplicationModal);
progressDialog->setMinimumDuration(INT_MAX); // In order to suppress calls to processEvents() from setValue()
progressDialog->setFixedSize(progressDialog->sizeHint()); progressDialog->setFixedSize(progressDialog->sizeHint());
progressDialog->setAutoClose(false); progressDialog->setAutoClose(false);
progressDialog->show(); // TODO: Should not be needed. Investigate possible QT_BUG progressDialog->show(); // TODO: Should not be needed. Investigate possible QT_BUG

View File

@@ -69,23 +69,25 @@ bool BlameMark::addToolTipContent(QLayout *target) const
auto textLabel = new QLabel; auto textLabel = new QLabel;
textLabel->setText(toolTip()); textLabel->setText(toolTip());
target->addWidget(textLabel); target->addWidget(textLabel);
QObject::connect(textLabel, &QLabel::linkActivated, textLabel, [this](const QString &link) { QObject::connect(
textLabel, &QLabel::linkActivated, textLabel, [info = m_info](const QString &link) {
qCInfo(log) << "Link activated with target:" << link; qCInfo(log) << "Link activated with target:" << link;
const QString hash = (link == "blameParent") ? m_info.hash + "^" : m_info.hash; const QString hash = (link == "blameParent") ? info.hash + "^" : info.hash;
if (link.startsWith("blame") || link == "showFile") { if (link.startsWith("blame") || link == "showFile") {
const VcsBasePluginState state = currentState(); const VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasTopLevel(), return); QTC_ASSERT(state.hasTopLevel(), return);
const Utils::FilePath path = state.topLevel(); const Utils::FilePath path = state.topLevel();
const QString originalFileName = m_info.originalFileName; const QString originalFileName = info.originalFileName;
if (link.startsWith("blame")) { if (link.startsWith("blame")) {
qCInfo(log).nospace().noquote() << "Blaming: \"" << path << "/" << originalFileName qCInfo(log).nospace().noquote()
<< "\":" << m_info.originalLine << " @ " << hash; << "Blaming: \"" << path << "/" << originalFileName
gitClient().annotate(path, originalFileName, m_info.originalLine, hash); << "\":" << info.originalLine << " @ " << hash;
gitClient().annotate(path, originalFileName, info.originalLine, hash);
} else { } else {
qCInfo(log).nospace().noquote() << "Showing file: \"" << path << "/" qCInfo(log).nospace().noquote()
<< originalFileName << "\" @ " << hash; << "Showing file: \"" << path << "/" << originalFileName << "\" @ " << hash;
const auto fileName = Utils::FilePath::fromString(originalFileName); const auto fileName = Utils::FilePath::fromString(originalFileName);
gitClient().openShowEditor(path, hash, fileName); gitClient().openShowEditor(path, hash, fileName);
@@ -94,15 +96,16 @@ bool BlameMark::addToolTipContent(QLayout *target) const
const VcsBasePluginState state = currentState(); const VcsBasePluginState state = currentState();
QTC_ASSERT(state.hasFile(), return); QTC_ASSERT(state.hasFile(), return);
qCInfo(log).nospace().noquote() << "Showing log for: \"" << m_info.filePath qCInfo(log).nospace().noquote()
<< "\" line:" << m_info.line; << "Showing log for: \"" << info.filePath << "\" line:" << info.line;
const QString lineArg = QString("-L %1,%1:%2") const QString lineArg
.arg(m_info.line).arg(state.relativeCurrentFile()); = QString("-L %1,%1:%2").arg(info.line).arg(state.relativeCurrentFile());
gitClient().log(state.currentFileTopLevel(), {}, true, {lineArg, "--no-patch"}); gitClient().log(state.currentFileTopLevel(), {}, true, {lineArg, "--no-patch"});
} else { } else {
qCInfo(log).nospace().noquote() << "Showing commit: " << hash << " for " << m_info.filePath; qCInfo(log).nospace().noquote()
gitClient().show(m_info.filePath, hash); << "Showing commit: " << hash << " for " << info.filePath;
gitClient().show(info.filePath, hash);
} }
}); });

View File

@@ -660,7 +660,8 @@ void LanguageClientManager::documentOpened(Core::IDocument *document)
clients.removeAll(clientForProject); clients.removeAll(clientForProject);
} }
} else if (setting->m_startBehavior == BaseSettings::RequiresFile && clients.isEmpty()) { } else if (setting->m_startBehavior == BaseSettings::RequiresFile && clients.isEmpty()) {
clients << startClient(setting); if (Client *client = startClient(setting); QTC_GUARD(client))
clients << client;
} }
allClients << clients; allClients << clients;
} }

View File

@@ -618,6 +618,7 @@ Client *BaseSettings::createClient(ProjectExplorer::Project *project) const
BaseClientInterface *interface = createInterface(project); BaseClientInterface *interface = createInterface(project);
QTC_ASSERT(interface, return nullptr); QTC_ASSERT(interface, return nullptr);
auto *client = createClient(interface); auto *client = createClient(interface);
QTC_ASSERT(client, return nullptr);
if (client->name().isEmpty()) if (client->name().isEmpty())
client->setName(Utils::globalMacroExpander()->expand(m_name)); client->setName(Utils::globalMacroExpander()->expand(m_name));

View File

@@ -7,10 +7,11 @@
#include <utils/stringutils.h> #include <utils/stringutils.h>
#include <QAction>
#include <QApplication> #include <QApplication>
#include <QClipboard> #include <QClipboard>
#include <QCursor>
#include <QCompleter> #include <QCompleter>
#include <QCursor>
#include <QDir> #include <QDir>
#include <QFileDevice> #include <QFileDevice>
#include <QFontMetrics> #include <QFontMetrics>
@@ -26,6 +27,40 @@ void setupQtModule()
sol::table qt(lua, sol::create); sol::table qt(lua, sol::create);
const ScriptPluginSpec *pluginSpec = lua.get<ScriptPluginSpec *>("PluginSpec"sv); const ScriptPluginSpec *pluginSpec = lua.get<ScriptPluginSpec *>("PluginSpec"sv);
qt.new_usertype<QAction>(
"QAction",
sol::no_constructor,
"checkable",
sol::property(&QAction::isCheckable, &QAction::setCheckable),
"checked",
sol::property(&QAction::isChecked, &QAction::setChecked),
"enabled",
sol::property(&QAction::isEnabled, &QAction::setEnabled),
"icon",
sol::property(
&QAction::icon,
[](QAction *action, IconFilePathOrString icon) {
action->setIcon(toIcon(icon)->icon());
}),
"text",
sol::property(&QAction::text, &QAction::setText),
"iconText",
sol::property(&QAction::iconText, &QAction::setIconText),
"toolTip",
sol::property(&QAction::toolTip, &QAction::setToolTip),
"statusTip",
sol::property(&QAction::statusTip, &QAction::setStatusTip),
"whatsThis",
sol::property(&QAction::whatsThis, &QAction::setWhatsThis),
"visible",
sol::property(&QAction::isVisible, &QAction::setVisible),
"iconVisibleInMenu",
sol::property(&QAction::isIconVisibleInMenu, &QAction::setIconVisibleInMenu),
"shortcutVisibleInContextMenu",
sol::property(
&QAction::isShortcutVisibleInContextMenu,
&QAction::setShortcutVisibleInContextMenu));
qt.new_usertype<QCompleter>( qt.new_usertype<QCompleter>(
"QCompleter", "QCompleter",
"create", "create",

View File

@@ -224,6 +224,15 @@ void setupTextEditorModule()
return BaseTextEditor::currentTextEditor(); return BaseTextEditor::currentTextEditor();
}; };
result["openedEditors"] = [lua]() mutable -> sol::table {
QList<BaseTextEditor *> editors = BaseTextEditor::openedTextEditors();
sol::table result = lua.create_table();
for (auto& editor : editors) {
result.add(TextEditorPtr(editor));
}
return result;
};
result.new_usertype<MultiTextCursor>( result.new_usertype<MultiTextCursor>(
"MultiTextCursor", "MultiTextCursor",
sol::no_constructor, sol::no_constructor,
@@ -238,18 +247,26 @@ void setupTextEditorModule()
"Position", "Position",
sol::no_constructor, sol::no_constructor,
"line", "line",
sol::property(&Position::line, &Position::line), sol::property(
[](const Position &pos) { return pos.line; },
[](Position &pos, int line) { pos.line = line; }),
"column", "column",
sol::property(&Position::column, &Position::column)); sol::property(
[](const Position &pos) { return pos.column; },
[](Position &pos, int column) { pos.column = column; }));
// In range can't use begin/end as "end" is a reserved word for LUA scripts // In range can't use begin/end as "end" is a reserved word for LUA scripts
result.new_usertype<Range>( result.new_usertype<Range>(
"Range", "Range",
sol::no_constructor, sol::no_constructor,
"from", "from",
sol::property(&Range::begin, &Range::begin), sol::property(
[](const Range &range) { return range.begin; },
[](Range &range, const Position &begin) { range.begin = begin; }),
"to", "to",
sol::property(&Range::end, &Range::end)); sol::property(
[](const Range &range) { return range.end; },
[](Range &range, const Position &end) { range.end = end; }));
auto textCursorType = result.new_usertype<QTextCursor>( auto textCursorType = result.new_usertype<QTextCursor>(
"TextCursor", "TextCursor",
@@ -419,6 +436,13 @@ void setupTextEditorModule()
QTC_ASSERT(textEditor, throw sol::error("TextEditor is not valid")); QTC_ASSERT(textEditor, throw sol::error("TextEditor is not valid"));
textEditor->editorWidget()->insertExtraToolBarWidget(side, toWidget(widget)); textEditor->editorWidget()->insertExtraToolBarWidget(side, toWidget(widget));
}, },
"insertExtraToolBarAction",
[](const TextEditorPtr &textEditor,
TextEditorWidget::Side side,
QAction* action) {
QTC_ASSERT(textEditor, throw sol::error("TextEditor is not valid"));
textEditor->editorWidget()->insertExtraToolBarAction(side, action);
},
"setRefactorMarker", "setRefactorMarker",
[pluginSpec, activeMarkers]( [pluginSpec, activeMarkers](
const TextEditorPtr &textEditor, const TextEditorPtr &textEditor,

View File

@@ -93,6 +93,10 @@ void setupUtilsModule()
utils.set_function("createUuid", []() { return QUuid::createUuid().toString(); }); utils.set_function("createUuid", []() { return QUuid::createUuid().toString(); });
utils.set_function("getNativeShortcut", [](QString shortcut) {
return QKeySequence::fromString(shortcut).toString(QKeySequence::NativeText);
});
sol::function wrap = async["wrap"].get<sol::function>(); sol::function wrap = async["wrap"].get<sol::function>();
utils["waitms"] = wrap(utils["waitms_cb"]); utils["waitms"] = wrap(utils["waitms_cb"]);

View File

@@ -18,6 +18,11 @@ function utils.waitms_cb(ms, callback) end
---@return QString Arbitrary UUID string. ---@return QString Arbitrary UUID string.
function utils.createUuid() end function utils.createUuid() end
---Converts a given shortcut string into its native representation for the current platform.
---@param shortcut string The shortcut string (e.g., "Ctrl+Shift+A").
---@return QString The native representation of the shortcut.
function utils.getNativeShortcut(shortcut) end
---@class Id ---@class Id
utils.Id = {} utils.Id = {}

View File

@@ -34,6 +34,7 @@ public:
virtual QString label() const = 0; virtual QString label() const = 0;
virtual QString cmakeVariableName() const = 0; virtual QString cmakeVariableName() const = 0;
virtual QString environmentVariableName() const = 0; virtual QString environmentVariableName() const = 0;
virtual bool isOptional() const = 0;
virtual bool isAddToSystemPath() const = 0; virtual bool isAddToSystemPath() const = 0;
virtual QStringList versions() const = 0; virtual QStringList versions() const = 0;

View File

@@ -41,6 +41,7 @@ McuPackage::McuPackage(const SettingsHandler::Ptr &settingsHandler,
const QStringList &versions, const QStringList &versions,
const QString &downloadUrl, const QString &downloadUrl,
const McuPackageVersionDetector *versionDetector, const McuPackageVersionDetector *versionDetector,
const bool optional,
const bool addToSystemPath, const bool addToSystemPath,
const Utils::PathChooser::Kind &valueType, const Utils::PathChooser::Kind &valueType,
const bool allowNewerVersionKey) const bool allowNewerVersionKey)
@@ -53,6 +54,7 @@ McuPackage::McuPackage(const SettingsHandler::Ptr &settingsHandler,
, m_cmakeVariableName(cmakeVarName) , m_cmakeVariableName(cmakeVarName)
, m_environmentVariableName(envVarName) , m_environmentVariableName(envVarName)
, m_downloadUrl(downloadUrl) , m_downloadUrl(downloadUrl)
, m_optional(optional)
, m_addToSystemPath(addToSystemPath) , m_addToSystemPath(addToSystemPath)
, m_valueType(valueType) , m_valueType(valueType)
{ {
@@ -93,6 +95,11 @@ QString McuPackage::environmentVariableName() const
return m_environmentVariableName; return m_environmentVariableName;
} }
bool McuPackage::isOptional() const
{
return m_optional;
}
bool McuPackage::isAddToSystemPath() const bool McuPackage::isAddToSystemPath() const
{ {
return m_addToSystemPath; return m_addToSystemPath;
@@ -190,14 +197,22 @@ McuPackage::Status McuPackage::status() const
return m_status; return m_status;
} }
bool McuPackage::isOptionalAndEmpty() const
{
return m_status == Status::EmptyPath && isOptional();
}
bool McuPackage::isValidStatus() const bool McuPackage::isValidStatus() const
{ {
return m_status == Status::ValidPackage || m_status == Status::ValidPackageMismatchedVersion return m_status == Status::ValidPackage || m_status == Status::ValidPackageMismatchedVersion
|| m_status == Status::ValidPackageVersionNotDetected; || m_status == Status::ValidPackageVersionNotDetected || isOptionalAndEmpty();
} }
void McuPackage::updateStatusUi() void McuPackage::updateStatusUi()
{ {
if (isOptionalAndEmpty()) {
m_infoLabel->setType(InfoLabel::Ok);
} else {
switch (m_status) { switch (m_status) {
case Status::ValidPackage: case Status::ValidPackage:
m_infoLabel->setType(InfoLabel::Ok); m_infoLabel->setType(InfoLabel::Ok);
@@ -210,6 +225,7 @@ void McuPackage::updateStatusUi()
m_infoLabel->setType(InfoLabel::NotOk); m_infoLabel->setType(InfoLabel::NotOk);
break; break;
} }
}
m_infoLabel->setText(statusText()); m_infoLabel->setText(statusText());
} }

View File

@@ -39,6 +39,7 @@ public:
const QString &downloadUrl = {}, const QString &downloadUrl = {},
const McuPackageVersionDetector *versionDetector = nullptr, const McuPackageVersionDetector *versionDetector = nullptr,
const bool addToPath = false, const bool addToPath = false,
const bool optional = false,
const Utils::PathChooser::Kind &valueType const Utils::PathChooser::Kind &valueType
= Utils::PathChooser::Kind::ExistingDirectory, = Utils::PathChooser::Kind::ExistingDirectory,
const bool allowNewerVersionKey = false); const bool allowNewerVersionKey = false);
@@ -50,6 +51,7 @@ public:
QString label() const override; QString label() const override;
QString cmakeVariableName() const override; QString cmakeVariableName() const override;
QString environmentVariableName() const override; QString environmentVariableName() const override;
bool isOptional() const override;
bool isAddToSystemPath() const override; bool isAddToSystemPath() const override;
QStringList versions() const override; QStringList versions() const override;
@@ -77,6 +79,8 @@ private:
void updatePath(); void updatePath();
void updateStatusUi(); void updateStatusUi();
bool isOptionalAndEmpty() const;
SettingsHandler::Ptr settingsHandler; SettingsHandler::Ptr settingsHandler;
Utils::PathChooser *m_fileChooser = nullptr; Utils::PathChooser *m_fileChooser = nullptr;
@@ -95,6 +99,7 @@ private:
const QString m_cmakeVariableName; const QString m_cmakeVariableName;
const QString m_environmentVariableName; const QString m_environmentVariableName;
const QString m_downloadUrl; const QString m_downloadUrl;
const bool m_optional;
const bool m_addToSystemPath; const bool m_addToSystemPath;
const Utils::PathChooser::Kind m_valueType; const Utils::PathChooser::Kind m_valueType;

View File

@@ -55,8 +55,10 @@ private:
QMap<McuPackagePtr, QWidget *> m_packageWidgets; QMap<McuPackagePtr, QWidget *> m_packageWidgets;
QMap<McuTargetPtr, QWidget *> m_mcuTargetPacketWidgets; QMap<McuTargetPtr, QWidget *> m_mcuTargetPacketWidgets;
QFormLayout *m_packagesLayout = nullptr; QFormLayout *m_packagesLayout = nullptr;
QFormLayout *m_optionalPackagesLayout = nullptr;
QGroupBox *m_qtForMCUsSdkGroupBox = nullptr; QGroupBox *m_qtForMCUsSdkGroupBox = nullptr;
QGroupBox *m_packagesGroupBox = nullptr; QGroupBox *m_packagesGroupBox = nullptr;
QGroupBox *m_optionalPackagesGroupBox = nullptr;
QGroupBox *m_mcuTargetsGroupBox = nullptr; QGroupBox *m_mcuTargetsGroupBox = nullptr;
QComboBox *m_mcuTargetsComboBox = nullptr; QComboBox *m_mcuTargetsComboBox = nullptr;
QGroupBox *m_kitCreationGroupBox = nullptr; QGroupBox *m_kitCreationGroupBox = nullptr;
@@ -122,6 +124,14 @@ McuSupportOptionsWidget::McuSupportOptionsWidget(McuSupportOptions &options,
m_packagesGroupBox->setLayout(m_packagesLayout); m_packagesGroupBox->setLayout(m_packagesLayout);
} }
{
m_optionalPackagesGroupBox = new QGroupBox(Tr::tr("Optional"));
m_optionalPackagesGroupBox->setFlat(true);
mainLayout->addWidget(m_optionalPackagesGroupBox);
m_optionalPackagesLayout = new QFormLayout;
m_optionalPackagesGroupBox->setLayout(m_optionalPackagesLayout);
}
{ {
m_mcuTargetsInfoLabel = new Utils::InfoLabel; m_mcuTargetsInfoLabel = new Utils::InfoLabel;
mainLayout->addWidget(m_mcuTargetsInfoLabel); mainLayout->addWidget(m_mcuTargetsInfoLabel);
@@ -187,6 +197,10 @@ void McuSupportOptionsWidget::updateStatus()
const bool ready = valid && mcuTarget; const bool ready = valid && mcuTarget;
m_mcuTargetsGroupBox->setVisible(ready); m_mcuTargetsGroupBox->setVisible(ready);
m_packagesGroupBox->setVisible(ready && !mcuTarget->packages().isEmpty()); m_packagesGroupBox->setVisible(ready && !mcuTarget->packages().isEmpty());
m_optionalPackagesGroupBox->setVisible(
ready && std::ranges::any_of(mcuTarget->packages(), [](McuPackagePtr p) {
return p->isOptional();
}));
m_kitCreationGroupBox->setVisible(ready); m_kitCreationGroupBox->setVisible(ready);
m_mcuTargetsInfoLabel->setVisible(valid && m_options.sdkRepository.mcuTargets.isEmpty()); m_mcuTargetsInfoLabel->setVisible(valid && m_options.sdkRepository.mcuTargets.isEmpty());
if (m_mcuTargetsInfoLabel->isVisible()) { if (m_mcuTargetsInfoLabel->isVisible()) {
@@ -266,6 +280,10 @@ void McuSupportOptionsWidget::showMcuTargetPackages()
m_packagesLayout->removeRow(0); m_packagesLayout->removeRow(0);
} }
while (m_optionalPackagesLayout->rowCount() > 0) {
m_optionalPackagesLayout->removeRow(0);
}
std::set<McuPackagePtr, McuPackageSort> packages; std::set<McuPackagePtr, McuPackageSort> packages;
for (const auto &package : mcuTarget->packages()) { for (const auto &package : mcuTarget->packages()) {
@@ -285,6 +303,9 @@ void McuSupportOptionsWidget::showMcuTargetPackages()
package->setPath(macroExpander->expand(package->defaultPath())); package->setPath(macroExpander->expand(package->defaultPath()));
} }
}); });
if (package->isOptional())
m_optionalPackagesLayout->addRow(package->label(), packageWidget);
else
m_packagesLayout->addRow(package->label(), packageWidget); m_packagesLayout->addRow(package->label(), packageWidget);
packageWidget->show(); packageWidget->show();
} }

View File

@@ -61,6 +61,7 @@ McuPackagePtr createQtForMCUsPackage(const SettingsHandler::Ptr &settingsHandler
{}, // versions {}, // versions
{}, // downloadUrl {}, // downloadUrl
nullptr, // versionDetector nullptr, // versionDetector
false, // optional
false, // addToPath false, // addToPath
Utils::PathChooser::Kind::ExistingDirectory, // valueType Utils::PathChooser::Kind::ExistingDirectory, // valueType
true)}; // useNewestVersionKey true)}; // useNewestVersionKey
@@ -706,6 +707,7 @@ static PackageDescription parsePackage(const QJsonObject &cmakeEntry)
detectionPaths, detectionPaths,
versions, versions,
parseVersionDetection(cmakeEntry), parseVersionDetection(cmakeEntry),
cmakeEntry["optional"].toBool(),
cmakeEntry["addToSystemPath"].toBool(), cmakeEntry["addToSystemPath"].toBool(),
parseLineEditType(cmakeEntry["type"])}; parseLineEditType(cmakeEntry["type"])};
} }

View File

@@ -33,6 +33,7 @@ struct PackageDescription
Utils::FilePaths detectionPaths; Utils::FilePaths detectionPaths;
QStringList versions; QStringList versions;
VersionDetection versionDetection; VersionDetection versionDetection;
bool optional;
bool shouldAddToSystemPath; bool shouldAddToSystemPath;
Utils::PathChooser::Kind type; Utils::PathChooser::Kind type;
}; //struct PackageDescription }; //struct PackageDescription

View File

@@ -137,6 +137,7 @@ McuPackagePtr McuTargetFactory::createPackage(const PackageDescription &pkgDesc)
pkgDesc.versions, pkgDesc.versions,
{}, {},
createVersionDetection(pkgDesc.versionDetection), createVersionDetection(pkgDesc.versionDetection),
pkgDesc.optional,
pkgDesc.shouldAddToSystemPath, pkgDesc.shouldAddToSystemPath,
pkgDesc.type}}; pkgDesc.type}};
} }

View File

@@ -29,6 +29,7 @@ public:
MOCK_METHOD(bool, isValidStatus, (), (const)); MOCK_METHOD(bool, isValidStatus, (), (const));
MOCK_METHOD(QString, cmakeVariableName, (), (const)); MOCK_METHOD(QString, cmakeVariableName, (), (const));
MOCK_METHOD(QString, environmentVariableName, (), (const)); MOCK_METHOD(QString, environmentVariableName, (), (const));
MOCK_METHOD(bool, isOptional, (), (const));
MOCK_METHOD(bool, isAddToSystemPath, (), (const)); MOCK_METHOD(bool, isAddToSystemPath, (), (const));
MOCK_METHOD(bool, writeToSettings, (), (const)); MOCK_METHOD(bool, writeToSettings, (), (const));
MOCK_METHOD(void, readFromSettings, ()); MOCK_METHOD(void, readFromSettings, ());

View File

@@ -196,6 +196,7 @@ const PackageDescription
{}, {},
VersionDetection{}, VersionDetection{},
false, false,
false,
Utils::PathChooser::Kind::ExistingDirectory}; Utils::PathChooser::Kind::ExistingDirectory};
const McuTargetDescription::Platform platformDescription{id, const McuTargetDescription::Platform platformDescription{id,
@@ -851,6 +852,7 @@ void McuSupportTest::test_useFallbackPathForToolchainWhenPathFromSettingsIsNotAv
{}, {},
VersionDetection{}, VersionDetection{},
false, false,
false,
Utils::PathChooser::Kind::ExistingDirectory}; Utils::PathChooser::Kind::ExistingDirectory};
McuTargetDescription::Toolchain toolchainDescription{armGcc, {}, compilerDescription, {}}; McuTargetDescription::Toolchain toolchainDescription{armGcc, {}, compilerDescription, {}};
@@ -875,6 +877,7 @@ void McuSupportTest::test_usePathFromSettingsForToolchainPath()
{}, {},
VersionDetection{}, VersionDetection{},
false, false,
false,
Utils::PathChooser::Kind::ExistingDirectory}; Utils::PathChooser::Kind::ExistingDirectory};
McuTargetDescription::Toolchain toolchainDescription{armGcc, {}, compilerDescription, {}}; McuTargetDescription::Toolchain toolchainDescription{armGcc, {}, compilerDescription, {}};

View File

@@ -139,7 +139,7 @@ public:
perfParserWorker->addStartDependency(perfRecordWorker); perfParserWorker->addStartDependency(perfRecordWorker);
perfParserWorker->addStopDependency(perfRecordWorker); perfParserWorker->addStopDependency(perfRecordWorker);
perfRecordWorker->addStopDependency(perfParserWorker); QObject::connect(perfRecordWorker, &RunWorker::stopped, runControl, &RunControl::initiateStop);
PerfProfilerTool::instance()->onWorkerCreation(runControl); PerfProfilerTool::instance()->onWorkerCreation(runControl);
auto tool = PerfProfilerTool::instance(); auto tool = PerfProfilerTool::instance();

View File

@@ -318,6 +318,7 @@ GroupItem WindowsSettingsWidget::downloadNugetRecipe()
Tr::tr("Cancel"), 0, 100, Tr::tr("Cancel"), 0, 100,
Core::ICore::dialogParent())); Core::ICore::dialogParent()));
progressDialog->setWindowModality(Qt::ApplicationModal); progressDialog->setWindowModality(Qt::ApplicationModal);
progressDialog->setMinimumDuration(INT_MAX); // In order to suppress calls to processEvents() from setValue()
progressDialog->setWindowTitle(Tr::tr("Downloading")); progressDialog->setWindowTitle(Tr::tr("Downloading"));
progressDialog->setFixedSize(progressDialog->sizeHint()); progressDialog->setFixedSize(progressDialog->sizeHint());
progressDialog->setAutoClose(false); progressDialog->setAutoClose(false);

View File

@@ -38,7 +38,6 @@ QmlProfilerRunner::QmlProfilerRunner(RunControl *runControl)
: RunWorker(runControl) : RunWorker(runControl)
{ {
setId("QmlProfilerRunner"); setId("QmlProfilerRunner");
runControl->requestQmlChannel();
runControl->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR); runControl->setIcon(ProjectExplorer::Icons::ANALYZER_START_SMALL_TOOLBAR);
} }
@@ -152,6 +151,7 @@ RunWorker *createLocalQmlProfilerWorker(RunControl *runControl)
worker->setId("LocalQmlProfilerSupport"); worker->setId("LocalQmlProfilerSupport");
auto profiler = new QmlProfilerRunner(runControl); auto profiler = new QmlProfilerRunner(runControl);
runControl->requestQmlChannel();
worker->addStopDependency(profiler); worker->addStopDependency(profiler);
// We need to open the local server before the application tries to connect. // We need to open the local server before the application tries to connect.

View File

@@ -555,7 +555,9 @@ ProjectExplorer::RunControl *QmlProfilerTool::attachToWaitingApplication()
d->m_viewContainer->perspective()->select(); d->m_viewContainer->perspective()->select();
auto runControl = new RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE); auto runControl = new RunControl(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
runControl->copyDataFromRunConfiguration(activeRunConfigForActiveProject()); if (RunConfiguration *runConfig = activeRunConfigForActiveProject())
runControl->copyDataFromRunConfiguration(runConfig);
runControl->setQmlChannel(serverUrl);
// The object as such is needed, the RunWorker becomes part of the RunControl at construction time, // The object as such is needed, the RunWorker becomes part of the RunControl at construction time,
// similar to how QObject children are owned by their parents // similar to how QObject children are owned by their parents
[[maybe_unused]] auto profiler = new QmlProfilerRunner(runControl); [[maybe_unused]] auto profiler = new QmlProfilerRunner(runControl);

View File

@@ -66,6 +66,7 @@ TerminalWidget::TerminalWidget(QWidget *parent, const OpenTerminalParameters &op
surfaceChanged(); surfaceChanged();
setAllowBlinkingCursor(settings().allowBlinkingCursor()); setAllowBlinkingCursor(settings().allowBlinkingCursor());
enableMouseTracking(settings().enableMouseTracking());
connect(&settings(), &AspectContainer::applied, this, [this] { connect(&settings(), &AspectContainer::applied, this, [this] {
// Setup colors first, as setupFont will redraw the screen. // Setup colors first, as setupFont will redraw the screen.
@@ -73,6 +74,7 @@ TerminalWidget::TerminalWidget(QWidget *parent, const OpenTerminalParameters &op
setupFont(); setupFont();
configBlinkTimer(); configBlinkTimer();
setAllowBlinkingCursor(settings().allowBlinkingCursor()); setAllowBlinkingCursor(settings().allowBlinkingCursor());
enableMouseTracking(settings().enableMouseTracking());
}); });
} }
@@ -127,8 +129,6 @@ void TerminalWidget::setupPty()
env.setFallback("COMMAND_MODE", "unix2003"); env.setFallback("COMMAND_MODE", "unix2003");
env.setFallback("INIT_CWD", QCoreApplication::applicationDirPath()); env.setFallback("INIT_CWD", QCoreApplication::applicationDirPath());
// For git bash on Windows
env.prependOrSetPath(shellCommand.executable().parentDir());
if (env.hasKey("CLINK_NOAUTORUN")) if (env.hasKey("CLINK_NOAUTORUN"))
env.unset("CLINK_NOAUTORUN"); env.unset("CLINK_NOAUTORUN");

View File

@@ -77,6 +77,7 @@ static FormatOutput format(const FormatInput &input)
options.replaceInStrings(QLatin1String("%file"), sourceFile.filePath().toUrlishString()); options.replaceInStrings(QLatin1String("%file"), sourceFile.filePath().toUrlishString());
Process process; Process process;
process.setCommand({executable, options}); process.setCommand({executable, options});
process.setUtf8StdOutCodec();
process.runBlocking(5s); process.runBlocking(5s);
if (process.result() != ProcessResult::FinishedWithSuccess) { if (process.result() != ProcessResult::FinishedWithSuccess) {
return Utils::make_unexpected(Tr::tr("Failed to format: %1.") return Utils::make_unexpected(Tr::tr("Failed to format: %1.")
@@ -102,6 +103,7 @@ static FormatOutput format(const FormatInput &input)
options.replaceInStrings("%file", input.filePath.toUrlishString()); options.replaceInStrings("%file", input.filePath.toUrlishString());
process.setCommand({executable, options}); process.setCommand({executable, options});
process.setWriteData(input.sourceData.toUtf8()); process.setWriteData(input.sourceData.toUtf8());
process.setUtf8StdOutCodec();
process.start(); process.start();
if (!process.waitForFinished(5s)) { if (!process.waitForFinished(5s)) {
return Utils::make_unexpected(Tr::tr("Cannot call %1 or some other error occurred. " return Utils::make_unexpected(Tr::tr("Cannot call %1 or some other error occurred. "

View File

@@ -3497,7 +3497,9 @@ void TextEditorWidget::gotoLine(int line, int column, bool centerLine, bool anim
const QTextBlock &block = document()->findBlockByNumber(blockNumber); const QTextBlock &block = document()->findBlockByNumber(blockNumber);
if (block.isValid()) { if (block.isValid()) {
QTextCursor cursor(block); QTextCursor cursor(block);
if (column > 0) { if (column >= block.length()) {
cursor.movePosition(QTextCursor::EndOfBlock);
} else if (column > 0) {
cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, column); cursor.movePosition(QTextCursor::Right, QTextCursor::MoveAnchor, column);
} else { } else {
int pos = cursor.position(); int pos = cursor.position();
@@ -9897,6 +9899,23 @@ QAction * TextEditorWidget::insertExtraToolBarWidget(TextEditorWidget::Side side
} }
} }
void TextEditorWidget::insertExtraToolBarAction(TextEditorWidget::Side side, QAction *action)
{
if (side == Left) {
auto findLeftMostAction = [this](QAction *action) {
if (d->m_toolbarOutlineAction && action == d->m_toolbarOutlineAction)
return false;
return d->m_toolBar->widgetForAction(action) != nullptr;
};
QAction *before = Utils::findOr(d->m_toolBar->actions(),
d->m_fileEncodingLabelAction,
findLeftMostAction);
d->m_toolBar->insertAction(before, action);
} else {
d->m_toolBar->insertAction(d->m_fileLineEndingAction, action);
}
}
void TextEditorWidget::setToolbarOutline(QWidget *widget) void TextEditorWidget::setToolbarOutline(QWidget *widget)
{ {
if (d->m_toolbarOutlineAction) { if (d->m_toolbarOutlineAction) {
@@ -10357,6 +10376,11 @@ BaseTextEditor *BaseTextEditor::currentTextEditor()
return qobject_cast<BaseTextEditor *>(EditorManager::currentEditor()); return qobject_cast<BaseTextEditor *>(EditorManager::currentEditor());
} }
QList<BaseTextEditor *> BaseTextEditor::openedTextEditors()
{
return qobject_container_cast<BaseTextEditor *>(DocumentModel::editorsForOpenedDocuments());
}
QVector<BaseTextEditor *> BaseTextEditor::textEditorsForDocument(TextDocument *textDocument) QVector<BaseTextEditor *> BaseTextEditor::textEditorsForDocument(TextDocument *textDocument)
{ {
QVector<BaseTextEditor *> ret; QVector<BaseTextEditor *> ret;

View File

@@ -127,6 +127,7 @@ public:
virtual void finalizeInitialization() {} virtual void finalizeInitialization() {}
static BaseTextEditor *currentTextEditor(); static BaseTextEditor *currentTextEditor();
static QList<BaseTextEditor *> openedTextEditors();
static QVector<BaseTextEditor *> textEditorsForDocument(TextDocument *textDocument); static QVector<BaseTextEditor *> textEditorsForDocument(TextDocument *textDocument);
TextEditorWidget *editorWidget() const; TextEditorWidget *editorWidget() const;
@@ -351,6 +352,7 @@ public:
enum Side { Left, Right }; enum Side { Left, Right };
QAction *insertExtraToolBarWidget(Side side, QWidget *widget); QAction *insertExtraToolBarWidget(Side side, QWidget *widget);
void insertExtraToolBarAction(Side side, QAction *action);
void setToolbarOutline(QWidget* widget); void setToolbarOutline(QWidget* widget);
const QWidget *toolbarOutlineWidget(); const QWidget *toolbarOutlineWidget();

View File

@@ -126,7 +126,7 @@ def displayHintForHighlighterDefinition(fileName, patterns, added):
if hasSuffix(fileName, patterns): if hasSuffix(fileName, patterns):
return not added return not added
test.warning("Got an unexpected suffix.", "Filename: %s, Patterns: %s" test.warning("Got an unexpected suffix.", "Filename: %s, Patterns: %s"
% (fileName, str(patterns + lPatterns))) % (fileName, str(patterns)))
return False return False
def main(): def main():

View File

@@ -62,12 +62,20 @@ def main():
"consider raising the timeout.") "consider raising the timeout.")
else: else:
snooze(1) snooze(1)
type(cppwindow, testData.field(record, "operator")) operator = testData.field(record, "operator")
type(cppwindow, operator)
genericProposalWidget = __getGenericProposalListView__(1500) genericProposalWidget = __getGenericProposalListView__(1500)
# the clang code model does not change the . to -> before applying a proposal # the clang code model does not change the . to -> before applying a proposal
# so, verify list of proposals roughly # so, verify list of proposals roughly
if useClang: if useClang:
expectProposal = testData.field(record, "clangProposal") == 'True' expectProposal = testData.field(record, "clangProposal") == 'True'
if expectProposal and (genericProposalWidget is None):
test.warning("Expected proposal widget was not displayed as expected. "
"Trying again...")
for _ in operator:
type(cppwindow, "<Backspace>")
type(cppwindow, operator)
genericProposalWidget = __getGenericProposalListView__(500)
test.compare(genericProposalWidget is not None, expectProposal, test.compare(genericProposalWidget is not None, expectProposal,
'Verifying whether proposal widget is displayed as expected.') 'Verifying whether proposal widget is displayed as expected.')

View File

@@ -13,12 +13,12 @@
"<QPointer>" "QPointer<QCoreApplication> pa; QPointer<QCoreApplication> &poi = pa;" "poi" "." "poi." "True" "mixed" "<QPointer>" "QPointer<QCoreApplication> pa; QPointer<QCoreApplication> &poi = pa;" "poi" "." "poi." "True" "mixed"
"<QPointer>" "QPointer<QCoreApplication> poi[5];" "poi[2]" "." "poi[2]." "True" "mixed" "<QPointer>" "QPointer<QCoreApplication> poi[5];" "poi[2]" "." "poi[2]." "True" "mixed"
"<QPointer>" "QPointer<QCoreApplication> *poi[5];" "poi[2]" "." "poi[2]->" "True" "all" "<QPointer>" "QPointer<QCoreApplication> *poi[5];" "poi[2]" "." "poi[2]->" "True" "all"
"<memory>" "std::auto_ptr<QCoreApplication> sap;" "sap" "." "sap." "True" "mixed" "<memory>" "std::unique_ptr<QCoreApplication> sap;" "sap" "." "sap." "True" "mixed"
"<memory>" "std::auto_ptr<QCoreApplication> *sap;" "sap" "." "sap->" "True" "all" "<memory>" "std::unique_ptr<QCoreApplication> *sap;" "sap" "." "sap->" "True" "all"
"<memory>" "std::auto_ptr<QCoreApplication> &sap;" "sap" "." "sap." "True" "mixed" "<memory>" "std::unique_ptr<QCoreApplication> &sap;" "sap" "." "sap." "True" "mixed"
"<memory>" "std::auto_ptr<QCoreApplication> sapqa; std::auto_ptr<QCoreApplication> &sap = sapqa;" "sap" "." "sap." "True" "mixed" "<memory>" "std::unique_ptr<QCoreApplication> sapqa; std::unique_ptr<QCoreApplication> &sap = sapqa;" "sap" "." "sap." "True" "mixed"
"<memory>" "std::auto_ptr<QCoreApplication> sap[10];" "sap[2]" "." "sap[2]." "True" "mixed" "<memory>" "std::unique_ptr<QCoreApplication> sap[10];" "sap[2]" "." "sap[2]." "True" "mixed"
"<memory>" "std::auto_ptr<QCoreApplication> *sap[10];" "sap[2]" "." "sap[2]->" "True" "all" "<memory>" "std::unique_ptr<QCoreApplication> *sap[10];" "sap[2]" "." "sap[2]->" "True" "all"
"<QVector>" "QVector<QCoreApplication> vec;" "vec" "." "vec." "True" "none" "<QVector>" "QVector<QCoreApplication> vec;" "vec" "." "vec." "True" "none"
"<QVector>" "QVector<QCoreApplication *> vec;" "vec" "." "vec." "True" "none" "<QVector>" "QVector<QCoreApplication *> vec;" "vec" "." "vec." "True" "none"
"<QVector>" "QVector<QCoreApplication> *vec;" "vec" "." "vec->" "True" "all" "<QVector>" "QVector<QCoreApplication> *vec;" "vec" "." "vec->" "True" "all"
1 include declaration usage operator expected clangProposal correction
13 <QPointer> QPointer<QCoreApplication> pa; QPointer<QCoreApplication> &poi = pa; poi . poi. True mixed
14 <QPointer> QPointer<QCoreApplication> poi[5]; poi[2] . poi[2]. True mixed
15 <QPointer> QPointer<QCoreApplication> *poi[5]; poi[2] . poi[2]-> True all
16 <memory> std::auto_ptr<QCoreApplication> sap; std::unique_ptr<QCoreApplication> sap; sap . sap. True mixed
17 <memory> std::auto_ptr<QCoreApplication> *sap; std::unique_ptr<QCoreApplication> *sap; sap . sap-> True all
18 <memory> std::auto_ptr<QCoreApplication> &sap; std::unique_ptr<QCoreApplication> &sap; sap . sap. True mixed
19 <memory> std::auto_ptr<QCoreApplication> sapqa; std::auto_ptr<QCoreApplication> &sap = sapqa; std::unique_ptr<QCoreApplication> sapqa; std::unique_ptr<QCoreApplication> &sap = sapqa; sap . sap. True mixed
20 <memory> std::auto_ptr<QCoreApplication> sap[10]; std::unique_ptr<QCoreApplication> sap[10]; sap[2] . sap[2]. True mixed
21 <memory> std::auto_ptr<QCoreApplication> *sap[10]; std::unique_ptr<QCoreApplication> *sap[10]; sap[2] . sap[2]-> True all
22 <QVector> QVector<QCoreApplication> vec; vec . vec. True none
23 <QVector> QVector<QCoreApplication *> vec; vec . vec. True none
24 <QVector> QVector<QCoreApplication> *vec; vec . vec-> True all