Qt4Project: Only complain about missing subdirs from the exact parse

Task-number: QTCREATORBUG-8941

Change-Id: Ie843529e42ede29d607932d5fbd9e92da2fd8082
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Daniel Teske
2013-08-09 12:26:32 +02:00
parent b71b7f140c
commit 97ececbbd6
2 changed files with 8 additions and 6 deletions

View File

@@ -1720,7 +1720,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
QStringList subProjectsNotToDeploy; QStringList subProjectsNotToDeploy;
if (evalResult == EvalOk) { if (evalResult == EvalOk) {
if (m_projectType == SubDirsTemplate) { if (m_projectType == SubDirsTemplate) {
newProjectFilesExact = subDirsPaths(m_readerExact, &subProjectsNotToDeploy); newProjectFilesExact = subDirsPaths(m_readerExact, &subProjectsNotToDeploy, false);
exactSubdirs = newProjectFilesExact.toSet(); exactSubdirs = newProjectFilesExact.toSet();
} }
foreach (ProFile *includeFile, m_readerExact->includeFiles()) { foreach (ProFile *includeFile, m_readerExact->includeFiles()) {
@@ -1737,7 +1737,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
QHash<QString, ProFile*> includeFilesCumlative; QHash<QString, ProFile*> includeFilesCumlative;
ProFile *fileForCurrentProjectCumlative = 0; ProFile *fileForCurrentProjectCumlative = 0;
if (m_projectType == SubDirsTemplate) if (m_projectType == SubDirsTemplate)
newProjectFilesCumlative = subDirsPaths(m_readerCumulative); newProjectFilesCumlative = subDirsPaths(m_readerCumulative, 0, true);
foreach (ProFile *includeFile, m_readerCumulative->includeFiles()) { foreach (ProFile *includeFile, m_readerCumulative->includeFiles()) {
if (includeFile->fileName() == m_projectFilePath) { if (includeFile->fileName() == m_projectFilePath) {
fileForCurrentProjectCumlative = includeFile; fileForCurrentProjectCumlative = includeFile;
@@ -2042,7 +2042,8 @@ QStringList Qt4ProFileNode::libDirectories(QtSupport::ProFileReader *reader) con
return result; return result;
} }
QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy) const QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStringList *subProjectsNotToDeploy,
bool silent) const
{ {
QStringList subProjectPaths; QStringList subProjectPaths;
@@ -2085,8 +2086,9 @@ QStringList Qt4ProFileNode::subDirsPaths(QtSupport::ProFileReader *reader, QStri
subProjectsNotToDeploy->append(realFile); subProjectsNotToDeploy->append(realFile);
} }
} else { } else {
m_project->proFileParseError(tr("Could not find .pro file for sub dir '%1' in '%2'") if (!silent)
.arg(subDirVar).arg(realDir)); m_project->proFileParseError(tr("Could not find .pro file for sub dir '%1' in '%2'")
.arg(subDirVar).arg(realDir));
} }
} }

View File

@@ -426,7 +426,7 @@ private:
QString mocDirPath(QtSupport::ProFileReader *reader) const; QString mocDirPath(QtSupport::ProFileReader *reader) const;
QStringList includePaths(QtSupport::ProFileReader *reader) const; QStringList includePaths(QtSupport::ProFileReader *reader) const;
QStringList libDirectories(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; TargetInformation targetInformation(QtSupport::ProFileReader *reader) const;
void setupInstallsList(const QtSupport::ProFileReader *reader); void setupInstallsList(const QtSupport::ProFileReader *reader);