summaryrefslogtreecommitdiff
path: root/src/plugins/welcome
diff options
context:
space:
mode:
authorDaniel Molkentin <daniel.molkentin@nokia.com>2009-08-10 11:41:28 +0200
committerDaniel Molkentin <daniel.molkentin@nokia.com>2009-08-10 11:41:54 +0200
commit452a565ea2e5fdc7e6c498ec17bf1dd55a40ee1e (patch)
tree35fabb34abbad89bec8f79497810832e270e69ec /src/plugins/welcome
parent0ab8f1ed462d9202a3d925c52448b35490ac658c (diff)
downloadqt-creator-452a565ea2e5fdc7e6c498ec17bf1dd55a40ee1e.tar.gz
Do not crash on some system when no proxy is set
Diffstat (limited to 'src/plugins/welcome')
-rw-r--r--src/plugins/welcome/rssfetcher.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/welcome/rssfetcher.cpp b/src/plugins/welcome/rssfetcher.cpp
index 7254c2d00b..e0848a7969 100644
--- a/src/plugins/welcome/rssfetcher.cpp
+++ b/src/plugins/welcome/rssfetcher.cpp
@@ -120,7 +120,9 @@ RSSFetcher::RSSFetcher(int maxItems, QObject *parent)
void RSSFetcher::fetch(const QUrl &url)
{
- m_http.setProxy(QNetworkProxyFactory::systemProxyForQuery(QNetworkProxyQuery(url)).first());
+ QList<QNetworkProxy> proxies = QNetworkProxyFactory::systemProxyForQuery(QNetworkProxyQuery(url));
+ if (proxies.count() > 0)
+ m_http.setProxy(proxies.first());
m_http.setHost(url.host());
QString agentStr = QString("Qt-Creator/%1 (QHttp %2; %3; %4; %5 bit)")
.arg(Core::Constants::IDE_VERSION_LONG).arg(qVersion())