forked from qt-creator/qt-creator
Merge "Merge remote-tracking branch 'origin/9.0'"
This commit is contained in:
@@ -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.
|
||||
|
||||
|
@@ -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.
|
||||
|
@@ -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.
|
||||
|
@@ -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
|
||||
|
@@ -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}.
|
||||
|
@@ -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}.
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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.
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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"
|
||||
|
@@ -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.
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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('<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,
|
||||
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
|
||||
|
@@ -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
|
||||
|
@@ -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.
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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,
|
||||
|
@@ -1085,6 +1085,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;
|
||||
|
@@ -6,6 +6,7 @@
|
||||
#include <QByteArray>
|
||||
#include <QDebug>
|
||||
#include <QMutex>
|
||||
#include <QTime>
|
||||
|
||||
#if defined(Q_OS_UNIX)
|
||||
#include <stdio.h>
|
||||
@@ -117,11 +118,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)
|
||||
|
@@ -262,6 +262,8 @@ void Theme::setHelpMenu(QMenu *menu)
|
||||
{
|
||||
#ifdef Q_OS_MACOS
|
||||
Internal::setMacOSHelpMenu(menu);
|
||||
#else
|
||||
Q_UNUSED(menu)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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; }
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
|
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "dockerconstants.h"
|
||||
#include "dockertr.h"
|
||||
#include "utils/hostosinfo.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
@@ -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:"));
|
||||
|
@@ -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.")
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -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();
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -392,7 +392,7 @@ Runnable RunConfiguration::runnable() const
|
||||
Runnable r;
|
||||
r.command = commandLine();
|
||||
if (auto workingDirectoryAspect = aspect<WorkingDirectoryAspect>())
|
||||
r.workingDirectory = workingDirectoryAspect->workingDirectory();
|
||||
r.workingDirectory = workingDirectoryAspect->workingDirectory().onDevice(r.command.executable());
|
||||
if (auto environmentAspect = aspect<EnvironmentAspect>())
|
||||
r.environment = environmentAspect->environment();
|
||||
if (m_runnableModifier)
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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();
|
||||
|
@@ -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) {
|
||||
|
@@ -20,7 +20,7 @@
|
||||
#include <QDir>
|
||||
#include <QSignalSpy>
|
||||
|
||||
#define HEADER_LENGTH 25
|
||||
#define HEADER_LENGTH 3
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Valgrind::XmlProtocol;
|
||||
|
Reference in New Issue
Block a user