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 --- src/xml/doc/snippets/code/src_xml_dom_qdom.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/xml/doc/snippets') diff --git a/src/xml/doc/snippets/code/src_xml_dom_qdom.cpp b/src/xml/doc/snippets/code/src_xml_dom_qdom.cpp index 2d18e0e537..f7d81f676f 100644 --- a/src/xml/doc/snippets/code/src_xml_dom_qdom.cpp +++ b/src/xml/doc/snippets/code/src_xml_dom_qdom.cpp @@ -74,7 +74,7 @@ QDomNode n = d.firstChild(); while (!n.isNull()) { if (n.isElement()) { QDomElement e = n.toElement(); - cout << "Element name: " << e.tagName() << endl; + cout << "Element name: " << e.tagName() << Qt::endl; break; } n = n.nextSibling(); @@ -126,10 +126,10 @@ QDomElement element4 = document.createElement("MyElement"); QDomElement e = //... //... QDomAttr a = e.attributeNode("href"); -cout << a.value() << endl; // prints "http://qt-project.org" +cout << a.value() << Qt::endl; // prints "http://qt-project.org" a.setValue("http://qt-project.org/doc"); // change the node's attribute QDomAttr a2 = e.attributeNode("href"); -cout << a2.value() << endl; // prints "http://qt-project.org/doc" +cout << a2.value() << Qt::endl; // prints "http://qt-project.org/doc" //! [8] @@ -201,7 +201,7 @@ QDomNode n = docElem.firstChild(); while(!n.isNull()) { QDomElement e = n.toElement(); // try to convert the node to an element. if(!e.isNull()) { - cout << qPrintable(e.tagName()) << endl; // the node really is an element. + cout << qPrintable(e.tagName()) << Qt::endl; // the node really is an element. } n = n.nextSibling(); } -- cgit v1.2.3