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 // update TargetInformation
m_qt4targetInformation = targetInformation(m_readerExact); m_qt4targetInformation = targetInformation(m_readerExact);
m_resolvedMkspecPath = m_project->proFileOption()->qmakespec;
setupInstallsList(m_readerExact); setupInstallsList(m_readerExact);
setupProjectVersion(m_readerExact); setupProjectVersion(m_readerExact);
@@ -2141,6 +2142,11 @@ TargetInformation Qt4ProFileNode::targetInformation() const
return m_qt4targetInformation; return m_qt4targetInformation;
} }
QString Qt4ProFileNode::resolvedMkspecPath() const
{
return m_resolvedMkspecPath;
}
void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader) void Qt4ProFileNode::setupInstallsList(const QtSupport::ProFileReader *reader)
{ {
m_installsList.clear(); m_installsList.clear();

View File

@@ -355,6 +355,7 @@ public:
QString makefile() const; QString makefile() const;
QStringList symbianCapabilities() const; QStringList symbianCapabilities() const;
bool isDeployable() const; bool isDeployable() const;
QString resolvedMkspecPath() const;
void update(); void update();
void scheduleUpdate(); void scheduleUpdate();
@@ -404,6 +405,7 @@ private:
QMap<QString, QDateTime> m_uitimestamps; QMap<QString, QDateTime> m_uitimestamps;
TargetInformation m_qt4targetInformation; TargetInformation m_qt4targetInformation;
QString m_resolvedMkspecPath;
InstallsList m_installsList; InstallsList m_installsList;
ProjectVersion m_projectVersion; ProjectVersion m_projectVersion;
friend class Qt4NodeHierarchy; friend class Qt4NodeHierarchy;

View File

@@ -553,7 +553,9 @@ void Qt4Project::updateCppCodeModel()
} }
// Add mkspec directory // Add mkspec directory
if (activeBC->qtVersion()) if (rootQt4ProjectNode())
allIncludePaths.append(rootQt4ProjectNode()->resolvedMkspecPath());
else if (activeBC->qtVersion())
allIncludePaths.append(activeBC->qtVersion()->mkspecPath()); allIncludePaths.append(activeBC->qtVersion()->mkspecPath());
allIncludePaths.append(predefinedIncludePaths); allIncludePaths.append(predefinedIncludePaths);
@@ -969,10 +971,12 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4Pro
m_proFileOption->environment.insert(env.key(eit), env.value(eit)); m_proFileOption->environment.insert(env.key(eit), env.value(eit));
QStringList args; QStringList args;
if (QMakeStep *qs = bc->qmakeStep()) if (QMakeStep *qs = bc->qmakeStep()) {
args = qs->parserArguments(); args = qs->parserArguments();
else m_proFileOption->qmakespec = qs->mkspec();
} else {
args = bc->configCommandLineArguments(); args = bc->configCommandLineArguments();
}
m_proFileOption->setCommandLineArguments(args); m_proFileOption->setCommandLineArguments(args);
} }
@@ -987,6 +991,11 @@ QtSupport::ProFileReader *Qt4Project::createProFileReader(Qt4ProFileNode *qt4Pro
return reader; return reader;
} }
ProFileOption *Qt4Project::proFileOption()
{
return m_proFileOption;
}
void Qt4Project::destroyProFileReader(QtSupport::ProFileReader *reader) void Qt4Project::destroyProFileReader(QtSupport::ProFileReader *reader)
{ {
delete reader; delete reader;

View File

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