QLocalSocket shouldn't emit disconnected if it isn't connected yet.

Task-number: QTBUG-22082
Change-Id: I2e1dae133f50a232d4be3ff63cafaf1b417b286c
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
This commit is contained in:
Jonas M. Gastal 2011-12-19 13:55:29 -02:00 committed by Qt by Nokia
parent ebe43992f9
commit d17b56f42b

View File

@ -100,7 +100,7 @@ void QLocalSocketPrivate::_q_winError(ulong windowsError, const QString &functio
if (currentState != state) {
q->emit stateChanged(state);
if (state == QLocalSocket::UnconnectedState)
if (state == QLocalSocket::UnconnectedState && currentState != QLocalSocket::ConnectingState)
q->emit disconnected();
}
emit q->error(error);