diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2009-02-26 17:44:50 +0100 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2009-02-26 17:46:28 +0100 |
commit | eefd64dd508362e5f42cd0fb4c85834197209ede (patch) | |
tree | 51d7ef783294cfff886651278a9cf4b4b846e2a3 | |
parent | 1055eb5e2dc3086173ad9519215ab36a8a34f21f (diff) |
Fixed: C++ parser configuration (2nd try).
We use `cc' instead of `c++' and we also also moved the code in qt4project.cpp.
Done by ossi reviewed by me.
-rw-r--r-- | src/plugins/qt4projectmanager/qt4nodes.cpp | 9 | ||||
-rw-r--r-- | src/plugins/qt4projectmanager/qt4project.cpp | 7 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index e2ed24cadc..1a33bbf215 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -691,17 +691,10 @@ void Qt4ProFileNode::update() Qt4PriFileNode::update(fileForCurrentProject, reader); - QString qmakeCxx = reader->value(QLatin1String("QMAKE_CXX")); - if (qmakeCxx.isEmpty()) { - // macx-xcode mkspec resets the value of QMAKE_CXX. - // Unfortunately, we need a valid QMAKE_CXX to configure the parser. - qmakeCxx = QLatin1String("c++"); - } - // update other variables QHash<Qt4Variable, QStringList> newVarValues; - newVarValues[CxxCompilerVar] << qmakeCxx; + newVarValues[CxxCompilerVar] << reader->value(QLatin1String("QMAKE_CXX")); newVarValues[DefinesVar] = reader->values(QLatin1String("DEFINES")); newVarValues[IncludePathVar] = includePaths(reader); newVarValues[UiDirVar] = uiDirPaths(reader); diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index ac30added5..b5eb66d909 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -420,6 +420,13 @@ void Qt4Project::updateCodeModel() if (t == QtVersion::MinGW || t == QtVersion::OTHER) { QStringList list = rootProjectNode()->variableValue(Internal::CxxCompilerVar); QString qmake_cxx = list.isEmpty() ? QString::null : list.first(); + + if (qmake_cxx.isEmpty()) { + // macx-xcode mkspec resets the value of QMAKE_CXX. + // Unfortunately, we need a valid QMAKE_CXX to configure the parser. + qmake_cxx = QLatin1String("cc"); + } + qmake_cxx = environment(activeBuildConfiguration()).searchInPath(qmake_cxx); m_preproc.setGcc(qmake_cxx); predefinedMacros = m_preproc.predefinedMacros(); |