From 343528841e72adf36a37d9afd7260e260a9342eb Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 30 Apr 2019 12:51:36 +0200 Subject: Prefix textstream operators with Qt:: As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen --- examples/xml/htmlinfo/main.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'examples/xml') diff --git a/examples/xml/htmlinfo/main.cpp b/examples/xml/htmlinfo/main.cpp index 22bf36f33c..bc19ae4a82 100644 --- a/examples/xml/htmlinfo/main.cpp +++ b/examples/xml/htmlinfo/main.cpp @@ -54,10 +54,10 @@ void parseHtmlFile(QTextStream &out, const QString &fileName) { QFile file(fileName); - out << "Analysis of HTML file: " << fileName << endl; + out << "Analysis of HTML file: " << fileName << Qt::endl; if (!file.open(QIODevice::ReadOnly)) { - out << " Couldn't open the file." << endl << endl << endl; + out << " Couldn't open the file." << Qt::endl << Qt::endl << Qt::endl; return; } @@ -85,22 +85,22 @@ void parseHtmlFile(QTextStream &out, const QString &fileName) //! [2] if (reader.hasError()) { out << " The HTML file isn't well-formed: " << reader.errorString() - << endl << endl << endl; + << Qt::endl << Qt::endl << Qt::endl; return; } //! [2] - out << " Title: \"" << title << '"' << endl - << " Number of paragraphs: " << paragraphCount << endl - << " Number of links: " << links.size() << endl - << " Showing first few links:" << endl; + out << " Title: \"" << title << '"' << Qt::endl + << " Number of paragraphs: " << paragraphCount << Qt::endl + << " Number of links: " << links.size() << Qt::endl + << " Showing first few links:" << Qt::endl; while (links.size() > 5) links.removeLast(); for (const QString &link : qAsConst(links)) - out << " " << link << endl; - out << endl << endl; + out << " " << link << Qt::endl; + out << Qt::endl << Qt::endl; } int main(int argc, char **argv) -- cgit v1.2.3