Commit cff2c1df authored by dt's avatar dt
Browse files

QMakeStep some API cleanup

Rename arguments to allArguments(), qmakeArguments() to userArguments()
parent 6e01bf60
......@@ -120,8 +120,6 @@ public:
// restores a BuildConfiguration with the name and adds it to the project
virtual BuildConfiguration *restore() const = 0;
// TODO display name unique, in different ways
signals:
void availableCreationTypesChanged();
};
......
......@@ -58,7 +58,7 @@ QMakeStep::QMakeStep(ProjectExplorer::BuildConfiguration *bc)
QMakeStep::QMakeStep(QMakeStep *bs, ProjectExplorer::BuildConfiguration *bc)
: AbstractMakeStep(bs, bc),
m_forced(false),
m_qmakeArgs(bs->m_qmakeArgs)
m_userArgs(bs->m_userArgs)
{
}
......@@ -72,9 +72,9 @@ Qt4BuildConfiguration *QMakeStep::qt4BuildConfiguration() const
return static_cast<Qt4BuildConfiguration *>(buildConfiguration());
}
QStringList QMakeStep::arguments()
QStringList QMakeStep::allArguments()
{
QStringList additonalArguments = m_qmakeArgs;
QStringList additonalArguments = m_userArgs;
Qt4BuildConfiguration *bc = qt4BuildConfiguration();
QStringList arguments;
arguments << buildConfiguration()->project()->file()->fileName();
......@@ -129,7 +129,7 @@ bool QMakeStep::init()
return false;
}
QStringList args = arguments();
QStringList args = allArguments();
QString workingDirectory = qt4bc->buildDirectory();
QString program = qtVersion->qmakeCommand();
......@@ -220,24 +220,24 @@ bool QMakeStep::processFinished(int exitCode, QProcess::ExitStatus status)
void QMakeStep::setQMakeArguments(const QStringList &arguments)
{
m_qmakeArgs = arguments;
m_userArgs = arguments;
emit changed();
}
QStringList QMakeStep::qmakeArguments()
QStringList QMakeStep::userArguments()
{
return m_qmakeArgs;
return m_userArgs;
}
void QMakeStep::restoreFromLocalMap(const QMap<QString, QVariant> &map)
{
m_qmakeArgs = map.value("qmakeArgs").toStringList();
m_userArgs = map.value("qmakeArgs").toStringList();
AbstractProcessStep::restoreFromLocalMap(map);
}
void QMakeStep::storeIntoLocalMap(QMap<QString, QVariant> &map)
{
map["qmakeArgs"] = m_qmakeArgs;
map["qmakeArgs"] = m_userArgs;
AbstractProcessStep::storeIntoLocalMap(map);
}
......@@ -276,7 +276,7 @@ void QMakeStepConfigWidget::updateTitleLabel()
return;
}
QStringList args = m_step->arguments();
QStringList args = m_step->allArguments();
// We don't want the full path to the .pro file
const QString projectFileName = m_step->buildConfiguration()->project()->file()->fileName();
int index = args.indexOf(projectFileName);
......@@ -331,7 +331,7 @@ void QMakeStepConfigWidget::update()
void QMakeStepConfigWidget::init()
{
QString qmakeArgs = ProjectExplorer::Environment::joinArgumentList(m_step->qmakeArguments());
QString qmakeArgs = ProjectExplorer::Environment::joinArgumentList(m_step->userArguments());
m_ui.qmakeAdditonalArgumentsLineEdit->setText(qmakeArgs);
ProjectExplorer::BuildConfiguration *bc = m_step->buildConfiguration();
bool debug = QtVersion::QmakeBuildConfig(bc->value("buildConfiguration").toInt()) & QtVersion::DebugBuild;
......@@ -346,7 +346,7 @@ void QMakeStepConfigWidget::updateEffectiveQMakeCall()
const QtVersion *qtVersion = qt4bc->qtVersion();
if (qtVersion) {
QString program = QFileInfo(qtVersion->qmakeCommand()).fileName();
m_ui.qmakeArgumentsEdit->setPlainText(program + QLatin1Char(' ') + ProjectExplorer::Environment::joinArgumentList(m_step->arguments()));
m_ui.qmakeArgumentsEdit->setPlainText(program + QLatin1Char(' ') + ProjectExplorer::Environment::joinArgumentList(m_step->allArguments()));
} else {
m_ui.qmakeArgumentsEdit->setPlainText(tr("No valid Qt version set."));
}
......
......@@ -78,11 +78,11 @@ public:
virtual QString displayName();
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
virtual bool immutable() const;
QStringList arguments();
void setForced(bool b);
bool forced();
QStringList qmakeArguments();
QStringList allArguments();
QStringList userArguments();
void setQMakeArguments(const QStringList &arguments);
virtual void restoreFromLocalMap(const QMap<QString, QVariant> &map);
......@@ -100,7 +100,7 @@ private:
QStringList m_lastEnv;
bool m_forced;
bool m_needToRunQMake; // set in init(), read in run()
QStringList m_qmakeArgs;
QStringList m_userArgs;
};
......
......@@ -284,7 +284,7 @@ bool Qt4BuildConfiguration::compareBuildConfigurationToImportFrom(const QString
// now compare arguments lists
// we have to compare without the spec/platform cmd argument
// and compare that on its own
QString actualSpec = extractSpecFromArgumentList(qs->qmakeArguments(), workingDirectory, version);
QString actualSpec = extractSpecFromArgumentList(qs->userArguments(), workingDirectory, version);
if (actualSpec.isEmpty()) {
// Easy one the user has choosen not to override the settings
actualSpec = version->mkspec();
......@@ -292,7 +292,7 @@ bool Qt4BuildConfiguration::compareBuildConfigurationToImportFrom(const QString
QString parsedSpec = extractSpecFromArgumentList(result.second, workingDirectory, version);
QStringList actualArgs = removeSpecFromArgumentList(qs->qmakeArguments());
QStringList actualArgs = removeSpecFromArgumentList(qs->userArguments());
QStringList parsedArgs = removeSpecFromArgumentList(result.second);
if (debug) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment