From 97ececbbd601de97adc2aa024d4a56f4f6d7f3ba Mon Sep 17 00:00:00 2001 From: Daniel Teske Date: Fri, 9 Aug 2013 12:26:32 +0200 Subject: [PATCH] Qt4Project: Only complain about missing subdirs from the exact parse Task-number: QTCREATORBUG-8941 Change-Id: Ie843529e42ede29d607932d5fbd9e92da2fd8082 Reviewed-by: Oswald Buddenhagen Reviewed-by: Daniel Teske --- src/plugins/qt4projectmanager/qt4nodes.cpp | 12 +++++++----- src/plugins/qt4projectmanager/qt4nodes.h | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index 2f4426902f4..a4f449083c0 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -1720,7 +1720,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) QStringList subProjectsNotToDeploy; if (evalResult == EvalOk) { if (m_projectType == SubDirsTemplate) { - newProjectFilesExact = subDirsPaths(m_readerExact, &subProjectsNotToDeploy); + newProjectFilesExact = subDirsPaths(m_readerExact, &subProjectsNotToDeploy, false); exactSubdirs = newProjectFilesExact.toSet(); } foreach (ProFile *includeFile, m_readerExact->includeFiles()) { @@ -1737,7 +1737,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) QHash includeFilesCumlative; ProFile *fileForCurrentProjectCumlative = 0; if (m_projectType == SubDirsTemplate) - newProjectFilesCumlative = subDirsPaths(m_readerCumulative); + newProjectFilesCumlative = subDirsPaths(m_readerCumulative, 0, true); foreach (ProFile *includeFile, m_readerCumulative->includeFiles()) { if (includeFile->fileName() == m_projectFilePath) { fileForCurrentProjectCumlative = includeFile; @@ -2042,7 +2042,8 @@ QStringList Qt4ProFileNode::libDirectories(QtSupport::ProFileReader *reader) con return result; } -QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy) const +QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy, + bool silent) const { QStringList subProjectPaths; @@ -2085,8 +2086,9 @@ QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStri subProjectsNotToDeploy->append(realFile); } } else { - m_project->proFileParseError(tr("Could not find .pro file for sub dir '%1' in '%2'") - .arg(subDirVar).arg(realDir)); + if (!silent) + m_project->proFileParseError(tr("Could not find .pro file for sub dir '%1' in '%2'") + .arg(subDirVar).arg(realDir)); } } diff --git a/src/plugins/qt4projectmanager/qt4nodes.h b/src/plugins/qt4projectmanager/qt4nodes.h index 1b51311d86f..1eefdc61d97 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.h +++ b/src/plugins/qt4projectmanager/qt4nodes.h @@ -426,7 +426,7 @@ private: QString mocDirPath(QtSupport::ProFileReader *reader) const; QStringList includePaths(QtSupport::ProFileReader *reader) const; QStringList libDirectories(QtSupport::ProFileReader *reader) const; - QStringList subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy = 0) const; + QStringList subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy, bool silent) const; TargetInformation targetInformation(QtSupport::ProFileReader *reader) const; void setupInstallsList(const QtSupport::ProFileReader *reader);