Fix building with Qt 4.7.
QUrl::isLocalFile() is available starting with Qt 4.8. We can safely check for
a file:// url instead.
Qt 4.8 dropped support for OS X 10.4 / 10.5. Since we're still supporting those
we need to keep using Qt 4.7 on OS X. We might want to consider requiring at
least 10.6 on OS X with the next major release of Rockbox Utility.
Change-Id: I18998fe3c7a38773479bc7a1c32ca6e4966359e9
diff --git a/rbutil/rbutilqt/base/httpget.cpp b/rbutil/rbutilqt/base/httpget.cpp
index 476da87..1c879e7 100644
--- a/rbutil/rbutilqt/base/httpget.cpp
+++ b/rbutil/rbutilqt/base/httpget.cpp
@@ -170,7 +170,7 @@
return;
}
else if(m_lastStatusCode == 200 ||
- (reply->url().isLocalFile() && reply->error() == 0)) {
+ (reply->url().scheme() == "file" && reply->error() == 0)) {
// callers might not be aware if the request is file:// so fake 200.
m_lastStatusCode = 200;
m_data = reply->readAll();