1
0
Fork 0
forked from len0rd/rockbox

Create local file URL using QUrl.

Don't construct the local file URL from string. On Windows the URL needs to
start with file:/// instead of file://. QUrl handles this.

Change-Id: I3dea29a8d368ebdc20eeff6b1f1cf5058d1b5d05
This commit is contained in:
Dominik Riebeling 2016-04-09 13:15:11 +02:00
parent 14ef6079c0
commit efe3775145

View file

@ -207,7 +207,7 @@ void TestHttpGet::testFileUrlRequest(void)
QTemporaryFile datafile;
datafile.open();
datafile.write(teststring.toLatin1());
m_getter->getFile(QUrl("file://" + datafile.fileName()));
m_getter->getFile(QUrl::fromLocalFile(datafile.fileName()));
datafile.close();
while(m_doneSpy->count() == 0 && m_waitTimeoutOccured == false)
QCoreApplication::processEvents();