summaryrefslogtreecommitdiff
path: root/src/xmlpatterns/api/qcoloringmessagehandler.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2011-10-20 00:21:08 +0200
committerQt by Nokia <qt-info@nokia.com>2012-04-20 15:49:35 +0200
commit3c03878293bf2a155762a61d3a29c958eddbe0b1 (patch)
treef0a3532d628e4927b1d000292f7bed10baffc1f9 /src/xmlpatterns/api/qcoloringmessagehandler.cpp
parent36ff2e99f7474c93b3a8f6578a2717dad81034d7 (diff)
downloadqtxmlpatterns-3c03878293bf2a155762a61d3a29c958eddbe0b1.tar.gz
Use the new QUrl API
Use QByteArray::{from,to}PercentEncoding when operating directly on byte arrays. Don't use toEncoded/fromEncoded if the final source/destination is a QString -- QUrl's constructor and toString() are fine for that. Change-Id: I9349c2c6a12c43b8c5a4a4fca1fa796272ca90fa Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/xmlpatterns/api/qcoloringmessagehandler.cpp')
-rw-r--r--src/xmlpatterns/api/qcoloringmessagehandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/xmlpatterns/api/qcoloringmessagehandler.cpp b/src/xmlpatterns/api/qcoloringmessagehandler.cpp
index dc574e3..b7d0d9f 100644
--- a/src/xmlpatterns/api/qcoloringmessagehandler.cpp
+++ b/src/xmlpatterns/api/qcoloringmessagehandler.cpp
@@ -84,14 +84,14 @@ void ColoringMessageHandler::handleMessage(QtMsgType type,
{
if(hasLine)
{
- writeUncolored(QXmlPatternistCLI::tr("Warning in %1, at line %2, column %3: %4").arg(QString::fromLatin1(sourceLocation.uri().toEncoded()),
+ writeUncolored(QXmlPatternistCLI::tr("Warning in %1, at line %2, column %3: %4").arg(sourceLocation.uri().toString(),
QString::number(sourceLocation.line()),
QString::number(sourceLocation.column()),
colorifyDescription(description)));
}
else
{
- writeUncolored(QXmlPatternistCLI::tr("Warning in %1: %2").arg(QString::fromLatin1(sourceLocation.uri().toEncoded()),
+ writeUncolored(QXmlPatternistCLI::tr("Warning in %1: %2").arg(sourceLocation.uri().toString(),
colorifyDescription(description)));
}
@@ -109,7 +109,7 @@ void ColoringMessageHandler::handleMessage(QtMsgType type,
if(sourceLocation.isNull())
location = QXmlPatternistCLI::tr("Unknown location");
else
- location = QString::fromLatin1(sourceLocation.uri().toEncoded());
+ location = sourceLocation.uri().toString();
QString errorId;
/* If it's a standard error code, we don't want to output the
@@ -117,7 +117,7 @@ void ColoringMessageHandler::handleMessage(QtMsgType type,
if(uri.toString() == QLatin1String("http://www.w3.org/2005/xqt-errors"))
errorId = errorCode;
else
- errorId = QString::fromLatin1(identifier.toEncoded());
+ errorId = identifier.toString();
if(hasLine)
{