On terça-feira, 13 de agosto de 2013 18:44:41, Richard Turner wrote: > QUrl downloadUrl1 = QUrl::fromEncoded(str.toUtf8()); > QUrl downloadUrl2 = QUrl::fromPercentEncoding(str.toUtf8());
Please note QUrl::fromEncoded returns a QUrl. QUrl::fromPercentEncoding returns a QString. That's the difference. Your code above also calls the QUrl constructor taking a QString, which is a big no-no in Qt 4 code, but entirely acceptable in Qt 5. On the other hand, if you have any percent sequences not making UTF-8, QUrl::fromPercentEncoding will mangle them. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest