forked from qt-creator/qt-creator
QML Debugger: Show error messages when connection is lost
Related to Qt commit bd521ed56f8e4be7117dc3534c6fded68f7a70c5
This commit is contained in:
@@ -166,9 +166,10 @@ void QmlEngine::connectionStartupFailed()
|
||||
notifyEngineRunFailed();
|
||||
}
|
||||
|
||||
void QmlEngine::connectionError()
|
||||
void QmlEngine::connectionError(QAbstractSocket::SocketError socketError)
|
||||
{
|
||||
// do nothing for now - only exit the debugger when inferior exits.
|
||||
if (socketError ==QAbstractSocket::RemoteHostClosedError)
|
||||
plugin()->showMessage(tr("QML Debugger: Remote host closed connection."), StatusBar);
|
||||
}
|
||||
|
||||
void QmlEngine::runEngine()
|
||||
@@ -251,13 +252,15 @@ void QmlEngine::shutdownEngine()
|
||||
shutdownEngineAsSlave();
|
||||
|
||||
notifyEngineShutdownOk();
|
||||
plugin()->showMessage(QString(), StatusBar);
|
||||
}
|
||||
|
||||
void QmlEngine::setupEngine()
|
||||
{
|
||||
m_adapter->setMaxConnectionAttempts(MaxConnectionAttempts);
|
||||
m_adapter->setConnectionAttemptInterval(ConnectionAttemptDefaultInterval);
|
||||
connect(m_adapter, SIGNAL(connectionError()), SLOT(connectionError()));
|
||||
connect(m_adapter, SIGNAL(connectionError(QAbstractSocket::SocketError)),
|
||||
SLOT(connectionError(QAbstractSocket::SocketError)));
|
||||
connect(m_adapter, SIGNAL(connected()), SLOT(connectionEstablished()));
|
||||
connect(m_adapter, SIGNAL(connectionStartupFailed()), SLOT(connectionStartupFailed()));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user