CR feedback

This commit is contained in:
Brad Hefta-Gaub 2015-09-09 17:26:01 -07:00
parent d62945c6bf
commit f710afbfd1

View file

@ -28,10 +28,8 @@ ResourceRequest* ResourceManager::createResourceRequest(QObject* parent, const Q
} else { } else {
// check the degenerative file case: on windows we can often have urls of the form c:/filename // check the degenerative file case: on windows we can often have urls of the form c:/filename
// this checks for and works around that case. // this checks for and works around that case.
QString urlWithFileSchemeName = URL_SCHEME_FILE + ":///" + url.toString(); QUrl urlWithFileScheme { QString(URL_SCHEME_FILE + ":///" + url.toString()) };
QUrl urlWithFileScheme = urlWithFileSchemeName; if (!urlWithFileScheme.toLocalFile().isEmpty()) {
QString fileName = urlWithFileScheme.toLocalFile();
if (!fileName.isEmpty()) {
return new FileResourceRequest(parent, urlWithFileScheme); return new FileResourceRequest(parent, urlWithFileScheme);
} }
} }