OSDN Git Service

QmlDebugging: Fix on-device debugging for people with a default proxy
authorKai Koehne <kai.koehne@nokia.com>
Thu, 11 Aug 2011 07:57:44 +0000 (09:57 +0200)
committerKai Koehne <kai.koehne@nokia.com>
Thu, 11 Aug 2011 09:25:04 +0000 (11:25 +0200)
Qt Creator by default honors the proxy settings of the environment.
This is the wrong choice when connecting to your device, leading to
'Cannot connect to in-process debugger' errors.

Change-Id: Ie0b822dec601463ba3a620efe1a1e35bb24b6c5a
Reviewed-on: http://codereview.qt.nokia.com/2846
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
src/libs/qmljsdebugclient/qdeclarativedebugclient.cpp

index 094da28..9e45145 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <QtCore/qdebug.h>
 #include <QtCore/qstringlist.h>
+#include <QtNetwork/qnetworkproxy.h>
 #include <symbiandevicemanager.h>
 
 namespace QmlJsDebugClient {
@@ -286,6 +287,7 @@ void QDeclarativeDebugConnection::flush()
 void QDeclarativeDebugConnection::connectToHost(const QString &hostName, quint16 port)
 {
     QTcpSocket *socket = new QTcpSocket(d);
+    socket->setProxy(QNetworkProxy::NoProxy);
     d->device = socket;
     d->connectDeviceSignals();
     d->gotHello = false;