Merge "Merge remote-tracking branch 'origin/9.0'"

This commit is contained in:
The Qt Project
2022-11-17 15:57:52 +00:00
40 changed files with 91 additions and 67 deletions

View File

@@ -16,7 +16,7 @@
To develop for Android, you must have a tool chain for building applications To develop for Android, you must have a tool chain for building applications
for Android devices installed on the development PC. \QC can automatically 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 \l{glossary-buildandrun-kit}{kit} that contains the tool chain and the Qt
version for Android for the device's architecture. version for Android for the device's architecture.

View File

@@ -239,7 +239,7 @@
To add OpenSSL libraries, select \uicontrol {Include prebuilt OpenSSL libraries} To add OpenSSL libraries, select \uicontrol {Include prebuilt OpenSSL libraries}
in the \uicontrol {Additional Libraries} group. This will add the OpenSSL in the \uicontrol {Additional Libraries} group. This will add the OpenSSL
include project defined in \l{Specifying Android Device Settings}{device settings} 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. projects.
Otherwise, you can manually add the paths to the required \c libssl.so and Otherwise, you can manually add the paths to the required \c libssl.so and
@@ -248,7 +248,7 @@
\section1 Editing Manifest Files \section1 Editing Manifest Files
You can use the configuration options to specify all the settings you need 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. to specify Android-specific settings, such as the application icon.
However, the manifest file is needed when you want to publish the package However, the manifest file is needed when you want to publish the package
in the Play Store. in the Play Store.

View File

@@ -99,7 +99,7 @@
\li In the \uicontrol Type field, select the interface type. \li In the \uicontrol Type field, select the interface type.
\li In the \uicontrol Speed field, enter the interface speed between \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 \li Select the \uicontrol {Disable cache} check box to disable the
\EBlink flash cache. \EBlink flash cache.

View File

@@ -62,7 +62,7 @@
breakpoint in the \uicontrol Breakpoints view. breakpoint in the \uicontrol Breakpoints view.
At various times, attempts are made to implant pending breakpoints into 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 implanted breakpoints, each associated with an actual address in
the debugged breakpoint. The implantation might also move a breakpoint 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 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 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 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 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 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 displays the contents of a QHash or QMap in an orderly manner. Also, the

View File

@@ -169,7 +169,7 @@
The 32-bit CDB version can only debug 32-bit executables, whereas the 64-bit 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 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. WOW64 emulator 32-bit emulation layer being displayed.
\QC extends the command line debugger by loading the \QC extends the command line debugger by loading the
@@ -187,7 +187,7 @@
It is highly recommended that you add the Symbol Server provided It is highly recommended that you add the Symbol Server provided
by Microsoft to the symbol search path of the debugger. The 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. operating system libraries for debugging Windows applications.
For more information, see For more information, see
\l{Setting CDB Paths on Windows}. \l{Setting CDB Paths on Windows}.

View File

@@ -417,7 +417,7 @@
to manage the GDB process, see \l{Specifying GDB Settings} and to manage the GDB process, see \l{Specifying GDB Settings} and
\l{Specifying Extended GDB Settings}. \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} in GDB, see \l{https://sourceware.org/gdb/onlinedocs/gdb/Connecting.html}
{Debugging with GDB: Connecting to a Remote Target}. {Debugging with GDB: Connecting to a Remote Target}.

View File

@@ -67,8 +67,8 @@
\li In the \uicontrol Background field, select the background \li In the \uicontrol Background field, select the background
color for the code element or message. color for the code element or message.
The backgound of the \uicontrol Text element determines the background of the The background of the \uicontrol Text element determines the background
code editor. of the code editor.
\li In \uicontrol Font, select \uicontrol Bold or \uicontrol Italic to \li In \uicontrol Font, select \uicontrol Bold or \uicontrol Italic to
format the text of the selected code element or message by making it 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 To resolve the issue, use a file conversion tool to convert the file
encoding to UTF-8 when developing Qt 5 applications. Otherwise, conversion 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 If you develop only Qt 4 applications or other than Qt applications, you
can set other encoding options as the default encoding. Select the can set other encoding options as the default encoding. Select the

View File

@@ -310,7 +310,7 @@
\section1 Quitting FakeVim Mode \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}. \uicontrol FakeVim > \uicontrol {Use FakeVim} or press \key {Alt+V,Alt+V}.
You can temporarily escape FakeVim mode to access the normal \QC keyboard You can temporarily escape FakeVim mode to access the normal \QC keyboard

View File

@@ -52,7 +52,7 @@
file patterns to match language servers. If you do not set at least one MIME 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 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 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}. more information about how \QC uses MIME types, see \l {Editing MIME Types}.
\section1 Specifying Settings for Language Clients \section1 Specifying Settings for Language Clients

View File

@@ -34,7 +34,7 @@
\QC searches for the value within a specified range in the files and takes \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 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 advised to use the recommended values for the range and priority of the
magic header. magic header.

View File

@@ -74,7 +74,7 @@
\endlist \endlist
You can group elements by surrounding them with a boundary. When you move 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 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) 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 will be moved together. A vertical swimlane is created when you drop the

View File

@@ -87,7 +87,7 @@
\li For a Qt Quick test, select the \li For a Qt Quick test, select the
\uicontrol {Generate setup code} check box to execute C++ \uicontrol {Generate setup code} check box to execute C++
code before any of the QML tests are run. The testing 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}. described in \l{Executing C++ Before QML Tests}.
\image qtcreator-autotests-project-qtquick-test.png "Autotest project wizard - Qt Quick Test" \image qtcreator-autotests-project-qtquick-test.png "Autotest project wizard - Qt Quick Test"

View File

@@ -105,7 +105,7 @@
is encountered. This is the default behavior in Visual Studio is encountered. This is the default behavior in Visual Studio
builds, but not for Make and Build tools or Dev Tools builds. builds, but not for Make and Build tools or Dev Tools builds.
\li \uicontrol {Additional Arguments} are concatenated to the final \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 \li \uicontrol {Open Build Monitor} opens an IncrediBuild Build Monitor
that graphically displays the build's progress once the build that graphically displays the build's progress once the build
starts. starts.

View File

@@ -97,7 +97,7 @@
\row \row
\li {1,2} General \li {1,2} General
\li Empty File \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 \row
\li Scratch Buffer \li Scratch Buffer
\li Scratch buffer that uses temporary files. You can \li Scratch buffer that uses temporary files. You can

View File

@@ -81,7 +81,7 @@
compilers from the various KEIL development environments. compilers from the various KEIL development environments.
Currently supported architectures are \c 8051 and \c ARM. 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. C bare-metal compiler for various architectures.
Currently supported architectures are \c 8051 and \c STM8. Currently supported architectures are \c 8051 and \c STM8.
@@ -90,7 +90,7 @@
The emscripten compiler is tool chain for compiling to The emscripten compiler is tool chain for compiling to
\l{Building Applications for the Web}{WebAssembly}. \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 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 x86_64 target. If you plan to create also 32-bit x86 binaries without using

View File

@@ -36,7 +36,7 @@
JavaScript expression and converts the resulting JavaScript value to a string. 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 In the JavaScript expression you can refer to variables defined by the wizard with
\c {value('<variableName>')}. The returned JavaScript object has the type that the value \c {value('<variableName>')}. 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, 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 an empty string as well as the string \c {"false"} is treated as
@@ -471,7 +471,7 @@
\endlist \endlist
\li \c preferredFeatures with a list in the same format as \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 \c preferredFeatures (in addition to \c requiredFeatures) will be
pre-selected on this page. pre-selected on this page.
\endlist \endlist
@@ -524,7 +524,7 @@
} }
\endcode \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 project and to \c yes otherwise. It sets \c VersionControl to the ID of the
version control system in use. version control system in use.
@@ -621,7 +621,7 @@
\li \c type specifies the type of the widget: \c CheckBox, \c ComboBox, \li \c type specifies the type of the widget: \c CheckBox, \c ComboBox,
\c Label, \c LineEdit, \c PathChooser, \c Spacer, and \c TextEdit. \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. with the mouse.
\li \c isComplete is evaluated for all fields to decide whether the \li \c isComplete is evaluated for all fields to decide whether the

View File

@@ -38,7 +38,7 @@
\endlist \endlist
To stop the synchronization between the editor and the 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. (\uicontrol {Synchronize Root Directory with Editor}) button.
The view displays the path to the active file as bread crumbs. You can move The view displays the path to the active file as bread crumbs. You can move

View File

@@ -33,7 +33,7 @@
\li \l{Using Bookmarks}{Bookmarks} shows all bookmarks for the current \li \l{Using Bookmarks}{Bookmarks} shows all bookmarks for the current
session. session.
\li \l{Working with Branches}{Git Branches} shows the local and remote \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 \li \l{Viewing Defined Types and Symbols}{Outline} shows an overview of
defined types and other symbols, as well as their properties and defined types and other symbols, as well as their properties and
hierarchy in a source file. hierarchy in a source file.

View File

@@ -54,7 +54,7 @@
To group files for commit, select \uicontrol Tools > \uicontrol Perforce > To group files for commit, select \uicontrol Tools > \uicontrol Perforce >
\uicontrol {Pending Changes}. \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. \uicontrol Tools > \uicontrol Perforce > \uicontrol Describe.
By default, you must confirm that you want to submit changes. To suppress By default, you must confirm that you want to submit changes. To suppress

View File

@@ -399,7 +399,7 @@
With Git, you can put your current set of changes onto a virtual shelf 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 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. another repository.
To stash all local changes, select \uicontrol Stash > \uicontrol Stash. The To stash all local changes, select \uicontrol Stash > \uicontrol Stash. The
@@ -411,7 +411,7 @@
display or delete them, select \uicontrol Stashes. display or delete them, select \uicontrol Stashes.
To save a snapshot of your current work under a name for later reference, 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 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. 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 > version control, select \uicontrol Tools > \uicontrol Git >
\uicontrol {Create Repository}. \QC creates a new subdirectory named .git \uicontrol {Create Repository}. \QC creates a new subdirectory named .git
that contains all the necessary repository files. However, Git does not track 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. start tracking the project files.
\section1 Working with Remote Repositories \section1 Working with Remote Repositories

View File

@@ -53,7 +53,7 @@
On \macos, a GUI application must be built and run from a bundle. A bundle 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 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. all the resources it needs.
\QC uses its own set of Qt Libraries located in the bundle, and therefore, \QC uses its own set of Qt Libraries located in the bundle, and therefore,

View File

@@ -1085,6 +1085,7 @@ QString FilePath::calcRelativePath(const QString &absolutePath, const QString &a
*/ */
FilePath FilePath::onDevice(const FilePath &deviceTemplate) const FilePath FilePath::onDevice(const FilePath &deviceTemplate) const
{ {
isSameDevice(deviceTemplate);
const bool sameDevice = scheme() == deviceTemplate.scheme() && host() == deviceTemplate.host(); const bool sameDevice = scheme() == deviceTemplate.scheme() && host() == deviceTemplate.host();
if (sameDevice) if (sameDevice)
return *this; return *this;

View File

@@ -6,6 +6,7 @@
#include <QByteArray> #include <QByteArray>
#include <QDebug> #include <QDebug>
#include <QMutex> #include <QMutex>
#include <QTime>
#if defined(Q_OS_UNIX) #if defined(Q_OS_UNIX)
#include <stdio.h> #include <stdio.h>
@@ -117,11 +118,12 @@ void dumpBacktrace(int maxdepth)
void writeAssertLocation(const char *msg) void writeAssertLocation(const char *msg)
{ {
const QByteArray time = QTime::currentTime().toString(Qt::ISODateWithMs).toLatin1();
static bool goBoom = qEnvironmentVariableIsSet("QTC_FATAL_ASSERTS"); static bool goBoom = qEnvironmentVariableIsSet("QTC_FATAL_ASSERTS");
if (goBoom) if (goBoom)
qFatal("SOFT ASSERT made fatal: %s", msg); qFatal("SOFT ASSERT [%s] made fatal: %s", time.data(), msg);
else else
qDebug("SOFT ASSERT: %s", msg); qDebug("SOFT ASSERT [%s]: %s", time.data(), msg);
static int maxdepth = qEnvironmentVariableIntValue("QTC_BACKTRACE_MAXDEPTH"); static int maxdepth = qEnvironmentVariableIntValue("QTC_BACKTRACE_MAXDEPTH");
if (maxdepth != 0) if (maxdepth != 0)

View File

@@ -262,6 +262,8 @@ void Theme::setHelpMenu(QMenu *menu)
{ {
#ifdef Q_OS_MACOS #ifdef Q_OS_MACOS
Internal::setMacOSHelpMenu(menu); Internal::setMacOSHelpMenu(menu);
#else
Q_UNUSED(menu)
#endif #endif
} }

View File

@@ -1484,6 +1484,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
cmd.addArg("-DCMAKE_TOOLCHAIN_FILE:FILEPATH=" cmd.addArg("-DCMAKE_TOOLCHAIN_FILE:FILEPATH="
+ ndkLocation.pathAppended("build/cmake/android.toolchain.cmake").path()); + 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(); auto androidAbis = bs->data(Android::Constants::AndroidMkSpecAbis).toStringList();
QString preferredAbi; QString preferredAbi;

View File

@@ -114,7 +114,7 @@ void DebuggerItem::createId()
m_id = QUuid::createUuid().toString(); 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 // CDB only understands the single-dash -version, whereas GDB and LLDB are
// happy with both -version and --version. So use the "working" -version // happy with both -version and --version. So use the "working" -version
@@ -137,7 +137,8 @@ void DebuggerItem::reinitializeFromFile(const Environment &sysEnv, QString *erro
return; 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 // Prevent calling lldb on Windows because the lldb from the llvm package is linked against
// python but does not contain a python dll. // python but does not contain a python dll.
const bool isAndroidNdkLldb = DebuggerItem::addAndroidLldbPythonEnv(m_command, env); 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 unableToFindAVersion = (0 == version);
const bool gdbSupportsConfigurationFlag = (version >= 70700); const bool gdbSupportsConfigurationFlag = (version >= 70700);
if (gdbSupportsConfigurationFlag || unableToFindAVersion) { if (gdbSupportsConfigurationFlag || unableToFindAVersion) {
const QString gdbTargetAbiString = extractGdbTargetAbiStringFromGdbOutput(
auto gdbConfiguration = [this, &output, &sysEnv]() { getGdbConfiguration(m_command, env));
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());
if (!gdbTargetAbiString.isEmpty()) { if (!gdbTargetAbiString.isEmpty()) {
m_abis.append(Abi::abiFromTargetTriplet(gdbTargetAbiString)); m_abis.append(Abi::abiFromTargetTriplet(gdbTargetAbiString));
return; return;

View File

@@ -76,8 +76,7 @@ public:
bool operator==(const DebuggerItem &other) const; bool operator==(const DebuggerItem &other) const;
bool operator!=(const DebuggerItem &other) const { return !operator==(other); } bool operator!=(const DebuggerItem &other) const { return !operator==(other); }
void reinitializeFromFile(const Utils::Environment &sysEnv = Utils::Environment::systemEnvironment(), void reinitializeFromFile(QString *error = nullptr, Utils::Environment *env = nullptr);
QString *error = nullptr);
Utils::FilePath workingDirectory() const { return m_workingDirectory; } Utils::FilePath workingDirectory() const { return m_workingDirectory; }
void setWorkingDirectory(const Utils::FilePath &workingPath) { m_workingDirectory = workingPath; } void setWorkingDirectory(const Utils::FilePath &workingPath) { m_workingDirectory = workingPath; }

View File

@@ -296,7 +296,7 @@ DebuggerItemConfigWidget::DebuggerItemConfigWidget()
DebuggerItem item; DebuggerItem item;
item.setCommand(m_binaryChooser->filePath()); item.setCommand(m_binaryChooser->filePath());
errorMessage->clear(); errorMessage->clear();
item.reinitializeFromFile({}, errorMessage); item.reinitializeFromFile(errorMessage);
return errorMessage->isEmpty(); return errorMessage->isEmpty();
}); });
m_binaryChooser->setAllowPathFromDevice(true); m_binaryChooser->setAllowPathFromDevice(true);

View File

@@ -451,7 +451,8 @@ void DebuggerRunTool::start()
} }
// QML and/or mixed are not prepared for it. // 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. // FIXME: Disabled due to Android. Make Android device report available ports instead.
// int portsUsed = portsUsedByDebugger(); // int portsUsed = portsUsedByDebugger();

View File

@@ -5,6 +5,7 @@
#include "dockerconstants.h" #include "dockerconstants.h"
#include "dockertr.h" #include "dockertr.h"
#include "utils/hostosinfo.h"
#include <coreplugin/icore.h> #include <coreplugin/icore.h>
@@ -22,10 +23,17 @@ DockerSettings::DockerSettings()
setSettingsGroup(Constants::DOCKER); setSettingsGroup(Constants::DOCKER);
setAutoApply(false); setAutoApply(false);
FilePaths additionalPaths;
if (HostOsInfo::isWindowsHost())
additionalPaths.append("C:/Program Files/Docker/Docker/resources/bin");
else
additionalPaths.append("/usr/local/bin");
registerAspect(&dockerBinaryPath); registerAspect(&dockerBinaryPath);
dockerBinaryPath.setDisplayStyle(StringAspect::PathChooserDisplay); dockerBinaryPath.setDisplayStyle(StringAspect::PathChooserDisplay);
dockerBinaryPath.setExpectedKind(PathChooser::ExistingCommand); 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.setDisplayName(Tr::tr("Docker CLI"));
dockerBinaryPath.setHistoryCompleter("Docker.Command.History"); dockerBinaryPath.setHistoryCompleter("Docker.Command.History");
dockerBinaryPath.setLabelText(Tr::tr("Command:")); dockerBinaryPath.setLabelText(Tr::tr("Command:"));

View File

@@ -259,10 +259,13 @@ public:
ProjectExplorer::Constants::CXX_LANGUAGE_ID); ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (cToolchain && cxxToolchain) { if (cToolchain && cxxToolchain) {
configMap.insert("CMAKE_CXX_COMPILER", if (!cxxToolchain->compilerCommand().isEmpty()
cxxToolchain->compilerCommand().toString().toLatin1()); && !cToolchain->compilerCommand().isEmpty()) {
configMap.insert("CMAKE_C_COMPILER", configMap.insert("CMAKE_CXX_COMPILER",
cToolchain->compilerCommand().toString().toLatin1()); cxxToolchain->compilerCommand().toString().toLatin1());
configMap.insert("CMAKE_C_COMPILER",
cToolchain->compilerCommand().toString().toLatin1());
}
} else { } else {
printMessage(Tr::tr("Warning for target %1: invalid toolchain path (%2). " printMessage(Tr::tr("Warning for target %1: invalid toolchain path (%2). "
"Update the toolchain in Edit > Preferences > Kits.") "Update the toolchain in Edit > Preferences > Kits.")

View File

@@ -50,9 +50,14 @@ McuPackageVersionDetector *createVersionDetection(const VersionDetection &versio
static void removeEmptyPackages(Packages &packages) static void removeEmptyPackages(Packages &packages)
{ {
for (const McuPackagePtr &pkg : packages) { Packages::const_iterator it = packages.constBegin();
if (pkg->cmakeVariableName().isEmpty() && pkg->path().isEmpty()) while (it != packages.constEnd()) {
packages.remove(pkg); const auto &pkg = *it;
if (pkg->cmakeVariableName().isEmpty() && pkg->path().isEmpty()) {
it = packages.erase(it);
} else {
++it;
}
} }
} }

View File

@@ -150,4 +150,11 @@ Environment DesktopDevice::systemEnvironment() const
return Environment::systemEnvironment(); return Environment::systemEnvironment();
} }
FilePath DesktopDevice::rootPath() const
{
if (id() == DESKTOP_DEVICE_ID)
return FilePath::fromParts({}, {}, QDir::rootPath());
return IDevice::rootPath();
}
} // namespace ProjectExplorer } // namespace ProjectExplorer

View File

@@ -36,6 +36,8 @@ public:
Utils::Environment systemEnvironment() const override; Utils::Environment systemEnvironment() const override;
Utils::FilePath mapToGlobalPath(const Utils::FilePath &pathOnDevice) const override; Utils::FilePath mapToGlobalPath(const Utils::FilePath &pathOnDevice) const override;
Utils::FilePath rootPath() const override;
protected: protected:
DesktopDevice(); DesktopDevice();

View File

@@ -174,7 +174,7 @@ void DeviceManager::load()
// devices with the same id. // devices with the same id.
for (IDevice::ConstPtr device : std::as_const(userDevices)) { for (IDevice::ConstPtr device : std::as_const(userDevices)) {
for (const IDevice::Ptr &sdkDevice : std::as_const(sdkDevices)) { 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()) if (device->version() < sdkDevice->version())
device = sdkDevice; device = sdkDevice;
sdkDevices.removeOne(sdkDevice); sdkDevices.removeOne(sdkDevice);

View File

@@ -392,7 +392,7 @@ Runnable RunConfiguration::runnable() const
Runnable r; Runnable r;
r.command = commandLine(); r.command = commandLine();
if (auto workingDirectoryAspect = aspect<WorkingDirectoryAspect>()) if (auto workingDirectoryAspect = aspect<WorkingDirectoryAspect>())
r.workingDirectory = workingDirectoryAspect->workingDirectory(); r.workingDirectory = workingDirectoryAspect->workingDirectory().onDevice(r.command.executable());
if (auto environmentAspect = aspect<EnvironmentAspect>()) if (auto environmentAspect = aspect<EnvironmentAspect>())
r.environment = environmentAspect->environment(); r.environment = environmentAspect->environment();
if (m_runnableModifier) if (m_runnableModifier)

View File

@@ -621,7 +621,7 @@ FilePath ExecutableAspect::executable() const
: m_executable.filePath(); : m_executable.filePath();
if (const IDevice::ConstPtr dev = executionDevice(m_target, m_selector)) if (const IDevice::ConstPtr dev = executionDevice(m_target, m_selector))
exe = dev->filePath(exe.path()); exe = exe.onDevice(dev->rootPath());
return exe; return exe;
} }

View File

@@ -252,7 +252,7 @@ MakeFileParse::MakeFileParse(const FilePath &makefile, Mode mode) : m_mode(mode)
project = project.trimmed(); project = project.trimmed();
// Src Pro file // Src Pro file
m_srcProFile = makefile.parentDir().resolvePath(project); m_srcProFile = makefile.parentDir().resolvePath(project).cleanPath();
qCDebug(logging()) << " source .pro file:" << m_srcProFile; qCDebug(logging()) << " source .pro file:" << m_srcProFile;
QString command = findQMakeLine(makefile, QLatin1String("# Command:")).trimmed(); QString command = findQMakeLine(makefile, QLatin1String("# Command:")).trimmed();

View File

@@ -236,9 +236,10 @@ QVariant QnxConfiguration::createDebugger(const Target &target)
{ {
Utils::Environment sysEnv = Utils::Environment::systemEnvironment(); Utils::Environment sysEnv = Utils::Environment::systemEnvironment();
sysEnv.modify(qnxEnvironmentItems()); sysEnv.modify(qnxEnvironmentItems());
Debugger::DebuggerItem debugger; Debugger::DebuggerItem debugger;
debugger.setCommand(target.m_debuggerPath); debugger.setCommand(target.m_debuggerPath);
debugger.reinitializeFromFile(sysEnv); debugger.reinitializeFromFile(nullptr, &sysEnv);
debugger.setAutoDetected(true); debugger.setAutoDetected(true);
debugger.setUnexpandedDisplayName(Tr::tr("Debugger for %1 (%2)") debugger.setUnexpandedDisplayName(Tr::tr("Debugger for %1 (%2)")
.arg(displayName()) .arg(displayName())
@@ -416,10 +417,11 @@ void QnxConfiguration::assignDebuggersToTargets()
{{HostOsInfo::withExecutableSuffix("nto*-gdb")}, QDir::Files}); {{HostOsInfo::withExecutableSuffix("nto*-gdb")}, QDir::Files});
Environment sysEnv = Environment::systemEnvironment(); Environment sysEnv = Environment::systemEnvironment();
sysEnv.modify(qnxEnvironmentItems()); sysEnv.modify(qnxEnvironmentItems());
for (const FilePath &debuggerPath : debuggerNames) { for (const FilePath &debuggerPath : debuggerNames) {
DebuggerItem item; DebuggerItem item;
item.setCommand(debuggerPath); item.setCommand(debuggerPath);
item.reinitializeFromFile(sysEnv); item.reinitializeFromFile(nullptr, &sysEnv);
bool found = false; bool found = false;
for (const Abi &abi : item.abis()) { for (const Abi &abi : item.abis()) {
for (Target &target : m_targets) { for (Target &target : m_targets) {

View File

@@ -20,7 +20,7 @@
#include <QDir> #include <QDir>
#include <QSignalSpy> #include <QSignalSpy>
#define HEADER_LENGTH 25 #define HEADER_LENGTH 3
using namespace ProjectExplorer; using namespace ProjectExplorer;
using namespace Valgrind::XmlProtocol; using namespace Valgrind::XmlProtocol;