forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/7.0'
Conflicts: src/libs/ssh/sshremoteprocessrunner.h Change-Id: I4ce088c68704845ec8ec6feaad10bf747e415bec
This commit is contained in:
Binary file not shown.
Before Width: | Height: | Size: 26 KiB |
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 18 KiB |
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2020 The Qt Company Ltd.
|
** Copyright (C) 2022 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -47,11 +47,14 @@
|
|||||||
format file recursively from the directory that contains the source file
|
format file recursively from the directory that contains the source file
|
||||||
up to the file system root.
|
up to the file system root.
|
||||||
|
|
||||||
To specify settings for automatic formatting and indentation:
|
To specify global settings for automatic formatting and indentation, you
|
||||||
|
must copy the built-in settings and edit the copy:
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++}.
|
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++} >
|
||||||
\image qtcreator-clang-format-options.png "C++ Clang Format options"
|
\uicontrol Edit > \uicontrol {Copy Built-in Code Style} >
|
||||||
|
\uicontrol {ClangFormat}.
|
||||||
|
\image qtcreator-code-style-clang-format.png "C++ Clang Format options"
|
||||||
\li Select the \uicontrol {Format instead of indenting} check box to
|
\li Select the \uicontrol {Format instead of indenting} check box to
|
||||||
use the \key {Ctrl+I} keyboard shortcut to format code instead of
|
use the \key {Ctrl+I} keyboard shortcut to format code instead of
|
||||||
indenting it.
|
indenting it.
|
||||||
@@ -72,11 +75,10 @@
|
|||||||
|
|
||||||
To override the \c {.clang-format} file for a project, select
|
To override the \c {.clang-format} file for a project, select
|
||||||
\uicontrol Projects > \uicontrol {Project Settings} >
|
\uicontrol Projects > \uicontrol {Project Settings} >
|
||||||
\uicontrol {Code Style} >
|
\uicontrol {Code Style} > \uicontrol Edit >
|
||||||
|
\uicontrol {Copy Built-in Code Style} > \uicontrol {ClangFormat} >
|
||||||
\uicontrol {Override Clang Format configuration file}.
|
\uicontrol {Override Clang Format configuration file}.
|
||||||
|
|
||||||
\image qtcreator-code-style-clang-format.png
|
|
||||||
|
|
||||||
You can create \c {.clang-format} files that contain the configuration
|
You can create \c {.clang-format} files that contain the configuration
|
||||||
options of a certain predefined style from the command line. For example,
|
options of a certain predefined style from the command line. For example,
|
||||||
to create a format file for the LLVM style, enter the following command:
|
to create a format file for the LLVM style, enter the following command:
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2021 The Qt Company Ltd.
|
** Copyright (C) 2022 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -104,9 +104,6 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++}.
|
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol {C++}.
|
||||||
\note The settings displayed here depend on which plugins you have
|
|
||||||
enabled. If the Clang Format plugin is enabled, you'll see the
|
|
||||||
settings described in \l{Automatic Formatting and Indentation}.
|
|
||||||
\li In the \uicontrol {Current settings} field, select the settings to
|
\li In the \uicontrol {Current settings} field, select the settings to
|
||||||
modify and click \uicontrol Copy.
|
modify and click \uicontrol Copy.
|
||||||
\image qtcreator-options-code-style-cpp.png "C++ Code Style options"
|
\image qtcreator-options-code-style-cpp.png "C++ Code Style options"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2020 The Qt Company Ltd.
|
** Copyright (C) 2022 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
**
|
**
|
||||||
** This file is part of the Qt Creator documentation.
|
** This file is part of the Qt Creator documentation.
|
||||||
@@ -176,7 +176,7 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol C++ >
|
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol C++ >
|
||||||
\uicontrol Clang > \uicontrol {Use clangd (EXPERIMENTAL)}.
|
\uicontrol Clangd > \uicontrol {Use clangd (EXPERIMENTAL)}.
|
||||||
\image qtcreator-options-clangd.png "clangd options"
|
\image qtcreator-options-clangd.png "clangd options"
|
||||||
\li In \uicontrol {Path to executable}, enter the path to clangd
|
\li In \uicontrol {Path to executable}, enter the path to clangd
|
||||||
version 13, or later.
|
version 13, or later.
|
||||||
|
@@ -13,6 +13,10 @@ versionAtLeast(QT_VERSION, 5.15.0) {
|
|||||||
QT *= quick3dparticles-private
|
QT *= quick3dparticles-private
|
||||||
DEFINES *= QUICK3D_PARTICLES_MODULE
|
DEFINES *= QUICK3D_PARTICLES_MODULE
|
||||||
}
|
}
|
||||||
|
qtHaveModule(quick3dassetutils) {
|
||||||
|
QT *= quick3dassetutils-private
|
||||||
|
DEFINES *= QUICK3D_ASSET_UTILS_MODULE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HEADERS += $$PWD/qt5nodeinstanceserver.h \
|
HEADERS += $$PWD/qt5nodeinstanceserver.h \
|
||||||
|
@@ -104,6 +104,9 @@
|
|||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
#include "../editor3d/qt5compat/qquick3darealight_p.h"
|
#include "../editor3d/qt5compat/qquick3darealight_p.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(QUICK3D_ASSET_UTILS_MODULE) && QT_VERSION > QT_VERSION_CHECK(6, 2, 0)
|
||||||
|
#include <private/qquick3druntimeloader_p.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef QUICK3D_PARTICLES_MODULE
|
#ifdef QUICK3D_PARTICLES_MODULE
|
||||||
@@ -2317,13 +2320,23 @@ void Qt5InformationNodeInstanceServer::handleInstanceHidden(const ServerNodeInst
|
|||||||
} else {
|
} else {
|
||||||
auto checkRepeater = qobject_cast<QQuick3DRepeater *>(checkNode);
|
auto checkRepeater = qobject_cast<QQuick3DRepeater *>(checkNode);
|
||||||
auto checkLoader = qobject_cast<QQuick3DLoader *>(checkNode);
|
auto checkLoader = qobject_cast<QQuick3DLoader *>(checkNode);
|
||||||
|
#if defined(QUICK3D_ASSET_UTILS_MODULE) && QT_VERSION > QT_VERSION_CHECK(6, 2, 0)
|
||||||
|
auto checkRunLoader = qobject_cast<QQuick3DRuntimeLoader *>(checkNode);
|
||||||
|
if (checkRepeater || checkLoader || checkRunLoader) {
|
||||||
|
#else
|
||||||
if (checkRepeater || checkLoader) {
|
if (checkRepeater || checkLoader) {
|
||||||
|
#endif
|
||||||
// Repeaters/loaders may not yet have created their children, so we set
|
// Repeaters/loaders may not yet have created their children, so we set
|
||||||
// _pickTarget on them and connect the notifier.
|
// _pickTarget on them and connect the notifier.
|
||||||
if (checkNode->property("_pickTarget").isNull()) {
|
if (checkNode->property("_pickTarget").isNull()) {
|
||||||
if (checkRepeater) {
|
if (checkRepeater) {
|
||||||
QObject::connect(checkRepeater, &QQuick3DRepeater::objectAdded,
|
QObject::connect(checkRepeater, &QQuick3DRepeater::objectAdded,
|
||||||
this, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
this, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
||||||
|
#if defined(QUICK3D_ASSET_UTILS_MODULE) && QT_VERSION > QT_VERSION_CHECK(6, 2, 0)
|
||||||
|
} else if (checkRunLoader) {
|
||||||
|
QObject::connect(checkRunLoader, &QQuick3DRuntimeLoader::statusChanged,
|
||||||
|
this, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
QObject::connect(checkLoader, &QQuick3DLoader::loaded,
|
QObject::connect(checkLoader, &QQuick3DLoader::loaded,
|
||||||
this, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
this, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
||||||
|
@@ -42,6 +42,9 @@
|
|||||||
#include <private/qquick3dnode_p_p.h>
|
#include <private/qquick3dnode_p_p.h>
|
||||||
#include <private/qquick3drepeater_p.h>
|
#include <private/qquick3drepeater_p.h>
|
||||||
#include <private/qquick3dloader_p.h>
|
#include <private/qquick3dloader_p.h>
|
||||||
|
#if defined(QUICK3D_ASSET_UTILS_MODULE) && QT_VERSION > QT_VERSION_CHECK(6, 2, 0)
|
||||||
|
#include <private/qquick3druntimeloader_p.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner {
|
||||||
@@ -63,11 +66,21 @@ void Quick3DNodeInstance::initialize(const ObjectNodeInstance::Pointer &objectNo
|
|||||||
QObject *obj = object();
|
QObject *obj = object();
|
||||||
auto repObj = qobject_cast<QQuick3DRepeater *>(obj);
|
auto repObj = qobject_cast<QQuick3DRepeater *>(obj);
|
||||||
auto loadObj = qobject_cast<QQuick3DLoader *>(obj);
|
auto loadObj = qobject_cast<QQuick3DLoader *>(obj);
|
||||||
|
#if defined(QUICK3D_ASSET_UTILS_MODULE) && QT_VERSION > QT_VERSION_CHECK(6, 2, 0)
|
||||||
|
auto runLoadObj = qobject_cast<QQuick3DRuntimeLoader *>(obj);
|
||||||
|
if (repObj || loadObj || runLoadObj) {
|
||||||
|
#else
|
||||||
if (repObj || loadObj) {
|
if (repObj || loadObj) {
|
||||||
|
#endif
|
||||||
if (auto infoServer = qobject_cast<Qt5InformationNodeInstanceServer *>(nodeInstanceServer())) {
|
if (auto infoServer = qobject_cast<Qt5InformationNodeInstanceServer *>(nodeInstanceServer())) {
|
||||||
if (repObj) {
|
if (repObj) {
|
||||||
QObject::connect(repObj, &QQuick3DRepeater::objectAdded,
|
QObject::connect(repObj, &QQuick3DRepeater::objectAdded,
|
||||||
infoServer, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
infoServer, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
||||||
|
#if defined(QUICK3D_ASSET_UTILS_MODULE) && QT_VERSION > QT_VERSION_CHECK(6, 2, 0)
|
||||||
|
} else if (runLoadObj) {
|
||||||
|
QObject::connect(runLoadObj, &QQuick3DRuntimeLoader::statusChanged,
|
||||||
|
infoServer, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
QObject::connect(loadObj, &QQuick3DLoader::loaded,
|
QObject::connect(loadObj, &QQuick3DLoader::loaded,
|
||||||
infoServer, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
infoServer, &Qt5InformationNodeInstanceServer::handleDynamicAddObject);
|
||||||
|
@@ -34,7 +34,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
PerspectiveCamera {
|
PerspectiveCamera {
|
||||||
id: camera
|
id: sceneCamera
|
||||||
z: 350
|
z: 350
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -151,6 +151,7 @@ private:
|
|||||||
|
|
||||||
disconnect(connection, nullptr, this, nullptr);
|
disconnect(connection, nullptr, this, nullptr);
|
||||||
connection->deleteLater();
|
connection->deleteLater();
|
||||||
|
m_connections.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
void removeInactiveConnections()
|
void removeInactiveConnections()
|
||||||
|
@@ -185,7 +185,6 @@ void SshRemoteProcessRunner::setState(int newState)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString SshRemoteProcessRunner::command() const { return d->m_command; }
|
|
||||||
QString SshRemoteProcessRunner::lastConnectionErrorString() const {
|
QString SshRemoteProcessRunner::lastConnectionErrorString() const {
|
||||||
return d->m_lastConnectionErrorString;
|
return d->m_lastConnectionErrorString;
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,7 @@ public:
|
|||||||
~SshRemoteProcessRunner();
|
~SshRemoteProcessRunner();
|
||||||
|
|
||||||
void run(const QString &command, const SshConnectionParameters &sshParams);
|
void run(const QString &command, const SshConnectionParameters &sshParams);
|
||||||
QString command() const;
|
void runInTerminal(const QString &command, const SshConnectionParameters &sshParams);
|
||||||
|
|
||||||
QString lastConnectionErrorString() const;
|
QString lastConnectionErrorString() const;
|
||||||
|
|
||||||
|
@@ -227,8 +227,8 @@ public:
|
|||||||
virtual void setWorkingDirectory(const QString &dir) = 0;
|
virtual void setWorkingDirectory(const QString &dir) = 0;
|
||||||
virtual void start(const QString &program, const QStringList &arguments,
|
virtual void start(const QString &program, const QStringList &arguments,
|
||||||
const QByteArray &writeData) = 0;
|
const QByteArray &writeData) = 0;
|
||||||
virtual void customStart(const CommandLine &command, const FilePath &workingDirectory,
|
virtual void customStart(const CommandLine &, const FilePath &workingDirectory,
|
||||||
const Environment &environment) { QTC_CHECK(false); }
|
const Environment &) { Q_UNUSED(workingDirectory); QTC_CHECK(false); }
|
||||||
virtual bool isCustomStart() const { return false; }
|
virtual bool isCustomStart() const { return false; }
|
||||||
virtual void terminate() = 0;
|
virtual void terminate() = 0;
|
||||||
virtual void kill() = 0;
|
virtual void kill() = 0;
|
||||||
@@ -312,9 +312,9 @@ public:
|
|||||||
QByteArray readAllStandardOutput() override { QTC_CHECK(false); return {}; }
|
QByteArray readAllStandardOutput() override { QTC_CHECK(false); return {}; }
|
||||||
QByteArray readAllStandardError() override { QTC_CHECK(false); return {}; }
|
QByteArray readAllStandardError() override { QTC_CHECK(false); return {}; }
|
||||||
|
|
||||||
void setProcessEnvironment(const QProcessEnvironment &environment) override { QTC_CHECK(false); }
|
void setProcessEnvironment(const QProcessEnvironment &) override { QTC_CHECK(false); }
|
||||||
void setWorkingDirectory(const QString &dir) override { QTC_CHECK(false); }
|
void setWorkingDirectory(const QString &) override { QTC_CHECK(false); }
|
||||||
void start(const QString &program, const QStringList &arguments, const QByteArray &writeData) override
|
void start(const QString &, const QStringList &, const QByteArray &) override
|
||||||
{ QTC_CHECK(false); }
|
{ QTC_CHECK(false); }
|
||||||
void customStart(const CommandLine &command, const FilePath &workingDirectory,
|
void customStart(const CommandLine &command, const FilePath &workingDirectory,
|
||||||
const Environment &environment) override
|
const Environment &environment) override
|
||||||
@@ -330,7 +330,7 @@ public:
|
|||||||
void terminate() override { m_terminal.stopProcess(); }
|
void terminate() override { m_terminal.stopProcess(); }
|
||||||
void kill() override { m_terminal.stopProcess(); }
|
void kill() override { m_terminal.stopProcess(); }
|
||||||
void close() override { m_terminal.stopProcess(); }
|
void close() override { m_terminal.stopProcess(); }
|
||||||
qint64 write(const QByteArray &data) override { QTC_CHECK(false); return -1; }
|
qint64 write(const QByteArray &) override { QTC_CHECK(false); return -1; }
|
||||||
|
|
||||||
void setStandardInputFile(const QString &fileName) override { Q_UNUSED(fileName) QTC_CHECK(false); }
|
void setStandardInputFile(const QString &fileName) override { Q_UNUSED(fileName) QTC_CHECK(false); }
|
||||||
// intentionally no-op without an assert
|
// intentionally no-op without an assert
|
||||||
@@ -343,13 +343,13 @@ public:
|
|||||||
int exitCode() const override { return m_terminal.exitCode(); }
|
int exitCode() const override { return m_terminal.exitCode(); }
|
||||||
QProcess::ExitStatus exitStatus() const override { return m_terminal.exitStatus(); }
|
QProcess::ExitStatus exitStatus() const override { return m_terminal.exitStatus(); }
|
||||||
QString errorString() const override { return m_terminal.errorString(); }
|
QString errorString() const override { return m_terminal.errorString(); }
|
||||||
void setErrorString(const QString &str) override { QTC_CHECK(false); }
|
void setErrorString(const QString &) override { QTC_CHECK(false); }
|
||||||
|
|
||||||
// intentionally no-op without an assert
|
// intentionally no-op without an assert
|
||||||
bool waitForStarted(int msecs) override { return false; }
|
bool waitForStarted(int) override { return false; }
|
||||||
bool waitForReadyRead(int msecs) override { QTC_CHECK(false); return false; }
|
bool waitForReadyRead(int) override { QTC_CHECK(false); return false; }
|
||||||
// intentionally no-op without an assert
|
// intentionally no-op without an assert
|
||||||
bool waitForFinished(int msecs) override { return false; }
|
bool waitForFinished(int) override { return false; }
|
||||||
|
|
||||||
void kickoffProcess() override { m_terminal.kickoffProcess(); }
|
void kickoffProcess() override { m_terminal.kickoffProcess(); }
|
||||||
void interruptProcess() override { m_terminal.interruptProcess(); }
|
void interruptProcess() override { m_terminal.interruptProcess(); }
|
||||||
@@ -748,9 +748,11 @@ static QtcProcess::ProcessImpl defaultProcessImpl()
|
|||||||
return QtcProcess::ProcessLauncherImpl;
|
return QtcProcess::ProcessLauncherImpl;
|
||||||
}
|
}
|
||||||
|
|
||||||
QtcProcess::QtcProcess(ProcessImpl processImpl, ProcessMode processMode, TerminalMode terminalMode,
|
QtcProcess::QtcProcess(const Setup &setup, QObject *parent)
|
||||||
QObject *parent)
|
: QObject(parent),
|
||||||
: QObject(parent), d(new QtcProcessPrivate(this, processImpl, processMode, terminalMode))
|
d(new QtcProcessPrivate(this,
|
||||||
|
setup.processImpl == DefaultImpl ? defaultProcessImpl() : setup.processImpl,
|
||||||
|
setup.processMode, setup.terminalMode))
|
||||||
{
|
{
|
||||||
static int qProcessExitStatusMeta = qRegisterMetaType<QProcess::ExitStatus>();
|
static int qProcessExitStatusMeta = qRegisterMetaType<QProcess::ExitStatus>();
|
||||||
static int qProcessProcessErrorMeta = qRegisterMetaType<QProcess::ProcessError>();
|
static int qProcessProcessErrorMeta = qRegisterMetaType<QProcess::ProcessError>();
|
||||||
@@ -758,17 +760,9 @@ QtcProcess::QtcProcess(ProcessImpl processImpl, ProcessMode processMode, Termina
|
|||||||
Q_UNUSED(qProcessProcessErrorMeta)
|
Q_UNUSED(qProcessProcessErrorMeta)
|
||||||
}
|
}
|
||||||
|
|
||||||
QtcProcess::QtcProcess(ProcessImpl processImpl, QObject *parent)
|
|
||||||
: QtcProcess(processImpl, ProcessMode::Reader, TerminalMode::TerminalOff, parent) {}
|
|
||||||
|
|
||||||
QtcProcess::QtcProcess(ProcessMode processMode, QObject *parent)
|
|
||||||
: QtcProcess(defaultProcessImpl(), processMode, TerminalMode::TerminalOff, parent) {}
|
|
||||||
|
|
||||||
QtcProcess::QtcProcess(TerminalMode terminalMode, QObject *parent)
|
|
||||||
: QtcProcess(defaultProcessImpl(), ProcessMode::Reader, terminalMode, parent) {}
|
|
||||||
|
|
||||||
QtcProcess::QtcProcess(QObject *parent)
|
QtcProcess::QtcProcess(QObject *parent)
|
||||||
: QtcProcess(defaultProcessImpl(), ProcessMode::Reader, TerminalMode::TerminalOff, parent) {}
|
: QtcProcess({}, parent)
|
||||||
|
{}
|
||||||
|
|
||||||
QtcProcess::~QtcProcess()
|
QtcProcess::~QtcProcess()
|
||||||
{
|
{
|
||||||
|
@@ -62,7 +62,8 @@ class QTCREATOR_UTILS_EXPORT QtcProcess : public QObject
|
|||||||
public:
|
public:
|
||||||
enum ProcessImpl {
|
enum ProcessImpl {
|
||||||
QProcessImpl,
|
QProcessImpl,
|
||||||
ProcessLauncherImpl
|
ProcessLauncherImpl,
|
||||||
|
DefaultImpl,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TerminalMode {
|
enum TerminalMode {
|
||||||
@@ -73,12 +74,19 @@ public:
|
|||||||
TerminalOn = TerminalRun // default mode for ON
|
TerminalOn = TerminalRun // default mode for ON
|
||||||
};
|
};
|
||||||
|
|
||||||
QtcProcess(ProcessImpl processImpl, ProcessMode processMode, TerminalMode terminalMode,
|
struct Setup {
|
||||||
QObject *parent = nullptr);
|
Setup() {}
|
||||||
QtcProcess(ProcessImpl processImpl, QObject *parent = nullptr);
|
Setup(ProcessImpl processImpl) : processImpl(processImpl) {}
|
||||||
QtcProcess(ProcessMode processMode, QObject *parent = nullptr);
|
Setup(ProcessMode processMode) : processMode(processMode) {}
|
||||||
QtcProcess(TerminalMode terminalMode, QObject *parent = nullptr);
|
Setup(TerminalMode terminalMode) : terminalMode(terminalMode) {}
|
||||||
QtcProcess(QObject *parent = nullptr);
|
|
||||||
|
ProcessImpl processImpl = DefaultImpl;
|
||||||
|
ProcessMode processMode = ProcessMode::Reader;
|
||||||
|
TerminalMode terminalMode = TerminalOff;
|
||||||
|
};
|
||||||
|
|
||||||
|
QtcProcess(const Setup &setup = {}, QObject *parent = nullptr);
|
||||||
|
QtcProcess(QObject *parent);
|
||||||
~QtcProcess();
|
~QtcProcess();
|
||||||
|
|
||||||
ProcessMode processMode() const;
|
ProcessMode processMode() const;
|
||||||
|
@@ -186,63 +186,6 @@ const CommandLine &TerminalProcess::commandLine() const
|
|||||||
return d->m_commandLine;
|
return d->m_commandLine;
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString quoteWinCommand(const QString &program)
|
|
||||||
{
|
|
||||||
const QChar doubleQuote = QLatin1Char('"');
|
|
||||||
|
|
||||||
// add the program as the first arg ... it works better
|
|
||||||
QString programName = program;
|
|
||||||
programName.replace(QLatin1Char('/'), QLatin1Char('\\'));
|
|
||||||
if (!programName.startsWith(doubleQuote) && !programName.endsWith(doubleQuote)
|
|
||||||
&& programName.contains(QLatin1Char(' '))) {
|
|
||||||
programName.prepend(doubleQuote);
|
|
||||||
programName.append(doubleQuote);
|
|
||||||
}
|
|
||||||
return programName;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString quoteWinArgument(const QString &arg)
|
|
||||||
{
|
|
||||||
if (arg.isEmpty())
|
|
||||||
return QString::fromLatin1("\"\"");
|
|
||||||
|
|
||||||
QString ret(arg);
|
|
||||||
// Quotes are escaped and their preceding backslashes are doubled.
|
|
||||||
ret.replace(QRegularExpression("(\\\\*)\""), "\\1\\1\\\"");
|
|
||||||
if (ret.contains(QRegularExpression("\\s"))) {
|
|
||||||
// The argument must not end with a \ since this would be interpreted
|
|
||||||
// as escaping the quote -- rather put the \ behind the quote: e.g.
|
|
||||||
// rather use "foo"\ than "foo\"
|
|
||||||
int i = ret.length();
|
|
||||||
while (i > 0 && ret.at(i - 1) == QLatin1Char('\\'))
|
|
||||||
--i;
|
|
||||||
ret.insert(i, QLatin1Char('"'));
|
|
||||||
ret.prepend(QLatin1Char('"'));
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Quote a Windows command line correctly for the "CreateProcess" API
|
|
||||||
static QString createWinCommandline(const QString &program, const QStringList &args)
|
|
||||||
{
|
|
||||||
QString programName = quoteWinCommand(program);
|
|
||||||
for (const QString &arg : args) {
|
|
||||||
programName += QLatin1Char(' ');
|
|
||||||
programName += quoteWinArgument(arg);
|
|
||||||
}
|
|
||||||
return programName;
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString createWinCommandline(const QString &program, const QString &args)
|
|
||||||
{
|
|
||||||
QString programName = quoteWinCommand(program);
|
|
||||||
if (!args.isEmpty()) {
|
|
||||||
programName += QLatin1Char(' ');
|
|
||||||
programName += args;
|
|
||||||
}
|
|
||||||
return programName;
|
|
||||||
}
|
|
||||||
|
|
||||||
void TerminalProcess::setAbortOnMetaChars(bool abort)
|
void TerminalProcess::setAbortOnMetaChars(bool abort)
|
||||||
{
|
{
|
||||||
d->m_abortOnMetaChars = abort;
|
d->m_abortOnMetaChars = abort;
|
||||||
@@ -334,15 +277,66 @@ void TerminalProcess::start()
|
|||||||
if (!workDir.isEmpty() && !workDir.endsWith(QLatin1Char('\\')))
|
if (!workDir.isEmpty() && !workDir.endsWith(QLatin1Char('\\')))
|
||||||
workDir.append(QLatin1Char('\\'));
|
workDir.append(QLatin1Char('\\'));
|
||||||
|
|
||||||
|
// Quote a Windows command line correctly for the "CreateProcess" API
|
||||||
|
static const auto quoteWinCommand = [](const QString &program) {
|
||||||
|
const QChar doubleQuote = QLatin1Char('"');
|
||||||
|
|
||||||
|
// add the program as the first arg ... it works better
|
||||||
|
QString programName = program;
|
||||||
|
programName.replace(QLatin1Char('/'), QLatin1Char('\\'));
|
||||||
|
if (!programName.startsWith(doubleQuote) && !programName.endsWith(doubleQuote)
|
||||||
|
&& programName.contains(QLatin1Char(' '))) {
|
||||||
|
programName.prepend(doubleQuote);
|
||||||
|
programName.append(doubleQuote);
|
||||||
|
}
|
||||||
|
return programName;
|
||||||
|
};
|
||||||
|
static const auto quoteWinArgument = [](const QString &arg) {
|
||||||
|
if (arg.isEmpty())
|
||||||
|
return QString::fromLatin1("\"\"");
|
||||||
|
|
||||||
|
QString ret(arg);
|
||||||
|
// Quotes are escaped and their preceding backslashes are doubled.
|
||||||
|
ret.replace(QRegularExpression("(\\\\*)\""), "\\1\\1\\\"");
|
||||||
|
if (ret.contains(QRegularExpression("\\s"))) {
|
||||||
|
// The argument must not end with a \ since this would be interpreted
|
||||||
|
// as escaping the quote -- rather put the \ behind the quote: e.g.
|
||||||
|
// rather use "foo"\ than "foo\"
|
||||||
|
int i = ret.length();
|
||||||
|
while (i > 0 && ret.at(i - 1) == QLatin1Char('\\'))
|
||||||
|
--i;
|
||||||
|
ret.insert(i, QLatin1Char('"'));
|
||||||
|
ret.prepend(QLatin1Char('"'));
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
};
|
||||||
|
static const auto createWinCommandlineMultiArgs = [](const QString &program, const QStringList &args) {
|
||||||
|
QString programName = quoteWinCommand(program);
|
||||||
|
for (const QString &arg : args) {
|
||||||
|
programName += QLatin1Char(' ');
|
||||||
|
programName += quoteWinArgument(arg);
|
||||||
|
}
|
||||||
|
return programName;
|
||||||
|
};
|
||||||
|
static const auto createWinCommandlineSingleArg = [](const QString &program, const QString &args)
|
||||||
|
{
|
||||||
|
QString programName = quoteWinCommand(program);
|
||||||
|
if (!args.isEmpty()) {
|
||||||
|
programName += QLatin1Char(' ');
|
||||||
|
programName += args;
|
||||||
|
}
|
||||||
|
return programName;
|
||||||
|
};
|
||||||
|
|
||||||
QStringList stubArgs;
|
QStringList stubArgs;
|
||||||
stubArgs << modeOption(d->m_terminalMode)
|
stubArgs << modeOption(d->m_terminalMode)
|
||||||
<< d->m_stubServer.fullServerName()
|
<< d->m_stubServer.fullServerName()
|
||||||
<< workDir
|
<< workDir
|
||||||
<< (d->m_tempFile ? d->m_tempFile->fileName() : QString())
|
<< (d->m_tempFile ? d->m_tempFile->fileName() : QString())
|
||||||
<< createWinCommandline(pcmd, pargs)
|
<< createWinCommandlineSingleArg(pcmd, pargs)
|
||||||
<< msgPromptToClose();
|
<< msgPromptToClose();
|
||||||
|
|
||||||
const QString cmdLine = createWinCommandline(
|
const QString cmdLine = createWinCommandlineMultiArgs(
|
||||||
QCoreApplication::applicationDirPath() + QLatin1String("/qtcreator_process_stub.exe"), stubArgs);
|
QCoreApplication::applicationDirPath() + QLatin1String("/qtcreator_process_stub.exe"), stubArgs);
|
||||||
|
|
||||||
bool success = CreateProcessW(0, (WCHAR*)cmdLine.utf16(),
|
bool success = CreateProcessW(0, (WCHAR*)cmdLine.utf16(),
|
||||||
|
@@ -24,13 +24,13 @@
|
|||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "androidsdkdownloader.h"
|
#include "androidsdkdownloader.h"
|
||||||
#include "utils/filepath.h"
|
|
||||||
#include "utils/qtcprocess.h"
|
#include <utils/archive.h>
|
||||||
|
#include <utils/filepath.h>
|
||||||
|
|
||||||
#include <coreplugin/icore.h>
|
#include <coreplugin/icore.h>
|
||||||
|
|
||||||
#include <QCryptographicHash>
|
#include <QCryptographicHash>
|
||||||
#include <QDir>
|
|
||||||
#include <QDirIterator>
|
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
@@ -61,22 +61,7 @@ void AndroidSdkDownloader::sslErrors(const QList<QSslError> &sslErrors)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void setSdkFilesExecPermission( const FilePath &sdkExtractPath)
|
void AndroidSdkDownloader::downloadAndExtractSdk(const FilePath &sdkExtractPath)
|
||||||
{
|
|
||||||
const FilePath filePath = sdkExtractPath / "tools";
|
|
||||||
|
|
||||||
filePath.iterateDirectory(
|
|
||||||
[](const FilePath &filePath) {
|
|
||||||
if (!filePath.fileName().contains('.')) {
|
|
||||||
QFlags<QFileDevice::Permission> currentPermissions = filePath.permissions();
|
|
||||||
filePath.setPermissions(currentPermissions | QFileDevice::ExeOwner);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
{{"*"}, QDir::Files, QDirIterator::Subdirectories});
|
|
||||||
}
|
|
||||||
|
|
||||||
void AndroidSdkDownloader::downloadAndExtractSdk(const FilePath &jdkPath, const FilePath &sdkExtractPath)
|
|
||||||
{
|
{
|
||||||
if (m_androidConfig.sdkToolsUrl().isEmpty()) {
|
if (m_androidConfig.sdkToolsUrl().isEmpty()) {
|
||||||
logError(tr("The SDK Tools download URL is empty."));
|
logError(tr("The SDK Tools download URL is empty."));
|
||||||
@@ -103,34 +88,16 @@ void AndroidSdkDownloader::downloadAndExtractSdk(const FilePath &jdkPath, const
|
|||||||
|
|
||||||
connect(m_progressDialog, &QProgressDialog::canceled, this, &AndroidSdkDownloader::cancel);
|
connect(m_progressDialog, &QProgressDialog::canceled, this, &AndroidSdkDownloader::cancel);
|
||||||
|
|
||||||
connect(this, &AndroidSdkDownloader::sdkPackageWriteFinished, this, [this, jdkPath, sdkExtractPath]() {
|
connect(this, &AndroidSdkDownloader::sdkPackageWriteFinished, this, [this, sdkExtractPath]() {
|
||||||
if (extractSdk(jdkPath, sdkExtractPath)) {
|
if (Archive *archive = Archive::unarchive(m_sdkFilename, sdkExtractPath)) {
|
||||||
setSdkFilesExecPermission(sdkExtractPath);
|
connect(archive, &Archive::finished, [this, sdkExtractPath](bool success){
|
||||||
|
if (success)
|
||||||
emit sdkExtracted();
|
emit sdkExtracted();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AndroidSdkDownloader::extractSdk(const FilePath &jdkPath, const FilePath &sdkExtractPath)
|
|
||||||
{
|
|
||||||
QDir sdkDir = sdkExtractPath.toDir();
|
|
||||||
if (!sdkDir.exists()) {
|
|
||||||
if (!sdkDir.mkpath(".")) {
|
|
||||||
logError(QString(tr("Could not create the SDK folder %1."))
|
|
||||||
.arg(sdkExtractPath.toUserOutput()));
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QtcProcess jarExtractProc;
|
|
||||||
jarExtractProc.setWorkingDirectory(sdkExtractPath);
|
|
||||||
FilePath jarCmdPath(jdkPath / "/bin/jar");
|
|
||||||
jarExtractProc.setCommand({jarCmdPath, {"xf", m_sdkFilename.path()}});
|
|
||||||
jarExtractProc.runBlocking();
|
|
||||||
|
|
||||||
return jarExtractProc.exitCode() ? false : true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool AndroidSdkDownloader::verifyFileIntegrity()
|
bool AndroidSdkDownloader::verifyFileIntegrity()
|
||||||
{
|
{
|
||||||
QFile f(m_sdkFilename.toString());
|
QFile f(m_sdkFilename.toString());
|
||||||
@@ -170,7 +137,7 @@ void AndroidSdkDownloader::logError(const QString &error)
|
|||||||
emit sdkDownloaderError(error);
|
emit sdkDownloaderError(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString AndroidSdkDownloader::getSaveFilename(const QUrl &url)
|
FilePath AndroidSdkDownloader::getSaveFilename(const QUrl &url)
|
||||||
{
|
{
|
||||||
QString path = url.path();
|
QString path = url.path();
|
||||||
QString basename = QFileInfo(path).fileName();
|
QString basename = QFileInfo(path).fileName();
|
||||||
@@ -186,9 +153,8 @@ QString AndroidSdkDownloader::getSaveFilename(const QUrl &url)
|
|||||||
basename += QString::number(i);
|
basename += QString::number(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString fullPath = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation)
|
return FilePath::fromString(QStandardPaths::writableLocation(QStandardPaths::DownloadLocation))
|
||||||
+ QDir::separator() + basename;
|
/ basename;
|
||||||
return fullPath;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AndroidSdkDownloader::saveToDisk(const FilePath &filename, QIODevice *data)
|
bool AndroidSdkDownloader::saveToDisk(const FilePath &filename, QIODevice *data)
|
||||||
@@ -223,7 +189,7 @@ void AndroidSdkDownloader::downloadFinished(QNetworkReply *reply)
|
|||||||
if (isHttpRedirect(reply)) {
|
if (isHttpRedirect(reply)) {
|
||||||
cancelWithError(QString(tr("Download from %1 was redirected.")).arg(url.toString()));
|
cancelWithError(QString(tr("Download from %1 was redirected.")).arg(url.toString()));
|
||||||
} else {
|
} else {
|
||||||
m_sdkFilename = FilePath::fromString(getSaveFilename(url));
|
m_sdkFilename = getSaveFilename(url);
|
||||||
if (saveToDisk(m_sdkFilename, reply) && verifyFileIntegrity())
|
if (saveToDisk(m_sdkFilename, reply) && verifyFileIntegrity())
|
||||||
emit sdkPackageWriteFinished();
|
emit sdkPackageWriteFinished();
|
||||||
else
|
else
|
||||||
|
@@ -43,7 +43,7 @@ class AndroidSdkDownloader : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
AndroidSdkDownloader();
|
AndroidSdkDownloader();
|
||||||
void downloadAndExtractSdk(const Utils::FilePath &jdkPath, const Utils::FilePath &sdkExtractPath);
|
void downloadAndExtractSdk(const Utils::FilePath &sdkExtractPath);
|
||||||
static QString dialogTitle();
|
static QString dialogTitle();
|
||||||
|
|
||||||
void cancel();
|
void cancel();
|
||||||
@@ -54,11 +54,10 @@ signals:
|
|||||||
void sdkDownloaderError(const QString &error);
|
void sdkDownloaderError(const QString &error);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static QString getSaveFilename(const QUrl &url);
|
static Utils::FilePath getSaveFilename(const QUrl &url);
|
||||||
bool saveToDisk(const Utils::FilePath &filename, QIODevice *data);
|
bool saveToDisk(const Utils::FilePath &filename, QIODevice *data);
|
||||||
static bool isHttpRedirect(QNetworkReply *m_reply);
|
static bool isHttpRedirect(QNetworkReply *m_reply);
|
||||||
|
|
||||||
bool extractSdk(const Utils::FilePath &jdkPath, const Utils::FilePath &sdkExtractPath);
|
|
||||||
bool verifyFileIntegrity();
|
bool verifyFileIntegrity();
|
||||||
void cancelWithError(const QString &error);
|
void cancelWithError(const QString &error);
|
||||||
void logError(const QString &error);
|
void logError(const QString &error);
|
||||||
|
@@ -712,14 +712,8 @@ void AndroidSettingsWidget::downloadSdk()
|
|||||||
.arg(m_ui.SDKLocationPathChooser->filePath().cleanPath().toUserOutput());
|
.arg(m_ui.SDKLocationPathChooser->filePath().cleanPath().toUserOutput());
|
||||||
auto userInput = QMessageBox::information(this, AndroidSdkDownloader::dialogTitle(),
|
auto userInput = QMessageBox::information(this, AndroidSdkDownloader::dialogTitle(),
|
||||||
message, QMessageBox::Yes | QMessageBox::No);
|
message, QMessageBox::Yes | QMessageBox::No);
|
||||||
if (userInput == QMessageBox::Yes) {
|
if (userInput == QMessageBox::Yes)
|
||||||
if (m_androidSummary->rowsOk({JavaPathExistsAndWritableRow})) {
|
m_sdkDownloader.downloadAndExtractSdk(m_ui.SDKLocationPathChooser->filePath().cleanPath());
|
||||||
auto javaPath = m_ui.OpenJDKLocationPathChooser->filePath();
|
|
||||||
m_sdkDownloader.downloadAndExtractSdk(
|
|
||||||
javaPath,
|
|
||||||
m_ui.SDKLocationPathChooser->filePath().cleanPath());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// AndroidSettingsPage
|
// AndroidSettingsPage
|
||||||
|
@@ -2458,6 +2458,13 @@ QTextCursor ClangdClient::Private::adjustedCursor(const QTextCursor &cursor,
|
|||||||
}
|
}
|
||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ~My|Class
|
||||||
|
if (const DestructorNameAST * const destrAst = (*it)->asDestructorName()) {
|
||||||
|
QTextCursor c = cursor;
|
||||||
|
c.setPosition(posForToken(destrAst->tilde_token));
|
||||||
|
return c;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return cursor;
|
return cursor;
|
||||||
}
|
}
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
add_qtc_plugin(ClangFormat
|
add_qtc_plugin(ClangFormat
|
||||||
CONDITION TARGET libclang AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0 AND QTC_CLANG_BUILDMODE_MATCH
|
CONDITION TARGET libclang AND LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL 10.0.0 AND (QTC_CLANG_BUILDMODE_MATCH OR CLANGTOOLING_LINK_CLANG_DYLIB)
|
||||||
DEPENDS Utils Qt5::Widgets ${CLANG_FORMAT_LIB}
|
DEPENDS Utils Qt5::Widgets ${CLANG_FORMAT_LIB}
|
||||||
INCLUDES "${CLANG_INCLUDE_DIRS}"
|
INCLUDES "${CLANG_INCLUDE_DIRS}"
|
||||||
PLUGIN_DEPENDS Core TextEditor CppEditor ProjectExplorer
|
PLUGIN_DEPENDS Core TextEditor CppEditor ProjectExplorer
|
||||||
@@ -15,6 +15,10 @@ add_qtc_plugin(ClangFormat
|
|||||||
clangformatutils.cpp clangformatutils.h
|
clangformatutils.cpp clangformatutils.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(MSVC AND TARGET ClangFormat)
|
||||||
|
target_compile_options(ClangFormat PUBLIC /wd4267 /wd4624)
|
||||||
|
endif()
|
||||||
|
|
||||||
extend_qtc_plugin(ClangFormat
|
extend_qtc_plugin(ClangFormat
|
||||||
CONDITION UNIX AND NOT APPLE
|
CONDITION UNIX AND NOT APPLE
|
||||||
PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL"
|
PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL"
|
||||||
|
@@ -353,6 +353,8 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
|||||||
m_showProgressTimer.start();
|
m_showProgressTimer.start();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
m_configModel->setMacroExpander(m_buildConfiguration->macroExpander());
|
||||||
|
|
||||||
if (bc->buildSystem()->isParsing())
|
if (bc->buildSystem()->isParsing())
|
||||||
m_showProgressTimer.start();
|
m_showProgressTimer.start();
|
||||||
else {
|
else {
|
||||||
@@ -368,6 +370,7 @@ CMakeBuildSettingsWidget::CMakeBuildSettingsWidget(CMakeBuildConfiguration *bc)
|
|||||||
m_configModel->setInitialParametersConfiguration(
|
m_configModel->setInitialParametersConfiguration(
|
||||||
m_buildConfiguration->initialCMakeConfiguration());
|
m_buildConfiguration->initialCMakeConfiguration());
|
||||||
m_buildConfiguration->filterConfigArgumentsFromAdditionalCMakeArguments();
|
m_buildConfiguration->filterConfigArgumentsFromAdditionalCMakeArguments();
|
||||||
|
updateFromKit();
|
||||||
m_configView->expandAll();
|
m_configView->expandAll();
|
||||||
m_configView->setEnabled(true);
|
m_configView->setEnabled(true);
|
||||||
stretcher->stretch();
|
stretcher->stretch();
|
||||||
|
@@ -26,6 +26,7 @@
|
|||||||
#include "configmodel.h"
|
#include "configmodel.h"
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
|
#include <utils/macroexpander.h>
|
||||||
#include <utils/qtcassert.h>
|
#include <utils/qtcassert.h>
|
||||||
#include <utils/theme/theme.h>
|
#include <utils/theme/theme.h>
|
||||||
|
|
||||||
@@ -315,34 +316,37 @@ void ConfigModel::setConfiguration(const QList<ConfigModel::InternalDataItem> &c
|
|||||||
generateTree();
|
generateTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Utils::MacroExpander *ConfigModel::macroExpander() const
|
||||||
|
{
|
||||||
|
return m_macroExpander;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConfigModel::setMacroExpander(Utils::MacroExpander *newExpander)
|
||||||
|
{
|
||||||
|
m_macroExpander = newExpander;
|
||||||
|
}
|
||||||
|
|
||||||
void ConfigModel::generateTree()
|
void ConfigModel::generateTree()
|
||||||
{
|
{
|
||||||
|
QHash<QString, InternalDataItem> initialHash;
|
||||||
|
for (const InternalDataItem &di : m_configuration)
|
||||||
|
if (di.isInitial)
|
||||||
|
initialHash.insert(di.key, di);
|
||||||
|
|
||||||
auto root = new Utils::TreeItem;
|
auto root = new Utils::TreeItem;
|
||||||
for (InternalDataItem &di : m_configuration)
|
for (InternalDataItem &di : m_configuration) {
|
||||||
|
auto it = initialHash.find(di.key);
|
||||||
|
if (it != initialHash.end())
|
||||||
|
di.initialValue = macroExpander()->expand(it->value);
|
||||||
|
|
||||||
root->appendChild(new Internal::ConfigModelTreeItem(&di));
|
root->appendChild(new Internal::ConfigModelTreeItem(&di));
|
||||||
|
}
|
||||||
setRootItem(root);
|
setRootItem(root);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigModel::InternalDataItem::InternalDataItem(const ConfigModel::DataItem &item) : DataItem(item)
|
ConfigModel::InternalDataItem::InternalDataItem(const ConfigModel::DataItem &item) : DataItem(item)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
QString ConfigModel::InternalDataItem::toolTip() const
|
|
||||||
{
|
|
||||||
QString desc = description;
|
|
||||||
if (isAdvanced)
|
|
||||||
desc += QCoreApplication::translate("CMakeProjectManager::ConfigModel", " (ADVANCED)");
|
|
||||||
QStringList tooltip(desc);
|
|
||||||
if (inCMakeCache) {
|
|
||||||
if (value != newValue)
|
|
||||||
tooltip << QCoreApplication::translate("CMakeProjectManager", "Current CMake: %1").arg(value);
|
|
||||||
} else {
|
|
||||||
tooltip << QCoreApplication::translate("CMakeProjectManager", "Not in CMakeCache.txt").arg(value);
|
|
||||||
}
|
|
||||||
if (!kitValue.isEmpty())
|
|
||||||
tooltip << QCoreApplication::translate("CMakeProjectManager::ConfigModel", "Current kit: %1").arg(kitValue);
|
|
||||||
return tooltip.join("<br>");
|
|
||||||
}
|
|
||||||
|
|
||||||
QString ConfigModel::InternalDataItem::currentValue() const
|
QString ConfigModel::InternalDataItem::currentValue() const
|
||||||
{
|
{
|
||||||
if (isUnset)
|
if (isUnset)
|
||||||
@@ -414,9 +418,15 @@ QVariant ConfigModelTreeItem::data(int column, int role) const
|
|||||||
font.setStrikeOut((!dataItem->inCMakeCache && !dataItem->isUserNew) || dataItem->isUnset);
|
font.setStrikeOut((!dataItem->inCMakeCache && !dataItem->isUserNew) || dataItem->isUnset);
|
||||||
return font;
|
return font;
|
||||||
}
|
}
|
||||||
case Qt::ForegroundRole:
|
case Qt::ForegroundRole: {
|
||||||
return Utils::creatorTheme()->color((!dataItem->kitValue.isNull() && dataItem->kitValue != value)
|
bool mismatch = false;
|
||||||
? Utils::Theme::TextColorHighlight : Utils::Theme::TextColorNormal);
|
if (dataItem->isInitial)
|
||||||
|
mismatch = !dataItem->kitValue.isEmpty() && dataItem->kitValue != value;
|
||||||
|
else
|
||||||
|
mismatch = !dataItem->initialValue.isEmpty() && dataItem->initialValue != value;
|
||||||
|
return Utils::creatorTheme()->color(mismatch ? Utils::Theme::TextColorHighlight
|
||||||
|
: Utils::Theme::TextColorNormal);
|
||||||
|
}
|
||||||
case Qt::ToolTipRole: {
|
case Qt::ToolTipRole: {
|
||||||
return toolTip();
|
return toolTip();
|
||||||
}
|
}
|
||||||
@@ -492,16 +502,36 @@ Qt::ItemFlags ConfigModelTreeItem::flags(int column) const
|
|||||||
QString ConfigModelTreeItem::toolTip() const
|
QString ConfigModelTreeItem::toolTip() const
|
||||||
{
|
{
|
||||||
QTC_ASSERT(dataItem, return QString());
|
QTC_ASSERT(dataItem, return QString());
|
||||||
QStringList tooltip(dataItem->description);
|
QStringList tooltip;
|
||||||
|
if (!dataItem->description.isEmpty())
|
||||||
|
tooltip << dataItem->description;
|
||||||
|
|
||||||
|
if (dataItem->isInitial) {
|
||||||
if (!dataItem->kitValue.isEmpty())
|
if (!dataItem->kitValue.isEmpty())
|
||||||
tooltip << QCoreApplication::translate("CMakeProjectManager", "Value requested by kit: %1").arg(dataItem->kitValue);
|
tooltip << QCoreApplication::translate("CMakeProjectManager", "<p>Kit: <b>%1</b></p>")
|
||||||
|
.arg(dataItem->kitValue);
|
||||||
|
|
||||||
|
if (dataItem->value != dataItem->newValue)
|
||||||
|
tooltip << QCoreApplication::translate("CMakeProjectManager",
|
||||||
|
"<p>Initial Configuration: <b>%1</b></p>")
|
||||||
|
.arg(dataItem->value);
|
||||||
|
} else {
|
||||||
|
if (!dataItem->initialValue.isEmpty())
|
||||||
|
tooltip << QCoreApplication::translate("CMakeProjectManager",
|
||||||
|
"<p>Initial Configuration: <b>%1</b></p>")
|
||||||
|
.arg(dataItem->initialValue);
|
||||||
|
|
||||||
if (dataItem->inCMakeCache) {
|
if (dataItem->inCMakeCache) {
|
||||||
if (dataItem->value != dataItem->newValue)
|
if (dataItem->value != dataItem->newValue)
|
||||||
tooltip << QCoreApplication::translate("CMakeProjectManager", "Current CMake: %1").arg(dataItem->value);
|
tooltip << QCoreApplication::translate("CMakeProjectManager",
|
||||||
|
"<p>Current Configuration: <b>%1</b></p>")
|
||||||
|
.arg(dataItem->value);
|
||||||
} else {
|
} else {
|
||||||
tooltip << QCoreApplication::translate("CMakeProjectManager", "Not in CMakeCache.txt");
|
tooltip << QCoreApplication::translate("CMakeProjectManager",
|
||||||
|
"<p>Not in CMakeCache.txt</p>");
|
||||||
}
|
}
|
||||||
return tooltip.join("<br>");
|
}
|
||||||
|
return tooltip.join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ConfigModelTreeItem::currentValue() const
|
QString ConfigModelTreeItem::currentValue() const
|
||||||
|
@@ -162,6 +162,8 @@ public:
|
|||||||
|
|
||||||
QList<DataItem> configurationForCMake() const;
|
QList<DataItem> configurationForCMake() const;
|
||||||
|
|
||||||
|
Utils::MacroExpander *macroExpander() const;
|
||||||
|
void setMacroExpander(Utils::MacroExpander *newExpander);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class InternalDataItem : public DataItem
|
class InternalDataItem : public DataItem
|
||||||
@@ -170,13 +172,13 @@ private:
|
|||||||
InternalDataItem(const DataItem &item);
|
InternalDataItem(const DataItem &item);
|
||||||
InternalDataItem(const InternalDataItem &item) = default;
|
InternalDataItem(const InternalDataItem &item) = default;
|
||||||
|
|
||||||
QString toolTip() const;
|
|
||||||
QString currentValue() const;
|
QString currentValue() const;
|
||||||
|
|
||||||
bool isUserChanged = false;
|
bool isUserChanged = false;
|
||||||
bool isUserNew = false;
|
bool isUserNew = false;
|
||||||
QString newValue;
|
QString newValue;
|
||||||
QString kitValue;
|
QString kitValue;
|
||||||
|
QString initialValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
void generateTree();
|
void generateTree();
|
||||||
@@ -184,6 +186,7 @@ private:
|
|||||||
void setConfiguration(const QList<InternalDataItem> &config);
|
void setConfiguration(const QList<InternalDataItem> &config);
|
||||||
QList<InternalDataItem> m_configuration;
|
QList<InternalDataItem> m_configuration;
|
||||||
KitConfiguration m_kitConfiguration;
|
KitConfiguration m_kitConfiguration;
|
||||||
|
Utils::MacroExpander *m_macroExpander = nullptr;
|
||||||
|
|
||||||
friend class Internal::ConfigModelTreeItem;
|
friend class Internal::ConfigModelTreeItem;
|
||||||
};
|
};
|
||||||
|
@@ -137,8 +137,17 @@ void FileUtils::showInFileSystemView(const FilePath &path)
|
|||||||
navWidget->syncWithFilePath(path);
|
navWidget->syncWithFilePath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString quoteWinCommand(const QString &program)
|
static void startTerminalEmulator(const QString &workingDir, const Environment &env)
|
||||||
{
|
{
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
STARTUPINFO si;
|
||||||
|
ZeroMemory(&si, sizeof(si));
|
||||||
|
si.cb = sizeof(si);
|
||||||
|
|
||||||
|
PROCESS_INFORMATION pinfo;
|
||||||
|
ZeroMemory(&pinfo, sizeof(pinfo));
|
||||||
|
|
||||||
|
static const auto quoteWinCommand = [](const QString &program) {
|
||||||
const QChar doubleQuote = QLatin1Char('"');
|
const QChar doubleQuote = QLatin1Char('"');
|
||||||
|
|
||||||
// add the program as the first arg ... it works better
|
// add the program as the first arg ... it works better
|
||||||
@@ -150,18 +159,7 @@ static QString quoteWinCommand(const QString &program)
|
|||||||
programName.append(doubleQuote);
|
programName.append(doubleQuote);
|
||||||
}
|
}
|
||||||
return programName;
|
return programName;
|
||||||
}
|
};
|
||||||
|
|
||||||
static void startTerminalEmulator(const QString &workingDir, const Environment &env)
|
|
||||||
{
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
STARTUPINFO si;
|
|
||||||
ZeroMemory(&si, sizeof(si));
|
|
||||||
si.cb = sizeof(si);
|
|
||||||
|
|
||||||
PROCESS_INFORMATION pinfo;
|
|
||||||
ZeroMemory(&pinfo, sizeof(pinfo));
|
|
||||||
|
|
||||||
const QString cmdLine = quoteWinCommand(QString::fromLocal8Bit(qgetenv("COMSPEC")));
|
const QString cmdLine = quoteWinCommand(QString::fromLocal8Bit(qgetenv("COMSPEC")));
|
||||||
// cmdLine is assumed to be detached -
|
// cmdLine is assumed to be detached -
|
||||||
// https://blogs.msdn.microsoft.com/oldnewthing/20090601-00/?p=18083
|
// https://blogs.msdn.microsoft.com/oldnewthing/20090601-00/?p=18083
|
||||||
|
@@ -72,7 +72,7 @@ static QString indexerFileSizeLimitKey()
|
|||||||
{ return QLatin1String(Constants::CPPEDITOR_INDEXER_FILE_SIZE_LIMIT); }
|
{ return QLatin1String(Constants::CPPEDITOR_INDEXER_FILE_SIZE_LIMIT); }
|
||||||
|
|
||||||
static QString clangdSettingsKey() { return QLatin1String("ClangdSettings"); }
|
static QString clangdSettingsKey() { return QLatin1String("ClangdSettings"); }
|
||||||
static QString useClangdKey() { return QLatin1String("UseClangd"); }
|
static QString useClangdKey() { return QLatin1String("UseClangdV7"); }
|
||||||
static QString clangdPathKey() { return QLatin1String("ClangdPath"); }
|
static QString clangdPathKey() { return QLatin1String("ClangdPath"); }
|
||||||
static QString clangdIndexingKey() { return QLatin1String("ClangdIndexing"); }
|
static QString clangdIndexingKey() { return QLatin1String("ClangdIndexing"); }
|
||||||
static QString clangdHeaderInsertionKey() { return QLatin1String("ClangdHeaderInsertion"); }
|
static QString clangdHeaderInsertionKey() { return QLatin1String("ClangdHeaderInsertion"); }
|
||||||
@@ -485,7 +485,7 @@ QVariantMap ClangdSettings::Data::toMap() const
|
|||||||
|
|
||||||
void ClangdSettings::Data::fromMap(const QVariantMap &map)
|
void ClangdSettings::Data::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
useClangd = map.value(useClangdKey(), false).toBool();
|
useClangd = map.value(useClangdKey(), true).toBool();
|
||||||
executableFilePath = FilePath::fromString(map.value(clangdPathKey()).toString());
|
executableFilePath = FilePath::fromString(map.value(clangdPathKey()).toString());
|
||||||
enableIndexing = map.value(clangdIndexingKey(), true).toBool();
|
enableIndexing = map.value(clangdIndexingKey(), true).toBool();
|
||||||
autoIncludeHeaders = map.value(clangdHeaderInsertionKey(), false).toBool();
|
autoIncludeHeaders = map.value(clangdHeaderInsertionKey(), false).toBool();
|
||||||
|
@@ -122,7 +122,7 @@ public:
|
|||||||
Utils::FilePath executableFilePath;
|
Utils::FilePath executableFilePath;
|
||||||
QStringList sessionsWithOneClangd;
|
QStringList sessionsWithOneClangd;
|
||||||
int workerThreadLimit = 0;
|
int workerThreadLimit = 0;
|
||||||
bool useClangd = false;
|
bool useClangd = true;
|
||||||
bool enableIndexing = true;
|
bool enableIndexing = true;
|
||||||
bool autoIncludeHeaders = false;
|
bool autoIncludeHeaders = false;
|
||||||
int documentUpdateThreshold = 500;
|
int documentUpdateThreshold = 500;
|
||||||
|
@@ -263,10 +263,6 @@ F2TestCase::F2TestCase(CppEditorAction action,
|
|||||||
QSKIP("fuzzy matching is not supposed to work with clangd"); // TODO: Implement fallback as we do with libclang
|
QSKIP("fuzzy matching is not supposed to work with clangd"); // TODO: Implement fallback as we do with libclang
|
||||||
if (tag == "baseClassFunctionIntroducedByUsingDeclaration")
|
if (tag == "baseClassFunctionIntroducedByUsingDeclaration")
|
||||||
QSKIP("clangd points to the using declaration");
|
QSKIP("clangd points to the using declaration");
|
||||||
if (tag == "classDestructor" || tag == "fromDestructorDefinitionSymbol"
|
|
||||||
|| tag == "fromDestructorBody") {
|
|
||||||
QSKIP("clangd wants the cursor before the ~ character");
|
|
||||||
}
|
|
||||||
if (curTestName == "testFollowClassOperatorInOp")
|
if (curTestName == "testFollowClassOperatorInOp")
|
||||||
QSKIP("clangd goes to operator name first");
|
QSKIP("clangd goes to operator name first");
|
||||||
}
|
}
|
||||||
@@ -438,6 +434,10 @@ F2TestCase::F2TestCase(CppEditorAction action,
|
|||||||
} else {
|
} else {
|
||||||
currentTextEditor->convertPosition(targetTestFile->m_targetCursorPosition,
|
currentTextEditor->convertPosition(targetTestFile->m_targetCursorPosition,
|
||||||
&expectedLine, &expectedColumn);
|
&expectedLine, &expectedColumn);
|
||||||
|
if (useClangd && (tag == "classDestructor" || tag == "fromDestructorDefinitionSymbol"
|
||||||
|
|| tag == "fromDestructorBody")) {
|
||||||
|
--expectedColumn; // clangd goes before the ~, built-in code model after
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// qDebug() << "Expected line:" << expectedLine;
|
// qDebug() << "Expected line:" << expectedLine;
|
||||||
// qDebug() << "Expected column:" << expectedColumn;
|
// qDebug() << "Expected column:" << expectedColumn;
|
||||||
|
@@ -1053,19 +1053,23 @@ void DebuggerItemManager::removeDetectedDebuggers(const QString &detectionSource
|
|||||||
QString *logMessage)
|
QString *logMessage)
|
||||||
{
|
{
|
||||||
QStringList logMessages{tr("Removing debugger entries...")};
|
QStringList logMessages{tr("Removing debugger entries...")};
|
||||||
d->m_model->forItemsAtLevel<2>([detectionSource, &logMessages](DebuggerTreeItem *titem) {
|
QList<DebuggerTreeItem *> toBeRemoved;
|
||||||
|
|
||||||
|
d->m_model->forItemsAtLevel<2>([detectionSource, &toBeRemoved](DebuggerTreeItem *titem) {
|
||||||
if (titem->m_item.detectionSource() == detectionSource) {
|
if (titem->m_item.detectionSource() == detectionSource) {
|
||||||
logMessages.append(tr("Removed \"%1\"").arg(titem->m_item.displayName()));
|
toBeRemoved.append(titem);
|
||||||
d->m_model->destroyItem(titem);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// FIXME: These items appeared in early docker development. Ok to remove for Creator 7.0.
|
// FIXME: These items appeared in early docker development. Ok to remove for Creator 7.0.
|
||||||
FilePath filePath = titem->m_item.command();
|
FilePath filePath = titem->m_item.command();
|
||||||
if (filePath.scheme() + ':' + filePath.host() == detectionSource) {
|
if (filePath.scheme() + ':' + filePath.host() == detectionSource)
|
||||||
logMessages.append(tr("Removed \"%1\"").arg(titem->m_item.displayName()));
|
toBeRemoved.append(titem);
|
||||||
d->m_model->destroyItem(titem);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
for (DebuggerTreeItem *current : toBeRemoved) {
|
||||||
|
logMessages.append(tr("Removed \"%1\"").arg(current->m_item.displayName()));
|
||||||
|
d->m_model->destroyItem(current);
|
||||||
|
}
|
||||||
|
|
||||||
if (logMessage)
|
if (logMessage)
|
||||||
*logMessage = logMessages.join('\n');
|
*logMessage = logMessages.join('\n');
|
||||||
}
|
}
|
||||||
|
@@ -154,7 +154,7 @@ void DockerDeviceProcess::start(const Runnable &runnable)
|
|||||||
m_process.setCommand(command);
|
m_process.setCommand(command);
|
||||||
m_process.setEnvironment(runnable.environment);
|
m_process.setEnvironment(runnable.environment);
|
||||||
m_process.setWorkingDirectory(runnable.workingDirectory);
|
m_process.setWorkingDirectory(runnable.workingDirectory);
|
||||||
connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::error);
|
connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::errorOccurred);
|
||||||
connect(&m_process, &QtcProcess::finished, this, &DeviceProcess::finished);
|
connect(&m_process, &QtcProcess::finished, this, &DeviceProcess::finished);
|
||||||
connect(&m_process, &QtcProcess::readyReadStandardOutput,
|
connect(&m_process, &QtcProcess::readyReadStandardOutput,
|
||||||
this, &DeviceProcess::readyReadStandardOutput);
|
this, &DeviceProcess::readyReadStandardOutput);
|
||||||
@@ -569,7 +569,7 @@ DockerDevice::DockerDevice(const DockerDeviceData &data)
|
|||||||
}
|
}
|
||||||
proc->deleteLater();
|
proc->deleteLater();
|
||||||
});
|
});
|
||||||
QObject::connect(proc, &DeviceProcess::error, [proc] {
|
QObject::connect(proc, &DeviceProcess::errorOccurred, [proc] {
|
||||||
MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
||||||
proc->deleteLater();
|
proc->deleteLater();
|
||||||
});
|
});
|
||||||
@@ -628,9 +628,9 @@ void KitDetectorPrivate::undoAutoDetect() const
|
|||||||
};
|
};
|
||||||
|
|
||||||
emit q->logOutput('\n' + tr("Removing toolchain entries..."));
|
emit q->logOutput('\n' + tr("Removing toolchain entries..."));
|
||||||
for (ToolChain *toolChain : ToolChainManager::toolchains()) {
|
const Toolchains toolchains = ToolChainManager::toolchains();
|
||||||
QString detectionSource = toolChain->detectionSource();
|
for (ToolChain *toolChain : toolchains) {
|
||||||
if (toolChain->detectionSource() == m_sharedId) {
|
if (toolChain && toolChain->detectionSource() == m_sharedId) {
|
||||||
emit q->logOutput(tr("Removed \"%1\"").arg(toolChain->displayName()));
|
emit q->logOutput(tr("Removed \"%1\"").arg(toolChain->displayName()));
|
||||||
ToolChainManager::deregisterToolChain(toolChain);
|
ToolChainManager::deregisterToolChain(toolChain);
|
||||||
}
|
}
|
||||||
@@ -709,20 +709,26 @@ QtVersions KitDetectorPrivate::autoDetectQtVersions() const
|
|||||||
QtVersions qtVersions;
|
QtVersions qtVersions;
|
||||||
|
|
||||||
QString error;
|
QString error;
|
||||||
const QStringList candidates = {"qmake-qt6", "qmake-qt5", "qmake"};
|
|
||||||
emit q->logOutput('\n' + tr("Searching Qt installations..."));
|
const auto handleQmake = [this, &qtVersions, &error](const FilePath &qmake) {
|
||||||
for (const QString &candidate : candidates) {
|
if (QtVersion *qtVersion = QtVersionFactory::createQtVersionFromQMakePath(qmake, false, m_sharedId, &error)) {
|
||||||
emit q->logOutput(tr("Searching for %1 executable...").arg(candidate));
|
|
||||||
const FilePath qmake = m_device->searchExecutable(candidate, m_searchPaths);
|
|
||||||
if (qmake.isEmpty())
|
|
||||||
continue;
|
|
||||||
QtVersion *qtVersion = QtVersionFactory::createQtVersionFromQMakePath(qmake, false, m_sharedId, &error);
|
|
||||||
if (!qtVersion)
|
|
||||||
continue;
|
|
||||||
qtVersions.append(qtVersion);
|
qtVersions.append(qtVersion);
|
||||||
QtVersionManager::addVersion(qtVersion);
|
QtVersionManager::addVersion(qtVersion);
|
||||||
emit q->logOutput(tr("Found \"%1\"").arg(qtVersion->qmakeFilePath().toUserOutput()));
|
emit q->logOutput(tr("Found \"%1\"").arg(qtVersion->qmakeFilePath().toUserOutput()));
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
emit q->logOutput(tr("Searching for qmake executables..."));
|
||||||
|
|
||||||
|
const QStringList candidates = {"qmake-qt6", "qmake-qt5", "qmake"};
|
||||||
|
for (const FilePath &searchPath : m_searchPaths) {
|
||||||
|
searchPath.iterateDirectory(handleQmake, {candidates, QDir::Files | QDir::Executable,
|
||||||
|
QDirIterator::Subdirectories});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!error.isEmpty())
|
||||||
|
emit q->logOutput(tr("Error: %1.").arg(error));
|
||||||
if (qtVersions.isEmpty())
|
if (qtVersions.isEmpty())
|
||||||
emit q->logOutput(tr("No Qt installation found."));
|
emit q->logOutput(tr("No Qt installation found."));
|
||||||
return qtVersions;
|
return qtVersions;
|
||||||
@@ -793,19 +799,20 @@ void KitDetectorPrivate::autoDetect()
|
|||||||
|
|
||||||
emit q->logOutput(tr("Starting auto-detection. This will take a while..."));
|
emit q->logOutput(tr("Starting auto-detection. This will take a while..."));
|
||||||
|
|
||||||
QList<ToolChain *> toolChains = autoDetectToolChains();
|
const Toolchains toolchains = autoDetectToolChains();
|
||||||
QtVersions qtVersions = autoDetectQtVersions();
|
const QtVersions qtVersions = autoDetectQtVersions();
|
||||||
|
|
||||||
autoDetectCMake();
|
autoDetectCMake();
|
||||||
autoDetectDebugger();
|
autoDetectDebugger();
|
||||||
|
|
||||||
const auto initializeKit = [this, toolChains, qtVersions](Kit *k) {
|
const auto initializeKit = [this, toolchains, qtVersions](Kit *k) {
|
||||||
k->setAutoDetected(false);
|
k->setAutoDetected(false);
|
||||||
k->setAutoDetectionSource(m_sharedId);
|
k->setAutoDetectionSource(m_sharedId);
|
||||||
k->setUnexpandedDisplayName("%{Device:Name}");
|
k->setUnexpandedDisplayName("%{Device:Name}");
|
||||||
|
|
||||||
DeviceTypeKitAspect::setDeviceTypeId(k, Constants::DOCKER_DEVICE_TYPE);
|
DeviceTypeKitAspect::setDeviceTypeId(k, Constants::DOCKER_DEVICE_TYPE);
|
||||||
DeviceKitAspect::setDevice(k, m_device);
|
DeviceKitAspect::setDevice(k, m_device);
|
||||||
|
|
||||||
QtVersion *qt = nullptr;
|
QtVersion *qt = nullptr;
|
||||||
if (!qtVersions.isEmpty()) {
|
if (!qtVersions.isEmpty()) {
|
||||||
qt = qtVersions.at(0);
|
qt = qtVersions.at(0);
|
||||||
@@ -1495,17 +1502,19 @@ void DockerDevice::iterateWithFind(const FilePath &filePath,
|
|||||||
|
|
||||||
const QString nameOption = (filters & QDir::CaseSensitive) ? QString{"-name"}
|
const QString nameOption = (filters & QDir::CaseSensitive) ? QString{"-name"}
|
||||||
: QString{"-iname"};
|
: QString{"-iname"};
|
||||||
QStringList criticalWildcards;
|
|
||||||
if (!filter.nameFilters.isEmpty()) {
|
if (!filter.nameFilters.isEmpty()) {
|
||||||
const QRegularExpression oneChar("\\[.*?\\]");
|
const QRegularExpression oneChar("\\[.*?\\]");
|
||||||
for (int i = 0, len = filter.nameFilters.size(); i < len; ++i) {
|
bool addedFirst = false;
|
||||||
if (i > 0)
|
for (const QString ¤t : filter.nameFilters) {
|
||||||
|
if (current.indexOf(oneChar) != -1) {
|
||||||
|
LOG("Skipped" << current << "due to presence of [] wildcard");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (addedFirst)
|
||||||
filterOptions << "-o";
|
filterOptions << "-o";
|
||||||
QString current = filter.nameFilters.at(i);
|
|
||||||
if (current.indexOf(oneChar) != -1)
|
|
||||||
criticalWildcards.append(current);
|
|
||||||
current.replace(oneChar, "?"); // BAD! but still better than nothing
|
|
||||||
filterOptions << nameOption << current;
|
filterOptions << nameOption << current;
|
||||||
|
addedFirst = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arguments << filterOptions;
|
arguments << filterOptions;
|
||||||
@@ -1522,17 +1531,6 @@ void DockerDevice::iterateWithFind(const FilePath &filePath,
|
|||||||
continue;
|
continue;
|
||||||
const FilePath fp = FilePath::fromString(entry);
|
const FilePath fp = FilePath::fromString(entry);
|
||||||
|
|
||||||
if (!criticalWildcards.isEmpty() &&
|
|
||||||
!Utils::anyOf(criticalWildcards,
|
|
||||||
[name = fp.fileName()](const QString &pattern) {
|
|
||||||
const QRegularExpression regex(QRegularExpression::wildcardToRegularExpression(pattern));
|
|
||||||
if (regex.match(name).hasMatch())
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
})) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!callBack(fp.onDevice(filePath)))
|
if (!callBack(fp.onDevice(filePath)))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -149,7 +149,7 @@ void PerfConfigWidget::setTarget(ProjectExplorer::Target *target)
|
|||||||
connect(m_process.get(), &ProjectExplorer::DeviceProcess::finished,
|
connect(m_process.get(), &ProjectExplorer::DeviceProcess::finished,
|
||||||
this, &PerfConfigWidget::handleProcessFinished);
|
this, &PerfConfigWidget::handleProcessFinished);
|
||||||
|
|
||||||
connect(m_process.get(), &ProjectExplorer::DeviceProcess::error,
|
connect(m_process.get(), &ProjectExplorer::DeviceProcess::errorOccurred,
|
||||||
this, &PerfConfigWidget::handleProcessError);
|
this, &PerfConfigWidget::handleProcessError);
|
||||||
|
|
||||||
useTracePointsButton->setEnabled(true);
|
useTracePointsButton->setEnabled(true);
|
||||||
|
@@ -133,7 +133,7 @@ public:
|
|||||||
|
|
||||||
connect(m_process, &DeviceProcess::started, this, &RunWorker::reportStarted);
|
connect(m_process, &DeviceProcess::started, this, &RunWorker::reportStarted);
|
||||||
connect(m_process, &DeviceProcess::finished, this, &RunWorker::reportStopped);
|
connect(m_process, &DeviceProcess::finished, this, &RunWorker::reportStopped);
|
||||||
connect(m_process, &DeviceProcess::error, [this](QProcess::ProcessError e) {
|
connect(m_process, &DeviceProcess::errorOccurred, [this](QProcess::ProcessError e) {
|
||||||
// The terminate() below will frequently lead to QProcess::Crashed. We're not interested
|
// The terminate() below will frequently lead to QProcess::Crashed. We're not interested
|
||||||
// in that. FailedToStart is the only actual failure.
|
// in that. FailedToStart is the only actual failure.
|
||||||
if (e == QProcess::FailedToStart) {
|
if (e == QProcess::FailedToStart) {
|
||||||
|
@@ -113,7 +113,7 @@ void PerfTracePointDialog::runScript()
|
|||||||
connect(m_process.get(), &DeviceProcess::finished,
|
connect(m_process.get(), &DeviceProcess::finished,
|
||||||
this, &PerfTracePointDialog::handleProcessFinished);
|
this, &PerfTracePointDialog::handleProcessFinished);
|
||||||
|
|
||||||
connect(m_process.get(), &DeviceProcess::error,
|
connect(m_process.get(), &DeviceProcess::errorOccurred,
|
||||||
this, &PerfTracePointDialog::handleProcessError);
|
this, &PerfTracePointDialog::handleProcessError);
|
||||||
|
|
||||||
m_process->start(runnable);
|
m_process->start(runnable);
|
||||||
|
@@ -424,7 +424,7 @@ void ApplicationLauncherPrivate::start(const Runnable &runnable, const IDevice::
|
|||||||
this, &ApplicationLauncherPrivate::handleRemoteStdout);
|
this, &ApplicationLauncherPrivate::handleRemoteStdout);
|
||||||
connect(m_deviceProcess, &DeviceProcess::readyReadStandardError,
|
connect(m_deviceProcess, &DeviceProcess::readyReadStandardError,
|
||||||
this, &ApplicationLauncherPrivate::handleRemoteStderr);
|
this, &ApplicationLauncherPrivate::handleRemoteStderr);
|
||||||
connect(m_deviceProcess, &DeviceProcess::error,
|
connect(m_deviceProcess, &DeviceProcess::errorOccurred,
|
||||||
this, &ApplicationLauncherPrivate::handleApplicationError);
|
this, &ApplicationLauncherPrivate::handleApplicationError);
|
||||||
connect(m_deviceProcess, &DeviceProcess::finished,
|
connect(m_deviceProcess, &DeviceProcess::finished,
|
||||||
this, &ApplicationLauncherPrivate::handleApplicationFinished);
|
this, &ApplicationLauncherPrivate::handleApplicationFinished);
|
||||||
|
@@ -42,7 +42,7 @@ DesktopDeviceProcess::DesktopDeviceProcess(const QSharedPointer<const IDevice> &
|
|||||||
: DeviceProcess(device, parent)
|
: DeviceProcess(device, parent)
|
||||||
, m_process(ProcessMode::Writer)
|
, m_process(ProcessMode::Writer)
|
||||||
{
|
{
|
||||||
connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::error);
|
connect(&m_process, &QtcProcess::errorOccurred, this, &DeviceProcess::errorOccurred);
|
||||||
connect(&m_process, &QtcProcess::finished, this, &DeviceProcess::finished);
|
connect(&m_process, &QtcProcess::finished, this, &DeviceProcess::finished);
|
||||||
connect(&m_process, &QtcProcess::readyReadStandardOutput,
|
connect(&m_process, &QtcProcess::readyReadStandardOutput,
|
||||||
this, &DeviceProcess::readyReadStandardOutput);
|
this, &DeviceProcess::readyReadStandardOutput);
|
||||||
|
@@ -112,7 +112,7 @@ void DeviceManager::replaceInstance()
|
|||||||
const QList<Id> newIds =
|
const QList<Id> newIds =
|
||||||
Utils::transform(DeviceManagerPrivate::clonedInstance->d->devices, &IDevice::id);
|
Utils::transform(DeviceManagerPrivate::clonedInstance->d->devices, &IDevice::id);
|
||||||
|
|
||||||
for (const IDevice::ConstPtr &dev : qAsConst(m_instance->d->devices)) {
|
for (const IDevice::Ptr &dev : qAsConst(m_instance->d->devices)) {
|
||||||
if (!newIds.contains(dev->id()))
|
if (!newIds.contains(dev->id()))
|
||||||
dev->aboutToBeRemoved();
|
dev->aboutToBeRemoved();
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ DeviceManager *DeviceManager::cloneInstance()
|
|||||||
void DeviceManager::copy(const DeviceManager *source, DeviceManager *target, bool deep)
|
void DeviceManager::copy(const DeviceManager *source, DeviceManager *target, bool deep)
|
||||||
{
|
{
|
||||||
if (deep) {
|
if (deep) {
|
||||||
for (const IDevice::ConstPtr &device : qAsConst(source->d->devices))
|
for (const IDevice::Ptr &device : qAsConst(source->d->devices))
|
||||||
target->d->devices << device->clone();
|
target->d->devices << device->clone();
|
||||||
} else {
|
} else {
|
||||||
target->d->devices = source->d->devices;
|
target->d->devices = source->d->devices;
|
||||||
@@ -265,7 +265,7 @@ QVariantMap DeviceManager::toMap() const
|
|||||||
}
|
}
|
||||||
map.insert(QLatin1String(DefaultDevicesKey), defaultDeviceMap);
|
map.insert(QLatin1String(DefaultDevicesKey), defaultDeviceMap);
|
||||||
QVariantList deviceList;
|
QVariantList deviceList;
|
||||||
for (const IDevice::ConstPtr &device : qAsConst(d->devices))
|
for (const IDevice::Ptr &device : qAsConst(d->devices))
|
||||||
deviceList << device->toMap();
|
deviceList << device->toMap();
|
||||||
map.insert(QLatin1String(DeviceListKey), deviceList);
|
map.insert(QLatin1String(DeviceListKey), deviceList);
|
||||||
return map;
|
return map;
|
||||||
@@ -276,7 +276,7 @@ void DeviceManager::addDevice(const IDevice::ConstPtr &_device)
|
|||||||
const IDevice::Ptr device = _device->clone();
|
const IDevice::Ptr device = _device->clone();
|
||||||
|
|
||||||
QStringList names;
|
QStringList names;
|
||||||
for (const IDevice::ConstPtr &tmp : qAsConst(d->devices)) {
|
for (const IDevice::Ptr &tmp : qAsConst(d->devices)) {
|
||||||
if (tmp->id() != device->id())
|
if (tmp->id() != device->id())
|
||||||
names << tmp->displayName();
|
names << tmp->displayName();
|
||||||
}
|
}
|
||||||
@@ -366,7 +366,7 @@ bool DeviceManager::isLoaded() const
|
|||||||
IDevice::ConstPtr DeviceManager::deviceForPath(const FilePath &path)
|
IDevice::ConstPtr DeviceManager::deviceForPath(const FilePath &path)
|
||||||
{
|
{
|
||||||
const QList<IDevice::Ptr> devices = instance()->d->deviceList();
|
const QList<IDevice::Ptr> devices = instance()->d->deviceList();
|
||||||
for (const IDevice::ConstPtr &dev : devices) {
|
for (const IDevice::Ptr &dev : devices) {
|
||||||
// TODO: ensure handlesFile is thread safe
|
// TODO: ensure handlesFile is thread safe
|
||||||
if (dev->handlesFile(path))
|
if (dev->handlesFile(path))
|
||||||
return dev;
|
return dev;
|
||||||
|
@@ -62,7 +62,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void started();
|
void started();
|
||||||
void finished();
|
void finished();
|
||||||
void error(QProcess::ProcessError error);
|
void errorOccurred(QProcess::ProcessError error);
|
||||||
|
|
||||||
void readyReadStandardOutput();
|
void readyReadStandardOutput();
|
||||||
void readyReadStandardError();
|
void readyReadStandardError();
|
||||||
|
@@ -79,7 +79,7 @@ void DeviceUsedPortsGatherer::start(const IDevice::ConstPtr &device)
|
|||||||
|
|
||||||
connect(d->process.data(), &DeviceProcess::finished,
|
connect(d->process.data(), &DeviceProcess::finished,
|
||||||
this, &DeviceUsedPortsGatherer::handleProcessFinished);
|
this, &DeviceUsedPortsGatherer::handleProcessFinished);
|
||||||
connect(d->process.data(), &DeviceProcess::error,
|
connect(d->process.data(), &DeviceProcess::errorOccurred,
|
||||||
this, &DeviceUsedPortsGatherer::handleProcessError);
|
this, &DeviceUsedPortsGatherer::handleProcessError);
|
||||||
connect(d->process.data(), &DeviceProcess::readyReadStandardOutput,
|
connect(d->process.data(), &DeviceProcess::readyReadStandardOutput,
|
||||||
this, &DeviceUsedPortsGatherer::handleRemoteStdOut);
|
this, &DeviceUsedPortsGatherer::handleRemoteStdOut);
|
||||||
|
@@ -193,7 +193,7 @@ void SshDeviceProcess::handleConnected()
|
|||||||
d->process->requestX11Forwarding(display);
|
d->process->requestX11Forwarding(display);
|
||||||
if (runInTerminal()) {
|
if (runInTerminal()) {
|
||||||
connect(&d->consoleProcess, &QtcProcess::errorOccurred,
|
connect(&d->consoleProcess, &QtcProcess::errorOccurred,
|
||||||
this, &DeviceProcess::error);
|
this, &DeviceProcess::errorOccurred);
|
||||||
connect(&d->consoleProcess, &QtcProcess::started,
|
connect(&d->consoleProcess, &QtcProcess::started,
|
||||||
this, &SshDeviceProcess::handleProcessStarted);
|
this, &SshDeviceProcess::handleProcessStarted);
|
||||||
connect(&d->consoleProcess, &QtcProcess::finished,
|
connect(&d->consoleProcess, &QtcProcess::finished,
|
||||||
@@ -230,7 +230,7 @@ void SshDeviceProcess::handleDisconnected()
|
|||||||
switch (oldState) {
|
switch (oldState) {
|
||||||
case SshDeviceProcessPrivate::Connecting:
|
case SshDeviceProcessPrivate::Connecting:
|
||||||
case SshDeviceProcessPrivate::Connected:
|
case SshDeviceProcessPrivate::Connected:
|
||||||
emit error(QProcess::FailedToStart);
|
emit errorOccurred(QProcess::FailedToStart);
|
||||||
break;
|
break;
|
||||||
case SshDeviceProcessPrivate::ProcessRunning:
|
case SshDeviceProcessPrivate::ProcessRunning:
|
||||||
d->exitStatus = QProcess::CrashExit;
|
d->exitStatus = QProcess::CrashExit;
|
||||||
@@ -316,7 +316,7 @@ void SshDeviceProcess::SshDeviceProcessPrivate::doSignal(Signal signal)
|
|||||||
case SshDeviceProcessPrivate::Connecting:
|
case SshDeviceProcessPrivate::Connecting:
|
||||||
errorMessage = tr("Terminated by request.");
|
errorMessage = tr("Terminated by request.");
|
||||||
setState(SshDeviceProcessPrivate::Inactive);
|
setState(SshDeviceProcessPrivate::Inactive);
|
||||||
emit q->error(QProcess::FailedToStart);
|
emit q->errorOccurred(QProcess::FailedToStart);
|
||||||
break;
|
break;
|
||||||
case SshDeviceProcessPrivate::Connected:
|
case SshDeviceProcessPrivate::Connected:
|
||||||
case SshDeviceProcessPrivate::ProcessRunning:
|
case SshDeviceProcessPrivate::ProcessRunning:
|
||||||
|
@@ -791,7 +791,8 @@ QStringList SessionManager::sessions()
|
|||||||
{
|
{
|
||||||
if (d->m_sessions.isEmpty()) {
|
if (d->m_sessions.isEmpty()) {
|
||||||
// We are not initialized yet, so do that now
|
// We are not initialized yet, so do that now
|
||||||
const FilePaths sessionFiles = ICore::userResourcePath().dirEntries({{"*qws"}}, QDir::Time);
|
const FilePaths sessionFiles =
|
||||||
|
ICore::userResourcePath().dirEntries({{"*qws"}}, QDir::Time | QDir::Reversed);
|
||||||
for (const FilePath &file : sessionFiles) {
|
for (const FilePath &file : sessionFiles) {
|
||||||
const QString &name = file.completeBaseName();
|
const QString &name = file.completeBaseName();
|
||||||
d->m_sessionDateTimes.insert(name, file.lastModified());
|
d->m_sessionDateTimes.insert(name, file.lastModified());
|
||||||
|
@@ -92,6 +92,8 @@ Edit3DWidget *Edit3DView::edit3DWidget() const
|
|||||||
|
|
||||||
void Edit3DView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList, const QList<ModelNode> &lastSelectedNodeList)
|
void Edit3DView::selectedNodesChanged(const QList<ModelNode> &selectedNodeList, const QList<ModelNode> &lastSelectedNodeList)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(selectedNodeList)
|
||||||
|
Q_UNUSED(lastSelectedNodeList)
|
||||||
SelectionContext selectionContext(this);
|
SelectionContext selectionContext(this);
|
||||||
selectionContext.setUpdateMode(SelectionContext::UpdateMode::Fast);
|
selectionContext.setUpdateMode(SelectionContext::UpdateMode::Fast);
|
||||||
if (m_alignCamerasAction)
|
if (m_alignCamerasAction)
|
||||||
|
@@ -1348,7 +1348,7 @@ void TextToModelMerger::syncNode(ModelNode &modelNode,
|
|||||||
syncExpressionProperty(modelProperty, astValue, astType, differenceHandler);
|
syncExpressionProperty(modelProperty, astValue, astType, differenceHandler);
|
||||||
}
|
}
|
||||||
modelPropertyNames.remove(astName.toUtf8());
|
modelPropertyNames.remove(astName.toUtf8());
|
||||||
} else if (auto source = AST::cast<AST::UiSourceElement *>(member)) {
|
} else if (AST::cast<AST::UiSourceElement *>(member)) {
|
||||||
// function et al
|
// function et al
|
||||||
} else {
|
} else {
|
||||||
qWarning() << "Found an unknown QML value.";
|
qWarning() << "Found an unknown QML value.";
|
||||||
|
@@ -104,7 +104,7 @@ void QnxDevice::updateVersionNumber() const
|
|||||||
QEventLoop eventLoop;
|
QEventLoop eventLoop;
|
||||||
SshDeviceProcess versionNumberProcess(sharedFromThis());
|
SshDeviceProcess versionNumberProcess(sharedFromThis());
|
||||||
QObject::connect(&versionNumberProcess, &SshDeviceProcess::finished, &eventLoop, &QEventLoop::quit);
|
QObject::connect(&versionNumberProcess, &SshDeviceProcess::finished, &eventLoop, &QEventLoop::quit);
|
||||||
QObject::connect(&versionNumberProcess, &DeviceProcess::error, &eventLoop, &QEventLoop::quit);
|
QObject::connect(&versionNumberProcess, &DeviceProcess::errorOccurred, &eventLoop, &QEventLoop::quit);
|
||||||
|
|
||||||
Runnable r;
|
Runnable r;
|
||||||
r.command = {"uname", {"-r"}};
|
r.command = {"uname", {"-r"}};
|
||||||
|
@@ -60,7 +60,7 @@ Slog2InfoRunner::Slog2InfoRunner(RunControl *runControl)
|
|||||||
m_logProcess = new QnxDeviceProcess(device(), this);
|
m_logProcess = new QnxDeviceProcess(device(), this);
|
||||||
connect(m_logProcess, &DeviceProcess::readyReadStandardOutput, this, &Slog2InfoRunner::readLogStandardOutput);
|
connect(m_logProcess, &DeviceProcess::readyReadStandardOutput, this, &Slog2InfoRunner::readLogStandardOutput);
|
||||||
connect(m_logProcess, &DeviceProcess::readyReadStandardError, this, &Slog2InfoRunner::readLogStandardError);
|
connect(m_logProcess, &DeviceProcess::readyReadStandardError, this, &Slog2InfoRunner::readLogStandardError);
|
||||||
connect(m_logProcess, &DeviceProcess::error, this, &Slog2InfoRunner::handleLogError);
|
connect(m_logProcess, &DeviceProcess::errorOccurred, this, &Slog2InfoRunner::handleLogError);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Slog2InfoRunner::printMissingWarning()
|
void Slog2InfoRunner::printMissingWarning()
|
||||||
|
@@ -201,7 +201,7 @@ public:
|
|||||||
{
|
{
|
||||||
delete m_shell;
|
delete m_shell;
|
||||||
m_shell = nullptr;
|
m_shell = nullptr;
|
||||||
DEBUG("Failed to connect to " << parameters.host());
|
qCDebug(linuxDeviceLog) << "Failed to connect to" << parameters.host();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ LinuxDevice::LinuxDevice()
|
|||||||
}
|
}
|
||||||
proc->deleteLater();
|
proc->deleteLater();
|
||||||
});
|
});
|
||||||
QObject::connect(proc, &DeviceProcess::error, [proc] {
|
QObject::connect(proc, &DeviceProcess::errorOccurred, [proc] {
|
||||||
Core::MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
Core::MessageManager::writeDisrupting(tr("Error starting remote shell."));
|
||||||
proc->deleteLater();
|
proc->deleteLater();
|
||||||
});
|
});
|
||||||
@@ -440,7 +440,7 @@ bool LinuxDevice::handlesFile(const FilePath &filePath) const
|
|||||||
return filePath.scheme() == "ssh" && filePath.host() == userAtHost();
|
return filePath.scheme() == "ssh" && filePath.host() == userAtHost();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinuxDevice::runProcess(QtcProcess &process) const
|
void LinuxDevice::runProcess(QtcProcess &) const
|
||||||
{
|
{
|
||||||
QTC_CHECK(false); // FIXME: Implement
|
QTC_CHECK(false); // FIXME: Implement
|
||||||
}
|
}
|
||||||
|
@@ -82,7 +82,7 @@ public:
|
|||||||
QByteArray fileContents(const Utils::FilePath &filePath, qint64 limit, qint64 offset) const override;
|
QByteArray fileContents(const Utils::FilePath &filePath, qint64 limit, qint64 offset) const override;
|
||||||
bool writeFileContents(const Utils::FilePath &filePath, const QByteArray &data) const override;
|
bool writeFileContents(const Utils::FilePath &filePath, const QByteArray &data) const override;
|
||||||
QDateTime lastModified(const Utils::FilePath &filePath) const override;
|
QDateTime lastModified(const Utils::FilePath &filePath) const override;
|
||||||
void runProcess(Utils::QtcProcess &process) const override;
|
void runProcess(Utils::QtcProcess &) const override;
|
||||||
qint64 fileSize(const Utils::FilePath &filePath) const override;
|
qint64 fileSize(const Utils::FilePath &filePath) const override;
|
||||||
qint64 bytesAvailable(const Utils::FilePath &filePath) const override;
|
qint64 bytesAvailable(const Utils::FilePath &filePath) const override;
|
||||||
QFileDevice::Permissions permissions(const Utils::FilePath &filePath) const override;
|
QFileDevice::Permissions permissions(const Utils::FilePath &filePath) const override;
|
||||||
|
@@ -54,7 +54,7 @@ void RemoteLinuxEnvironmentReader::start()
|
|||||||
}
|
}
|
||||||
m_stop = false;
|
m_stop = false;
|
||||||
m_deviceProcess = m_device->createProcess(this);
|
m_deviceProcess = m_device->createProcess(this);
|
||||||
connect(m_deviceProcess, &DeviceProcess::error,
|
connect(m_deviceProcess, &DeviceProcess::errorOccurred,
|
||||||
this, &RemoteLinuxEnvironmentReader::handleError);
|
this, &RemoteLinuxEnvironmentReader::handleError);
|
||||||
connect(m_deviceProcess, &DeviceProcess::finished,
|
connect(m_deviceProcess, &DeviceProcess::finished,
|
||||||
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);
|
this, &RemoteLinuxEnvironmentReader::remoteProcessFinished);
|
||||||
|
@@ -178,6 +178,15 @@ extend_qtc_executable(qml2puppet
|
|||||||
DEFINES QUICK3D_PARTICLES_MODULE
|
DEFINES QUICK3D_PARTICLES_MODULE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Quick3DAssetUtils optionally depends on QuickTimeline, so find also it to make the CI build work
|
||||||
|
find_package(Qt5 5.15.0 COMPONENTS Quick3DAssetUtils QuickTimeline QUIET)
|
||||||
|
extend_qtc_executable(qml2puppet
|
||||||
|
CONDITION TARGET Qt5::Quick3DAssetUtils
|
||||||
|
FEATURE_INFO "Qt Quick 3D asset utils"
|
||||||
|
DEPENDS Qt5::Quick3DAssetUtilsPrivate
|
||||||
|
DEFINES QUICK3D_ASSET_UTILS_MODULE
|
||||||
|
)
|
||||||
|
|
||||||
extend_qtc_executable(qml2puppet
|
extend_qtc_executable(qml2puppet
|
||||||
CONDITION Qt5_VERSION VERSION_GREATER_EQUAL 6.0.0
|
CONDITION Qt5_VERSION VERSION_GREATER_EQUAL 6.0.0
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user