Qt-interest Archive, August 2006
Does all URL handling have to be done "manually" in 4.x?
Message 1 in thread
In Qt3, we had the QUrlOperator class, which was nice in
that you could hand it a http://whatever URL, a file:://whatever
URL, or a ftp:://whatever URL and it would present a fairly
scheme-independent interface to the caller (though obviously
certain operations (like file delete) weren't supported with
certain schemes (like http).
It appears this is all gone in Qt4. There's QHttp which apparently
can only take URLs with a http (or maybe https) scheme. There's
QFile which does NOT take file://whatever URLs. And there QFtp
which does NOT take ftp:://whatever URLs.
Am I missing something, or am I going to have to write code to
look at the scheme of a QUrl I am passed, then based on the scheme
extract out information I need and then construct and use a QHttp,
QFile, or QFtp as appropriate?
If so, why did TT get rid of QUrlOperator? I can certainly agree
with making sure we have QHttp, QFile, and QFtp for when we need
scheme-specific fine control. But having a scheme-independent
interface was nice. At the very least, why not have QFtp and QFile
constructors which can initialize from QUrls so that the programmer
doesn't have to extract the info from the QUrl?
== Rich Carreiro
--
[ signature omitted ]