diff options
author | Martin Petersson <martin.petersson@nokia.com> | 2011-02-24 11:28:40 (GMT) |
---|---|---|
committer | Martin Petersson <martin.petersson@nokia.com> | 2011-02-24 11:33:28 (GMT) |
commit | f33378ec70a52c5e99d6b496c9c8c3980d1258fd (patch) | |
tree | d69fa7d5510313e0d69b1e971650714622c34226 /src | |
parent | 2a2e50befeb3414205377702dfb9fe082f213ede (diff) | |
download | Qt-f33378ec70a52c5e99d6b496c9c8c3980d1258fd.zip Qt-f33378ec70a52c5e99d6b496c9c8c3980d1258fd.tar.gz Qt-f33378ec70a52c5e99d6b496c9c8c3980d1258fd.tar.bz2 |
QNAM: Add a warning for misuse of the file backend.
Task-number: QTBUG-17731
Reviewed-by: Markus Goetz
Diffstat (limited to 'src')
-rw-r--r-- | src/network/access/qnetworkaccessfilebackend.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/network/access/qnetworkaccessfilebackend.cpp b/src/network/access/qnetworkaccessfilebackend.cpp index 6da0722..7ebf626 100644 --- a/src/network/access/qnetworkaccessfilebackend.cpp +++ b/src/network/access/qnetworkaccessfilebackend.cpp @@ -75,6 +75,8 @@ QNetworkAccessFileBackendFactory::create(QNetworkAccessManager::Operation op, // // this construct here must match the one below in open() QFileInfo fi(url.toString(QUrl::RemoveAuthority | QUrl::RemoveFragment | QUrl::RemoveQuery)); + if ((url.scheme().length()==1) && fi.exists()) + qWarning("QNetworkAccessFileBackendFactory: URL has no schema set, use file:// for files"); if (fi.exists() || (op == QNetworkAccessManager::PutOperation && fi.dir().exists())) return new QNetworkAccessFileBackend; } |