forked from qt-creator/qt-creator
QmlDbg: Fix behavior when re-running the same run control
Change-Id: Icb405b4751fc885d8b96d1daec3653236b564ef0 Reviewed-on: http://codereview.qt.nokia.com/2352 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
This commit is contained in:
@@ -237,6 +237,11 @@ void QDeclarativeDebugConnection::close()
|
||||
QIODevice::close();
|
||||
d->device->close();
|
||||
emit stateChanged(QAbstractSocket::UnconnectedState);
|
||||
|
||||
QHash<QString, QDeclarativeDebugClient*>::iterator iter = d->plugins.begin();
|
||||
for (; iter != d->plugins.end(); ++iter) {
|
||||
iter.value()->statusChanged(QDeclarativeDebugClient::NotConnected);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,6 +288,7 @@ void QDeclarativeDebugConnection::connectToHost(const QString &hostName, quint16
|
||||
QTcpSocket *socket = new QTcpSocket(d);
|
||||
d->device = socket;
|
||||
d->connectDeviceSignals();
|
||||
d->gotHello = false;
|
||||
connect(socket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SIGNAL(stateChanged(QAbstractSocket::SocketState)));
|
||||
connect(socket, SIGNAL(error(QAbstractSocket::SocketError)), this, SIGNAL(error(QAbstractSocket::SocketError)));
|
||||
connect(socket, SIGNAL(connected()), this, SIGNAL(connected()));
|
||||
@@ -297,6 +303,7 @@ void QDeclarativeDebugConnection::connectToOst(const QString &port)
|
||||
ost->setParent(d);
|
||||
d->device = ost;
|
||||
d->connectDeviceSignals();
|
||||
d->gotHello = false;
|
||||
QIODevice::open(ReadWrite | Unbuffered);
|
||||
emit stateChanged(QAbstractSocket::ConnectedState);
|
||||
emit connected();
|
||||
|
||||
Reference in New Issue
Block a user