rsslisting example (coding style): split a long line, purge stray braces

Task-number: QTBUG-111228
Change-Id: Ic919d4dee74823f11c55d286beba447d45111754
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 00ccc564348f83b07337b7575dfb0a9d0ec8ff2d)
This commit is contained in:
Edward Welbourne 2023-05-04 17:02:09 +02:00
parent df942089da
commit e79e2912bb

View File

@ -112,10 +112,10 @@ void RSSListing::fetch()
void RSSListing::metaDataChanged() void RSSListing::metaDataChanged()
{ {
QUrl redirectionTarget = currentReply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl(); const QUrl redirectionTarget =
if (redirectionTarget.isValid()) { currentReply->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
if (redirectionTarget.isValid())
get(redirectionTarget); get(redirectionTarget);
}
} }
/* /*
@ -180,9 +180,8 @@ void RSSListing::parseXml()
linkString += xml.text(); linkString += xml.text();
} }
} }
if (xml.error() && xml.error() != QXmlStreamReader::PrematureEndOfDocumentError) { if (xml.error() && xml.error() != QXmlStreamReader::PrematureEndOfDocumentError)
qWarning() << "XML ERROR:" << xml.lineNumber() << ": " << xml.errorString(); qWarning() << "XML ERROR:" << xml.lineNumber() << ": " << xml.errorString();
}
} }
/* /*