Commit cc21572b authored by Daniel Teske's avatar Daniel Teske

Fix -spec parameter not used in profile evaluation nor code model

Task-number: QTCREATORBUG-4723
Change-Id: I845326bdc8726c27502c66c5aeaacb0d286c54c1
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent 52a66bca
......@@ -1813,6 +1813,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
// update TargetInformation
m_qt4targetInformation = targetInformation(m_readerExact);
m_resolvedMkspecPath = m_project->proFileOption()->qmakespec;
setupInstallsList(m_readerExact);
setupProjectVersion(m_readerExact);
......@@ -2141,6 +2142,11 @@ TargetInformation Qt4ProFileNode::targetInformation() const
return m_qt4targetInformation;
}
QString Qt4ProFileNode::resolvedMkspecPath() const
{
return m_resolvedMkspecPath;
}
void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader)
{
m_installsList.clear();
......
......@@ -355,6 +355,7 @@ public:
QString makefile() const;
QStringList symbianCapabilities() const;
bool isDeployable() const;
QString resolvedMkspecPath() const;
void update();
void scheduleUpdate();
......@@ -404,6 +405,7 @@ private:
QMap<QString, QDateTime> m_uitimestamps;
TargetInformation m_qt4targetInformation;
QString m_resolvedMkspecPath;
InstallsList m_installsList;
ProjectVersion m_projectVersion;
friend class Qt4NodeHierarchy;
......
......@@ -553,7 +553,9 @@ void Qt4Project::updateCppCodeModel()
}
// Add mkspec directory
if (activeBC->qtVersion())
if (rootQt4ProjectNode())
allIncludePaths.append(rootQt4ProjectNode()->resolvedMkspecPath());
else if (activeBC->qtVersion())
allIncludePaths.append(activeBC->qtVersion()->mkspecPath());
allIncludePaths.append(predefinedIncludePaths);
......@@ -969,10 +971,12 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4Pro
m_proFileOption->environment.insert(env.key(eit), env.value(eit));
QStringList args;
if (QMakeStep *qs = bc->qmakeStep())
if (QMakeStep *qs = bc->qmakeStep()) {
args = qs->parserArguments();
else
m_proFileOption->qmakespec = qs->mkspec();
} else {
args = bc->configCommandLineArguments();
}
m_proFileOption->setCommandLineArguments(args);
}
......@@ -987,6 +991,11 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4Pro
return reader;
}
ProFileOption *Qt4Project::proFileOption()
{
return m_proFileOption;
}
void Qt4Project::destroyProFileReader(QtSupport::ProFileReader *reader)
{
delete reader;
......
......@@ -118,6 +118,8 @@ public:
/// \internal
QtSupport::ProFileReader *createProFileReader(Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc = 0);
/// \internal
ProFileOption *proFileOption();
/// \internal
void destroyProFileReader(QtSupport::ProFileReader *reader);
/// \internal
......
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