summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2010-06-08 09:25:04 +0200
committerKai Koehne <kai.koehne@nokia.com>2010-06-08 09:35:14 +0200
commit3e707f559f6f26ab7a5d5623f8e5af9ea9cc317e (patch)
tree87fba34156071050f1d54eeb85a78178f45c39b9 /tools
parentfe3439827048b54288e5807a057ea6093d67bca9 (diff)
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
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/qmlruntime.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp
index 5b0139f689..d95bec269d 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)
{