print(fileName, lineNo, msg);
}
- virtual void fileMessage(const QString &) {}
+ virtual void fileMessage(int type, const QString &msg)
+ {
+ if (verbose && !(type & CumulativeEvalMessage) && (type & CategoryMask) == ErrorMessage) {
+ // "Downgrade" errors, as we don't really care for them
+ printErr(QLatin1String("WARNING: ") + msg + QLatin1Char('\n'));
+ }
+ }
virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {}
virtual void doneWithEval(ProFile *) {}
print(fileName, lineNo, msg);
}
- virtual void fileMessage(const QString &) {}
+ virtual void fileMessage(int type, const QString &msg)
+ {
+ if (verbose && !(type & CumulativeEvalMessage) && (type & CategoryMask) == ErrorMessage) {
+ // "Downgrade" errors, as we don't really care for them
+ printErr(QLatin1String("WARNING: ") + msg + QLatin1Char('\n'));
+ }
+ }
virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {}
virtual void doneWithEval(ProFile *) {}
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;
enum {
SourceEvaluator = 0x10,
+ CumulativeEvalMessage = 0x1000,
+
EvalWarnLanguage = SourceEvaluator | WarningMessage | WarnLanguage,
EvalWarnDeprecated = SourceEvaluator | WarningMessage | WarnDeprecated,
};
// 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;
public:
enum {
CategoryMask = 0xf00,
- WarningMessage = 0x000,
- ErrorMessage = 0x100,
+ InfoMessage = 0x100,
+ WarningMessage = 0x200,
+ ErrorMessage = 0x300,
SourceMask = 0xf0,
SourceParser = 0,