summaryrefslogtreecommitdiffstats
path: root/src/corelib/mimetypes
diff options
context:
space:
mode:
authorDavid Faure <david.faure@kdab.com>2017-02-25 11:56:12 +0100
committerDavid Faure <david.faure@kdab.com>2017-07-03 13:18:03 +0000
commitdf06926b8a25316db5c21a82e68beb097999e7b2 (patch)
treeec1fbf0a4d4d5cce4395d1de91e8bb4422ecb2d7 /src/corelib/mimetypes
parentf2df5c64bde5a3837048347b18c246e674de5caa (diff)
QMimeDatabase::mimeTypeForUrl: skip content check for remote URLs
The code was trying to open a local file with the same path as the remote URL, which is unnecessary and wrong in the unlikely case where such a file would exist. Spotted by Christoph Feck when reading the code. Change-Id: I1d77e5781cf606b025d2877f48a9914dd1e36b1d Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/corelib/mimetypes')
-rw-r--r--src/corelib/mimetypes/qmimedatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/mimetypes/qmimedatabase.cpp b/src/corelib/mimetypes/qmimedatabase.cpp
index fda9f01643..687f0b3e03 100644
--- a/src/corelib/mimetypes/qmimedatabase.cpp
+++ b/src/corelib/mimetypes/qmimedatabase.cpp
@@ -526,7 +526,7 @@ QMimeType QMimeDatabase::mimeTypeForUrl(const QUrl &url) const
if (scheme.startsWith(QLatin1String("http")) || scheme == QLatin1String("mailto"))
return mimeTypeForName(d->defaultMimeType());
- return mimeTypeForFile(url.path());
+ return mimeTypeForFile(url.path(), MatchExtension);
}
/*!