summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qt4projectmanager')
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index 0a801b3d80..e2ed24cadc 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -691,9 +691,17 @@ 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] << reader->value(QLatin1String("QMAKE_CXX"));
+
+ newVarValues[CxxCompilerVar] << qmakeCxx;
newVarValues[DefinesVar] = reader->values(QLatin1String("DEFINES"));
newVarValues[IncludePathVar] = includePaths(reader);
newVarValues[UiDirVar] = uiDirPaths(reader);