summaryrefslogtreecommitdiffstats
path: root/examples/xml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2019-04-30 12:51:36 +0200
committerLars Knoll <lars.knoll@qt.io>2019-05-02 11:52:02 +0000
commit343528841e72adf36a37d9afd7260e260a9342eb (patch)
tree399c295e0e08975106c12c7ef7deecd73436cf66 /examples/xml
parent185ba7f4cfd577189f9d8b9d55d7f9ae467055d3 (diff)
Prefix textstream operators with Qt::
As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'examples/xml')
-rw-r--r--examples/xml/htmlinfo/main.cpp18
1 files changed, 9 insertions, 9 deletions
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)