From 04cd6d9569e3034e57108e8309c353c13803abe8 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 24 May 2012 10:22:33 +0200 Subject: QtXmlPatterns: Fix compiler warnings. QString conversions, assigned/unused variables, braces around ambiguous else. Also fixed coding style in the affected lines to make the sanity bot happy. Change-Id: I85e440861ec9e8177a6cf9a017dc981a25212f54 Reviewed-by: Mark Brand --- src/xmlpatterns/functions/qstringvaluefns.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/xmlpatterns/functions/qstringvaluefns.cpp') diff --git a/src/xmlpatterns/functions/qstringvaluefns.cpp b/src/xmlpatterns/functions/qstringvaluefns.cpp index 0656721..2343737 100644 --- a/src/xmlpatterns/functions/qstringvaluefns.cpp +++ b/src/xmlpatterns/functions/qstringvaluefns.cpp @@ -345,8 +345,8 @@ Item EncodeString::evaluateSingleton(const DynamicContext::Ptr &context) const if(!item) return CommonValues::EmptyString; - return AtomicString::fromValue(item.stringValue().toUtf8().toPercentEncoding(m_excludeChars, - m_includeChars).constData()); + const QByteArray value = item.stringValue().toUtf8().toPercentEncoding(m_excludeChars, m_includeChars); + return AtomicString::fromValue(QLatin1String(value)); } const char *const EncodeForURIFN::include = "#!*'()"; -- cgit v1.2.1