add enablers for printing project errors in cumulative mode
this doesn't actually do anything in qmake. Change-Id: Ia14953a5a9dc31af56ad6c338017dd5b85bb4494 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> (cherry picked from qttools/08d0cb6f8e90a818bf6d3bec7a6d00f16419b8c0) Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
86b2b5319d
commit
e5f3b653f0
@ -1470,8 +1470,12 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional(
|
|||||||
fputs(msg.toLatin1().constData(), stderr);
|
fputs(msg.toLatin1().constData(), stderr);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
m_handler->fileMessage(fL1S("Project %1: %2")
|
m_handler->fileMessage(
|
||||||
.arg(function.toQString(m_tmp1).toUpper(), msg));
|
(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;
|
return (func_t == T_ERROR && !m_cumulative) ? ReturnError : ReturnTrue;
|
||||||
|
@ -68,6 +68,8 @@ public:
|
|||||||
enum {
|
enum {
|
||||||
SourceEvaluator = 0x10,
|
SourceEvaluator = 0x10,
|
||||||
|
|
||||||
|
CumulativeEvalMessage = 0x1000,
|
||||||
|
|
||||||
EvalWarnLanguage = SourceEvaluator | WarningMessage | WarnLanguage,
|
EvalWarnLanguage = SourceEvaluator | WarningMessage | WarnLanguage,
|
||||||
EvalWarnDeprecated = SourceEvaluator | WarningMessage | WarnDeprecated,
|
EvalWarnDeprecated = SourceEvaluator | WarningMessage | WarnDeprecated,
|
||||||
|
|
||||||
@ -75,7 +77,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// error(), warning() and message() from .pro file
|
// 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 };
|
enum EvalFileType { EvalProjectFile, EvalIncludeFile, EvalConfigFile, EvalFeatureFile, EvalAuxFile };
|
||||||
virtual void aboutToEval(ProFile *parent, ProFile *proFile, EvalFileType type) = 0;
|
virtual void aboutToEval(ProFile *parent, ProFile *proFile, EvalFileType type) = 0;
|
||||||
|
@ -50,8 +50,9 @@ class QMAKE_EXPORT QMakeParserHandler
|
|||||||
public:
|
public:
|
||||||
enum {
|
enum {
|
||||||
CategoryMask = 0xf00,
|
CategoryMask = 0xf00,
|
||||||
WarningMessage = 0x000,
|
InfoMessage = 0x100,
|
||||||
ErrorMessage = 0x100,
|
WarningMessage = 0x200,
|
||||||
|
ErrorMessage = 0x300,
|
||||||
|
|
||||||
SourceMask = 0xf0,
|
SourceMask = 0xf0,
|
||||||
SourceParser = 0,
|
SourceParser = 0,
|
||||||
|
@ -601,8 +601,9 @@ void EvalHandler::message(int type, const QString &msg, const QString &fileName,
|
|||||||
fprintf(stderr, "%s%s\n", qPrintable(pfx), qPrintable(msg));
|
fprintf(stderr, "%s%s\n", qPrintable(pfx), qPrintable(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
void EvalHandler::fileMessage(const QString &msg)
|
void EvalHandler::fileMessage(int type, const QString &msg)
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(type)
|
||||||
fprintf(stderr, "%s\n", qPrintable(msg));
|
fprintf(stderr, "%s\n", qPrintable(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class EvalHandler : public QMakeHandler {
|
|||||||
public:
|
public:
|
||||||
void message(int type, const QString &msg, const QString &fileName, int lineNo);
|
void message(int type, const QString &msg, const QString &fileName, int lineNo);
|
||||||
|
|
||||||
void fileMessage(const QString &msg);
|
void fileMessage(int type, const QString &msg);
|
||||||
|
|
||||||
void aboutToEval(ProFile *, ProFile *, EvalFileType);
|
void aboutToEval(ProFile *, ProFile *, EvalFileType);
|
||||||
void doneWithEval(ProFile *);
|
void doneWithEval(ProFile *);
|
||||||
|
@ -90,8 +90,8 @@ public:
|
|||||||
virtual void message(int type, const QString &msg, const QString &fileName, int lineNo)
|
virtual void message(int type, const QString &msg, const QString &fileName, int lineNo)
|
||||||
{ print(fileName, lineNo, type, msg); }
|
{ print(fileName, lineNo, type, msg); }
|
||||||
|
|
||||||
virtual void fileMessage(const QString &msg)
|
virtual void fileMessage(int type, const QString &msg)
|
||||||
{ doPrint(msg); }
|
{ Q_UNUSED(type) doPrint(msg); }
|
||||||
|
|
||||||
virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {}
|
virtual void aboutToEval(ProFile *, ProFile *, EvalFileType) {}
|
||||||
virtual void doneWithEval(ProFile *) {}
|
virtual void doneWithEval(ProFile *) {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user