summaryrefslogtreecommitdiffstats
path: root/tools/qml
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2010-06-08 07:25:04 (GMT)
committerKai Koehne <kai.koehne@nokia.com>2010-06-08 07:35:14 (GMT)
commit3e707f559f6f26ab7a5d5623f8e5af9ea9cc317e (patch)
tree87fba34156071050f1d54eeb85a78178f45c39b9 /tools/qml
parentfe3439827048b54288e5807a057ea6093d67bca9 (diff)
downloadQt-3e707f559f6f26ab7a5d5623f8e5af9ea9cc317e.zip
Qt-3e707f559f6f26ab7a5d5623f8e5af9ea9cc317e.tar.gz
Qt-3e707f559f6f26ab7a5d5623f8e5af9ea9cc317e.tar.bz2
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/qml')
-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 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)
{