The QUrl constructor can be used once again, so use it.
authorThiago Macieira <thiago.macieira@intel.com>
Mon, 26 Mar 2012 22:56:23 +0000 (19:56 -0300)
committerQt by Nokia <qt-info@nokia.com>
Tue, 24 Apr 2012 11:01:10 +0000 (13:01 +0200)
Slight performance gain by avoiding a round-trip through QByteArray.

Change-Id: Ibcd2e20f92236ca9878e52665b6d677019bb19a4
Reviewed-by: Matthew Vogt <matthew.vogt@nokia.com>
src/qml/qml/qqmlxmlhttprequest.cpp

index 8f63a4b..94ee7c7 100644 (file)
@@ -1503,7 +1503,7 @@ static v8::Handle<v8::Value> qmlxmlhttprequest_open(const v8::Arguments &args)
         V8THROW_DOM(DOMEXCEPTION_SYNTAX_ERR, "Unsupported HTTP method type");
 
     // Argument 1 - URL
-    QUrl url = QUrl::fromEncoded(engine->toString(args[1]).toUtf8());
+    QUrl url = QUrl(engine->toString(args[1]));
 
     if (url.isRelative()) 
         url = engine->callingContext()->resolvedUrl(url);