revamp message callbacks

instead of having a bazillion different callbacks, have only one with a
type parameter. the drain typically multiplexes all into one stream anyway.

Change-Id: I963daefc5a266c91334a4cc599570ed26b603d5d
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-07-03 10:08:04 +02:00
parent 7dd051ecce
commit 0af96c128a
9 changed files with 40 additions and 41 deletions

View File

@@ -204,8 +204,8 @@ bool QMakeParser::read(ProFile *pro)
QFile file(pro->fileName());
if (!file.open(QIODevice::ReadOnly)) {
if (m_handler && IoUtils::exists(pro->fileName()))
m_handler->parseError(QString(), 0, fL1S("Cannot read %1: %2")
.arg(pro->fileName(), file.errorString()));
m_handler->message(QMakeParserHandler::ParserIoError,
fL1S("Cannot read %1: %2").arg(pro->fileName(), file.errorString()));
return false;
}
@@ -1086,10 +1086,10 @@ bool QMakeParser::resolveVariable(ushort *xprPtr, int tlen, int needSep, ushort
return true;
}
void QMakeParser::parseError(const QString &msg) const
void QMakeParser::message(int type, const QString &msg) const
{
if (!m_inError && m_handler)
m_handler->parseError(m_proFile->fileName(), m_lineNo, msg);
m_handler->message(type, msg, m_proFile->fileName(), m_lineNo);
}
QT_END_NAMESPACE