mirror of
https://github.com/c0re100/qBittorrent-Enhanced-Edition.git
synced 2025-01-09 12:27:33 +08:00
Correctly handle XML parsing errors
This commit is contained in:
parent
7adccab687
commit
0a1e864f74
@ -591,16 +591,16 @@ void Parser::parse_impl(const QByteArray &feedData)
|
||||
xml.skipCurrentElement();
|
||||
}
|
||||
|
||||
if (!foundChannel)
|
||||
{
|
||||
m_result.error = tr("Invalid RSS feed.");
|
||||
}
|
||||
else if (xml.hasError())
|
||||
if (xml.hasError())
|
||||
{
|
||||
m_result.error = tr("%1 (line: %2, column: %3, offset: %4).")
|
||||
.arg(xml.errorString()).arg(xml.lineNumber())
|
||||
.arg(xml.columnNumber()).arg(xml.characterOffset());
|
||||
}
|
||||
else if (!foundChannel)
|
||||
{
|
||||
m_result.error = tr("Invalid RSS feed.");
|
||||
}
|
||||
|
||||
emit finished(m_result);
|
||||
m_result.articles.clear(); // clear articles only
|
||||
|
Loading…
Reference in New Issue
Block a user