forked from qt-creator/qt-creator
ProjectExplorer: Remove ExecutableAspect
It's unused, wrong, and unwanted. Change-Id: I1ee5474338b4d7ea9455fa2c3b9671d6a83042c9 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
@@ -287,64 +287,4 @@ void ArgumentsAspect::addToMainConfigurationWidget(QWidget *parent, QFormLayout
|
||||
layout->addRow(tr("Command line arguments:"), m_chooser);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\class ProjectExplorer::ExecutableAspect
|
||||
*/
|
||||
|
||||
ExecutableAspect::ExecutableAspect(RunConfiguration *runConfig, const QString &key, const QString &executable)
|
||||
: IRunConfigurationAspect(runConfig), m_executable(executable), m_chooser(0), m_key(key)
|
||||
{
|
||||
setDisplayName(tr("Executable"));
|
||||
setId("ExecutableAspect");
|
||||
}
|
||||
|
||||
QString ExecutableAspect::executable() const
|
||||
{
|
||||
return runConfiguration()->macroExpander()->expandProcessArgs(m_executable);
|
||||
}
|
||||
|
||||
QString ExecutableAspect::unexpandedExecutable() const
|
||||
{
|
||||
return m_executable;
|
||||
}
|
||||
|
||||
void ExecutableAspect::setExectuable(const QString &executable)
|
||||
{
|
||||
m_executable = executable;
|
||||
if (m_chooser)
|
||||
m_chooser->setText(m_executable);
|
||||
}
|
||||
|
||||
void ExecutableAspect::fromMap(const QVariantMap &map)
|
||||
{
|
||||
m_executable = map.value(m_key).toBool();
|
||||
}
|
||||
|
||||
void ExecutableAspect::toMap(QVariantMap &map) const
|
||||
{
|
||||
map.insert(m_key, m_executable);
|
||||
}
|
||||
|
||||
ExecutableAspect *ExecutableAspect::create(RunConfiguration *runConfig) const
|
||||
{
|
||||
return new ExecutableAspect(runConfig, m_key);
|
||||
}
|
||||
|
||||
ExecutableAspect *ExecutableAspect::clone(RunConfiguration *runConfig) const
|
||||
{
|
||||
return new ExecutableAspect(runConfig, m_key, m_executable);
|
||||
}
|
||||
|
||||
void ExecutableAspect::addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout)
|
||||
{
|
||||
QTC_CHECK(!m_chooser);
|
||||
m_chooser = new FancyLineEdit(parent);
|
||||
m_chooser->setHistoryCompleter(m_key);
|
||||
|
||||
connect(m_chooser, &QLineEdit::textChanged, this, &ExecutableAspect::setExectuable);
|
||||
|
||||
layout->addRow(tr("Command line arguments:"), m_chooser);
|
||||
}
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
@@ -138,32 +138,6 @@ private:
|
||||
QString m_key;
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT ExecutableAspect : public IRunConfigurationAspect
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ExecutableAspect(RunConfiguration *runConfig, const QString &key, const QString &executable = QString());
|
||||
|
||||
ExecutableAspect *create(RunConfiguration *runConfig) const override;
|
||||
ExecutableAspect *clone(RunConfiguration *runConfig) const override;
|
||||
|
||||
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout);
|
||||
|
||||
QString executable() const;
|
||||
QString unexpandedExecutable() const;
|
||||
|
||||
void setExectuable(const QString &executable);
|
||||
|
||||
private:
|
||||
void fromMap(const QVariantMap &map) override;
|
||||
void toMap(QVariantMap &map) const override;
|
||||
|
||||
QString m_executable;
|
||||
Utils::FancyLineEdit *m_chooser;
|
||||
QString m_key;
|
||||
};
|
||||
|
||||
} // namespace ProjectExplorer
|
||||
|
||||
#endif // RUNCONFIGURATION_ASPECTS_H
|
||||
|
||||
Reference in New Issue
Block a user