diff --git a/src/plugins/qt4projectmanager/qt-maemo/maemoprofilewrapper.cpp b/src/plugins/qt4projectmanager/qt-maemo/maemoprofilewrapper.cpp
index fdce039d9a441f4e716d3424c742bd52c657feca..ffb4107af37d5c1a143871f4ac918074c0922095 100644
--- a/src/plugins/qt4projectmanager/qt-maemo/maemoprofilewrapper.cpp
+++ b/src/plugins/qt4projectmanager/qt-maemo/maemoprofilewrapper.cpp
@@ -227,7 +227,7 @@ void MaemoProFileWrapper::parseProFile(ParseType type) const
     m_proFileReader->setCumulative(false);
     // TODO: Set output dir to build dir?
     if (type == ParseFromLines) {
-        m_proFile = m_proFileReader->parsedProFile(m_proFileName, false,
+        m_proFile = m_proFileReader->parsedProBlock(m_proFileName,
             m_proFileContents.join("\n"));
     } else {
         m_proFileContents.clear();
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index a2f5f951edcc7f37b5c1ced84ad7bfa0c199dfd9..33a23faf7ce5b947df07533528c2df9774bc0d35 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -1050,7 +1050,7 @@ void Qt4PriFileNode::changeFiles(const FileType fileType,
 
         ProMessageHandler handler;
         ProFileParser parser(0, &handler);
-        includeFile = parser.parsedProFile(m_projectFilePath, false, contents);
+        includeFile = parser.parsedProBlock(m_projectFilePath, contents);
     }
 
     const QStringList vars = varNames(fileType);
diff --git a/src/shared/proparser/profileevaluator.cpp b/src/shared/proparser/profileevaluator.cpp
index 216a44788211b9402ebb2e7c3de691edc2f1d6f7..f2d25de766d95bdd44792d1c6b7704ff3388d6a0 100644
--- a/src/shared/proparser/profileevaluator.cpp
+++ b/src/shared/proparser/profileevaluator.cpp
@@ -1274,8 +1274,8 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::visitProFile(
                 tgt.append(ProString(QFileInfo(pro->fileName()).baseName(), NoHash));
 
         if (!m_cmdArgs.isEmpty()) {
-            if (ProFile *pro = m_parser->parsedProFile(
-                    fL1S("(command line)"), false, m_cmdArgs.join(fL1S("\n")))) {
+            if (ProFile *pro = m_parser->parsedProBlock(
+                    fL1S("(command line)"), m_cmdArgs.join(fL1S("\n")))) {
                 m_locationStack.push(m_current);
                 visitProBlock(pro, pro->tokPtr());
                 m_current = m_locationStack.pop();
@@ -2420,8 +2420,8 @@ ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateCondit
         case T_REQUIRES:
 #endif
         case T_EVAL: {
-                ProFile *pro = m_parser->parsedProFile(fL1S("(eval)"), false,
-                                                       args.join(statics.field_sep));
+                ProFile *pro = m_parser->parsedProBlock(fL1S("(eval)"),
+                                                        args.join(statics.field_sep));
                 if (!pro)
                     return ReturnFalse;
                 m_locationStack.push(m_current);
diff --git a/src/shared/proparser/profileparser.cpp b/src/shared/proparser/profileparser.cpp
index ede2d6771e32a15242bbcdd903eb7234cd20a955..6c8d0c9fa892e12972053cd4d5fe8a8d1675337c 100644
--- a/src/shared/proparser/profileparser.cpp
+++ b/src/shared/proparser/profileparser.cpp
@@ -124,7 +124,7 @@ ProFileParser::ProFileParser(ProFileCache *cache, ProFileParserHandler *handler)
     initialize();
 }
 
-ProFile *ProFileParser::parsedProFile(const QString &fileName, bool cache, const QString &contents)
+ProFile *ProFileParser::parsedProFile(const QString &fileName, bool cache, const QString *contents)
 {
     ProFile *pro;
     if (cache && m_cache) {
@@ -156,7 +156,7 @@ ProFile *ProFileParser::parsedProFile(const QString &fileName, bool cache, const
             locker.unlock();
 #endif
             pro = new ProFile(fileName);
-            if (!(contents.isNull() ? read(pro) : read(pro, contents))) {
+            if (!(!contents ? read(pro) : read(pro, *contents))) {
                 delete pro;
                 pro = 0;
             } else {
@@ -176,7 +176,7 @@ ProFile *ProFileParser::parsedProFile(const QString &fileName, bool cache, const
         }
     } else {
         pro = new ProFile(fileName);
-        if (!(contents.isNull() ? read(pro) : read(pro, contents))) {
+        if (!(!contents ? read(pro) : read(pro, *contents))) {
             delete pro;
             pro = 0;
         }
diff --git a/src/shared/proparser/profileparser.h b/src/shared/proparser/profileparser.h
index 67684fd323d77aa93d392bdc9669ab9b92c3b3bf..b0aed0d9e3b9c8ccee08a53db1e1d65a6d2647d8 100644
--- a/src/shared/proparser/profileparser.h
+++ b/src/shared/proparser/profileparser.h
@@ -70,7 +70,9 @@ public:
     // fileName is expected to be absolute and cleanPath()ed.
     // If contents is non-null, it will be used instead of the file's actual content
     ProFile *parsedProFile(const QString &fileName, bool cache = false,
-                           const QString &contents = QString());
+                           const QString *contents = 0);
+    ProFile *parsedProBlock(const QString &name, const QString &contents)
+        { return parsedProFile(name, false, &contents); }
 
 private:
     struct BlockScope {