diff --git a/src/plugins/qtsupport/profilereader.cpp b/src/plugins/qtsupport/profilereader.cpp index 809342960e9..a65ee78c3ad 100644 --- a/src/plugins/qtsupport/profilereader.cpp +++ b/src/plugins/qtsupport/profilereader.cpp @@ -60,8 +60,9 @@ void ProMessageHandler::message(int type, const QString &msg, const QString &fil emit writeMessage(format(fileName, lineNo, msg), Core::MessageManager::NoModeSwitch); } -void ProMessageHandler::fileMessage(const QString &msg) +void ProMessageHandler::fileMessage(int type, const QString &msg) { + Q_UNUSED(type) if (m_verbose) emit writeMessage(msg, Core::MessageManager::NoModeSwitch); } diff --git a/src/plugins/qtsupport/profilereader.h b/src/plugins/qtsupport/profilereader.h index 3ab37cc1aca..dfdf9af140f 100644 --- a/src/plugins/qtsupport/profilereader.h +++ b/src/plugins/qtsupport/profilereader.h @@ -55,7 +55,7 @@ public: virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {} virtual void doneWithEval(ProFile *) {} virtual void message(int type, const QString &msg, const QString &fileName, int lineNo); - virtual void fileMessage(const QString &msg); + virtual void fileMessage(int type, const QString &msg); void setVerbose(bool on) { m_verbose = on; } diff --git a/src/shared/proparser/qmakebuiltins.cpp b/src/shared/proparser/qmakebuiltins.cpp index 0c6f9431b1f..f6cc329b849 100644 --- a/src/shared/proparser/qmakebuiltins.cpp +++ b/src/shared/proparser/qmakebuiltins.cpp @@ -399,7 +399,9 @@ QByteArray QMakeEvaluator::getCommandOutput(const QString &args) const if (!errout.isEmpty()) { if (errout.endsWith('\n')) errout.chop(1); - m_handler->message(QMakeHandler::EvalError, QString::fromLocal8Bit(errout)); + m_handler->message( + QMakeHandler::EvalError | (m_cumulative ? QMakeHandler::CumulativeEvalMessage : 0), + QString::fromLocal8Bit(errout)); } # endif out = proc.readAllStandardOutput(); @@ -1467,8 +1469,12 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( fputs(msg.toLatin1().constData(), stderr); #endif } else { - m_handler->fileMessage(fL1S("Project %1: %2") - .arg(function.toQString(m_tmp1).toUpper(), msg)); + m_handler->fileMessage( + (func_t == T_ERROR ? QMakeHandler::ErrorMessage : + func_t == T_WARNING ? QMakeHandler::WarningMessage : + QMakeHandler::InfoMessage) + | (m_cumulative ? QMakeHandler::CumulativeEvalMessage : 0), + fL1S("Project %1: %2").arg(function.toQString(m_tmp1).toUpper(), msg)); } } return (func_t == T_ERROR && !m_cumulative) ? ReturnError : ReturnTrue; diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp index cce86acecd6..72d9d31b173 100644 --- a/src/shared/proparser/qmakeevaluator.cpp +++ b/src/shared/proparser/qmakeevaluator.cpp @@ -1981,7 +1981,7 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateFileInto( void QMakeEvaluator::message(int type, const QString &msg) const { if (!m_skipLevel) - m_handler->message(type, msg, + m_handler->message(type | (m_cumulative ? QMakeHandler::CumulativeEvalMessage : 0), msg, m_current.line ? m_current.pro->fileName() : QString(), m_current.line != 0xffff ? m_current.line : -1); } diff --git a/src/shared/proparser/qmakeevaluator.h b/src/shared/proparser/qmakeevaluator.h index 31d05e74c79..8538e8b4f0b 100644 --- a/src/shared/proparser/qmakeevaluator.h +++ b/src/shared/proparser/qmakeevaluator.h @@ -65,6 +65,8 @@ public: enum { SourceEvaluator = 0x10, + CumulativeEvalMessage = 0x1000, + EvalWarnLanguage = SourceEvaluator | WarningMessage | WarnLanguage, EvalWarnDeprecated = SourceEvaluator | WarningMessage | WarnDeprecated, @@ -72,7 +74,7 @@ public: }; // error(), warning() and message() from .pro file - virtual void fileMessage(const QString &msg) = 0; + virtual void fileMessage(int type, const QString &msg) = 0; enum EvalFileType { EvalProjectFile, EvalIncludeFile, EvalConfigFile, EvalFeatureFile, EvalAuxFile }; virtual void aboutToEval(ProFile *parent, ProFile *proFile, EvalFileType type) = 0; diff --git a/src/shared/proparser/qmakeparser.h b/src/shared/proparser/qmakeparser.h index 91320c74914..a7d55c8d47c 100644 --- a/src/shared/proparser/qmakeparser.h +++ b/src/shared/proparser/qmakeparser.h @@ -47,8 +47,9 @@ class QMAKE_EXPORT QMakeParserHandler public: enum { CategoryMask = 0xf00, - WarningMessage = 0x000, - ErrorMessage = 0x100, + InfoMessage = 0x100, + WarningMessage = 0x200, + ErrorMessage = 0x300, SourceMask = 0xf0, SourceParser = 0,