From f9bf737d74c2493f7a535048cb4992d3e4cd3c99 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 13 Oct 2015 09:06:58 +0200 Subject: Examples/Doc snippets: Fix single-character string literals. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use character literals where applicable. Change-Id: I79fa5018f05735201ae35ee94ba0d356fcad1056 Reviewed-by: Topi Reiniƶ --- examples/xml/htmlinfo/main.cpp | 2 +- examples/xml/saxbookmarks/xbelgenerator.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/xml') diff --git a/examples/xml/htmlinfo/main.cpp b/examples/xml/htmlinfo/main.cpp index 3869ca5472..1424cfca67 100644 --- a/examples/xml/htmlinfo/main.cpp +++ b/examples/xml/htmlinfo/main.cpp @@ -79,7 +79,7 @@ void parseHtmlFile(QTextStream &out, const QString &fileName) { } //! [2] - out << " Title: \"" << title << "\"" << endl + out << " Title: \"" << title << '"' << endl << " Number of paragraphs: " << paragraphCount << endl << " Number of links: " << links.size() << endl << " Showing first few links:" << endl; diff --git a/examples/xml/saxbookmarks/xbelgenerator.cpp b/examples/xml/saxbookmarks/xbelgenerator.cpp index 24612c132c..5f1ec62e7e 100644 --- a/examples/xml/saxbookmarks/xbelgenerator.cpp +++ b/examples/xml/saxbookmarks/xbelgenerator.cpp @@ -81,8 +81,8 @@ QString XbelGenerator::escapedAttribute(const QString &str) { QString result = escapedText(str); result.replace("\"", """); - result.prepend("\""); - result.append("\""); + result.prepend(QLatin1Char('"')); + result.append(QLatin1Char('"')); return result; } -- cgit v1.2.3