forked from qt-creator/qt-creator
BuildStep: Do not use QLatin1String/QLatin1Char in BuildSteps
Change-Id: I287831a9151ba867eec443206235c7e07a6176e8 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -110,7 +110,7 @@ bool AutogenStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
pp->setEnvironment(bc->environment());
|
pp->setEnvironment(bc->environment());
|
||||||
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
||||||
pp->setWorkingDirectory(projectDir);
|
pp->setWorkingDirectory(projectDir);
|
||||||
pp->setCommand(QLatin1String("./autogen.sh"));
|
pp->setCommand("./autogen.sh");
|
||||||
pp->setArguments(additionalArguments());
|
pp->setArguments(additionalArguments());
|
||||||
pp->resolveAll();
|
pp->resolveAll();
|
||||||
|
|
||||||
@@ -123,9 +123,9 @@ void AutogenStep::run(QFutureInterface<bool> &fi)
|
|||||||
|
|
||||||
// Check whether we need to run autogen.sh
|
// Check whether we need to run autogen.sh
|
||||||
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
||||||
const QFileInfo configureInfo(projectDir + QLatin1String("/configure"));
|
const QFileInfo configureInfo(projectDir + "/configure");
|
||||||
const QFileInfo configureAcInfo(projectDir + QLatin1String("/configure.ac"));
|
const QFileInfo configureAcInfo(projectDir + "/configure.ac");
|
||||||
const QFileInfo makefileAmInfo(projectDir + QLatin1String("/Makefile.am"));
|
const QFileInfo makefileAmInfo(projectDir + "/Makefile.am");
|
||||||
|
|
||||||
if (!configureInfo.exists()
|
if (!configureInfo.exists()
|
||||||
|| configureInfo.lastModified() < configureAcInfo.lastModified()
|
|| configureInfo.lastModified() < configureAcInfo.lastModified()
|
||||||
@@ -173,13 +173,13 @@ QVariantMap AutogenStep::toMap() const
|
|||||||
{
|
{
|
||||||
QVariantMap map(AbstractProcessStep::toMap());
|
QVariantMap map(AbstractProcessStep::toMap());
|
||||||
|
|
||||||
map.insert(QLatin1String(AUTOGEN_ADDITIONAL_ARGUMENTS_KEY), m_additionalArguments);
|
map.insert(AUTOGEN_ADDITIONAL_ARGUMENTS_KEY, m_additionalArguments);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AutogenStep::fromMap(const QVariantMap &map)
|
bool AutogenStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_additionalArguments = map.value(QLatin1String(AUTOGEN_ADDITIONAL_ARGUMENTS_KEY)).toString();
|
m_additionalArguments = map.value(AUTOGEN_ADDITIONAL_ARGUMENTS_KEY).toString();
|
||||||
|
|
||||||
return BuildStep::fromMap(map);
|
return BuildStep::fromMap(map);
|
||||||
}
|
}
|
||||||
@@ -226,7 +226,7 @@ void AutogenStepConfigWidget::updateDetails()
|
|||||||
param.setEnvironment(bc->environment());
|
param.setEnvironment(bc->environment());
|
||||||
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
||||||
param.setWorkingDirectory(projectDir);
|
param.setWorkingDirectory(projectDir);
|
||||||
param.setCommand(QLatin1String("./autogen.sh"));
|
param.setCommand("./autogen.sh");
|
||||||
param.setArguments(m_autogenStep->additionalArguments());
|
param.setArguments(m_autogenStep->additionalArguments());
|
||||||
m_summaryText = param.summary(displayName());
|
m_summaryText = param.summary(displayName());
|
||||||
emit updateSummary();
|
emit updateSummary();
|
||||||
|
@@ -111,7 +111,7 @@ bool AutoreconfStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
pp->setEnvironment(bc->environment());
|
pp->setEnvironment(bc->environment());
|
||||||
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
||||||
pp->setWorkingDirectory(projectDir);
|
pp->setWorkingDirectory(projectDir);
|
||||||
pp->setCommand(QLatin1String("autoreconf"));
|
pp->setCommand("autoreconf");
|
||||||
pp->setArguments(additionalArguments());
|
pp->setArguments(additionalArguments());
|
||||||
pp->resolveAll();
|
pp->resolveAll();
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ void AutoreconfStep::run(QFutureInterface<bool> &fi)
|
|||||||
// Check whether we need to run autoreconf
|
// Check whether we need to run autoreconf
|
||||||
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
||||||
|
|
||||||
if (!QFileInfo::exists(projectDir + QLatin1String("/configure")))
|
if (!QFileInfo::exists(projectDir + "/configure"))
|
||||||
m_runAutoreconf = true;
|
m_runAutoreconf = true;
|
||||||
|
|
||||||
if (!m_runAutoreconf) {
|
if (!m_runAutoreconf) {
|
||||||
@@ -168,13 +168,13 @@ QVariantMap AutoreconfStep::toMap() const
|
|||||||
{
|
{
|
||||||
QVariantMap map = AbstractProcessStep::toMap();
|
QVariantMap map = AbstractProcessStep::toMap();
|
||||||
|
|
||||||
map.insert(QLatin1String(AUTORECONF_ADDITIONAL_ARGUMENTS_KEY), m_additionalArguments);
|
map.insert(AUTORECONF_ADDITIONAL_ARGUMENTS_KEY, m_additionalArguments);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AutoreconfStep::fromMap(const QVariantMap &map)
|
bool AutoreconfStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_additionalArguments = map.value(QLatin1String(AUTORECONF_ADDITIONAL_ARGUMENTS_KEY)).toString();
|
m_additionalArguments = map.value(AUTORECONF_ADDITIONAL_ARGUMENTS_KEY).toString();
|
||||||
|
|
||||||
return BuildStep::fromMap(map);
|
return BuildStep::fromMap(map);
|
||||||
}
|
}
|
||||||
@@ -221,7 +221,7 @@ void AutoreconfStepConfigWidget::updateDetails()
|
|||||||
param.setEnvironment(bc->environment());
|
param.setEnvironment(bc->environment());
|
||||||
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
||||||
param.setWorkingDirectory(projectDir);
|
param.setWorkingDirectory(projectDir);
|
||||||
param.setCommand(QLatin1String("autoreconf"));
|
param.setCommand("autoreconf");
|
||||||
param.setArguments(m_autoreconfStep->additionalArguments());
|
param.setArguments(m_autoreconfStep->additionalArguments());
|
||||||
m_summaryText = param.summary(displayName());
|
m_summaryText = param.summary(displayName());
|
||||||
emit updateSummary();
|
emit updateSummary();
|
||||||
|
@@ -58,9 +58,9 @@ static QString projectDirRelativeToBuildDir(BuildConfiguration *bc) {
|
|||||||
QString projDirToBuildDir = buildDir.relativeFilePath(
|
QString projDirToBuildDir = buildDir.relativeFilePath(
|
||||||
bc->target()->project()->projectDirectory().toString());
|
bc->target()->project()->projectDirectory().toString());
|
||||||
if (projDirToBuildDir.isEmpty())
|
if (projDirToBuildDir.isEmpty())
|
||||||
return QLatin1String("./");
|
return "./";
|
||||||
if (!projDirToBuildDir.endsWith(QLatin1Char('/')))
|
if (!projDirToBuildDir.endsWith('/'))
|
||||||
projDirToBuildDir.append(QLatin1Char('/'));
|
projDirToBuildDir.append('/');
|
||||||
return projDirToBuildDir;
|
return projDirToBuildDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ bool ConfigureStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
pp->setMacroExpander(bc->macroExpander());
|
pp->setMacroExpander(bc->macroExpander());
|
||||||
pp->setEnvironment(bc->environment());
|
pp->setEnvironment(bc->environment());
|
||||||
pp->setWorkingDirectory(bc->buildDirectory().toString());
|
pp->setWorkingDirectory(bc->buildDirectory().toString());
|
||||||
pp->setCommand(projectDirRelativeToBuildDir(bc) + QLatin1String("configure"));
|
pp->setCommand(projectDirRelativeToBuildDir(bc) + "configure");
|
||||||
pp->setArguments(additionalArguments());
|
pp->setArguments(additionalArguments());
|
||||||
pp->resolveAll();
|
pp->resolveAll();
|
||||||
|
|
||||||
@@ -138,8 +138,8 @@ void ConfigureStep::run(QFutureInterface<bool>& fi)
|
|||||||
|
|
||||||
//Check whether we need to run configure
|
//Check whether we need to run configure
|
||||||
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
const QString projectDir(bc->target()->project()->projectDirectory().toString());
|
||||||
const QFileInfo configureInfo(projectDir + QLatin1String("/configure"));
|
const QFileInfo configureInfo(projectDir + "/configure");
|
||||||
const QFileInfo configStatusInfo(bc->buildDirectory().toString() + QLatin1String("/config.status"));
|
const QFileInfo configStatusInfo(bc->buildDirectory().toString() + "/config.status");
|
||||||
|
|
||||||
if (!configStatusInfo.exists()
|
if (!configStatusInfo.exists()
|
||||||
|| configStatusInfo.lastModified() < configureInfo.lastModified()) {
|
|| configStatusInfo.lastModified() < configureInfo.lastModified()) {
|
||||||
@@ -191,13 +191,13 @@ QVariantMap ConfigureStep::toMap() const
|
|||||||
{
|
{
|
||||||
QVariantMap map = AbstractProcessStep::toMap();
|
QVariantMap map = AbstractProcessStep::toMap();
|
||||||
|
|
||||||
map.insert(QLatin1String(CONFIGURE_ADDITIONAL_ARGUMENTS_KEY), m_additionalArguments);
|
map.insert(CONFIGURE_ADDITIONAL_ARGUMENTS_KEY, m_additionalArguments);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ConfigureStep::fromMap(const QVariantMap &map)
|
bool ConfigureStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_additionalArguments = map.value(QLatin1String(CONFIGURE_ADDITIONAL_ARGUMENTS_KEY)).toString();
|
m_additionalArguments = map.value(CONFIGURE_ADDITIONAL_ARGUMENTS_KEY).toString();
|
||||||
|
|
||||||
return BuildStep::fromMap(map);
|
return BuildStep::fromMap(map);
|
||||||
}
|
}
|
||||||
@@ -245,7 +245,7 @@ void ConfigureStepConfigWidget::updateDetails()
|
|||||||
param.setMacroExpander(bc->macroExpander());
|
param.setMacroExpander(bc->macroExpander());
|
||||||
param.setEnvironment(bc->environment());
|
param.setEnvironment(bc->environment());
|
||||||
param.setWorkingDirectory(bc->buildDirectory().toString());
|
param.setWorkingDirectory(bc->buildDirectory().toString());
|
||||||
param.setCommand(projectDirRelativeToBuildDir(bc) + QLatin1String("configure"));
|
param.setCommand(projectDirRelativeToBuildDir(bc) + "configure");
|
||||||
param.setArguments(m_configureStep->additionalArguments());
|
param.setArguments(m_configureStep->additionalArguments());
|
||||||
m_summaryText = param.summaryInWorkdir(displayName());
|
m_summaryText = param.summaryInWorkdir(displayName());
|
||||||
emit updateSummary();
|
emit updateSummary();
|
||||||
|
@@ -60,7 +60,7 @@ const char MAKE_STEP_ADDITIONAL_ARGUMENTS_KEY[] = "AutotoolsProjectManager.MakeS
|
|||||||
// MakeStepFactory class
|
// MakeStepFactory class
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
MakeStepFactory::MakeStepFactory(QObject *parent) : IBuildStepFactory(parent)
|
MakeStepFactory::MakeStepFactory(QObject *parent) : IBuildStepFactory(parent)
|
||||||
{ setObjectName(QLatin1String("Autotools::MakeStepFactory")); }
|
{ setObjectName("Autotools::MakeStepFactory"); }
|
||||||
|
|
||||||
QList<BuildStepInfo> MakeStepFactory::availableSteps(BuildStepList *parent) const
|
QList<BuildStepInfo> MakeStepFactory::availableSteps(BuildStepList *parent) const
|
||||||
{
|
{
|
||||||
@@ -198,17 +198,17 @@ QVariantMap MakeStep::toMap() const
|
|||||||
{
|
{
|
||||||
QVariantMap map = AbstractProcessStep::toMap();
|
QVariantMap map = AbstractProcessStep::toMap();
|
||||||
|
|
||||||
map.insert(QLatin1String(BUILD_TARGETS_KEY), m_buildTargets);
|
map.insert(BUILD_TARGETS_KEY, m_buildTargets);
|
||||||
map.insert(QLatin1String(MAKE_STEP_ADDITIONAL_ARGUMENTS_KEY), m_additionalArguments);
|
map.insert(MAKE_STEP_ADDITIONAL_ARGUMENTS_KEY, m_additionalArguments);
|
||||||
map.insert(QLatin1String(CLEAN_KEY), m_clean);
|
map.insert(CLEAN_KEY, m_clean);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MakeStep::fromMap(const QVariantMap &map)
|
bool MakeStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_buildTargets = map.value(QLatin1String(BUILD_TARGETS_KEY)).toStringList();
|
m_buildTargets = map.value(BUILD_TARGETS_KEY).toStringList();
|
||||||
m_additionalArguments = map.value(QLatin1String(MAKE_STEP_ADDITIONAL_ARGUMENTS_KEY)).toString();
|
m_additionalArguments = map.value(MAKE_STEP_ADDITIONAL_ARGUMENTS_KEY).toString();
|
||||||
m_clean = map.value(QLatin1String(CLEAN_KEY)).toBool();
|
m_clean = map.value(CLEAN_KEY).toBool();
|
||||||
|
|
||||||
return BuildStep::fromMap(map);
|
return BuildStep::fromMap(map);
|
||||||
}
|
}
|
||||||
@@ -269,7 +269,7 @@ void MakeStepConfigWidget::updateDetails()
|
|||||||
param.setArguments(arguments);
|
param.setArguments(arguments);
|
||||||
m_summaryText = param.summary(displayName());
|
m_summaryText = param.summary(displayName());
|
||||||
} else {
|
} else {
|
||||||
m_summaryText = QLatin1String("<b>") + ToolChainKitInformation::msgNoToolChainInTarget() + QLatin1String("</b>");
|
m_summaryText = "<b>" + ToolChainKitInformation::msgNoToolChainInTarget() + "</b>";
|
||||||
}
|
}
|
||||||
|
|
||||||
emit updateSummary();
|
emit updateSummary();
|
||||||
|
@@ -71,7 +71,7 @@ const char ADD_RUNCONFIGURATION_TEXT[] = "Current executable";
|
|||||||
|
|
||||||
static bool isCurrentExecutableTarget(const QString &target)
|
static bool isCurrentExecutableTarget(const QString &target)
|
||||||
{
|
{
|
||||||
return target == QLatin1String(ADD_RUNCONFIGURATION_TEXT);
|
return target == ADD_RUNCONFIGURATION_TEXT;
|
||||||
}
|
}
|
||||||
|
|
||||||
CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl) :
|
CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl) :
|
||||||
@@ -95,9 +95,9 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, CMakeBuildStep *bs) :
|
|||||||
|
|
||||||
void CMakeBuildStep::ctor(BuildStepList *bsl)
|
void CMakeBuildStep::ctor(BuildStepList *bsl)
|
||||||
{
|
{
|
||||||
m_percentProgress = QRegExp(QLatin1String("^\\[\\s*(\\d*)%\\]"));
|
m_percentProgress = QRegExp("^\\[\\s*(\\d*)%\\]");
|
||||||
m_ninjaProgress = QRegExp(QLatin1String("^\\[\\s*(\\d*)/\\s*(\\d*)"));
|
m_ninjaProgress = QRegExp("^\\[\\s*(\\d*)/\\s*(\\d*)");
|
||||||
m_ninjaProgressString = QLatin1String("[%f/%t "); // ninja: [33/100
|
m_ninjaProgressString = "[%f/%t "; // ninja: [33/100
|
||||||
//: Default display name for the cmake make step.
|
//: Default display name for the cmake make step.
|
||||||
setDefaultDisplayName(tr("CMake Build"));
|
setDefaultDisplayName(tr("CMake Build"));
|
||||||
|
|
||||||
@@ -150,23 +150,23 @@ QVariantMap CMakeBuildStep::toMap() const
|
|||||||
{
|
{
|
||||||
QVariantMap map(AbstractProcessStep::toMap());
|
QVariantMap map(AbstractProcessStep::toMap());
|
||||||
// Use QStringList for compatibility with old files
|
// Use QStringList for compatibility with old files
|
||||||
map.insert(QLatin1String(BUILD_TARGETS_KEY), QStringList(m_buildTarget));
|
map.insert(BUILD_TARGETS_KEY, QStringList(m_buildTarget));
|
||||||
map.insert(QLatin1String(TOOL_ARGUMENTS_KEY), m_toolArguments);
|
map.insert(TOOL_ARGUMENTS_KEY, m_toolArguments);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CMakeBuildStep::fromMap(const QVariantMap &map)
|
bool CMakeBuildStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
if (map.value(QLatin1String(CLEAN_KEY), false).toBool()) {
|
if (map.value(CLEAN_KEY, false).toBool()) {
|
||||||
m_buildTarget = CMakeBuildStep::cleanTarget();
|
m_buildTarget = CMakeBuildStep::cleanTarget();
|
||||||
} else {
|
} else {
|
||||||
const QStringList targetList = map.value(QLatin1String(BUILD_TARGETS_KEY)).toStringList();
|
const QStringList targetList = map.value(BUILD_TARGETS_KEY).toStringList();
|
||||||
if (!targetList.isEmpty())
|
if (!targetList.isEmpty())
|
||||||
m_buildTarget = targetList.last();
|
m_buildTarget = targetList.last();
|
||||||
m_toolArguments = map.value(QLatin1String(TOOL_ARGUMENTS_KEY)).toString();
|
m_toolArguments = map.value(TOOL_ARGUMENTS_KEY).toString();
|
||||||
}
|
}
|
||||||
if (map.value(QLatin1String(ADD_RUNCONFIGURATION_ARGUMENT_KEY), false).toBool())
|
if (map.value(ADD_RUNCONFIGURATION_ARGUMENT_KEY, false).toBool())
|
||||||
m_buildTarget = QLatin1String(ADD_RUNCONFIGURATION_TEXT);
|
m_buildTarget = ADD_RUNCONFIGURATION_TEXT;
|
||||||
|
|
||||||
return BuildStep::fromMap(map);
|
return BuildStep::fromMap(map);
|
||||||
}
|
}
|
||||||
@@ -241,8 +241,8 @@ bool CMakeBuildStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
pp->setMacroExpander(bc->macroExpander());
|
pp->setMacroExpander(bc->macroExpander());
|
||||||
Utils::Environment env = bc->environment();
|
Utils::Environment env = bc->environment();
|
||||||
Utils::Environment::setupEnglishOutput(&env);
|
Utils::Environment::setupEnglishOutput(&env);
|
||||||
if (!env.value(QLatin1String("NINJA_STATUS")).startsWith(m_ninjaProgressString))
|
if (!env.value("NINJA_STATUS").startsWith(m_ninjaProgressString))
|
||||||
env.set(QLatin1String("NINJA_STATUS"), m_ninjaProgressString + QLatin1String("%o/sec] "));
|
env.set("NINJA_STATUS", m_ninjaProgressString + "%o/sec] ");
|
||||||
pp->setEnvironment(env);
|
pp->setEnvironment(env);
|
||||||
pp->setWorkingDirectory(bc->buildDirectory().toString());
|
pp->setWorkingDirectory(bc->buildDirectory().toString());
|
||||||
pp->setCommand(cmakeCommand());
|
pp->setCommand(cmakeCommand());
|
||||||
@@ -384,8 +384,8 @@ QString CMakeBuildStep::allArguments(const CMakeRunConfiguration *rc) const
|
|||||||
{
|
{
|
||||||
QString arguments;
|
QString arguments;
|
||||||
|
|
||||||
Utils::QtcProcess::addArg(&arguments, QLatin1String("--build"));
|
Utils::QtcProcess::addArg(&arguments, "--build");
|
||||||
Utils::QtcProcess::addArg(&arguments, QLatin1String("."));
|
Utils::QtcProcess::addArg(&arguments, ".");
|
||||||
|
|
||||||
QString target;
|
QString target;
|
||||||
|
|
||||||
@@ -393,17 +393,17 @@ QString CMakeBuildStep::allArguments(const CMakeRunConfiguration *rc) const
|
|||||||
if (rc)
|
if (rc)
|
||||||
target = rc->buildSystemTarget();
|
target = rc->buildSystemTarget();
|
||||||
else
|
else
|
||||||
target = QLatin1String("<i><") + tr(ADD_RUNCONFIGURATION_TEXT) + QLatin1String("></i>");
|
target = "<i><" + tr(ADD_RUNCONFIGURATION_TEXT) + "></i>";
|
||||||
} else {
|
} else {
|
||||||
target = m_buildTarget;
|
target = m_buildTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::QtcProcess::addArg(&arguments, QLatin1String("--target"));
|
Utils::QtcProcess::addArg(&arguments, "--target");
|
||||||
Utils::QtcProcess::addArg(&arguments, target);
|
Utils::QtcProcess::addArg(&arguments, target);
|
||||||
|
|
||||||
if (!m_toolArguments.isEmpty()) {
|
if (!m_toolArguments.isEmpty()) {
|
||||||
Utils::QtcProcess::addArg(&arguments, QLatin1String("--"));
|
Utils::QtcProcess::addArg(&arguments, "--");
|
||||||
arguments += QLatin1Char(' ') + m_toolArguments;
|
arguments += ' ' + m_toolArguments;
|
||||||
}
|
}
|
||||||
|
|
||||||
return arguments;
|
return arguments;
|
||||||
|
@@ -130,7 +130,7 @@ BuildStepConfigWidget *NimCompilerBuildStep::createConfigWidget()
|
|||||||
bool NimCompilerBuildStep::fromMap(const QVariantMap &map)
|
bool NimCompilerBuildStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
AbstractProcessStep::fromMap(map);
|
AbstractProcessStep::fromMap(map);
|
||||||
m_userCompilerOptions = map[Constants::C_NIMCOMPILERBUILDSTEP_USERCOMPILEROPTIONS].toString().split(QLatin1Char('|'));
|
m_userCompilerOptions = map[Constants::C_NIMCOMPILERBUILDSTEP_USERCOMPILEROPTIONS].toString().split('|');
|
||||||
m_defaultOptions = static_cast<DefaultBuildOptions>(map[Constants::C_NIMCOMPILERBUILDSTEP_DEFAULTBUILDOPTIONS].toInt());
|
m_defaultOptions = static_cast<DefaultBuildOptions>(map[Constants::C_NIMCOMPILERBUILDSTEP_DEFAULTBUILDOPTIONS].toInt());
|
||||||
m_targetNimFile = FileName::fromString(map[Constants::C_NIMCOMPILERBUILDSTEP_TARGETNIMFILE].toString());
|
m_targetNimFile = FileName::fromString(map[Constants::C_NIMCOMPILERBUILDSTEP_TARGETNIMFILE].toString());
|
||||||
updateProcessParameters();
|
updateProcessParameters();
|
||||||
@@ -140,7 +140,7 @@ bool NimCompilerBuildStep::fromMap(const QVariantMap &map)
|
|||||||
QVariantMap NimCompilerBuildStep::toMap() const
|
QVariantMap NimCompilerBuildStep::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap result = AbstractProcessStep::toMap();
|
QVariantMap result = AbstractProcessStep::toMap();
|
||||||
result[Constants::C_NIMCOMPILERBUILDSTEP_USERCOMPILEROPTIONS] = m_userCompilerOptions.join(QLatin1Char('|'));
|
result[Constants::C_NIMCOMPILERBUILDSTEP_USERCOMPILEROPTIONS] = m_userCompilerOptions.join('|');
|
||||||
result[Constants::C_NIMCOMPILERBUILDSTEP_DEFAULTBUILDOPTIONS] = m_defaultOptions;
|
result[Constants::C_NIMCOMPILERBUILDSTEP_DEFAULTBUILDOPTIONS] = m_defaultOptions;
|
||||||
result[Constants::C_NIMCOMPILERBUILDSTEP_TARGETNIMFILE] = m_targetNimFile.toString();
|
result[Constants::C_NIMCOMPILERBUILDSTEP_TARGETNIMFILE] = m_targetNimFile.toString();
|
||||||
return result;
|
return result;
|
||||||
|
@@ -136,14 +136,14 @@ void BuildStep::ctor()
|
|||||||
|
|
||||||
bool BuildStep::fromMap(const QVariantMap &map)
|
bool BuildStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_enabled = map.value(QLatin1String(buildStepEnabledKey), true).toBool();
|
m_enabled = map.value(buildStepEnabledKey, true).toBool();
|
||||||
return ProjectConfiguration::fromMap(map);
|
return ProjectConfiguration::fromMap(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariantMap BuildStep::toMap() const
|
QVariantMap BuildStep::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map = ProjectConfiguration::toMap();
|
QVariantMap map = ProjectConfiguration::toMap();
|
||||||
map.insert(QLatin1String(buildStepEnabledKey), m_enabled);
|
map.insert(buildStepEnabledKey, m_enabled);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -59,9 +59,9 @@ AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::
|
|||||||
bool AndroidPackageInstallationStep::init(QList<const BuildStep *> &earlierSteps)
|
bool AndroidPackageInstallationStep::init(QList<const BuildStep *> &earlierSteps)
|
||||||
{
|
{
|
||||||
ProjectExplorer::BuildConfiguration *bc = buildConfiguration();
|
ProjectExplorer::BuildConfiguration *bc = buildConfiguration();
|
||||||
QString dirPath = bc->buildDirectory().appendPath(QLatin1String(Android::Constants::ANDROID_BUILDDIRECTORY)).toString();
|
QString dirPath = bc->buildDirectory().appendPath(Android::Constants::ANDROID_BUILDDIRECTORY).toString();
|
||||||
if (Utils::HostOsInfo::isWindowsHost())
|
if (Utils::HostOsInfo::isWindowsHost())
|
||||||
if (bc->environment().searchInPath(QLatin1String("sh.exe")).isEmpty())
|
if (bc->environment().searchInPath("sh.exe").isEmpty())
|
||||||
dirPath = QDir::toNativeSeparators(dirPath);
|
dirPath = QDir::toNativeSeparators(dirPath);
|
||||||
|
|
||||||
ProjectExplorer::ToolChain *tc
|
ProjectExplorer::ToolChain *tc
|
||||||
@@ -88,9 +88,9 @@ bool AndroidPackageInstallationStep::init(QList<const BuildStep *> &earlierSteps
|
|||||||
|
|
||||||
m_androidDirsToClean.clear();
|
m_androidDirsToClean.clear();
|
||||||
// don't remove gradle's cache, it takes ages to rebuild it.
|
// don't remove gradle's cache, it takes ages to rebuild it.
|
||||||
if (!QFile::exists(dirPath + QLatin1String("/build.xml")) && Android::AndroidManager::useGradle(target())) {
|
if (!QFile::exists(dirPath + "/build.xml") && Android::AndroidManager::useGradle(target())) {
|
||||||
m_androidDirsToClean << dirPath + QLatin1String("/assets");
|
m_androidDirsToClean << dirPath + "/assets";
|
||||||
m_androidDirsToClean << dirPath + QLatin1String("/libs");
|
m_androidDirsToClean << dirPath + "/libs";
|
||||||
} else {
|
} else {
|
||||||
m_androidDirsToClean << dirPath;
|
m_androidDirsToClean << dirPath;
|
||||||
}
|
}
|
||||||
|
@@ -129,22 +129,22 @@ bool QmakeAndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
QString command = version->qmakeProperty("QT_HOST_BINS");
|
QString command = version->qmakeProperty("QT_HOST_BINS");
|
||||||
if (!command.endsWith(QLatin1Char('/')))
|
if (!command.endsWith('/'))
|
||||||
command += QLatin1Char('/');
|
command += '/';
|
||||||
command += QLatin1String("androiddeployqt");
|
command += "androiddeployqt";
|
||||||
if (Utils::HostOsInfo::isWindowsHost())
|
if (Utils::HostOsInfo::isWindowsHost())
|
||||||
command += QLatin1String(".exe");
|
command += ".exe";
|
||||||
|
|
||||||
QString deploymentMethod;
|
QString deploymentMethod;
|
||||||
if (m_deployAction == MinistroDeployment)
|
if (m_deployAction == MinistroDeployment)
|
||||||
deploymentMethod = QLatin1String("ministro");
|
deploymentMethod = "ministro";
|
||||||
else if (m_deployAction == DebugDeployment)
|
else if (m_deployAction == DebugDeployment)
|
||||||
deploymentMethod = QLatin1String("debug");
|
deploymentMethod = "debug";
|
||||||
else if (m_deployAction == BundleLibrariesDeployment)
|
else if (m_deployAction == BundleLibrariesDeployment)
|
||||||
deploymentMethod = QLatin1String("bundled");
|
deploymentMethod = "bundled";
|
||||||
|
|
||||||
ProjectExplorer::BuildConfiguration *bc = buildConfiguration();
|
ProjectExplorer::BuildConfiguration *bc = buildConfiguration();
|
||||||
QString outputDir = bc->buildDirectory().appendPath(QLatin1String(Constants::ANDROID_BUILDDIRECTORY)).toString();
|
QString outputDir = bc->buildDirectory().appendPath(Constants::ANDROID_BUILDDIRECTORY).toString();
|
||||||
|
|
||||||
const auto *pro = static_cast<QmakeProjectManager::QmakeProject *>(project());
|
const auto *pro = static_cast<QmakeProjectManager::QmakeProject *>(project());
|
||||||
const QmakeProjectManager::QmakeProFileNode *node = pro->rootProjectNode()->findProFileFor(proFilePathForInputFile());
|
const QmakeProjectManager::QmakeProFileNode *node = pro->rootProjectNode()->findProFileFor(proFilePathForInputFile());
|
||||||
@@ -165,43 +165,31 @@ bool QmakeAndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList arguments;
|
QStringList arguments = {"--input", inputFile,
|
||||||
arguments << QLatin1String("--input")
|
"--output", outputDir,
|
||||||
<< inputFile
|
"--deployment", deploymentMethod,
|
||||||
<< QLatin1String("--output")
|
"--android-platform", AndroidManager::buildTargetSDK(target()),
|
||||||
<< outputDir
|
"--jdk", AndroidConfigurations::currentConfig().openJDKLocation().toString()};
|
||||||
<< QLatin1String("--deployment")
|
|
||||||
<< deploymentMethod
|
|
||||||
<< QLatin1String("--android-platform")
|
|
||||||
<< AndroidManager::buildTargetSDK(target())
|
|
||||||
<< QLatin1String("--jdk")
|
|
||||||
<< AndroidConfigurations::currentConfig().openJDKLocation().toString();
|
|
||||||
|
|
||||||
if (m_verbose)
|
if (m_verbose)
|
||||||
arguments << QLatin1String("--verbose");
|
arguments << "--verbose";
|
||||||
|
|
||||||
if (m_useGradle)
|
if (m_useGradle)
|
||||||
arguments << QLatin1String("--gradle");
|
arguments << "--gradle";
|
||||||
else
|
else
|
||||||
arguments << QLatin1String("--ant")
|
arguments << "--ant" << AndroidConfigurations::currentConfig().antToolPath().toString();
|
||||||
<< AndroidConfigurations::currentConfig().antToolPath().toString();
|
|
||||||
|
|
||||||
|
|
||||||
QStringList argumentsPasswordConcealed = arguments;
|
QStringList argumentsPasswordConcealed = arguments;
|
||||||
|
|
||||||
if (m_signPackage) {
|
if (m_signPackage) {
|
||||||
arguments << QLatin1String("--sign")
|
arguments << "--sign" << m_keystorePath.toString() << m_certificateAlias
|
||||||
<< m_keystorePath.toString()
|
<< "--storepass" << m_keystorePasswd;
|
||||||
<< m_certificateAlias
|
argumentsPasswordConcealed << "--sign" << "******"
|
||||||
<< QLatin1String("--storepass")
|
<< "--storepass" << "******";
|
||||||
<< m_keystorePasswd;
|
|
||||||
argumentsPasswordConcealed << QLatin1String("--sign") << QLatin1String("******")
|
|
||||||
<< QLatin1String("--storepass") << QLatin1String("******");
|
|
||||||
if (!m_certificatePasswd.isEmpty()) {
|
if (!m_certificatePasswd.isEmpty()) {
|
||||||
arguments << QLatin1String("--keypass")
|
arguments << "--keypass" << m_certificatePasswd;
|
||||||
<< m_certificatePasswd;
|
argumentsPasswordConcealed << "--keypass" << "******";
|
||||||
argumentsPasswordConcealed << QLatin1String("--keypass")
|
|
||||||
<< QLatin1String("******");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -210,9 +198,9 @@ bool QmakeAndroidBuildApkStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
// params (e.g. --sign) to choose not to add gdbserver
|
// params (e.g. --sign) to choose not to add gdbserver
|
||||||
if (version->qtVersion() >= QtSupport::QtVersionNumber(5, 6, 0)) {
|
if (version->qtVersion() >= QtSupport::QtVersionNumber(5, 6, 0)) {
|
||||||
if (m_addDebugger || bc->buildType() == ProjectExplorer::BuildConfiguration::Debug)
|
if (m_addDebugger || bc->buildType() == ProjectExplorer::BuildConfiguration::Debug)
|
||||||
arguments << QLatin1String("--gdbserver");
|
arguments << "--gdbserver";
|
||||||
else
|
else
|
||||||
arguments << QLatin1String("--no-gdbserver");
|
arguments << "--no-gdbserver";
|
||||||
}
|
}
|
||||||
|
|
||||||
ProjectExplorer::ProcessParameters *pp = processParameters();
|
ProjectExplorer::ProcessParameters *pp = processParameters();
|
||||||
|
@@ -127,10 +127,10 @@ QString MakeStep::effectiveMakeCommand() const
|
|||||||
QVariantMap MakeStep::toMap() const
|
QVariantMap MakeStep::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map(AbstractProcessStep::toMap());
|
QVariantMap map(AbstractProcessStep::toMap());
|
||||||
map.insert(QLatin1String(MAKE_ARGUMENTS_KEY), m_userArgs);
|
map.insert(MAKE_ARGUMENTS_KEY, m_userArgs);
|
||||||
map.insert(QLatin1String(MAKE_COMMAND_KEY), m_makeCmd);
|
map.insert(MAKE_COMMAND_KEY, m_makeCmd);
|
||||||
map.insert(QLatin1String(CLEAN_KEY), m_clean);
|
map.insert(CLEAN_KEY, m_clean);
|
||||||
map.insert(QLatin1String(AUTOMATICLY_ADDED_MAKE_ARGUMENTS_KEY), automaticallyAddedArguments());
|
map.insert(AUTOMATICLY_ADDED_MAKE_ARGUMENTS_KEY, automaticallyAddedArguments());
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,20 +139,20 @@ QStringList MakeStep::automaticallyAddedArguments() const
|
|||||||
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
|
||||||
if (!tc || tc->targetAbi().binaryFormat() == Abi::PEFormat)
|
if (!tc || tc->targetAbi().binaryFormat() == Abi::PEFormat)
|
||||||
return QStringList();
|
return QStringList();
|
||||||
return QStringList() << QLatin1String("-w") << QLatin1String("-r");
|
return QStringList() << "-w" << "-r";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MakeStep::fromMap(const QVariantMap &map)
|
bool MakeStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_makeCmd = map.value(QLatin1String(MAKE_COMMAND_KEY)).toString();
|
m_makeCmd = map.value(MAKE_COMMAND_KEY).toString();
|
||||||
m_userArgs = map.value(QLatin1String(MAKE_ARGUMENTS_KEY)).toString();
|
m_userArgs = map.value(MAKE_ARGUMENTS_KEY).toString();
|
||||||
m_clean = map.value(QLatin1String(CLEAN_KEY)).toBool();
|
m_clean = map.value(CLEAN_KEY).toBool();
|
||||||
QStringList oldAddedArgs
|
QStringList oldAddedArgs
|
||||||
= map.value(QLatin1String(AUTOMATICLY_ADDED_MAKE_ARGUMENTS_KEY)).toStringList();
|
= map.value(AUTOMATICLY_ADDED_MAKE_ARGUMENTS_KEY).toStringList();
|
||||||
foreach (const QString &newArg, automaticallyAddedArguments()) {
|
foreach (const QString &newArg, automaticallyAddedArguments()) {
|
||||||
if (oldAddedArgs.contains(newArg))
|
if (oldAddedArgs.contains(newArg))
|
||||||
continue;
|
continue;
|
||||||
m_userArgs.prepend(newArg + QLatin1Char(' '));
|
m_userArgs.prepend(newArg + ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
return AbstractProcessStep::fromMap(map);
|
return AbstractProcessStep::fromMap(map);
|
||||||
@@ -199,28 +199,28 @@ bool MakeStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
if (subProFile) {
|
if (subProFile) {
|
||||||
QString makefile = subProFile->makefile();
|
QString makefile = subProFile->makefile();
|
||||||
if (makefile.isEmpty())
|
if (makefile.isEmpty())
|
||||||
makefile = QLatin1String("Makefile");
|
makefile = "Makefile";
|
||||||
// Use Makefile.Debug and Makefile.Release
|
// Use Makefile.Debug and Makefile.Release
|
||||||
// for file builds, since the rules for that are
|
// for file builds, since the rules for that are
|
||||||
// only in those files.
|
// only in those files.
|
||||||
if (subProFile->isDebugAndRelease() && bc->fileNodeBuild()) {
|
if (subProFile->isDebugAndRelease() && bc->fileNodeBuild()) {
|
||||||
if (bc->buildType() == QmakeBuildConfiguration::Debug)
|
if (bc->buildType() == QmakeBuildConfiguration::Debug)
|
||||||
makefile += QLatin1String(".Debug");
|
makefile += ".Debug";
|
||||||
else
|
else
|
||||||
makefile += QLatin1String(".Release");
|
makefile += ".Release";
|
||||||
}
|
}
|
||||||
if (makefile != QLatin1String("Makefile")) {
|
if (makefile != "Makefile") {
|
||||||
Utils::QtcProcess::addArg(&args, QLatin1String("-f"));
|
Utils::QtcProcess::addArg(&args, "-f");
|
||||||
Utils::QtcProcess::addArg(&args, makefile);
|
Utils::QtcProcess::addArg(&args, makefile);
|
||||||
}
|
}
|
||||||
m_makeFileToCheck = QDir(workingDirectory).filePath(makefile);
|
m_makeFileToCheck = QDir(workingDirectory).filePath(makefile);
|
||||||
} else {
|
} else {
|
||||||
if (!bc->makefile().isEmpty()) {
|
if (!bc->makefile().isEmpty()) {
|
||||||
Utils::QtcProcess::addArg(&args, QLatin1String("-f"));
|
Utils::QtcProcess::addArg(&args, "-f");
|
||||||
Utils::QtcProcess::addArg(&args, bc->makefile());
|
Utils::QtcProcess::addArg(&args, bc->makefile());
|
||||||
m_makeFileToCheck = QDir(workingDirectory).filePath(bc->makefile());
|
m_makeFileToCheck = QDir(workingDirectory).filePath(bc->makefile());
|
||||||
} else {
|
} else {
|
||||||
m_makeFileToCheck = QDir(workingDirectory).filePath(QLatin1String("Makefile"));
|
m_makeFileToCheck = QDir(workingDirectory).filePath("Makefile");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,16 +231,16 @@ bool MakeStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
objectsDir = subProFile->buildDir(bc).toString();
|
objectsDir = subProFile->buildDir(bc).toString();
|
||||||
if (subProFile->isDebugAndRelease()) {
|
if (subProFile->isDebugAndRelease()) {
|
||||||
if (bc->buildType() == QmakeBuildConfiguration::Debug)
|
if (bc->buildType() == QmakeBuildConfiguration::Debug)
|
||||||
objectsDir += QLatin1String("/debug");
|
objectsDir += "/debug";
|
||||||
else
|
else
|
||||||
objectsDir += QLatin1String("/release");
|
objectsDir += "/release";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
QString relObjectsDir = QDir(pp->workingDirectory()).relativeFilePath(objectsDir);
|
QString relObjectsDir = QDir(pp->workingDirectory()).relativeFilePath(objectsDir);
|
||||||
if (relObjectsDir == QLatin1String("."))
|
if (relObjectsDir == ".")
|
||||||
relObjectsDir.clear();
|
relObjectsDir.clear();
|
||||||
if (!relObjectsDir.isEmpty())
|
if (!relObjectsDir.isEmpty())
|
||||||
relObjectsDir += QLatin1Char('/');
|
relObjectsDir += '/';
|
||||||
QString objectFile = relObjectsDir +
|
QString objectFile = relObjectsDir +
|
||||||
bc->fileNodeBuild()->filePath().toFileInfo().baseName() +
|
bc->fileNodeBuild()->filePath().toFileInfo().baseName() +
|
||||||
subProFile->objectExtension();
|
subProFile->objectExtension();
|
||||||
@@ -252,8 +252,8 @@ bool MakeStep::init(QList<const BuildStep *> &earlierSteps)
|
|||||||
if (tc && makeCommand().isEmpty()) {
|
if (tc && makeCommand().isEmpty()) {
|
||||||
if (tc->targetAbi().os() == Abi::WindowsOS
|
if (tc->targetAbi().os() == Abi::WindowsOS
|
||||||
&& tc->targetAbi().osFlavor() != Abi::WindowsMSysFlavor) {
|
&& tc->targetAbi().osFlavor() != Abi::WindowsMSysFlavor) {
|
||||||
const QString makeFlags = QLatin1String("MAKEFLAGS");
|
const QString makeFlags = "MAKEFLAGS";
|
||||||
env.set(makeFlags, QLatin1Char('L') + env.value(makeFlags));
|
env.set(makeFlags, 'L' + env.value(makeFlags));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,7 +322,7 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
|
|||||||
|
|
||||||
m_ui->makePathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
m_ui->makePathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand);
|
||||||
m_ui->makePathChooser->setBaseDirectory(Utils::PathChooser::homePath());
|
m_ui->makePathChooser->setBaseDirectory(Utils::PathChooser::homePath());
|
||||||
m_ui->makePathChooser->setHistoryCompleter(QLatin1String("PE.MakeCommand.History"));
|
m_ui->makePathChooser->setHistoryCompleter("PE.MakeCommand.History");
|
||||||
|
|
||||||
const QString &makeCmd = m_makeStep->makeCommand();
|
const QString &makeCmd = m_makeStep->makeCommand();
|
||||||
m_ui->makePathChooser->setPath(makeCmd);
|
m_ui->makePathChooser->setPath(makeCmd);
|
||||||
@@ -434,8 +434,8 @@ void MakeStepConfigWidget::updateDetails()
|
|||||||
if (tc && m_makeStep->makeCommand().isEmpty()) {
|
if (tc && m_makeStep->makeCommand().isEmpty()) {
|
||||||
if (tc->targetAbi().os() == Abi::WindowsOS
|
if (tc->targetAbi().os() == Abi::WindowsOS
|
||||||
&& tc->targetAbi().osFlavor() != Abi::WindowsMSysFlavor) {
|
&& tc->targetAbi().osFlavor() != Abi::WindowsMSysFlavor) {
|
||||||
const QString makeFlags = QLatin1String("MAKEFLAGS");
|
const QString makeFlags = "MAKEFLAGS";
|
||||||
env.set(makeFlags, QLatin1Char('L') + env.value(makeFlags));
|
env.set(makeFlags, 'L' + env.value(makeFlags));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
param.setArguments(args);
|
param.setArguments(args);
|
||||||
@@ -502,7 +502,7 @@ BuildStep *MakeStepFactory::create(BuildStepList *parent, Core::Id id)
|
|||||||
MakeStep *step = new MakeStep(parent);
|
MakeStep *step = new MakeStep(parent);
|
||||||
if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) {
|
if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) {
|
||||||
step->setClean(true);
|
step->setClean(true);
|
||||||
step->setUserArguments(QLatin1String("clean"));
|
step->setUserArguments("clean");
|
||||||
}
|
}
|
||||||
return step;
|
return step;
|
||||||
}
|
}
|
||||||
|
@@ -134,10 +134,10 @@ QString QMakeStep::allArguments(const BaseQtVersion *v, bool shorted) const
|
|||||||
arguments << project()->projectFilePath().toUserOutput();
|
arguments << project()->projectFilePath().toUserOutput();
|
||||||
|
|
||||||
if (v->qtVersion() < QtVersionNumber(5, 0, 0))
|
if (v->qtVersion() < QtVersionNumber(5, 0, 0))
|
||||||
arguments << QLatin1String("-r");
|
arguments << "-r";
|
||||||
bool userProvidedMkspec = false;
|
bool userProvidedMkspec = false;
|
||||||
for (QtcProcess::ConstArgIterator ait(m_userArgs); ait.next(); ) {
|
for (QtcProcess::ConstArgIterator ait(m_userArgs); ait.next(); ) {
|
||||||
if (ait.value() == QLatin1String("-spec")) {
|
if (ait.value() == "-spec") {
|
||||||
if (ait.next()) {
|
if (ait.next()) {
|
||||||
userProvidedMkspec = true;
|
userProvidedMkspec = true;
|
||||||
break;
|
break;
|
||||||
@@ -146,7 +146,7 @@ QString QMakeStep::allArguments(const BaseQtVersion *v, bool shorted) const
|
|||||||
}
|
}
|
||||||
FileName specArg = mkspec();
|
FileName specArg = mkspec();
|
||||||
if (!userProvidedMkspec && !specArg.isEmpty())
|
if (!userProvidedMkspec && !specArg.isEmpty())
|
||||||
arguments << QLatin1String("-spec") << specArg.toUserOutput();
|
arguments << "-spec" << specArg.toUserOutput();
|
||||||
|
|
||||||
// Find out what flags we pass on to qmake
|
// Find out what flags we pass on to qmake
|
||||||
arguments << bc->configCommandLineArguments();
|
arguments << bc->configCommandLineArguments();
|
||||||
@@ -538,7 +538,7 @@ FileName QMakeStep::mkspec() const
|
|||||||
QString additionalArguments = m_userArgs;
|
QString additionalArguments = m_userArgs;
|
||||||
QtcProcess::addArgs(&additionalArguments, m_extraArgs);
|
QtcProcess::addArgs(&additionalArguments, m_extraArgs);
|
||||||
for (QtcProcess::ArgIterator ait(&additionalArguments); ait.next(); ) {
|
for (QtcProcess::ArgIterator ait(&additionalArguments); ait.next(); ) {
|
||||||
if (ait.value() == QLatin1String("-spec")) {
|
if (ait.value() == "-spec") {
|
||||||
if (ait.next())
|
if (ait.next())
|
||||||
return FileName::fromUserInput(ait.value());
|
return FileName::fromUserInput(ait.value());
|
||||||
}
|
}
|
||||||
@@ -550,31 +550,31 @@ FileName QMakeStep::mkspec() const
|
|||||||
QVariantMap QMakeStep::toMap() const
|
QVariantMap QMakeStep::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap map(AbstractProcessStep::toMap());
|
QVariantMap map(AbstractProcessStep::toMap());
|
||||||
map.insert(QLatin1String(QMAKE_ARGUMENTS_KEY), m_userArgs);
|
map.insert(QMAKE_ARGUMENTS_KEY, m_userArgs);
|
||||||
map.insert(QLatin1String(QMAKE_QMLDEBUGLIB_KEY), m_linkQmlDebuggingLibrary);
|
map.insert(QMAKE_QMLDEBUGLIB_KEY, m_linkQmlDebuggingLibrary);
|
||||||
map.insert(QLatin1String(QMAKE_FORCED_KEY), m_forced);
|
map.insert(QMAKE_FORCED_KEY, m_forced);
|
||||||
map.insert(QLatin1String(QMAKE_USE_QTQUICKCOMPILER), m_useQtQuickCompiler);
|
map.insert(QMAKE_USE_QTQUICKCOMPILER, m_useQtQuickCompiler);
|
||||||
map.insert(QLatin1String(QMAKE_SEPARATEDEBUGINFO_KEY), m_separateDebugInfo);
|
map.insert(QMAKE_SEPARATEDEBUGINFO_KEY, m_separateDebugInfo);
|
||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QMakeStep::fromMap(const QVariantMap &map)
|
bool QMakeStep::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_userArgs = map.value(QLatin1String(QMAKE_ARGUMENTS_KEY)).toString();
|
m_userArgs = map.value(QMAKE_ARGUMENTS_KEY).toString();
|
||||||
m_forced = map.value(QLatin1String(QMAKE_FORCED_KEY), false).toBool();
|
m_forced = map.value(QMAKE_FORCED_KEY, false).toBool();
|
||||||
m_useQtQuickCompiler = map.value(QLatin1String(QMAKE_USE_QTQUICKCOMPILER), false).toBool();
|
m_useQtQuickCompiler = map.value(QMAKE_USE_QTQUICKCOMPILER, false).toBool();
|
||||||
|
|
||||||
// QMAKE_QMLDEBUGLIBAUTO_KEY was used in versions 2.3 to 3.5 (both included) to automatically
|
// QMAKE_QMLDEBUGLIBAUTO_KEY was used in versions 2.3 to 3.5 (both included) to automatically
|
||||||
// change the qml_debug CONFIG flag based no the qmake build configuration.
|
// change the qml_debug CONFIG flag based no the qmake build configuration.
|
||||||
if (map.value(QLatin1String(QMAKE_QMLDEBUGLIBAUTO_KEY), false).toBool()) {
|
if (map.value(QMAKE_QMLDEBUGLIBAUTO_KEY, false).toBool()) {
|
||||||
m_linkQmlDebuggingLibrary =
|
m_linkQmlDebuggingLibrary =
|
||||||
project()->projectLanguages().contains(
|
project()->projectLanguages().contains(
|
||||||
ProjectExplorer::Constants::QMLJS_LANGUAGE_ID) &&
|
ProjectExplorer::Constants::QMLJS_LANGUAGE_ID) &&
|
||||||
(qmakeBuildConfiguration()->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild);
|
(qmakeBuildConfiguration()->qmakeBuildConfiguration() & BaseQtVersion::DebugBuild);
|
||||||
} else {
|
} else {
|
||||||
m_linkQmlDebuggingLibrary = map.value(QLatin1String(QMAKE_QMLDEBUGLIB_KEY), false).toBool();
|
m_linkQmlDebuggingLibrary = map.value(QMAKE_QMLDEBUGLIB_KEY, false).toBool();
|
||||||
}
|
}
|
||||||
m_separateDebugInfo = map.value(QLatin1String(QMAKE_SEPARATEDEBUGINFO_KEY), false).toBool();
|
m_separateDebugInfo = map.value(QMAKE_SEPARATEDEBUGINFO_KEY, false).toBool();
|
||||||
|
|
||||||
return BuildStep::fromMap(map);
|
return BuildStep::fromMap(map);
|
||||||
}
|
}
|
||||||
@@ -910,7 +910,7 @@ ProjectExplorer::BuildStep *QMakeStepFactory::clone(BuildStepList *parent, Proje
|
|||||||
QMakeStepConfig::TargetArchConfig QMakeStepConfig::targetArchFor(const Abi &targetAbi, const BaseQtVersion *version)
|
QMakeStepConfig::TargetArchConfig QMakeStepConfig::targetArchFor(const Abi &targetAbi, const BaseQtVersion *version)
|
||||||
{
|
{
|
||||||
QMakeStepConfig::TargetArchConfig arch = QMakeStepConfig::NoArch;
|
QMakeStepConfig::TargetArchConfig arch = QMakeStepConfig::NoArch;
|
||||||
if (!version || version->type() != QLatin1String(QtSupport::Constants::DESKTOPQT))
|
if (!version || version->type() != QtSupport::Constants::DESKTOPQT)
|
||||||
return arch;
|
return arch;
|
||||||
if ((targetAbi.os() == ProjectExplorer::Abi::DarwinOS)
|
if ((targetAbi.os() == ProjectExplorer::Abi::DarwinOS)
|
||||||
&& (targetAbi.binaryFormat() == ProjectExplorer::Abi::MachOFormat)) {
|
&& (targetAbi.binaryFormat() == ProjectExplorer::Abi::MachOFormat)) {
|
||||||
@@ -933,7 +933,7 @@ QMakeStepConfig::OsType QMakeStepConfig::osTypeFor(const ProjectExplorer::Abi &t
|
|||||||
{
|
{
|
||||||
QMakeStepConfig::OsType os = QMakeStepConfig::NoOsType;
|
QMakeStepConfig::OsType os = QMakeStepConfig::NoOsType;
|
||||||
const char IOSQT[] = "Qt4ProjectManager.QtVersion.Ios";
|
const char IOSQT[] = "Qt4ProjectManager.QtVersion.Ios";
|
||||||
if (!version || version->type() != QLatin1String(IOSQT))
|
if (!version || version->type() != IOSQT)
|
||||||
return os;
|
return os;
|
||||||
if ((targetAbi.os() == ProjectExplorer::Abi::DarwinOS)
|
if ((targetAbi.os() == ProjectExplorer::Abi::DarwinOS)
|
||||||
&& (targetAbi.binaryFormat() == ProjectExplorer::Abi::MachOFormat)) {
|
&& (targetAbi.binaryFormat() == ProjectExplorer::Abi::MachOFormat)) {
|
||||||
@@ -950,29 +950,28 @@ QStringList QMakeStepConfig::toArguments() const
|
|||||||
{
|
{
|
||||||
QStringList arguments;
|
QStringList arguments;
|
||||||
if (archConfig == X86)
|
if (archConfig == X86)
|
||||||
arguments << QLatin1String("CONFIG+=x86");
|
arguments << "CONFIG+=x86";
|
||||||
else if (archConfig == X86_64)
|
else if (archConfig == X86_64)
|
||||||
arguments << QLatin1String("CONFIG+=x86_64");
|
arguments << "CONFIG+=x86_64";
|
||||||
else if (archConfig == PowerPC)
|
else if (archConfig == PowerPC)
|
||||||
arguments << QLatin1String("CONFIG+=ppc");
|
arguments << "CONFIG+=ppc";
|
||||||
else if (archConfig == PowerPC64)
|
else if (archConfig == PowerPC64)
|
||||||
arguments << QLatin1String("CONFIG+=ppc64");
|
arguments << "CONFIG+=ppc64";
|
||||||
|
|
||||||
// TODO: make that depend on the actual Qt version that is used
|
// TODO: make that depend on the actual Qt version that is used
|
||||||
if (osType == IphoneSimulator)
|
if (osType == IphoneSimulator)
|
||||||
arguments << QLatin1String("CONFIG+=iphonesimulator") << QLatin1String("CONFIG+=simulator") /*since Qt 5.7*/;
|
arguments << "CONFIG+=iphonesimulator" << "CONFIG+=simulator" /*since Qt 5.7*/;
|
||||||
else if (osType == IphoneOS)
|
else if (osType == IphoneOS)
|
||||||
arguments << QLatin1String("CONFIG+=iphoneos") << QLatin1String("CONFIG+=device") /*since Qt 5.7*/;
|
arguments << "CONFIG+=iphoneos" << "CONFIG+=device" /*since Qt 5.7*/;
|
||||||
|
|
||||||
if (linkQmlDebuggingQQ2)
|
if (linkQmlDebuggingQQ2)
|
||||||
arguments << QLatin1String("CONFIG+=qml_debug");
|
arguments << "CONFIG+=qml_debug";
|
||||||
|
|
||||||
if (useQtQuickCompiler)
|
if (useQtQuickCompiler)
|
||||||
arguments << QLatin1String("CONFIG+=qtquickcompiler");
|
arguments << "CONFIG+=qtquickcompiler";
|
||||||
|
|
||||||
if (separateDebugInfo)
|
if (separateDebugInfo)
|
||||||
arguments << QLatin1String("CONFIG+=force_debug_info")
|
arguments << "CONFIG+=force_debug_info" << "CONFIG+=separate_debug_info";
|
||||||
<< QLatin1String("CONFIG+=separate_debug_info");
|
|
||||||
|
|
||||||
return arguments;
|
return arguments;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user