From: Oswald Buddenhagen Date: Wed, 24 Jul 2013 17:49:38 +0000 (+0200) Subject: change reporting of missing files X-Git-Tag: accepted/tizen/20131212.181521~83^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e5f3e008fb0a7ae6e26b6e492ae90d80e0824c9;p=platform%2Fupstream%2Fqttools.git change reporting of missing files use the new parser flags to report all i/o errors directly. as a notable side effect, the "WARNING" prefix is gone (even though it is still treated like that, which is mildly insane to start with). Change-Id: I084375d5e7a3314ae763795f7c318804a9fb84b6 Reviewed-by: Joerg Bornemann (cherry picked from qtbase/b4c0d9166e7a8f5dfa5ca052002a5ab318787aa2) --- diff --git a/src/linguist/shared/qmakeevaluator.cpp b/src/linguist/shared/qmakeevaluator.cpp index 6bd1c58..8cbd7b9 100644 --- a/src/linguist/shared/qmakeevaluator.cpp +++ b/src/linguist/shared/qmakeevaluator.cpp @@ -1824,7 +1824,10 @@ ProString QMakeEvaluator::first(const ProKey &variableName) const QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFile( const QString &fileName, QMakeHandler::EvalFileType type, LoadFlags flags) { - if (ProFile *pro = m_parser->parsedProFile(fileName, QMakeParser::ParseUseCache)) { + QMakeParser::ParseFlags pflags = QMakeParser::ParseUseCache; + if (!(flags & LoadSilent)) + pflags |= QMakeParser::ParseReportMissing; + if (ProFile *pro = m_parser->parsedProFile(fileName, pflags)) { m_locationStack.push(m_current); VisitReturn ok = visitProFile(pro, type, flags); m_current = m_locationStack.pop(); @@ -1839,8 +1842,6 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFile( #endif return ok; } else { - if (!(flags & LoadSilent) && !IoUtils::exists(fileName)) - evalError(fL1S("WARNING: Include file %1 not found").arg(fileName)); return ReturnFalse; } }