QmlDebugClient: hide all the socket details from clients

Like this no one will get the idea that the socket state represents
the connection state and we can safely replace the underlying
implementation with something not derived from QAbstractSocket.
All the logging is retained but the connection creates the messages
now.

Change-Id: If84ff42f1fa9785254fbd49c75be867b9f663c83
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
This commit is contained in:
Ulf Hermann
2014-05-05 17:18:11 +02:00
parent b63d9c6df0
commit a7012c5a87
8 changed files with 136 additions and 145 deletions

View File

@@ -266,8 +266,8 @@ QmlEngine::QmlEngine(const DebuggerStartParameters &startParameters, DebuggerEng
if (masterEngine)
setMasterEngine(masterEngine);
connect(&m_adapter, SIGNAL(connectionError(QAbstractSocket::SocketError)),
SLOT(connectionError(QAbstractSocket::SocketError)));
connect(&m_adapter, SIGNAL(connectionError(QDebugSupport::Error)),
SLOT(connectionError(QDebugSupport::Error)));
connect(&m_adapter, SIGNAL(serviceConnectionError(QString)),
SLOT(serviceConnectionError(QString)));
connect(&m_adapter, SIGNAL(connected()),
@@ -499,9 +499,9 @@ void QmlEngine::errorMessageBoxFinished(int result)
}
}
void QmlEngine::connectionError(QAbstractSocket::SocketError socketError)
void QmlEngine::connectionError(QDebugSupport::Error error)
{
if (socketError == QAbstractSocket::RemoteHostClosedError)
if (error == QDebugSupport::RemoteClosedConnectionError)
showMessage(tr("QML Debugger: Remote host closed connection."), StatusBar);
if (!isSlaveEngine()) { // normal flow for slave engine when gdb exits