From 3e707f559f6f26ab7a5d5623f8e5af9ea9cc317e Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 8 Jun 2010 09:25:04 +0200 Subject: Fix slow network access in qmlviewer (Windows) If no proxy is defined in the preferences, qmlviewer uses systemProxyForQuery to automatically retrieve the proxy settings of the Operating System. However, calling systemProxyForQuery can take several seconds in case Windows to automatically detect proxies (QTBUG-10106). This hot fix therefore just disables querying the OS proxies on Windows. Task-number: QTBUG-11261 Reviewed-by: Warwick Allison --- tools/qml/qmlruntime.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 5b0139f..d95bec2 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -281,7 +281,12 @@ public: ret << httpProxy; return ret; } +#ifdef Q_OS_WIN + // systemProxyForQuery can take insanely long on Windows (QTBUG-10106) + return QNetworkProxyFactory::proxyForQuery(query); +#else return QNetworkProxyFactory::systemProxyForQuery(query); +#endif } void setHttpProxy (QNetworkProxy proxy) { -- cgit v0.12