Valgrind: Merge parsers' finished() and internalError() signals

Replace them with done() signal.

Change-Id: I5f03df927ddefd803d9cb0b06d3f4c1601a15381
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2023-08-08 17:03:08 +02:00
parent 3970a834bc
commit 0a320185dc
6 changed files with 20 additions and 23 deletions

View File

@@ -318,12 +318,6 @@ static Status::State parseState(const QString &state)
throw ParserException(Tr::tr("Unknown state \"%1\"").arg(state));
}
void Parser::Private::reportInternalError(const QString &e)
{
errorString = e;
emit q->internalError(e);
}
static Stack makeStack(const XauxWhat &xauxwhat, const QList<Frame> &frames)
{
Stack s;
@@ -618,7 +612,9 @@ void Parser::Private::parse(QIODevice *device)
{
QTC_ASSERT(device, return);
reader.setDevice(device);
errorString.clear();
bool success = true;
try {
while (notAtEnd()) {
blockingReadNext();
@@ -639,11 +635,13 @@ void Parser::Private::parse(QIODevice *device)
checkTool(blockingReadElementText());
}
} catch (const ParserException &e) {
reportInternalError(e.message());
errorString = e.message();
success = false;
} catch (...) {
reportInternalError(Tr::tr("Unexpected exception caught during parsing."));
errorString = Tr::tr("Unexpected exception caught during parsing.");
success = false;
}
emit q->finished();
emit q->done(success, errorString);
}
Parser::Parser(QObject *parent)