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

Task-number: QTCREATORBUG-4723
Change-Id: I845326bdc8726c27502c66c5aeaacb0d286c54c1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Daniel Teske
2011-10-07 15:40:38 +02:00
parent 52a66bca82
commit cc21572b64
4 changed files with 22 additions and 3 deletions

View File

@@ -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();

View File

@@ -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;

View File

@@ -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;

View File

@@ -118,6 +118,8 @@ public:
/// \internal
QtSupport::ProFileReader *createProFileReader(Qt4ProFileNode *qt4ProFileNode, Qt4BuildConfiguration *bc = 0);
/// \internal
ProFileOption *proFileOption();
/// \internal
void destroyProFileReader(QtSupport::ProFileReader *reader);
/// \internal