From 2d8dc4c779d033696749cc82421adc96b8296a0d Mon Sep 17 00:00:00 2001 From: hjk Date: Wed, 16 Nov 2022 10:09:06 +0100 Subject: [PATCH 01/14] Debugger: Disable re-running It's currently broken in a lot of configurations. Change-Id: Ic948bb619c4860ba0c0d81a383412e6d0b007367 Reviewed-by: Reviewed-by: Christian Stenger --- src/plugins/debugger/debuggerruncontrol.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/debugger/debuggerruncontrol.cpp b/src/plugins/debugger/debuggerruncontrol.cpp index d72c57fe6f1..8323bad0a00 100644 --- a/src/plugins/debugger/debuggerruncontrol.cpp +++ b/src/plugins/debugger/debuggerruncontrol.cpp @@ -451,7 +451,8 @@ void DebuggerRunTool::start() } // QML and/or mixed are not prepared for it. - setSupportsReRunning(!m_runParameters.isQmlDebugging); +// setSupportsReRunning(!m_runParameters.isQmlDebugging); + setSupportsReRunning(false); // FIXME: Broken in general. // FIXME: Disabled due to Android. Make Android device report available ports instead. // int portsUsed = portsUsedByDebugger(); From be1aa6abed6009012fc5812ec1942f4c3fa56c86 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Mon, 14 Nov 2022 18:28:38 +0100 Subject: [PATCH 02/14] Doc: Fix typos Change-Id: I22b610a6dcab73867f915f877d7b7b844da5dc22 Reviewed-by: Venugopal Shivashankar --- doc/qtcreator/src/android/androiddev.qdoc | 2 +- doc/qtcreator/src/android/deploying-android.qdoc | 4 ++-- doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc | 2 +- .../src/debugger/creator-debugger-common.qdocinc | 4 ++-- .../src/debugger/creator-only/creator-debugger-setup.qdoc | 4 ++-- .../src/debugger/creator-only/creator-debugger.qdoc | 2 +- .../src/editors/creator-editors-options-text.qdoc | 6 +++--- .../src/editors/creator-only/creator-fakevim.qdoc | 2 +- .../src/editors/creator-only/creator-language-server.qdoc | 2 +- .../src/editors/creator-only/creator-mime-types.qdoc | 2 +- .../src/editors/creator-only/creator-modeling.qdoc | 2 +- .../src/howto/creator-only/creator-autotest.qdoc | 2 +- .../creator-projects-incredibuild-building.qdoc | 2 +- .../src/projects/creator-only/creator-files-creating.qdoc | 2 +- .../projects/creator-only/creator-projects-compilers.qdoc | 4 ++-- .../creator-projects-custom-wizards-json.qdocinc | 8 ++++---- .../src/user-interface/creator-file-system-view.qdoc | 2 +- doc/qtcreator/src/user-interface/creator-views.qdoc | 2 +- .../src/vcs/creator-only/creator-vcs-perforce.qdoc | 2 +- doc/qtcreator/src/vcs/creator-vcs-git.qdoc | 6 +++--- doc/qtcreator/src/widgets/qtdesigner-plugins.qdoc | 2 +- 21 files changed, 32 insertions(+), 32 deletions(-) diff --git a/doc/qtcreator/src/android/androiddev.qdoc b/doc/qtcreator/src/android/androiddev.qdoc index 6d716531abd..4474d04c71c 100644 --- a/doc/qtcreator/src/android/androiddev.qdoc +++ b/doc/qtcreator/src/android/androiddev.qdoc @@ -16,7 +16,7 @@ To develop for Android, you must have a tool chain for building applications for Android devices installed on the development PC. \QC can automatically - dowload and install the tool chain and create a suitable build and run + download and install the tool chain and create a suitable build and run \l{glossary-buildandrun-kit}{kit} that contains the tool chain and the Qt version for Android for the device's architecture. diff --git a/doc/qtcreator/src/android/deploying-android.qdoc b/doc/qtcreator/src/android/deploying-android.qdoc index 3fb8735f7cc..87a79e21bd4 100644 --- a/doc/qtcreator/src/android/deploying-android.qdoc +++ b/doc/qtcreator/src/android/deploying-android.qdoc @@ -239,7 +239,7 @@ To add OpenSSL libraries, select \uicontrol {Include prebuilt OpenSSL libraries} in the \uicontrol {Additional Libraries} group. This will add the OpenSSL include project defined in \l{Specifying Android Device Settings}{device settings} - in \uicontrol {Android OpenSSL} group. This can be used for QMake and CMake + in \uicontrol {Android OpenSSL} group. This can be used for qmake and CMake projects. Otherwise, you can manually add the paths to the required \c libssl.so and @@ -248,7 +248,7 @@ \section1 Editing Manifest Files You can use the configuration options to specify all the settings you need - for the \c androiddeployqt tool. You only need an Adroid manifest file + for the \c androiddeployqt tool. You only need an Android manifest file to specify Android-specific settings, such as the application icon. However, the manifest file is needed when you want to publish the package in the Play Store. diff --git a/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc b/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc index 603dc482641..0f928c6ec85 100644 --- a/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc +++ b/doc/qtcreator/src/baremetal/creator-baremetal-dev.qdoc @@ -99,7 +99,7 @@ \li In the \uicontrol Type field, select the interface type. \li In the \uicontrol Speed field, enter the interface speed between - 120 and 8000 kiloherz (kHz). + 120 and 8000 kilohertz (kHz). \li Select the \uicontrol {Disable cache} check box to disable the \EBlink flash cache. diff --git a/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc b/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc index 29978328a27..1226853275c 100644 --- a/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc +++ b/doc/qtcreator/src/debugger/creator-debugger-common.qdocinc @@ -62,7 +62,7 @@ breakpoint in the \uicontrol Breakpoints view. At various times, attempts are made to implant pending breakpoints into - the debugged process. Succesfull implantation might create one or more + the debugged process. Successful implantation might create one or more implanted breakpoints, each associated with an actual address in the debugged breakpoint. The implantation might also move a breakpoint marker in the editor from an empty line to the next line for which the @@ -389,7 +389,7 @@ to the most powerful feature of the debugger: comprehensive display of data belonging to Qt's basic objects. For example, in case of QObject, instead of displaying a pointer to some private data structure, you see a list of - children, signals and slots. + children, signals, and slots. Similarly, instead of displaying many pointers and integers, \QC's debugger displays the contents of a QHash or QMap in an orderly manner. Also, the diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc index a853d2511ba..7e61aa9ddbb 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger-setup.qdoc @@ -169,7 +169,7 @@ The 32-bit CDB version can only debug 32-bit executables, whereas the 64-bit version can debug both 64-bit and 32-bit executables. However, interrupting a - 32-bit executable with a 64-bit debugger can result in a stacktrace of the + 32-bit executable with a 64-bit debugger can result in a stack trace of the WOW64 emulator 32-bit emulation layer being displayed. \QC extends the command line debugger by loading the @@ -187,7 +187,7 @@ It is highly recommended that you add the Symbol Server provided by Microsoft to the symbol search path of the debugger. The - Symbol Server provides you with debugging informaton for the + Symbol Server provides you with debugging information for the operating system libraries for debugging Windows applications. For more information, see \l{Setting CDB Paths on Windows}. diff --git a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc index cc95b4b9503..35d598d4c6e 100644 --- a/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc +++ b/doc/qtcreator/src/debugger/creator-only/creator-debugger.qdoc @@ -417,7 +417,7 @@ to manage the GDB process, see \l{Specifying GDB Settings} and \l{Specifying Extended GDB Settings}. - For more informaton about connecting with \c {target extended-remote} mode + For more information about connecting with \c {target extended-remote} mode in GDB, see \l{https://sourceware.org/gdb/onlinedocs/gdb/Connecting.html} {Debugging with GDB: Connecting to a Remote Target}. diff --git a/doc/qtcreator/src/editors/creator-editors-options-text.qdoc b/doc/qtcreator/src/editors/creator-editors-options-text.qdoc index 54849b96825..e4779703627 100644 --- a/doc/qtcreator/src/editors/creator-editors-options-text.qdoc +++ b/doc/qtcreator/src/editors/creator-editors-options-text.qdoc @@ -67,8 +67,8 @@ \li In the \uicontrol Background field, select the background color for the code element or message. - The backgound of the \uicontrol Text element determines the background of the - code editor. + The background of the \uicontrol Text element determines the background + of the code editor. \li In \uicontrol Font, select \uicontrol Bold or \uicontrol Italic to format the text of the selected code element or message by making it @@ -116,7 +116,7 @@ To resolve the issue, use a file conversion tool to convert the file encoding to UTF-8 when developing Qt 5 applications. Otherwise, conversion - of string constants to QStrings might not work as expected. + of string constants to QString might not work as expected. If you develop only Qt 4 applications or other than Qt applications, you can set other encoding options as the default encoding. Select the diff --git a/doc/qtcreator/src/editors/creator-only/creator-fakevim.qdoc b/doc/qtcreator/src/editors/creator-only/creator-fakevim.qdoc index b09e302a124..83317675532 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-fakevim.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-fakevim.qdoc @@ -310,7 +310,7 @@ \section1 Quitting FakeVim Mode - To quit the FakeVim mode, unselect \uicontrol Edit > \uicontrol Preferences > + To quit the FakeVim mode, deselect \uicontrol Edit > \uicontrol Preferences > \uicontrol FakeVim > \uicontrol {Use FakeVim} or press \key {Alt+V,Alt+V}. You can temporarily escape FakeVim mode to access the normal \QC keyboard diff --git a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc index 129af74dd74..fed160bf76d 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc @@ -52,7 +52,7 @@ file patterns to match language servers. If you do not set at least one MIME type or file pattern, no files will be sent to the language server. This is done to avoid unnecessary traffic and inaccurate information, as files are - only sent to the languge server if they are known to be handled by it. For + only sent to the language server if they are known to be handled by it. For more information about how \QC uses MIME types, see \l {Editing MIME Types}. \section1 Specifying Settings for Language Clients diff --git a/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc b/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc index 6a064835340..b2532c6e033 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-mime-types.qdoc @@ -34,7 +34,7 @@ \QC searches for the value within a specified range in the files and takes the priority of the magic header into account. If you specify wide search - ranges, openging files in \QC might take a long time. Therefore, you are + ranges, opening files in \QC might take a long time. Therefore, you are advised to use the recommended values for the range and priority of the magic header. diff --git a/doc/qtcreator/src/editors/creator-only/creator-modeling.qdoc b/doc/qtcreator/src/editors/creator-only/creator-modeling.qdoc index 1dc2d40e177..181a4e1e0d6 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-modeling.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-modeling.qdoc @@ -74,7 +74,7 @@ \endlist You can group elements by surrounding them with a boundary. When you move - the boundary, all elements within it are moved together. Similary, drag + the boundary, all elements within it are moved together. Similarly, drag a swimlane to the diagram. When you move the swimlane, all elements right to the swimlane (for vertical swimlanes) or below it (for horizontal swimlanes) will be moved together. A vertical swimlane is created when you drop the diff --git a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc index 68fd18875c6..336b1d29d3f 100644 --- a/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc +++ b/doc/qtcreator/src/howto/creator-only/creator-autotest.qdoc @@ -87,7 +87,7 @@ \li For a Qt Quick test, select the \uicontrol {Generate setup code} check box to execute C++ code before any of the QML tests are run. The testing - framework will call slots and invokable functions, as + framework will call slots and invocable functions, as described in \l{Executing C++ Before QML Tests}. \image qtcreator-autotests-project-qtquick-test.png "Autotest project wizard - Qt Quick Test" diff --git a/doc/qtcreator/src/incredibuild/creator-projects-incredibuild-building.qdoc b/doc/qtcreator/src/incredibuild/creator-projects-incredibuild-building.qdoc index a404c2cb1c0..a619a764b36 100644 --- a/doc/qtcreator/src/incredibuild/creator-projects-incredibuild-building.qdoc +++ b/doc/qtcreator/src/incredibuild/creator-projects-incredibuild-building.qdoc @@ -105,7 +105,7 @@ is encountered. This is the default behavior in Visual Studio builds, but not for Make and Build tools or Dev Tools builds. \li \uicontrol {Additional Arguments} are concatenated to the final - buildconsole command line. + build console command line. \li \uicontrol {Open Build Monitor} opens an IncrediBuild Build Monitor that graphically displays the build's progress once the build starts. diff --git a/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc b/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc index 279c453f96c..3a7fd55ee7e 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-files-creating.qdoc @@ -97,7 +97,7 @@ \row \li {1,2} General \li Empty File - \li Empty file that you can save with any filename extensio. + \li Empty file that you can save with any filename extension. \row \li Scratch Buffer \li Scratch buffer that uses temporary files. You can diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc b/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc index 99acca06fa3..a2f85d010e5 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-compilers.qdoc @@ -81,7 +81,7 @@ compilers from the various KEIL development environments. Currently supported architectures are \c 8051 and \c ARM. - \li \l{http://sdcc.sourceforge.net}{SDCC} is a retargetable, optimizing + \li \l{http://sdcc.sourceforge.net}{SDCC} is an optimizing C bare-metal compiler for various architectures. Currently supported architectures are \c 8051 and \c STM8. @@ -90,7 +90,7 @@ The emscripten compiler is tool chain for compiling to \l{Building Applications for the Web}{WebAssembly}. - \section1 Redetecting Compilers + \section1 Re-detecting Compilers When \QC finds an x86_64 GCC compiler, it sets up an instance for the native x86_64 target. If you plan to create also 32-bit x86 binaries without using diff --git a/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards-json.qdocinc b/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards-json.qdocinc index ced787d2d95..8a31b460c02 100644 --- a/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards-json.qdocinc +++ b/doc/qtcreator/src/projects/creator-only/creator-projects-custom-wizards-json.qdocinc @@ -36,7 +36,7 @@ JavaScript expression and converts the resulting JavaScript value to a string. In the JavaScript expression you can refer to variables defined by the wizard with \c {value('')}. The returned JavaScript object has the type that the value - of the variable has, which can be a string, list, dictionary or boolean. + of the variable has, which can be a string, list, dictionary, or boolean. In places where a boolean value is expected and a string is given, an empty string as well as the string \c {"false"} is treated as @@ -471,7 +471,7 @@ \endlist \li \c preferredFeatures with a list in the same format as - requiredFeatures. Any kit matching all features listed in + \c requiredFeatures. Any kit matching all features listed in \c preferredFeatures (in addition to \c requiredFeatures) will be pre-selected on this page. \endlist @@ -524,7 +524,7 @@ } \endcode - The page sets \c IsSubproject to an empty string if this is a toplevel + The page sets \c IsSubproject to an empty string if this is a top-level project and to \c yes otherwise. It sets \c VersionControl to the ID of the version control system in use. @@ -621,7 +621,7 @@ \li \c type specifies the type of the widget: \c CheckBox, \c ComboBox, \c Label, \c LineEdit, \c PathChooser, \c Spacer, and \c TextEdit. - \li \c trToolTip specifies a tool tip to show when hovering the field + \li \c trToolTip specifies a tooltip to show when hovering the field with the mouse. \li \c isComplete is evaluated for all fields to decide whether the diff --git a/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc b/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc index 7a191cc414c..070b6072b33 100644 --- a/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc +++ b/doc/qtcreator/src/user-interface/creator-file-system-view.qdoc @@ -38,7 +38,7 @@ \endlist To stop the synchronization between the editor and the - \uicontrol {File System} view, delesect the \inlineimage icons/linkicon.png + \uicontrol {File System} view, deselect the \inlineimage icons/linkicon.png (\uicontrol {Synchronize Root Directory with Editor}) button. The view displays the path to the active file as bread crumbs. You can move diff --git a/doc/qtcreator/src/user-interface/creator-views.qdoc b/doc/qtcreator/src/user-interface/creator-views.qdoc index 5b709cd7687..1a620b807fd 100644 --- a/doc/qtcreator/src/user-interface/creator-views.qdoc +++ b/doc/qtcreator/src/user-interface/creator-views.qdoc @@ -33,7 +33,7 @@ \li \l{Using Bookmarks}{Bookmarks} shows all bookmarks for the current session. \li \l{Working with Branches}{Git Branches} shows the local and remote - brances for the project in the Git version control system. + branches for the project in the Git version control system. \li \l{Viewing Defined Types and Symbols}{Outline} shows an overview of defined types and other symbols, as well as their properties and hierarchy in a source file. diff --git a/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc b/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc index 23df8528b30..4bb330abe8e 100644 --- a/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc +++ b/doc/qtcreator/src/vcs/creator-only/creator-vcs-perforce.qdoc @@ -54,7 +54,7 @@ To group files for commit, select \uicontrol Tools > \uicontrol Perforce > \uicontrol {Pending Changes}. - To view information about changelists and the files in them, select + To view information about change lists and the files in them, select \uicontrol Tools > \uicontrol Perforce > \uicontrol Describe. By default, you must confirm that you want to submit changes. To suppress diff --git a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc index ad40677abbf..21da4da3f04 100644 --- a/doc/qtcreator/src/vcs/creator-vcs-git.qdoc +++ b/doc/qtcreator/src/vcs/creator-vcs-git.qdoc @@ -399,7 +399,7 @@ With Git, you can put your current set of changes onto a virtual shelf called a \e stash. Stashes are useful, for example, to put aside a set of - changes to work on higher priority tasks or to pull in new chages from + changes to work on higher priority tasks or to pull in new changes from another repository. To stash all local changes, select \uicontrol Stash > \uicontrol Stash. The @@ -411,7 +411,7 @@ display or delete them, select \uicontrol Stashes. To save a snapshot of your current work under a name for later reference, - select \uicontrol {Take Snapshot}. The working copy is unchanged. For + select \uicontrol {Take Snapshot}. The working copy is not changed. For example, if you want to try something and find out later that it does not work, you can discard the changes and return to the state of the snapshot. @@ -455,7 +455,7 @@ version control, select \uicontrol Tools > \uicontrol Git > \uicontrol {Create Repository}. \QC creates a new subdirectory named .git that contains all the necessary repository files. However, Git does not track - anyhing in the project yet, so you will need to create an initial commit to + anything in the project yet, so you will need to create an initial commit to start tracking the project files. \section1 Working with Remote Repositories diff --git a/doc/qtcreator/src/widgets/qtdesigner-plugins.qdoc b/doc/qtcreator/src/widgets/qtdesigner-plugins.qdoc index 49f3c020f59..555de464764 100644 --- a/doc/qtcreator/src/widgets/qtdesigner-plugins.qdoc +++ b/doc/qtcreator/src/widgets/qtdesigner-plugins.qdoc @@ -53,7 +53,7 @@ On \macos, a GUI application must be built and run from a bundle. A bundle is a directory structure that appears as a single entity when viewed in the - Finder. A bundle for an application typcially contains the executable and + Finder. A bundle for an application typically contains the executable and all the resources it needs. \QC uses its own set of Qt Libraries located in the bundle, and therefore, From c1edc1e9df1b9d107e64e8da421e253362505e2b Mon Sep 17 00:00:00 2001 From: David Schulz Date: Wed, 16 Nov 2022 13:28:39 +0100 Subject: [PATCH 03/14] ProjectExplorer: Fix starting a docker project on windows ... by mapping the executable and working directory to the target device. Change-Id: I0a220fe9bae980cb279fae776962f23335eac248 Reviewed-by: Marcus Tillmanns Reviewed-by: hjk --- src/plugins/projectexplorer/runconfiguration.cpp | 2 +- src/plugins/projectexplorer/runconfigurationaspects.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index d4e6784dda5..a459148bf2f 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -392,7 +392,7 @@ Runnable RunConfiguration::runnable() const Runnable r; r.command = commandLine(); if (auto workingDirectoryAspect = aspect()) - r.workingDirectory = workingDirectoryAspect->workingDirectory(); + r.workingDirectory = workingDirectoryAspect->workingDirectory().onDevice(r.command.executable()); if (auto environmentAspect = aspect()) r.environment = environmentAspect->environment(); if (m_runnableModifier) diff --git a/src/plugins/projectexplorer/runconfigurationaspects.cpp b/src/plugins/projectexplorer/runconfigurationaspects.cpp index 9c845fd31c0..e21c99e8571 100644 --- a/src/plugins/projectexplorer/runconfigurationaspects.cpp +++ b/src/plugins/projectexplorer/runconfigurationaspects.cpp @@ -621,7 +621,7 @@ FilePath ExecutableAspect::executable() const : m_executable.filePath(); if (const IDevice::ConstPtr dev = executionDevice(m_target, m_selector)) - exe = dev->filePath(exe.path()); + exe = exe.onDevice(dev->rootPath()); return exe; } From 86c8d2166e4c8aa635134281d4375b0e5cfd09ca Mon Sep 17 00:00:00 2001 From: Kwangsub Kim Date: Tue, 15 Nov 2022 08:11:07 +0100 Subject: [PATCH 04/14] McuSupport: Remove empty packages correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The effect of rehashing on removing an item from a set was not considered, so the empty packages were not removed completely in the packages set of McuTarget and it randomly caused an invalid status of the McuTarget. Task-number: QTCREATORBUG-28457 Change-Id: I964862330cf4f8d2de88647125f65c2959db417c Reviewed-by: Sivert Krøvel Reviewed-by: Reviewed-by: Yasser Grimes Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcutargetfactory.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/plugins/mcusupport/mcutargetfactory.cpp b/src/plugins/mcusupport/mcutargetfactory.cpp index f7105c36f5a..844c8a754d7 100644 --- a/src/plugins/mcusupport/mcutargetfactory.cpp +++ b/src/plugins/mcusupport/mcutargetfactory.cpp @@ -50,9 +50,14 @@ McuPackageVersionDetector *createVersionDetection(const VersionDetection &versio static void removeEmptyPackages(Packages &packages) { - for (const McuPackagePtr &pkg : packages) { - if (pkg->cmakeVariableName().isEmpty() && pkg->path().isEmpty()) - packages.remove(pkg); + Packages::const_iterator it = packages.constBegin(); + while (it != packages.constEnd()) { + const auto &pkg = *it; + if (pkg->cmakeVariableName().isEmpty() && pkg->path().isEmpty()) { + it = packages.erase(it); + } else { + ++it; + } } } From c39d89199e3fb29a556f293e737e7b2d50e923ad Mon Sep 17 00:00:00 2001 From: Kwangsub Kim Date: Mon, 14 Nov 2022 11:51:17 +0100 Subject: [PATCH 05/14] McuSupport: Avoid empty string for cmake toolchain vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit At the first run of Qt Creator after its installation, MSVC toolchain command is set lazily after it's detected, so an empty string can be set to cmake toolchain variable when a Qt for MCUs kit is created automatically. It needs be avoided to keep the cmake variables valid. Even when the command is not updated, it will work correctly with the default variale (%{Compiler:Executable:(C,CXX)}). Task-number: QTCREATORBUG-28457 Change-Id: I5de277831e7f1e696f67724193938d6eef7a12dd Reviewed-by: Sivert Krøvel Reviewed-by: Reviewed-by: Alessandro Portale --- src/plugins/mcusupport/mcukitmanager.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugins/mcusupport/mcukitmanager.cpp b/src/plugins/mcusupport/mcukitmanager.cpp index 1aba15b1b71..75ef1fe7309 100644 --- a/src/plugins/mcusupport/mcukitmanager.cpp +++ b/src/plugins/mcusupport/mcukitmanager.cpp @@ -259,10 +259,13 @@ public: ProjectExplorer::Constants::CXX_LANGUAGE_ID); if (cToolchain && cxxToolchain) { - configMap.insert("CMAKE_CXX_COMPILER", - cxxToolchain->compilerCommand().toString().toLatin1()); - configMap.insert("CMAKE_C_COMPILER", - cToolchain->compilerCommand().toString().toLatin1()); + if (!cxxToolchain->compilerCommand().isEmpty() + && !cToolchain->compilerCommand().isEmpty()) { + configMap.insert("CMAKE_CXX_COMPILER", + cxxToolchain->compilerCommand().toString().toLatin1()); + configMap.insert("CMAKE_C_COMPILER", + cToolchain->compilerCommand().toString().toLatin1()); + } } else { printMessage(Tr::tr("Warning for target %1: invalid toolchain path (%2). " "Update the toolchain in Edit > Preferences > Kits.") From de286be2dce1f24c46053c9929fc41124d11e3f4 Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Wed, 16 Nov 2022 15:41:24 +0100 Subject: [PATCH 06/14] Valgrind: Fix plugin unit test Amends a7956df3ca4. Change-Id: I281df7e8c8a971de6398d78c0afc09bfc3625b71 Reviewed-by: hjk --- src/plugins/valgrind/valgrindtestrunnertest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/valgrind/valgrindtestrunnertest.cpp b/src/plugins/valgrind/valgrindtestrunnertest.cpp index 1642f112ae1..a8e79764b55 100644 --- a/src/plugins/valgrind/valgrindtestrunnertest.cpp +++ b/src/plugins/valgrind/valgrindtestrunnertest.cpp @@ -21,7 +21,7 @@ #include #include -#define HEADER_LENGTH 25 +#define HEADER_LENGTH 3 using namespace ProjectExplorer; using namespace Valgrind::XmlProtocol; From 1ecde217a0f16e86e620828eafdcf632acf4203a Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 16 Nov 2022 21:43:36 +0100 Subject: [PATCH 07/14] QtcAssert: Print the time of log Sometimes, after I close Creator, I notice a bunch of logs being written to console. However, I really don't know when these logs happened - on close of Creator of much earlier (e.g. 1 hour ago). Having times in log may help to link the log content with the recently executed actions inside Creator. Change-Id: Id53c1eecd315917211b04adbd82669eb8865be81 Reviewed-by: Reviewed-by: hjk --- src/libs/utils/qtcassert.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libs/utils/qtcassert.cpp b/src/libs/utils/qtcassert.cpp index 65e39891f61..d371b6f6f3b 100644 --- a/src/libs/utils/qtcassert.cpp +++ b/src/libs/utils/qtcassert.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #if defined(Q_OS_UNIX) #include @@ -114,11 +115,12 @@ void dumpBacktrace(int maxdepth) void writeAssertLocation(const char *msg) { + const QByteArray time = QTime::currentTime().toString(Qt::ISODateWithMs).toLatin1(); static bool goBoom = qEnvironmentVariableIsSet("QTC_FATAL_ASSERTS"); if (goBoom) - qFatal("SOFT ASSERT made fatal: %s", msg); + qFatal("SOFT ASSERT [%s] made fatal: %s", time.data(), msg); else - qDebug("SOFT ASSERT: %s", msg); + qDebug("SOFT ASSERT [%s]: %s", time.data(), msg); static int maxdepth = qEnvironmentVariableIntValue("QTC_BACKTRACE_MAXDEPTH"); if (maxdepth != 0) From 74d915d6aa48a0c91807d2e00e043370fe730107 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 17 Nov 2022 07:16:39 +0100 Subject: [PATCH 08/14] Docker: Add default search path for docker binary Change-Id: I86e02f726e9dac7302c3435f53fdb47c70fffafd Reviewed-by: David Schulz Reviewed-by: Qt CI Bot --- src/plugins/docker/dockersettings.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/docker/dockersettings.cpp b/src/plugins/docker/dockersettings.cpp index 7efab810f26..cd8be83a0aa 100644 --- a/src/plugins/docker/dockersettings.cpp +++ b/src/plugins/docker/dockersettings.cpp @@ -5,6 +5,7 @@ #include "dockerconstants.h" #include "dockertr.h" +#include "utils/hostosinfo.h" #include @@ -22,10 +23,17 @@ DockerSettings::DockerSettings() setSettingsGroup(Constants::DOCKER); setAutoApply(false); + FilePaths additionalPaths; + if (HostOsInfo::isWindowsHost()) + additionalPaths.append("C:/Program Files/Docker/Docker/resources/bin"); + else + additionalPaths.append("/usr/local/bin"); + registerAspect(&dockerBinaryPath); dockerBinaryPath.setDisplayStyle(StringAspect::PathChooserDisplay); dockerBinaryPath.setExpectedKind(PathChooser::ExistingCommand); - dockerBinaryPath.setDefaultFilePath(FilePath::fromString("docker").searchInPath({"/usr/local/bin"})); + dockerBinaryPath.setDefaultFilePath( + FilePath::fromString("docker").searchInPath(additionalPaths)); dockerBinaryPath.setDisplayName(Tr::tr("Docker CLI")); dockerBinaryPath.setHistoryCompleter("Docker.Command.History"); dockerBinaryPath.setLabelText(Tr::tr("Command:")); From 895f88f63abb5de961bdee757fd32f8657ec2fdd Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 17 Nov 2022 10:06:19 +0100 Subject: [PATCH 09/14] ProjectExplorer: create a root path without scheme for host device Change-Id: I966db6378dca533c73635803fb177d31b2c625ac Reviewed-by: Jarek Kobus --- src/libs/utils/filepath.cpp | 1 + .../projectexplorer/devicesupport/desktopdevice.cpp | 7 +++++++ src/plugins/projectexplorer/devicesupport/desktopdevice.h | 2 ++ 3 files changed, 10 insertions(+) diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index 70487d6d3dc..fa969ee7a86 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -1083,6 +1083,7 @@ QString FilePath::calcRelativePath(const QString &absolutePath, const QString &a */ FilePath FilePath::onDevice(const FilePath &deviceTemplate) const { + isSameDevice(deviceTemplate); const bool sameDevice = scheme() == deviceTemplate.scheme() && host() == deviceTemplate.host(); if (sameDevice) return *this; diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp index e65e9892a18..c6209cf094c 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.cpp @@ -150,4 +150,11 @@ Environment DesktopDevice::systemEnvironment() const return Environment::systemEnvironment(); } +FilePath DesktopDevice::rootPath() const +{ + if (id() == DESKTOP_DEVICE_ID) + return FilePath::fromParts({}, {}, QDir::rootPath()); + return IDevice::rootPath(); +} + } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevice.h b/src/plugins/projectexplorer/devicesupport/desktopdevice.h index 7144eba8eea..32b456b6784 100644 --- a/src/plugins/projectexplorer/devicesupport/desktopdevice.h +++ b/src/plugins/projectexplorer/devicesupport/desktopdevice.h @@ -36,6 +36,8 @@ public: Utils::Environment systemEnvironment() const override; Utils::FilePath mapToGlobalPath(const Utils::FilePath &pathOnDevice) const override; + Utils::FilePath rootPath() const override; + protected: DesktopDevice(); From 9fc27b3bb43ed75358aad46792175c59ff97e742 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Thu, 17 Nov 2022 12:38:50 +0100 Subject: [PATCH 10/14] Utils: Fix "unused parameter" warning for non-macOS Change-Id: I4dc8a02a0476a34535352b110e140d98077b59d5 Reviewed-by: Jarek Kobus --- src/libs/utils/theme/theme.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libs/utils/theme/theme.cpp b/src/libs/utils/theme/theme.cpp index 54676b709cb..8221b455a3b 100644 --- a/src/libs/utils/theme/theme.cpp +++ b/src/libs/utils/theme/theme.cpp @@ -257,6 +257,8 @@ void Theme::setHelpMenu(QMenu *menu) { #ifdef Q_OS_MACOS Internal::setMacOSHelpMenu(menu); +#else + Q_UNUSED(menu) #endif } From c699249bc4f583db91a9487405ebbf544a3a6986 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 17 Nov 2022 11:34:41 +0100 Subject: [PATCH 11/14] QMake: Fix path cleaning The .pro file path is QString compared when trying to import an existing buildfolder. This broke since resolvePath() does not necessarily clean the path anymore. Fixes: QTCREATORBUG-28409 Change-Id: I10286f086762b8f8dd9020aa4003317ff6180e12 Reviewed-by: Reviewed-by: Christian Kandeler --- src/plugins/qmakeprojectmanager/makefileparse.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qmakeprojectmanager/makefileparse.cpp b/src/plugins/qmakeprojectmanager/makefileparse.cpp index c24450a5105..bd0f8f657ff 100644 --- a/src/plugins/qmakeprojectmanager/makefileparse.cpp +++ b/src/plugins/qmakeprojectmanager/makefileparse.cpp @@ -252,7 +252,7 @@ MakeFileParse::MakeFileParse(const FilePath &makefile, Mode mode) : m_mode(mode) project = project.trimmed(); // Src Pro file - m_srcProFile = makefile.parentDir().resolvePath(project); + m_srcProFile = makefile.parentDir().resolvePath(project).cleanPath(); qCDebug(logging()) << " source .pro file:" << m_srcProFile; QString command = findQMakeLine(makefile, QLatin1String("# Command:")).trimmed(); From 43ba40530c69a45f293c23e7b4a9fe7a96ccdd55 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 16 Nov 2022 15:50:07 +0100 Subject: [PATCH 12/14] CMakeProjectManager: Set ANDROID_USE_LEGACY_TOOLCHAIN_FILE to OFF Task-number: QTCREATORBUG-28442 Change-Id: I190ba68df5a71ae352c49c96a64e9a3777880368 Reviewed-by: Marcus Tillmanns Reviewed-by: Eike Ziller --- src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index cfc10a31ac4..b5adf4bc09d 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -1484,6 +1484,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id) cmd.addArg("-DCMAKE_TOOLCHAIN_FILE:FILEPATH=" + ndkLocation.pathAppended("build/cmake/android.toolchain.cmake").path()); + cmd.addArg("-DANDROID_USE_LEGACY_TOOLCHAIN_FILE:BOOL=OFF"); auto androidAbis = bs->data(Android::Constants::AndroidMkSpecAbis).toStringList(); QString preferredAbi; From 1ba366c5c0d6da797faed3cb4a2dedd7821cb872 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 17 Nov 2022 08:03:41 +0100 Subject: [PATCH 13/14] Debugger: Fix environment when initializing Previously when detecting / checking debuggers the process would be started with the Host environment set. This was incorrect for remote debuggers. Change-Id: Icd210dbfc9437e9abd2e0c4248e5503129bf6d8b Reviewed-by: hjk --- src/plugins/debugger/debuggeritem.cpp | 19 +++++-------------- src/plugins/debugger/debuggeritem.h | 3 +-- src/plugins/debugger/debuggeritemmanager.cpp | 2 +- src/plugins/qnx/qnxconfiguration.cpp | 6 ++++-- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/plugins/debugger/debuggeritem.cpp b/src/plugins/debugger/debuggeritem.cpp index 6eb1b3e6808..a9617fc8e7f 100644 --- a/src/plugins/debugger/debuggeritem.cpp +++ b/src/plugins/debugger/debuggeritem.cpp @@ -114,7 +114,7 @@ void DebuggerItem::createId() m_id = QUuid::createUuid().toString(); } -void DebuggerItem::reinitializeFromFile(const Environment &sysEnv, QString *error) +void DebuggerItem::reinitializeFromFile(QString *error, Utils::Environment *customEnv) { // CDB only understands the single-dash -version, whereas GDB and LLDB are // happy with both -version and --version. So use the "working" -version @@ -137,7 +137,8 @@ void DebuggerItem::reinitializeFromFile(const Environment &sysEnv, QString *erro return; } - Environment env = sysEnv.isValid() ? sysEnv : Environment::systemEnvironment(); + Environment env = customEnv ? *customEnv : m_command.deviceEnvironment(); + // Prevent calling lldb on Windows because the lldb from the llvm package is linked against // python but does not contain a python dll. const bool isAndroidNdkLldb = DebuggerItem::addAndroidLldbPythonEnv(m_command, env); @@ -186,18 +187,8 @@ void DebuggerItem::reinitializeFromFile(const Environment &sysEnv, QString *erro const bool unableToFindAVersion = (0 == version); const bool gdbSupportsConfigurationFlag = (version >= 70700); if (gdbSupportsConfigurationFlag || unableToFindAVersion) { - - auto gdbConfiguration = [this, &output, &sysEnv]() { - if (!output.contains("qnx")) - return getGdbConfiguration(m_command, sysEnv); - - Environment env = sysEnv; - env.set("QNX_TARGET", QString()); - return getGdbConfiguration(m_command, env); - }; - - const QString gdbTargetAbiString = - extractGdbTargetAbiStringFromGdbOutput(gdbConfiguration()); + const QString gdbTargetAbiString = extractGdbTargetAbiStringFromGdbOutput( + getGdbConfiguration(m_command, env)); if (!gdbTargetAbiString.isEmpty()) { m_abis.append(Abi::abiFromTargetTriplet(gdbTargetAbiString)); return; diff --git a/src/plugins/debugger/debuggeritem.h b/src/plugins/debugger/debuggeritem.h index 7f865a507b9..223f953197a 100644 --- a/src/plugins/debugger/debuggeritem.h +++ b/src/plugins/debugger/debuggeritem.h @@ -76,8 +76,7 @@ public: bool operator==(const DebuggerItem &other) const; bool operator!=(const DebuggerItem &other) const { return !operator==(other); } - void reinitializeFromFile(const Utils::Environment &sysEnv = Utils::Environment::systemEnvironment(), - QString *error = nullptr); + void reinitializeFromFile(QString *error = nullptr, Utils::Environment *env = nullptr); Utils::FilePath workingDirectory() const { return m_workingDirectory; } void setWorkingDirectory(const Utils::FilePath &workingPath) { m_workingDirectory = workingPath; } diff --git a/src/plugins/debugger/debuggeritemmanager.cpp b/src/plugins/debugger/debuggeritemmanager.cpp index 8602f031fdf..48eb54d72a6 100644 --- a/src/plugins/debugger/debuggeritemmanager.cpp +++ b/src/plugins/debugger/debuggeritemmanager.cpp @@ -296,7 +296,7 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget() DebuggerItem item; item.setCommand(m_binaryChooser->filePath()); errorMessage->clear(); - item.reinitializeFromFile({}, errorMessage); + item.reinitializeFromFile(errorMessage); return errorMessage->isEmpty(); }); m_binaryChooser->setAllowPathFromDevice(true); diff --git a/src/plugins/qnx/qnxconfiguration.cpp b/src/plugins/qnx/qnxconfiguration.cpp index 84ba0baa488..8c9bdf8347d 100644 --- a/src/plugins/qnx/qnxconfiguration.cpp +++ b/src/plugins/qnx/qnxconfiguration.cpp @@ -236,9 +236,10 @@ QVariant QnxConfiguration::createDebugger(const Target &target) { Utils::Environment sysEnv = Utils::Environment::systemEnvironment(); sysEnv.modify(qnxEnvironmentItems()); + Debugger::DebuggerItem debugger; debugger.setCommand(target.m_debuggerPath); - debugger.reinitializeFromFile(sysEnv); + debugger.reinitializeFromFile(nullptr, &sysEnv); debugger.setAutoDetected(true); debugger.setUnexpandedDisplayName(Tr::tr("Debugger for %1 (%2)") .arg(displayName()) @@ -416,10 +417,11 @@ void QnxConfiguration::assignDebuggersToTargets() {{HostOsInfo::withExecutableSuffix("nto*-gdb")}, QDir::Files}); Environment sysEnv = Environment::systemEnvironment(); sysEnv.modify(qnxEnvironmentItems()); + for (const FilePath &debuggerPath : debuggerNames) { DebuggerItem item; item.setCommand(debuggerPath); - item.reinitializeFromFile(sysEnv); + item.reinitializeFromFile(nullptr, &sysEnv); bool found = false; for (const Abi &abi : item.abis()) { for (Target &target : m_targets) { From d7869967cedbfadf3c0b27fa56fb8bb44d074e5c Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 10 Nov 2022 10:56:58 +0100 Subject: [PATCH 14/14] ProjectExplorer: Remove duplicate devices In rare cases it can happen that the installer creates a device that happens to have the same rootPath as a user created device. We need to filter these out since otherwise it can be random which of the two devices is selected. Change-Id: I8269795a2e4f439fb2f02d819272723a504c6703 Reviewed-by: hjk --- src/plugins/projectexplorer/devicesupport/devicemanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp index 2d7d060427b..97eb50b8ffc 100644 --- a/src/plugins/projectexplorer/devicesupport/devicemanager.cpp +++ b/src/plugins/projectexplorer/devicesupport/devicemanager.cpp @@ -174,7 +174,7 @@ void DeviceManager::load() // devices with the same id. for (IDevice::ConstPtr device : std::as_const(userDevices)) { for (const IDevice::Ptr &sdkDevice : std::as_const(sdkDevices)) { - if (device->id() == sdkDevice->id()) { + if (device->id() == sdkDevice->id() || device->rootPath() == sdkDevice->rootPath()) { if (device->version() < sdkDevice->version()) device = sdkDevice; sdkDevices.removeOne(sdkDevice);