forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.5'
Change-Id: I60fca091b2eac67259580acba5ae934c16d74a83
This commit is contained in:
@@ -199,6 +199,7 @@ PaletteButton=shadowBackground
|
|||||||
PaletteBrightText=ffff0000
|
PaletteBrightText=ffff0000
|
||||||
PaletteText=text
|
PaletteText=text
|
||||||
PaletteButtonText=text
|
PaletteButtonText=text
|
||||||
|
PaletteButtonTextDisabled=textDisabled
|
||||||
PaletteToolTipBase=selectedBackground
|
PaletteToolTipBase=selectedBackground
|
||||||
PaletteHighlight=selectedBackground
|
PaletteHighlight=selectedBackground
|
||||||
PaletteDark=shadowBackground
|
PaletteDark=shadowBackground
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -122,12 +122,6 @@ void BareMetalCustomRunConfiguration::initialize()
|
|||||||
BareMetalRunConfiguration::initialize(runConfigId(), QString());
|
BareMetalRunConfiguration::initialize(runConfigId(), QString());
|
||||||
}
|
}
|
||||||
|
|
||||||
void BareMetalCustomRunConfiguration::copyFrom(const BareMetalCustomRunConfiguration *source)
|
|
||||||
{
|
|
||||||
BareMetalRunConfiguration::copyFrom(source);
|
|
||||||
m_localExecutable = source->m_localExecutable;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool BareMetalCustomRunConfiguration::isConfigured() const
|
bool BareMetalCustomRunConfiguration::isConfigured() const
|
||||||
{
|
{
|
||||||
return !m_localExecutable.isEmpty();
|
return !m_localExecutable.isEmpty();
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ public:
|
|||||||
explicit BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent);
|
explicit BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent);
|
||||||
|
|
||||||
void initialize();
|
void initialize();
|
||||||
void copyFrom(const BareMetalCustomRunConfiguration *source);
|
|
||||||
|
|
||||||
bool isConfigured() const override;
|
bool isConfigured() const override;
|
||||||
ConfigurationState ensureConfigured(QString *errorMessage) override;
|
ConfigurationState ensureConfigured(QString *errorMessage) override;
|
||||||
|
|||||||
@@ -57,15 +57,6 @@ BareMetalRunConfiguration::BareMetalRunConfiguration(Target *target)
|
|||||||
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated); // Handles device changes, etc.
|
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated); // Handles device changes, etc.
|
||||||
}
|
}
|
||||||
|
|
||||||
void BareMetalRunConfiguration::copyFrom(const BareMetalRunConfiguration *other)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(other);
|
|
||||||
m_projectFilePath = other->m_projectFilePath;
|
|
||||||
m_workingDirectory = other->m_workingDirectory;
|
|
||||||
|
|
||||||
setDefaultDisplayName(defaultDisplayName());
|
|
||||||
}
|
|
||||||
|
|
||||||
void BareMetalRunConfiguration::initialize(const Core::Id id, const QString &projectFilePath)
|
void BareMetalRunConfiguration::initialize(const Core::Id id, const QString &projectFilePath)
|
||||||
{
|
{
|
||||||
RunConfiguration::initialize(id);
|
RunConfiguration::initialize(id);
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ protected:
|
|||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
QString defaultDisplayName();
|
QString defaultDisplayName();
|
||||||
void initialize(Core::Id id, const QString &projectFilePath);
|
void initialize(Core::Id id, const QString &projectFilePath);
|
||||||
void copyFrom(const BareMetalRunConfiguration *source);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void handleBuildSystemDataUpdated();
|
void handleBuildSystemDataUpdated();
|
||||||
|
|||||||
@@ -83,17 +83,6 @@ void CMakeRunConfiguration::initialize(Core::Id id, const QString &target,
|
|||||||
setDefaultDisplayName(defaultDisplayName());
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeRunConfiguration::copyFrom(const CMakeRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(source);
|
|
||||||
|
|
||||||
m_buildSystemTarget = source->m_buildSystemTarget;
|
|
||||||
m_executable = source->m_executable;
|
|
||||||
m_title = source->m_title;
|
|
||||||
|
|
||||||
setDefaultDisplayName(defaultDisplayName());
|
|
||||||
}
|
|
||||||
|
|
||||||
Runnable CMakeRunConfiguration::runnable() const
|
Runnable CMakeRunConfiguration::runnable() const
|
||||||
{
|
{
|
||||||
StandardRunnable r;
|
StandardRunnable r;
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
void initialize(Core::Id id, const QString &target,
|
void initialize(Core::Id id, const QString &target,
|
||||||
const Utils::FileName &workingDirectory, const QString &title);
|
const Utils::FileName &workingDirectory, const QString &title);
|
||||||
void copyFrom(const CMakeRunConfiguration *source);
|
|
||||||
|
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
QString defaultDisplayName() const;
|
QString defaultDisplayName() const;
|
||||||
|
|||||||
@@ -330,10 +330,4 @@ void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map)
|
|||||||
d.useMultiProcess = map.value(QLatin1String(USE_MULTIPROCESS_KEY), false).toBool();
|
d.useMultiProcess = map.value(QLatin1String(USE_MULTIPROCESS_KEY), false).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
DebuggerRunConfigurationAspect *DebuggerRunConfigurationAspect::create
|
|
||||||
(RunConfiguration *runConfiguration) const
|
|
||||||
{
|
|
||||||
return new DebuggerRunConfigurationAspect(runConfiguration);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace Debugger
|
} // namespace Debugger
|
||||||
|
|||||||
@@ -56,10 +56,9 @@ class DEBUGGER_EXPORT DebuggerRunConfigurationAspect
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
DebuggerRunConfigurationAspect(ProjectExplorer::RunConfiguration *runConfiguration);
|
DebuggerRunConfigurationAspect(ProjectExplorer::RunConfiguration *runConfiguration);
|
||||||
DebuggerRunConfigurationAspect *create(ProjectExplorer::RunConfiguration *runConfiguration) const;
|
|
||||||
|
|
||||||
void fromMap(const QVariantMap &map);
|
void fromMap(const QVariantMap &map) override;
|
||||||
void toMap(QVariantMap &map) const;
|
void toMap(QVariantMap &map) const override;
|
||||||
|
|
||||||
bool useCppDebugger() const;
|
bool useCppDebugger() const;
|
||||||
void setUseCppDebugger(bool value);
|
void setUseCppDebugger(bool value);
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ IosRunConfiguration::IosRunConfiguration(Target *target)
|
|||||||
this, &IosRunConfiguration::deviceChanges);
|
this, &IosRunConfiguration::deviceChanges);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void IosRunConfiguration::initialize(Core::Id id, const FileName &path)
|
void IosRunConfiguration::initialize(Core::Id id, const FileName &path)
|
||||||
{
|
{
|
||||||
RunConfiguration::initialize(id);
|
RunConfiguration::initialize(id);
|
||||||
@@ -114,14 +113,6 @@ void IosRunConfiguration::initialize(Core::Id id, const FileName &path)
|
|||||||
updateDisplayNames();
|
updateDisplayNames();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IosRunConfiguration::copyFrom(const IosRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(source);
|
|
||||||
m_profilePath = source->m_profilePath;
|
|
||||||
|
|
||||||
updateDisplayNames();
|
|
||||||
}
|
|
||||||
|
|
||||||
void IosRunConfiguration::deviceChanges() {
|
void IosRunConfiguration::deviceChanges() {
|
||||||
updateDisplayNames();
|
updateDisplayNames();
|
||||||
updateEnabledState();
|
updateEnabledState();
|
||||||
|
|||||||
@@ -72,7 +72,6 @@ signals:
|
|||||||
private:
|
private:
|
||||||
friend class ProjectExplorer::IRunConfigurationFactory;
|
friend class ProjectExplorer::IRunConfigurationFactory;
|
||||||
void initialize(Core::Id id, const Utils::FileName &path);
|
void initialize(Core::Id id, const Utils::FileName &path);
|
||||||
void copyFrom(const IosRunConfiguration *source);
|
|
||||||
|
|
||||||
void deviceChanges();
|
void deviceChanges();
|
||||||
friend class IosRunConfigurationWidget;
|
friend class IosRunConfigurationWidget;
|
||||||
|
|||||||
@@ -63,7 +63,8 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
|
|||||||
if (mode == InstantApply) {
|
if (mode == InstantApply) {
|
||||||
argumentsAspect->addToMainConfigurationWidget(this, layout);
|
argumentsAspect->addToMainConfigurationWidget(this, layout);
|
||||||
} else {
|
} else {
|
||||||
m_temporaryArgumentsAspect = argumentsAspect->clone(rc);
|
m_temporaryArgumentsAspect = new ArgumentsAspect(rc, QString());
|
||||||
|
m_temporaryArgumentsAspect->copyFrom(argumentsAspect);
|
||||||
m_temporaryArgumentsAspect->addToMainConfigurationWidget(this, layout);
|
m_temporaryArgumentsAspect->addToMainConfigurationWidget(this, layout);
|
||||||
connect(m_temporaryArgumentsAspect, &ArgumentsAspect::argumentsChanged,
|
connect(m_temporaryArgumentsAspect, &ArgumentsAspect::argumentsChanged,
|
||||||
this, &CustomExecutableConfigurationWidget::validChanged);
|
this, &CustomExecutableConfigurationWidget::validChanged);
|
||||||
@@ -80,7 +81,8 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
|
|||||||
if (mode == InstantApply) {
|
if (mode == InstantApply) {
|
||||||
terminalAspect->addToMainConfigurationWidget(this, layout);
|
terminalAspect->addToMainConfigurationWidget(this, layout);
|
||||||
} else {
|
} else {
|
||||||
m_temporaryTerminalAspect = terminalAspect->clone(rc);
|
m_temporaryTerminalAspect = new TerminalAspect(rc, QString());
|
||||||
|
m_temporaryTerminalAspect->copyFrom(terminalAspect);
|
||||||
m_temporaryTerminalAspect->addToMainConfigurationWidget(this, layout);
|
m_temporaryTerminalAspect->addToMainConfigurationWidget(this, layout);
|
||||||
connect(m_temporaryTerminalAspect, &TerminalAspect::useTerminalChanged,
|
connect(m_temporaryTerminalAspect, &TerminalAspect::useTerminalChanged,
|
||||||
this, &CustomExecutableConfigurationWidget::validChanged);
|
this, &CustomExecutableConfigurationWidget::validChanged);
|
||||||
|
|||||||
@@ -101,15 +101,6 @@ void CustomExecutableRunConfiguration::initialize()
|
|||||||
setDefaultDisplayName(defaultDisplayName());
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CustomExecutableRunConfiguration::copyFrom(const CustomExecutableRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(source);
|
|
||||||
m_executable = source->m_executable;
|
|
||||||
m_workingDirectory = source->m_workingDirectory;
|
|
||||||
|
|
||||||
setDefaultDisplayName(defaultDisplayName());
|
|
||||||
}
|
|
||||||
|
|
||||||
// Note: Qt4Project deletes all empty customexecrunconfigs for which isConfigured() == false.
|
// Note: Qt4Project deletes all empty customexecrunconfigs for which isConfigured() == false.
|
||||||
CustomExecutableRunConfiguration::~CustomExecutableRunConfiguration()
|
CustomExecutableRunConfiguration::~CustomExecutableRunConfiguration()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -67,8 +67,7 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initialize();
|
void initialize();
|
||||||
void copyFrom(const CustomExecutableRunConfiguration *source);
|
bool fromMap(const QVariantMap &map) override;
|
||||||
virtual bool fromMap(const QVariantMap &map) override;
|
|
||||||
QString defaultDisplayName() const;
|
QString defaultDisplayName() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -115,6 +115,8 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
|
|||||||
m_toggleSync(new QToolButton(this)),
|
m_toggleSync(new QToolButton(this)),
|
||||||
m_rootSelector(new QComboBox)
|
m_rootSelector(new QComboBox)
|
||||||
{
|
{
|
||||||
|
setBackgroundRole(QPalette::Base);
|
||||||
|
setAutoFillBackground(true);
|
||||||
m_fileSystemModel->setResolveSymlinks(false);
|
m_fileSystemModel->setResolveSymlinks(false);
|
||||||
m_fileSystemModel->setIconProvider(Core::FileIconProvider::iconProvider());
|
m_fileSystemModel->setIconProvider(Core::FileIconProvider::iconProvider());
|
||||||
QDir::Filters filters = QDir::AllEntries | QDir::NoDotAndDotDot;
|
QDir::Filters filters = QDir::AllEntries | QDir::NoDotAndDotDot;
|
||||||
@@ -131,8 +133,14 @@ FolderNavigationWidget::FolderNavigationWidget(QWidget *parent) : QWidget(parent
|
|||||||
showOnlyFirstColumn(m_listView);
|
showOnlyFirstColumn(m_listView);
|
||||||
setFocusProxy(m_listView);
|
setFocusProxy(m_listView);
|
||||||
|
|
||||||
|
auto selectorWidget = new QWidget(this);
|
||||||
|
auto selectorLayout = new QVBoxLayout(selectorWidget);
|
||||||
|
selectorWidget->setLayout(selectorLayout);
|
||||||
|
selectorLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
selectorLayout->addWidget(m_rootSelector);
|
||||||
|
|
||||||
auto layout = new QVBoxLayout();
|
auto layout = new QVBoxLayout();
|
||||||
layout->addWidget(m_rootSelector);
|
layout->addWidget(selectorWidget);
|
||||||
layout->addWidget(m_listView);
|
layout->addWidget(m_listView);
|
||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|||||||
@@ -94,11 +94,4 @@ LocalEnvironmentAspect::LocalEnvironmentAspect(RunConfiguration *parent,
|
|||||||
this, &LocalEnvironmentAspect::buildEnvironmentHasChanged);
|
this, &LocalEnvironmentAspect::buildEnvironmentHasChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalEnvironmentAspect *LocalEnvironmentAspect::create(RunConfiguration *parent) const
|
|
||||||
{
|
|
||||||
auto result = new LocalEnvironmentAspect(parent, m_baseEnvironmentModifier);
|
|
||||||
result->setUserEnvironmentChanges(userEnvironmentChanges());
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ class PROJECTEXPLORER_EXPORT LocalEnvironmentAspect : public EnvironmentAspect
|
|||||||
public:
|
public:
|
||||||
typedef std::function<void(RunConfiguration *, Utils::Environment &)> BaseEnvironmentModifier;
|
typedef std::function<void(RunConfiguration *, Utils::Environment &)> BaseEnvironmentModifier;
|
||||||
LocalEnvironmentAspect(RunConfiguration *parent, const BaseEnvironmentModifier &modifier);
|
LocalEnvironmentAspect(RunConfiguration *parent, const BaseEnvironmentModifier &modifier);
|
||||||
LocalEnvironmentAspect *create(RunConfiguration *parent) const override;
|
|
||||||
|
|
||||||
QList<int> possibleBaseEnvironments() const override;
|
QList<int> possibleBaseEnvironments() const override;
|
||||||
QString baseEnvironmentDisplayName(int base) const override;
|
QString baseEnvironmentDisplayName(int base) const override;
|
||||||
|
|||||||
@@ -110,6 +110,14 @@ RunConfigWidget *IRunConfigurationAspect::createConfigurationWidget() const
|
|||||||
return m_runConfigWidgetCreator ? m_runConfigWidgetCreator() : nullptr;
|
return m_runConfigWidgetCreator ? m_runConfigWidgetCreator() : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void IRunConfigurationAspect::copyFrom(IRunConfigurationAspect *source)
|
||||||
|
{
|
||||||
|
QTC_ASSERT(source, return);
|
||||||
|
QVariantMap data;
|
||||||
|
source->toMap(data);
|
||||||
|
fromMap(data);
|
||||||
|
}
|
||||||
|
|
||||||
void IRunConfigurationAspect::setProjectSettings(ISettingsAspect *settings)
|
void IRunConfigurationAspect::setProjectSettings(ISettingsAspect *settings)
|
||||||
{
|
{
|
||||||
m_projectSettings = settings;
|
m_projectSettings = settings;
|
||||||
@@ -132,13 +140,15 @@ ISettingsAspect *IRunConfigurationAspect::currentSettings() const
|
|||||||
|
|
||||||
void IRunConfigurationAspect::fromMap(const QVariantMap &map)
|
void IRunConfigurationAspect::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_projectSettings->fromMap(map);
|
if (m_projectSettings)
|
||||||
|
m_projectSettings->fromMap(map);
|
||||||
m_useGlobalSettings = map.value(m_id.toString() + QLatin1String(".UseGlobalSettings"), true).toBool();
|
m_useGlobalSettings = map.value(m_id.toString() + QLatin1String(".UseGlobalSettings"), true).toBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IRunConfigurationAspect::toMap(QVariantMap &map) const
|
void IRunConfigurationAspect::toMap(QVariantMap &map) const
|
||||||
{
|
{
|
||||||
m_projectSettings->toMap(map);
|
if (m_projectSettings)
|
||||||
|
m_projectSettings->toMap(map);
|
||||||
map.insert(m_id.toString() + QLatin1String(".UseGlobalSettings"), m_useGlobalSettings);
|
map.insert(m_id.toString() + QLatin1String(".UseGlobalSettings"), m_useGlobalSettings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,22 +157,13 @@ void IRunConfigurationAspect::setRunConfigWidgetCreator(const RunConfigWidgetCre
|
|||||||
m_runConfigWidgetCreator = runConfigWidgetCreator;
|
m_runConfigWidgetCreator = runConfigWidgetCreator;
|
||||||
}
|
}
|
||||||
|
|
||||||
IRunConfigurationAspect *IRunConfigurationAspect::clone(RunConfiguration *runConfig) const
|
|
||||||
{
|
|
||||||
IRunConfigurationAspect *other = create(runConfig);
|
|
||||||
if (m_projectSettings)
|
|
||||||
other->m_projectSettings = m_projectSettings->clone();
|
|
||||||
other->m_globalSettings = m_globalSettings;
|
|
||||||
other->m_useGlobalSettings = m_useGlobalSettings;
|
|
||||||
return other;
|
|
||||||
}
|
|
||||||
|
|
||||||
void IRunConfigurationAspect::resetProjectToGlobalSettings()
|
void IRunConfigurationAspect::resetProjectToGlobalSettings()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(m_globalSettings, return);
|
QTC_ASSERT(m_globalSettings, return);
|
||||||
QVariantMap map;
|
QVariantMap map;
|
||||||
m_globalSettings->toMap(map);
|
m_globalSettings->toMap(map);
|
||||||
m_projectSettings->fromMap(map);
|
if (m_projectSettings)
|
||||||
|
m_projectSettings->fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -223,6 +224,9 @@ RunConfiguration::RunConfiguration(Target *target)
|
|||||||
expander->registerVariable(Constants::VAR_CURRENTRUN_NAME,
|
expander->registerVariable(Constants::VAR_CURRENTRUN_NAME,
|
||||||
QCoreApplication::translate("ProjectExplorer", "The currently active run configuration's name."),
|
QCoreApplication::translate("ProjectExplorer", "The currently active run configuration's name."),
|
||||||
[this] { return displayName(); }, false);
|
[this] { return displayName(); }, false);
|
||||||
|
|
||||||
|
for (const AspectFactory &factory : theAspectFactories)
|
||||||
|
addExtraAspect(factory(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
RunConfiguration::~RunConfiguration()
|
RunConfiguration::~RunConfiguration()
|
||||||
@@ -233,20 +237,12 @@ RunConfiguration::~RunConfiguration()
|
|||||||
void RunConfiguration::initialize(Core::Id id)
|
void RunConfiguration::initialize(Core::Id id)
|
||||||
{
|
{
|
||||||
StatefulProjectConfiguration::initialize(id);
|
StatefulProjectConfiguration::initialize(id);
|
||||||
|
|
||||||
for (const AspectFactory &factory : theAspectFactories)
|
|
||||||
addExtraAspect(factory(this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RunConfiguration::copyFrom(const RunConfiguration *source)
|
void RunConfiguration::copyFrom(const RunConfiguration *source)
|
||||||
{
|
{
|
||||||
StatefulProjectConfiguration::copyFrom(source);
|
QVariantMap data = source->toMap();
|
||||||
|
fromMap(data);
|
||||||
foreach (IRunConfigurationAspect *aspect, source->m_aspects) {
|
|
||||||
IRunConfigurationAspect *clone = aspect->clone(this);
|
|
||||||
if (clone)
|
|
||||||
m_aspects.append(clone);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RunConfiguration::isActive() const
|
bool RunConfiguration::isActive() const
|
||||||
@@ -560,6 +556,40 @@ public:
|
|||||||
bool canStop() const;
|
bool canStop() const;
|
||||||
void timerEvent(QTimerEvent *ev) override;
|
void timerEvent(QTimerEvent *ev) override;
|
||||||
|
|
||||||
|
void killStartWatchdog()
|
||||||
|
{
|
||||||
|
if (startWatchdogTimerId != -1) {
|
||||||
|
killTimer(startWatchdogTimerId);
|
||||||
|
startWatchdogTimerId = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void killStopWatchdog()
|
||||||
|
{
|
||||||
|
if (stopWatchdogTimerId != -1) {
|
||||||
|
killTimer(stopWatchdogTimerId);
|
||||||
|
stopWatchdogTimerId = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void startStartWatchdog()
|
||||||
|
{
|
||||||
|
killStartWatchdog();
|
||||||
|
killStopWatchdog();
|
||||||
|
|
||||||
|
if (startWatchdogInterval != 0)
|
||||||
|
startWatchdogTimerId = startTimer(startWatchdogInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
void startStopWatchdog()
|
||||||
|
{
|
||||||
|
killStopWatchdog();
|
||||||
|
killStartWatchdog();
|
||||||
|
|
||||||
|
if (stopWatchdogInterval != 0)
|
||||||
|
stopWatchdogTimerId = startTimer(stopWatchdogInterval);
|
||||||
|
}
|
||||||
|
|
||||||
RunWorker *q;
|
RunWorker *q;
|
||||||
RunWorkerState state = RunWorkerState::Initialized;
|
RunWorkerState state = RunWorkerState::Initialized;
|
||||||
const QPointer<RunControl> runControl;
|
const QPointer<RunControl> runControl;
|
||||||
@@ -1573,17 +1603,21 @@ bool RunWorkerPrivate::canStop() const
|
|||||||
void RunWorkerPrivate::timerEvent(QTimerEvent *ev)
|
void RunWorkerPrivate::timerEvent(QTimerEvent *ev)
|
||||||
{
|
{
|
||||||
if (ev->timerId() == startWatchdogTimerId) {
|
if (ev->timerId() == startWatchdogTimerId) {
|
||||||
if (startWatchdogCallback)
|
if (startWatchdogCallback) {
|
||||||
|
killStartWatchdog();
|
||||||
startWatchdogCallback();
|
startWatchdogCallback();
|
||||||
else
|
} else {
|
||||||
q->reportFailure(RunWorker::tr("Worker start timed out."));
|
q->reportFailure(RunWorker::tr("Worker start timed out."));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (ev->timerId() == stopWatchdogTimerId) {
|
if (ev->timerId() == stopWatchdogTimerId) {
|
||||||
if (stopWatchdogCallback)
|
if (stopWatchdogCallback) {
|
||||||
|
killStopWatchdog();
|
||||||
stopWatchdogCallback();
|
stopWatchdogCallback();
|
||||||
else
|
} else {
|
||||||
q->reportFailure(RunWorker::tr("Worker stop timed out."));
|
q->reportFailure(RunWorker::tr("Worker stop timed out."));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1641,9 +1675,8 @@ RunWorker::~RunWorker()
|
|||||||
*/
|
*/
|
||||||
void RunWorker::initiateStart()
|
void RunWorker::initiateStart()
|
||||||
{
|
{
|
||||||
if (d->startWatchdogInterval != 0)
|
d->startStartWatchdog();
|
||||||
d->startWatchdogTimerId = d->startTimer(d->startWatchdogInterval);
|
d->runControl->d->debugMessage("Initiate start for " + d->id);
|
||||||
|
|
||||||
start();
|
start();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1655,8 +1688,7 @@ void RunWorker::initiateStart()
|
|||||||
*/
|
*/
|
||||||
void RunWorker::reportStarted()
|
void RunWorker::reportStarted()
|
||||||
{
|
{
|
||||||
if (d->startWatchdogInterval != 0)
|
d->killStartWatchdog();
|
||||||
d->killTimer(d->startWatchdogTimerId);
|
|
||||||
d->runControl->d->onWorkerStarted(this);
|
d->runControl->d->onWorkerStarted(this);
|
||||||
emit started();
|
emit started();
|
||||||
}
|
}
|
||||||
@@ -1669,9 +1701,7 @@ void RunWorker::reportStarted()
|
|||||||
*/
|
*/
|
||||||
void RunWorker::initiateStop()
|
void RunWorker::initiateStop()
|
||||||
{
|
{
|
||||||
if (d->stopWatchdogInterval != 0)
|
d->startStopWatchdog();
|
||||||
d->stopWatchdogTimerId = d->startTimer(d->stopWatchdogInterval);
|
|
||||||
|
|
||||||
d->runControl->d->debugMessage("Initiate stop for " + d->id);
|
d->runControl->d->debugMessage("Initiate stop for " + d->id);
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
@@ -1687,8 +1717,7 @@ void RunWorker::initiateStop()
|
|||||||
*/
|
*/
|
||||||
void RunWorker::reportStopped()
|
void RunWorker::reportStopped()
|
||||||
{
|
{
|
||||||
if (d->stopWatchdogInterval != 0)
|
d->killStopWatchdog();
|
||||||
d->killTimer(d->stopWatchdogTimerId);
|
|
||||||
d->runControl->d->onWorkerStopped(this);
|
d->runControl->d->onWorkerStopped(this);
|
||||||
emit stopped();
|
emit stopped();
|
||||||
}
|
}
|
||||||
@@ -1702,6 +1731,8 @@ void RunWorker::reportStopped()
|
|||||||
*/
|
*/
|
||||||
void RunWorker::reportDone()
|
void RunWorker::reportDone()
|
||||||
{
|
{
|
||||||
|
d->killStartWatchdog();
|
||||||
|
d->killStopWatchdog();
|
||||||
switch (d->state) {
|
switch (d->state) {
|
||||||
case RunWorkerState::Initialized:
|
case RunWorkerState::Initialized:
|
||||||
QTC_CHECK(false);
|
QTC_CHECK(false);
|
||||||
@@ -1727,6 +1758,8 @@ void RunWorker::reportDone()
|
|||||||
*/
|
*/
|
||||||
void RunWorker::reportFailure(const QString &msg)
|
void RunWorker::reportFailure(const QString &msg)
|
||||||
{
|
{
|
||||||
|
d->killStartWatchdog();
|
||||||
|
d->killStopWatchdog();
|
||||||
d->runControl->d->onWorkerFailed(this, msg);
|
d->runControl->d->onWorkerFailed(this, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -102,20 +102,20 @@ public:
|
|||||||
explicit IRunConfigurationAspect(RunConfiguration *runConfig);
|
explicit IRunConfigurationAspect(RunConfiguration *runConfig);
|
||||||
~IRunConfigurationAspect() override;
|
~IRunConfigurationAspect() override;
|
||||||
|
|
||||||
virtual IRunConfigurationAspect *create(RunConfiguration *runConfig) const = 0;
|
|
||||||
virtual IRunConfigurationAspect *clone(RunConfiguration *runConfig) const;
|
|
||||||
|
|
||||||
using RunConfigWidgetCreator = std::function<RunConfigWidget *()>;
|
using RunConfigWidgetCreator = std::function<RunConfigWidget *()>;
|
||||||
void setRunConfigWidgetCreator(const RunConfigWidgetCreator &runConfigWidgetCreator);
|
void setRunConfigWidgetCreator(const RunConfigWidgetCreator &runConfigWidgetCreator);
|
||||||
RunConfigWidget *createConfigurationWidget() const;
|
RunConfigWidget *createConfigurationWidget() const;
|
||||||
|
void copyFrom(IRunConfigurationAspect *other);
|
||||||
|
|
||||||
void setId(Core::Id id) { m_id = id; }
|
void setId(Core::Id id) { m_id = id; }
|
||||||
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
|
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
|
||||||
|
void setSettingsKey(const QString &settingsKey) { m_settingsKey = settingsKey; }
|
||||||
void setProjectSettings(ISettingsAspect *settings);
|
void setProjectSettings(ISettingsAspect *settings);
|
||||||
void setGlobalSettings(ISettingsAspect *settings);
|
void setGlobalSettings(ISettingsAspect *settings);
|
||||||
|
|
||||||
QString displayName() const { return m_displayName; }
|
|
||||||
Core::Id id() const { return m_id; }
|
Core::Id id() const { return m_id; }
|
||||||
|
QString displayName() const { return m_displayName; }
|
||||||
|
QString settingsKey() const { return m_settingsKey; }
|
||||||
bool isUsingGlobalSettings() const { return m_useGlobalSettings; }
|
bool isUsingGlobalSettings() const { return m_useGlobalSettings; }
|
||||||
void setUsingGlobalSettings(bool value);
|
void setUsingGlobalSettings(bool value);
|
||||||
void resetProjectToGlobalSettings();
|
void resetProjectToGlobalSettings();
|
||||||
@@ -133,6 +133,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
Core::Id m_id;
|
Core::Id m_id;
|
||||||
QString m_displayName;
|
QString m_displayName;
|
||||||
|
QString m_settingsKey; // Name of data in settings.
|
||||||
bool m_useGlobalSettings = false;
|
bool m_useGlobalSettings = false;
|
||||||
RunConfiguration *m_runConfiguration = nullptr;
|
RunConfiguration *m_runConfiguration = nullptr;
|
||||||
ISettingsAspect *m_projectSettings = nullptr; // Owned if present.
|
ISettingsAspect *m_projectSettings = nullptr; // Owned if present.
|
||||||
@@ -308,7 +309,7 @@ public:
|
|||||||
template <class RunConfig>
|
template <class RunConfig>
|
||||||
static RunConfig *cloneHelper(Target *target, const RunConfiguration *source) {
|
static RunConfig *cloneHelper(Target *target, const RunConfiguration *source) {
|
||||||
auto runConfig = new RunConfig(target);
|
auto runConfig = new RunConfig(target);
|
||||||
runConfig->copyFrom(static_cast<const RunConfig *>(source));
|
runConfig->copyFrom(source);
|
||||||
return runConfig;
|
return runConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,23 +46,12 @@ namespace ProjectExplorer {
|
|||||||
\class ProjectExplorer::TerminalAspect
|
\class ProjectExplorer::TerminalAspect
|
||||||
*/
|
*/
|
||||||
|
|
||||||
TerminalAspect::TerminalAspect(RunConfiguration *runConfig, const QString &key,
|
TerminalAspect::TerminalAspect(RunConfiguration *runConfig, const QString &key, bool useTerminal) :
|
||||||
bool useTerminal, bool userSet) :
|
IRunConfigurationAspect(runConfig), m_useTerminal(useTerminal)
|
||||||
IRunConfigurationAspect(runConfig),
|
|
||||||
m_useTerminal(useTerminal), m_userSet(userSet), m_checkBox(nullptr), m_key(key)
|
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Terminal"));
|
setDisplayName(tr("Terminal"));
|
||||||
setId("TerminalAspect");
|
setId("TerminalAspect");
|
||||||
}
|
setSettingsKey(key);
|
||||||
|
|
||||||
TerminalAspect *TerminalAspect::create(RunConfiguration *runConfig) const
|
|
||||||
{
|
|
||||||
return new TerminalAspect(runConfig, m_key, false, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
TerminalAspect *TerminalAspect::clone(RunConfiguration *runConfig) const
|
|
||||||
{
|
|
||||||
return new TerminalAspect(runConfig, m_key, m_useTerminal, m_userSet);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TerminalAspect::addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout)
|
void TerminalAspect::addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout)
|
||||||
@@ -80,8 +69,8 @@ void TerminalAspect::addToMainConfigurationWidget(QWidget *parent, QFormLayout *
|
|||||||
|
|
||||||
void TerminalAspect::fromMap(const QVariantMap &map)
|
void TerminalAspect::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
if (map.contains(m_key)) {
|
if (map.contains(settingsKey())) {
|
||||||
m_useTerminal = map.value(m_key).toBool();
|
m_useTerminal = map.value(settingsKey()).toBool();
|
||||||
m_userSet = true;
|
m_userSet = true;
|
||||||
} else {
|
} else {
|
||||||
m_userSet = false;
|
m_userSet = false;
|
||||||
@@ -91,7 +80,7 @@ void TerminalAspect::fromMap(const QVariantMap &map)
|
|||||||
void TerminalAspect::toMap(QVariantMap &data) const
|
void TerminalAspect::toMap(QVariantMap &data) const
|
||||||
{
|
{
|
||||||
if (m_userSet)
|
if (m_userSet)
|
||||||
data.insert(m_key, m_useTerminal);
|
data.insert(settingsKey(), m_useTerminal);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TerminalAspect::useTerminal() const
|
bool TerminalAspect::useTerminal() const
|
||||||
@@ -129,23 +118,11 @@ void TerminalAspect::setRunMode(ApplicationLauncher::Mode runMode)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
WorkingDirectoryAspect::WorkingDirectoryAspect(RunConfiguration *runConfig, const QString &key)
|
WorkingDirectoryAspect::WorkingDirectoryAspect(RunConfiguration *runConfig, const QString &key)
|
||||||
: IRunConfigurationAspect(runConfig), m_key(key)
|
: IRunConfigurationAspect(runConfig)
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Working Directory"));
|
setDisplayName(tr("Working Directory"));
|
||||||
setId("WorkingDirectoryAspect");
|
setId("WorkingDirectoryAspect");
|
||||||
}
|
setSettingsKey(key);
|
||||||
|
|
||||||
WorkingDirectoryAspect *WorkingDirectoryAspect::create(RunConfiguration *runConfig) const
|
|
||||||
{
|
|
||||||
return new WorkingDirectoryAspect(runConfig, m_key);
|
|
||||||
}
|
|
||||||
|
|
||||||
WorkingDirectoryAspect *WorkingDirectoryAspect::clone(RunConfiguration *runConfig) const
|
|
||||||
{
|
|
||||||
auto * const aspect = new WorkingDirectoryAspect(runConfig, m_key);
|
|
||||||
aspect->m_defaultWorkingDirectory = m_defaultWorkingDirectory;
|
|
||||||
aspect->m_workingDirectory = m_workingDirectory;
|
|
||||||
return aspect;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorkingDirectoryAspect::addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout)
|
void WorkingDirectoryAspect::addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout)
|
||||||
@@ -157,7 +134,7 @@ void WorkingDirectoryAspect::addToMainConfigurationWidget(QWidget *parent, QForm
|
|||||||
connect(m_resetButton.data(), &QAbstractButton::clicked, this, &WorkingDirectoryAspect::resetPath);
|
connect(m_resetButton.data(), &QAbstractButton::clicked, this, &WorkingDirectoryAspect::resetPath);
|
||||||
|
|
||||||
m_chooser = new PathChooser(parent);
|
m_chooser = new PathChooser(parent);
|
||||||
m_chooser->setHistoryCompleter(m_key);
|
m_chooser->setHistoryCompleter(settingsKey());
|
||||||
m_chooser->setExpectedKind(Utils::PathChooser::Directory);
|
m_chooser->setExpectedKind(Utils::PathChooser::Directory);
|
||||||
m_chooser->setPromptDialogTitle(tr("Select Working Directory"));
|
m_chooser->setPromptDialogTitle(tr("Select Working Directory"));
|
||||||
m_chooser->setBaseFileName(m_defaultWorkingDirectory);
|
m_chooser->setBaseFileName(m_defaultWorkingDirectory);
|
||||||
@@ -185,7 +162,7 @@ void WorkingDirectoryAspect::addToMainConfigurationWidget(QWidget *parent, QForm
|
|||||||
|
|
||||||
QString WorkingDirectoryAspect::keyForDefaultWd() const
|
QString WorkingDirectoryAspect::keyForDefaultWd() const
|
||||||
{
|
{
|
||||||
return m_key + QLatin1String(".default");
|
return settingsKey() + ".default";
|
||||||
}
|
}
|
||||||
|
|
||||||
void WorkingDirectoryAspect::resetPath()
|
void WorkingDirectoryAspect::resetPath()
|
||||||
@@ -195,7 +172,7 @@ void WorkingDirectoryAspect::resetPath()
|
|||||||
|
|
||||||
void WorkingDirectoryAspect::fromMap(const QVariantMap &map)
|
void WorkingDirectoryAspect::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_workingDirectory = FileName::fromString(map.value(m_key).toString());
|
m_workingDirectory = FileName::fromString(map.value(settingsKey()).toString());
|
||||||
m_defaultWorkingDirectory = FileName::fromString(map.value(keyForDefaultWd()).toString());
|
m_defaultWorkingDirectory = FileName::fromString(map.value(keyForDefaultWd()).toString());
|
||||||
|
|
||||||
if (m_workingDirectory.isEmpty())
|
if (m_workingDirectory.isEmpty())
|
||||||
@@ -204,9 +181,9 @@ void WorkingDirectoryAspect::fromMap(const QVariantMap &map)
|
|||||||
|
|
||||||
void WorkingDirectoryAspect::toMap(QVariantMap &data) const
|
void WorkingDirectoryAspect::toMap(QVariantMap &data) const
|
||||||
{
|
{
|
||||||
const QString wd
|
const QString wd = m_workingDirectory == m_defaultWorkingDirectory
|
||||||
= (m_workingDirectory == m_defaultWorkingDirectory) ? QString() : m_workingDirectory.toString();
|
? QString() : m_workingDirectory.toString();
|
||||||
data.insert(m_key, wd);
|
data.insert(settingsKey(), wd);
|
||||||
data.insert(keyForDefaultWd(), m_defaultWorkingDirectory.toString());
|
data.insert(keyForDefaultWd(), m_defaultWorkingDirectory.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,11 +234,12 @@ PathChooser *WorkingDirectoryAspect::pathChooser() const
|
|||||||
\class ProjectExplorer::ArgumentsAspect
|
\class ProjectExplorer::ArgumentsAspect
|
||||||
*/
|
*/
|
||||||
|
|
||||||
ArgumentsAspect::ArgumentsAspect(RunConfiguration *runConfig, const QString &key, const QString &arguments)
|
ArgumentsAspect::ArgumentsAspect(RunConfiguration *runConfig, const QString &key)
|
||||||
: IRunConfigurationAspect(runConfig), m_arguments(arguments), m_key(key)
|
: IRunConfigurationAspect(runConfig)
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Arguments"));
|
setDisplayName(tr("Arguments"));
|
||||||
setId("ArgumentsAspect");
|
setId("ArgumentsAspect");
|
||||||
|
setSettingsKey(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ArgumentsAspect::arguments() const
|
QString ArgumentsAspect::arguments() const
|
||||||
@@ -286,29 +264,19 @@ void ArgumentsAspect::setArguments(const QString &arguments)
|
|||||||
|
|
||||||
void ArgumentsAspect::fromMap(const QVariantMap &map)
|
void ArgumentsAspect::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_arguments = map.value(m_key).toString();
|
m_arguments = map.value(settingsKey()).toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArgumentsAspect::toMap(QVariantMap &map) const
|
void ArgumentsAspect::toMap(QVariantMap &map) const
|
||||||
{
|
{
|
||||||
map.insert(m_key, m_arguments);
|
map.insert(settingsKey(), m_arguments);
|
||||||
}
|
|
||||||
|
|
||||||
ArgumentsAspect *ArgumentsAspect::create(RunConfiguration *runConfig) const
|
|
||||||
{
|
|
||||||
return new ArgumentsAspect(runConfig, m_key);
|
|
||||||
}
|
|
||||||
|
|
||||||
ArgumentsAspect *ArgumentsAspect::clone(RunConfiguration *runConfig) const
|
|
||||||
{
|
|
||||||
return new ArgumentsAspect(runConfig, m_key, m_arguments);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ArgumentsAspect::addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout)
|
void ArgumentsAspect::addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout)
|
||||||
{
|
{
|
||||||
QTC_CHECK(!m_chooser);
|
QTC_CHECK(!m_chooser);
|
||||||
m_chooser = new FancyLineEdit(parent);
|
m_chooser = new FancyLineEdit(parent);
|
||||||
m_chooser->setHistoryCompleter(m_key);
|
m_chooser->setHistoryCompleter(settingsKey());
|
||||||
m_chooser->setText(m_arguments);
|
m_chooser->setText(m_arguments);
|
||||||
|
|
||||||
connect(m_chooser.data(), &QLineEdit::textChanged, this, &ArgumentsAspect::setArguments);
|
connect(m_chooser.data(), &QLineEdit::textChanged, this, &ArgumentsAspect::setArguments);
|
||||||
|
|||||||
@@ -33,7 +33,6 @@
|
|||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
class QCheckBox;
|
class QCheckBox;
|
||||||
class QFormLayout;
|
class QFormLayout;
|
||||||
class QLineEdit;
|
|
||||||
class QToolButton;
|
class QToolButton;
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
@@ -49,11 +48,8 @@ class PROJECTEXPLORER_EXPORT TerminalAspect : public IRunConfigurationAspect
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TerminalAspect(RunConfiguration *rc, const QString &key,
|
TerminalAspect(RunConfiguration *rc, const QString &settingsKey,
|
||||||
bool useTerminal = false, bool userSet = false);
|
bool useTerminal = false);
|
||||||
|
|
||||||
TerminalAspect *create(RunConfiguration *runConfig) const override;
|
|
||||||
TerminalAspect *clone(RunConfiguration *runConfig) const override;
|
|
||||||
|
|
||||||
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout);
|
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout);
|
||||||
|
|
||||||
@@ -75,7 +71,6 @@ private:
|
|||||||
bool m_useTerminal = false;
|
bool m_useTerminal = false;
|
||||||
bool m_userSet = false;
|
bool m_userSet = false;
|
||||||
QPointer<QCheckBox> m_checkBox; // Owned by RunConfigWidget
|
QPointer<QCheckBox> m_checkBox; // Owned by RunConfigWidget
|
||||||
QString m_key;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT WorkingDirectoryAspect : public IRunConfigurationAspect
|
class PROJECTEXPLORER_EXPORT WorkingDirectoryAspect : public IRunConfigurationAspect
|
||||||
@@ -83,10 +78,7 @@ class PROJECTEXPLORER_EXPORT WorkingDirectoryAspect : public IRunConfigurationAs
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit WorkingDirectoryAspect(RunConfiguration *runConfig, const QString &key);
|
explicit WorkingDirectoryAspect(RunConfiguration *runConfig, const QString &settingsKey);
|
||||||
|
|
||||||
WorkingDirectoryAspect *create(RunConfiguration *runConfig) const override;
|
|
||||||
WorkingDirectoryAspect *clone(RunConfiguration *runConfig) const override;
|
|
||||||
|
|
||||||
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout);
|
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout);
|
||||||
|
|
||||||
@@ -107,7 +99,6 @@ private:
|
|||||||
Utils::FileName m_defaultWorkingDirectory;
|
Utils::FileName m_defaultWorkingDirectory;
|
||||||
QPointer<Utils::PathChooser> m_chooser;
|
QPointer<Utils::PathChooser> m_chooser;
|
||||||
QPointer<QToolButton> m_resetButton;
|
QPointer<QToolButton> m_resetButton;
|
||||||
QString m_key;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT ArgumentsAspect : public IRunConfigurationAspect
|
class PROJECTEXPLORER_EXPORT ArgumentsAspect : public IRunConfigurationAspect
|
||||||
@@ -115,10 +106,7 @@ class PROJECTEXPLORER_EXPORT ArgumentsAspect : public IRunConfigurationAspect
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit ArgumentsAspect(RunConfiguration *runConfig, const QString &key, const QString &arguments = QString());
|
explicit ArgumentsAspect(RunConfiguration *runConfig, const QString &settingsKey);
|
||||||
|
|
||||||
ArgumentsAspect *create(RunConfiguration *runConfig) const override;
|
|
||||||
ArgumentsAspect *clone(RunConfiguration *runConfig) const override;
|
|
||||||
|
|
||||||
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout);
|
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout);
|
||||||
|
|
||||||
@@ -136,7 +124,6 @@ private:
|
|||||||
|
|
||||||
QString m_arguments;
|
QString m_arguments;
|
||||||
QPointer<Utils::FancyLineEdit> m_chooser;
|
QPointer<Utils::FancyLineEdit> m_chooser;
|
||||||
QString m_key;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace ProjectExplorer
|
} // namespace ProjectExplorer
|
||||||
|
|||||||
@@ -167,7 +167,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend class ProjectExplorer::IRunConfigurationFactory;
|
friend class ProjectExplorer::IRunConfigurationFactory;
|
||||||
void initialize(Core::Id id);
|
void initialize(Core::Id id);
|
||||||
void copyFrom(const PythonRunConfiguration *source);
|
|
||||||
|
|
||||||
QString defaultDisplayName() const;
|
QString defaultDisplayName() const;
|
||||||
|
|
||||||
@@ -198,13 +197,6 @@ void PythonRunConfiguration::initialize(Core::Id id)
|
|||||||
m_interpreter = exec.isEmpty() ? "python" : exec;
|
m_interpreter = exec.isEmpty() ? "python" : exec;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PythonRunConfiguration::copyFrom(const PythonRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(source);
|
|
||||||
m_interpreter = source->interpreter();
|
|
||||||
m_mainScript = source->m_mainScript;
|
|
||||||
}
|
|
||||||
|
|
||||||
QVariantMap PythonRunConfiguration::toMap() const
|
QVariantMap PythonRunConfiguration::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map(RunConfiguration::toMap());
|
QVariantMap map(RunConfiguration::toMap());
|
||||||
|
|||||||
@@ -144,21 +144,7 @@ void QbsRunConfiguration::initialize(Core::Id id)
|
|||||||
{
|
{
|
||||||
RunConfiguration::initialize(id);
|
RunConfiguration::initialize(id);
|
||||||
m_uniqueProductName = uniqueProductNameFromId(id);
|
m_uniqueProductName = uniqueProductNameFromId(id);
|
||||||
ctor();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QbsRunConfiguration::copyFrom(const QbsRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(source);
|
|
||||||
m_uniqueProductName = source->m_uniqueProductName;
|
|
||||||
m_currentInstallStep = nullptr; // no need to copy this, we will get if from the DC anyway.
|
|
||||||
m_currentBuildStepList = nullptr; // ditto
|
|
||||||
|
|
||||||
ctor();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QbsRunConfiguration::ctor()
|
|
||||||
{
|
|
||||||
setDefaultDisplayName(defaultDisplayName());
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
installStepChanged();
|
installStepChanged();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,15 +71,12 @@ signals:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void initialize(Core::Id id);
|
void initialize(Core::Id id);
|
||||||
void copyFrom(const QbsRunConfiguration *source);
|
|
||||||
|
|
||||||
void installStepChanged();
|
void installStepChanged();
|
||||||
void installStepToBeRemoved(int pos);
|
void installStepToBeRemoved(int pos);
|
||||||
QString baseWorkingDirectory() const;
|
QString baseWorkingDirectory() const;
|
||||||
QString defaultDisplayName();
|
QString defaultDisplayName();
|
||||||
|
|
||||||
void ctor();
|
|
||||||
|
|
||||||
void updateTarget();
|
void updateTarget();
|
||||||
|
|
||||||
QString m_uniqueProductName;
|
QString m_uniqueProductName;
|
||||||
|
|||||||
@@ -63,19 +63,6 @@ void QmakeAndroidRunConfiguration::initialize(Core::Id id)
|
|||||||
AndroidRunConfiguration::initialize(id);
|
AndroidRunConfiguration::initialize(id);
|
||||||
m_proFilePath = pathFromId(id);
|
m_proFilePath = pathFromId(id);
|
||||||
|
|
||||||
ctor();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmakeAndroidRunConfiguration::copyFrom(const QmakeAndroidRunConfiguration *source)
|
|
||||||
{
|
|
||||||
AndroidRunConfiguration::copyFrom(source);
|
|
||||||
m_proFilePath = source->m_proFilePath;
|
|
||||||
|
|
||||||
ctor();
|
|
||||||
}
|
|
||||||
|
|
||||||
void QmakeAndroidRunConfiguration::ctor()
|
|
||||||
{
|
|
||||||
setDefaultDisplayName(defaultDisplayName());
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
QTC_CHECK(!m_proFilePath.isEmpty());
|
QTC_CHECK(!m_proFilePath.isEmpty());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,14 +55,12 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend class ProjectExplorer::IRunConfigurationFactory;
|
friend class ProjectExplorer::IRunConfigurationFactory;
|
||||||
void initialize(Core::Id id);
|
void initialize(Core::Id id);
|
||||||
void copyFrom(const QmakeAndroidRunConfiguration *source);
|
|
||||||
|
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
QVariantMap toMap() const override;
|
QVariantMap toMap() const override;
|
||||||
QString defaultDisplayName();
|
QString defaultDisplayName();
|
||||||
|
|
||||||
QmakeProjectManager::QmakeProject *qmakeProject() const;
|
QmakeProjectManager::QmakeProject *qmakeProject() const;
|
||||||
void ctor();
|
|
||||||
|
|
||||||
mutable Utils::FileName m_proFilePath;
|
mutable Utils::FileName m_proFilePath;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -85,6 +85,12 @@ DesktopQmakeRunConfiguration::DesktopQmakeRunConfiguration(Target *target)
|
|||||||
addExtraAspect(new ArgumentsAspect(this, "Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"));
|
addExtraAspect(new ArgumentsAspect(this, "Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"));
|
||||||
addExtraAspect(new TerminalAspect(this, "Qt4ProjectManager.Qt4RunConfiguration.UseTerminal"));
|
addExtraAspect(new TerminalAspect(this, "Qt4ProjectManager.Qt4RunConfiguration.UseTerminal"));
|
||||||
addExtraAspect(new WorkingDirectoryAspect(this, "Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"));
|
addExtraAspect(new WorkingDirectoryAspect(this, "Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"));
|
||||||
|
|
||||||
|
QmakeProject *project = qmakeProject();
|
||||||
|
connect(project, &Project::parsingFinished,
|
||||||
|
this, &DesktopQmakeRunConfiguration::updateTargetInformation);
|
||||||
|
connect(project, &QmakeProject::proFilesEvaluated,
|
||||||
|
this, &DesktopQmakeRunConfiguration::proFileEvaluated);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopQmakeRunConfiguration::initialize(Core::Id id)
|
void DesktopQmakeRunConfiguration::initialize(Core::Id id)
|
||||||
@@ -92,17 +98,7 @@ void DesktopQmakeRunConfiguration::initialize(Core::Id id)
|
|||||||
RunConfiguration::initialize(id);
|
RunConfiguration::initialize(id);
|
||||||
m_proFilePath = pathFromId(id);
|
m_proFilePath = pathFromId(id);
|
||||||
|
|
||||||
ctor();
|
updateTargetInformation();
|
||||||
}
|
|
||||||
|
|
||||||
void DesktopQmakeRunConfiguration::copyFrom(const DesktopQmakeRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(source);
|
|
||||||
m_proFilePath = source->m_proFilePath;
|
|
||||||
m_isUsingDyldImageSuffix = source->m_isUsingDyldImageSuffix;
|
|
||||||
m_isUsingLibrarySearchPath = source->m_isUsingLibrarySearchPath;
|
|
||||||
|
|
||||||
ctor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopQmakeRunConfiguration::proFileEvaluated()
|
void DesktopQmakeRunConfiguration::proFileEvaluated()
|
||||||
@@ -129,19 +125,6 @@ void DesktopQmakeRunConfiguration::updateTargetInformation()
|
|||||||
emit effectiveTargetInformationChanged();
|
emit effectiveTargetInformationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DesktopQmakeRunConfiguration::ctor()
|
|
||||||
{
|
|
||||||
setDefaultDisplayName(defaultDisplayName());
|
|
||||||
|
|
||||||
QmakeProject *project = qmakeProject();
|
|
||||||
connect(project, &Project::parsingFinished,
|
|
||||||
this, &DesktopQmakeRunConfiguration::updateTargetInformation);
|
|
||||||
connect(project, &QmakeProject::proFilesEvaluated,
|
|
||||||
this, &DesktopQmakeRunConfiguration::proFileEvaluated);
|
|
||||||
|
|
||||||
updateTargetInformation();
|
|
||||||
}
|
|
||||||
|
|
||||||
//////
|
//////
|
||||||
/// DesktopQmakeRunConfigurationWidget
|
/// DesktopQmakeRunConfigurationWidget
|
||||||
/////
|
/////
|
||||||
|
|||||||
@@ -88,8 +88,6 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initialize(Core::Id id);
|
void initialize(Core::Id id);
|
||||||
void copyFrom(const DesktopQmakeRunConfiguration *source);
|
|
||||||
|
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -103,8 +101,6 @@ private:
|
|||||||
QmakeProject *qmakeProject() const;
|
QmakeProject *qmakeProject() const;
|
||||||
QmakeProFile *proFile() const;
|
QmakeProFile *proFile() const;
|
||||||
|
|
||||||
void ctor();
|
|
||||||
|
|
||||||
void updateTarget();
|
void updateTarget();
|
||||||
Utils::FileName m_proFilePath; // Full path to the Application Pro File
|
Utils::FileName m_proFilePath; // Full path to the Application Pro File
|
||||||
|
|
||||||
|
|||||||
@@ -46,11 +46,5 @@ QmlProfilerRunConfigurationAspect::QmlProfilerRunConfigurationAspect(
|
|||||||
setRunConfigWidgetCreator([this] { return new Debugger::AnalyzerRunConfigWidget(this); });
|
setRunConfigWidgetCreator([this] { return new Debugger::AnalyzerRunConfigWidget(this); });
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::IRunConfigurationAspect *QmlProfilerRunConfigurationAspect::create(
|
|
||||||
ProjectExplorer::RunConfiguration *runConfig) const
|
|
||||||
{
|
|
||||||
return new QmlProfilerRunConfigurationAspect(runConfig);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
} // QmlProfiler
|
} // QmlProfiler
|
||||||
|
|||||||
@@ -34,9 +34,6 @@ class QmlProfilerRunConfigurationAspect : public ProjectExplorer::IRunConfigurat
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QmlProfilerRunConfigurationAspect(ProjectExplorer::RunConfiguration *parent);
|
QmlProfilerRunConfigurationAspect(ProjectExplorer::RunConfiguration *parent);
|
||||||
|
|
||||||
ProjectExplorer::IRunConfigurationAspect *create(
|
|
||||||
ProjectExplorer::RunConfiguration *runConfig) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
|||||||
@@ -64,9 +64,4 @@ QmlProjectEnvironmentAspect::QmlProjectEnvironmentAspect(ProjectExplorer::RunCon
|
|||||||
ProjectExplorer::EnvironmentAspect(rc)
|
ProjectExplorer::EnvironmentAspect(rc)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
QmlProjectEnvironmentAspect *QmlProjectEnvironmentAspect::create(ProjectExplorer::RunConfiguration *parent) const
|
|
||||||
{
|
|
||||||
return new QmlProjectEnvironmentAspect(parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace QmlProjectManager
|
} // namespace QmlProjectManager
|
||||||
|
|||||||
@@ -35,11 +35,10 @@ class QmlProjectEnvironmentAspect : public ProjectExplorer::EnvironmentAspect
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
QmlProjectEnvironmentAspect(ProjectExplorer::RunConfiguration *rc);
|
QmlProjectEnvironmentAspect(ProjectExplorer::RunConfiguration *rc);
|
||||||
QmlProjectEnvironmentAspect *create(ProjectExplorer::RunConfiguration *parent) const;
|
|
||||||
|
|
||||||
QList<int> possibleBaseEnvironments() const;
|
QList<int> possibleBaseEnvironments() const override;
|
||||||
QString baseEnvironmentDisplayName(int base) const;
|
QString baseEnvironmentDisplayName(int base) const override;
|
||||||
Utils::Environment baseEnvironment() const;
|
Utils::Environment baseEnvironment() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum BaseEnvironmentBase {
|
enum BaseEnvironmentBase {
|
||||||
|
|||||||
@@ -79,17 +79,6 @@ void QmlProjectRunConfiguration::initialize(Id id)
|
|||||||
updateEnabledState();
|
updateEnabledState();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlProjectRunConfiguration::copyFrom(const QmlProjectRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(source);
|
|
||||||
m_currentFileFilename = source->m_currentFileFilename;
|
|
||||||
m_mainScriptFilename = source->m_mainScriptFilename;
|
|
||||||
m_scriptFile = source->m_scriptFile;
|
|
||||||
m_qmlViewerArgs = source->m_qmlViewerArgs;
|
|
||||||
|
|
||||||
updateEnabledState();
|
|
||||||
}
|
|
||||||
|
|
||||||
Runnable QmlProjectRunConfiguration::runnable() const
|
Runnable QmlProjectRunConfiguration::runnable() const
|
||||||
{
|
{
|
||||||
StandardRunnable r;
|
StandardRunnable r;
|
||||||
|
|||||||
@@ -78,8 +78,7 @@ signals:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
void initialize(Core::Id id);
|
void initialize(Core::Id id);
|
||||||
void copyFrom(const QmlProjectRunConfiguration *source);
|
bool fromMap(const QVariantMap &map) override;
|
||||||
virtual bool fromMap(const QVariantMap &map) override;
|
|
||||||
|
|
||||||
void changeCurrentFile(Core::IEditor* = 0);
|
void changeCurrentFile(Core::IEditor* = 0);
|
||||||
void updateEnabledState() final;
|
void updateEnabledState() final;
|
||||||
|
|||||||
@@ -45,17 +45,6 @@ QnxRunConfiguration::QnxRunConfiguration(Target *target)
|
|||||||
: RemoteLinuxRunConfiguration(target)
|
: RemoteLinuxRunConfiguration(target)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void QnxRunConfiguration::initialize(Core::Id id, const QString &targetName)
|
|
||||||
{
|
|
||||||
RemoteLinuxRunConfiguration::initialize(id, targetName);
|
|
||||||
}
|
|
||||||
|
|
||||||
void QnxRunConfiguration::copyFrom(const QnxRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RemoteLinuxRunConfiguration::copyFrom(source);
|
|
||||||
m_qtLibPath = source->m_qtLibPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
Runnable QnxRunConfiguration::runnable() const
|
Runnable QnxRunConfiguration::runnable() const
|
||||||
{
|
{
|
||||||
auto r = RemoteLinuxRunConfiguration::runnable().as<StandardRunnable>();
|
auto r = RemoteLinuxRunConfiguration::runnable().as<StandardRunnable>();
|
||||||
|
|||||||
@@ -37,17 +37,11 @@ class QnxRunConfiguration : public RemoteLinux::RemoteLinuxRunConfiguration
|
|||||||
public:
|
public:
|
||||||
explicit QnxRunConfiguration(ProjectExplorer::Target *target);
|
explicit QnxRunConfiguration(ProjectExplorer::Target *target);
|
||||||
|
|
||||||
ProjectExplorer::Runnable runnable() const override;
|
|
||||||
|
|
||||||
QWidget *createConfigurationWidget() override;
|
|
||||||
QVariantMap toMap() const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class ProjectExplorer::IRunConfigurationFactory;
|
ProjectExplorer::Runnable runnable() const override;
|
||||||
|
QWidget *createConfigurationWidget() override;
|
||||||
void copyFrom(const QnxRunConfiguration *source);
|
|
||||||
void initialize(Core::Id id, const QString &targetName);
|
|
||||||
|
|
||||||
|
QVariantMap toMap() const override;
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
|
|
||||||
QString m_qtLibPath;
|
QString m_qtLibPath;
|
||||||
|
|||||||
@@ -45,13 +45,11 @@ enum State { Inactive, Connecting, RunningUname, TestingPorts };
|
|||||||
class GenericLinuxDeviceTesterPrivate
|
class GenericLinuxDeviceTesterPrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GenericLinuxDeviceTesterPrivate() : connection(0), state(Inactive) {}
|
|
||||||
|
|
||||||
IDevice::ConstPtr deviceConfiguration;
|
IDevice::ConstPtr deviceConfiguration;
|
||||||
SshConnection *connection;
|
SshConnection *connection = nullptr;
|
||||||
SshRemoteProcess::Ptr process;
|
SshRemoteProcess::Ptr process;
|
||||||
DeviceUsedPortsGatherer portsGatherer;
|
DeviceUsedPortsGatherer portsGatherer;
|
||||||
State state;
|
State state = Inactive;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
@@ -105,11 +103,6 @@ void GenericLinuxDeviceTester::stopTest()
|
|||||||
setFinished(TestFailure);
|
setFinished(TestFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
DeviceUsedPortsGatherer *GenericLinuxDeviceTester::usedPortsGatherer() const
|
|
||||||
{
|
|
||||||
return &d->portsGatherer;
|
|
||||||
}
|
|
||||||
|
|
||||||
void GenericLinuxDeviceTester::handleConnected()
|
void GenericLinuxDeviceTester::handleConnected()
|
||||||
{
|
{
|
||||||
QTC_ASSERT(d->state == Connecting, return);
|
QTC_ASSERT(d->state == Connecting, return);
|
||||||
|
|||||||
@@ -29,10 +29,6 @@
|
|||||||
|
|
||||||
#include <projectexplorer/devicesupport/idevice.h>
|
#include <projectexplorer/devicesupport/idevice.h>
|
||||||
|
|
||||||
namespace ProjectExplorer { class DeviceUsedPortsGatherer; }
|
|
||||||
namespace QSsh { class SshConnection; }
|
|
||||||
namespace ProjectExplorer { class DeviceUsedPortsGatherer; }
|
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
|
||||||
namespace Internal { class GenericLinuxDeviceTesterPrivate; }
|
namespace Internal { class GenericLinuxDeviceTesterPrivate; }
|
||||||
@@ -48,8 +44,6 @@ public:
|
|||||||
void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration);
|
void testDevice(const ProjectExplorer::IDevice::ConstPtr &deviceConfiguration);
|
||||||
void stopTest();
|
void stopTest();
|
||||||
|
|
||||||
ProjectExplorer::DeviceUsedPortsGatherer *usedPortsGatherer() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void handleConnected();
|
void handleConnected();
|
||||||
void handleConnectionFailure();
|
void handleConnectionFailure();
|
||||||
|
|||||||
@@ -109,18 +109,6 @@ void RemoteLinuxCustomRunConfiguration::initialize()
|
|||||||
setDefaultDisplayName(runConfigDefaultDisplayName());
|
setDefaultDisplayName(runConfigDefaultDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxCustomRunConfiguration::copyFrom(const RemoteLinuxCustomRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(source);
|
|
||||||
|
|
||||||
m_localExecutable = source->m_localExecutable;
|
|
||||||
m_remoteExecutable = source->m_remoteExecutable;
|
|
||||||
m_arguments = source->m_arguments;
|
|
||||||
m_workingDirectory = source->m_workingDirectory;
|
|
||||||
|
|
||||||
setDefaultDisplayName(runConfigDefaultDisplayName());
|
|
||||||
}
|
|
||||||
|
|
||||||
bool RemoteLinuxCustomRunConfiguration::isConfigured() const
|
bool RemoteLinuxCustomRunConfiguration::isConfigured() const
|
||||||
{
|
{
|
||||||
return !m_remoteExecutable.isEmpty();
|
return !m_remoteExecutable.isEmpty();
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ public:
|
|||||||
explicit RemoteLinuxCustomRunConfiguration(ProjectExplorer::Target *target);
|
explicit RemoteLinuxCustomRunConfiguration(ProjectExplorer::Target *target);
|
||||||
|
|
||||||
void initialize();
|
void initialize();
|
||||||
void copyFrom(const RemoteLinuxCustomRunConfiguration *source);
|
|
||||||
|
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
QVariantMap toMap() const override;
|
QVariantMap toMap() const override;
|
||||||
|
|||||||
@@ -55,11 +55,6 @@ RemoteLinuxEnvironmentAspect::RemoteLinuxEnvironmentAspect(ProjectExplorer::RunC
|
|||||||
setRunConfigWidgetCreator([this] { return new RemoteLinuxEnvironmentAspectWidget(this); });
|
setRunConfigWidgetCreator([this] { return new RemoteLinuxEnvironmentAspectWidget(this); });
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxEnvironmentAspect *RemoteLinuxEnvironmentAspect::create(ProjectExplorer::RunConfiguration *parent) const
|
|
||||||
{
|
|
||||||
return new RemoteLinuxEnvironmentAspect(parent);
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<int> RemoteLinuxEnvironmentAspect::possibleBaseEnvironments() const
|
QList<int> RemoteLinuxEnvironmentAspect::possibleBaseEnvironments() const
|
||||||
{
|
{
|
||||||
return QList<int>() << static_cast<int>(RemoteBaseEnvironment)
|
return QList<int>() << static_cast<int>(RemoteBaseEnvironment)
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ class REMOTELINUX_EXPORT RemoteLinuxEnvironmentAspect : public ProjectExplorer::
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
RemoteLinuxEnvironmentAspect(ProjectExplorer::RunConfiguration *rc);
|
RemoteLinuxEnvironmentAspect(ProjectExplorer::RunConfiguration *rc);
|
||||||
RemoteLinuxEnvironmentAspect *create(ProjectExplorer::RunConfiguration *parent) const override;
|
|
||||||
|
|
||||||
QList<int> possibleBaseEnvironments() const override;
|
QList<int> possibleBaseEnvironments() const override;
|
||||||
QString baseEnvironmentDisplayName(int base) const override;
|
QString baseEnvironmentDisplayName(int base) const override;
|
||||||
|
|||||||
@@ -88,14 +88,6 @@ void RemoteLinuxRunConfiguration::initialize(Core::Id id, const QString &targetN
|
|||||||
setDefaultDisplayName(defaultDisplayName());
|
setDefaultDisplayName(defaultDisplayName());
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxRunConfiguration::copyFrom(const RemoteLinuxRunConfiguration *source)
|
|
||||||
{
|
|
||||||
RunConfiguration::copyFrom(source);
|
|
||||||
*d = *source->d;
|
|
||||||
|
|
||||||
setDefaultDisplayName(defaultDisplayName());
|
|
||||||
}
|
|
||||||
|
|
||||||
RemoteLinuxRunConfiguration::~RemoteLinuxRunConfiguration()
|
RemoteLinuxRunConfiguration::~RemoteLinuxRunConfiguration()
|
||||||
{
|
{
|
||||||
delete d;
|
delete d;
|
||||||
|
|||||||
@@ -75,7 +75,6 @@ signals:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initialize(Core::Id id, const QString &targetName);
|
void initialize(Core::Id id, const QString &targetName);
|
||||||
void copyFrom(const RemoteLinuxRunConfiguration *source);
|
|
||||||
|
|
||||||
bool fromMap(const QVariantMap &map) override;
|
bool fromMap(const QVariantMap &map) override;
|
||||||
QString defaultDisplayName();
|
QString defaultDisplayName();
|
||||||
|
|||||||
@@ -103,11 +103,6 @@ public:
|
|||||||
resetProjectToGlobalSettings();
|
resetProjectToGlobalSettings();
|
||||||
setRunConfigWidgetCreator([this] { return new Debugger::AnalyzerRunConfigWidget(this); });
|
setRunConfigWidgetCreator([this] { return new Debugger::AnalyzerRunConfigWidget(this); });
|
||||||
}
|
}
|
||||||
|
|
||||||
ValgrindRunConfigurationAspect *create(RunConfiguration *parent) const override
|
|
||||||
{
|
|
||||||
return new ValgrindRunConfigurationAspect(parent);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
ValgrindPlugin::~ValgrindPlugin()
|
ValgrindPlugin::~ValgrindPlugin()
|
||||||
|
|||||||
@@ -959,9 +959,10 @@ public:
|
|||||||
|
|
||||||
struct TempStuff
|
struct TempStuff
|
||||||
{
|
{
|
||||||
TempStuff(const char *tag) : buildTemp(QString("qt_tst_dumpers_") + tag + '_')
|
TempStuff(const char *tag)
|
||||||
|
: buildTemp(QDir::currentPath() + "/qt_tst_dumpers_" + tag + "_XXXXXX")
|
||||||
{
|
{
|
||||||
buildPath = QDir::currentPath() + '/' + buildTemp.path();
|
buildPath = buildTemp.path();
|
||||||
buildTemp.setAutoRemove(false);
|
buildTemp.setAutoRemove(false);
|
||||||
QVERIFY(!buildPath.isEmpty());
|
QVERIFY(!buildPath.isEmpty());
|
||||||
}
|
}
|
||||||
@@ -5335,6 +5336,22 @@ void tst_Dumpers::dumper_data()
|
|||||||
+ Check("fbad", "(unknown:24) (24)", "Flags");
|
+ Check("fbad", "(unknown:24) (24)", "Flags");
|
||||||
|
|
||||||
|
|
||||||
|
QTest::newRow("EnumInClass")
|
||||||
|
<< Data("struct E {\n"
|
||||||
|
" enum Enum1 { a1, b1, c1 };\n"
|
||||||
|
" typedef enum Enum2 { a2, b2, c2 } Enum2;\n"
|
||||||
|
" typedef enum { a3, b3, c3 } Enum3;\n"
|
||||||
|
" Enum1 e1 = Enum1(c1 | b1);\n"
|
||||||
|
" Enum2 e2 = Enum2(c2 | b2);\n"
|
||||||
|
" Enum3 e3 = Enum3(c3 | b3);\n"
|
||||||
|
"};\n",
|
||||||
|
"E e;\n")
|
||||||
|
+ GdbEngine
|
||||||
|
+ Check("e.e1", "E::b1 | E::c1 (0x0003)", "E::Enum1")
|
||||||
|
+ Check("e.e2", "E::b2 | E::c2 (0x0003)", "E::Enum2")
|
||||||
|
+ Check("e.e3", "E::b3 | E::c3 (0x0003)", "E::Enum3");
|
||||||
|
|
||||||
|
|
||||||
QTest::newRow("Array")
|
QTest::newRow("Array")
|
||||||
<< Data("",
|
<< Data("",
|
||||||
"double a1[3][3];\n"
|
"double a1[3][3];\n"
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ HOOK_SUB_PROCESSES=false
|
|||||||
IMPLICITAUTSTART=0
|
IMPLICITAUTSTART=0
|
||||||
LANGUAGE=Python
|
LANGUAGE=Python
|
||||||
OBJECTMAP=../objects.map
|
OBJECTMAP=../objects.map
|
||||||
TEST_CASES=tst_codepasting tst_designer_autocomplete tst_designer_edit tst_designer_goto_slot tst_external_sort tst_git_clone tst_git_first_commit tst_git_local
|
TEST_CASES=tst_codepasting tst_designer_autocomplete tst_designer_edit tst_designer_goto_slot tst_git_clone tst_git_first_commit tst_git_local tst_sort
|
||||||
VERSION=2
|
VERSION=2
|
||||||
WRAPPERS=Qt
|
WRAPPERS=Qt
|
||||||
|
|||||||
@@ -31,16 +31,13 @@ def main():
|
|||||||
return
|
return
|
||||||
invokeMenuItem("File", "Open File or Project...")
|
invokeMenuItem("File", "Open File or Project...")
|
||||||
unsortedFile = os.path.join(os.getcwd(), "testdata", "unsorted.txt")
|
unsortedFile = os.path.join(os.getcwd(), "testdata", "unsorted.txt")
|
||||||
locale = None
|
sorted = readFile(os.path.join(os.getcwd(), "testdata", "sorted.txt"))
|
||||||
if not platform.system() in ('Windows', 'Microsoft'):
|
|
||||||
locale = {"LC_ALL":"C"}
|
|
||||||
sorted = getOutputFromCmdline(["sort", unsortedFile], locale).replace("\r", "")
|
|
||||||
selectFromFileDialog(unsortedFile)
|
selectFromFileDialog(unsortedFile)
|
||||||
editor = waitForObject("{type='TextEditor::TextEditorWidget' unnamed='1' "
|
editor = waitForObject("{type='TextEditor::TextEditorWidget' unnamed='1' "
|
||||||
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}", 3000)
|
"visible='1' window=':Qt Creator_Core::Internal::MainWindow'}", 3000)
|
||||||
placeCursorToLine(editor, "bbb")
|
placeCursorToLine(editor, "bbb")
|
||||||
invokeMenuItem("Edit", "Select All")
|
invokeMenuItem("Edit", "Select All")
|
||||||
invokeMenuItem("Tools", "External", "Text", "Sort Selection")
|
invokeMenuItem("Edit", "Advanced", "Sort Selected Lines")
|
||||||
test.verify(waitFor("str(editor.plainText) == sorted", 2000),
|
test.verify(waitFor("str(editor.plainText) == sorted", 2000),
|
||||||
"Verify that sorted text\n%s\nmatches the expected text\n%s" % (editor.plainText, sorted))
|
"Verify that sorted text\n%s\nmatches the expected text\n%s" % (editor.plainText, sorted))
|
||||||
invokeMenuItem('File', 'Revert "unsorted.txt" to Saved')
|
invokeMenuItem('File', 'Revert "unsorted.txt" to Saved')
|
||||||
25
tests/system/suite_tools/tst_sort/testdata/sorted.txt
vendored
Normal file
25
tests/system/suite_tools/tst_sort/testdata/sorted.txt
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
|
||||||
|
aa
|
||||||
|
!
|
||||||
|
*
|
||||||
|
-
|
||||||
|
12,345
|
||||||
|
12.345
|
||||||
|
1A
|
||||||
|
1a
|
||||||
|
1a
|
||||||
|
?
|
||||||
|
AAA
|
||||||
|
_
|
||||||
|
a
|
||||||
|
a | ls
|
||||||
|
aa
|
||||||
|
aa a
|
||||||
|
aaa
|
||||||
|
aaa1
|
||||||
|
aaa2
|
||||||
|
ab
|
||||||
|
aba
|
||||||
|
b > nul
|
||||||
|
bbb
|
||||||
|
c >> dir
|
||||||
Reference in New Issue
Block a user