diff --git a/ChangeLog b/ChangeLog index e36701968..0b4917494 100644 --- a/ChangeLog +++ b/ChangeLog @@ -14,6 +14,7 @@ 7. Fix issue with certain styles not drawing selection background in icon view. 8. If we show an error, or info, message whilst using compact interface - then adjust size to take message widget into account. +9. If we loose MPD connection, then show error widget. 0.8.2 ----- diff --git a/mpd/mpdconnection.cpp b/mpd/mpdconnection.cpp index cf6bd8aeb..6527b18ca 100644 --- a/mpd/mpdconnection.cpp +++ b/mpd/mpdconnection.cpp @@ -426,6 +426,7 @@ MPDConnection::Response MPDConnection::sendCommand(const QByteArray &command, bo // Failed to connect, so close *both* sockets! disconnectFromMPD(); emit stateChanged(false); + emit error(i18n("Connection to %1 failed").arg(details.description()), true); return Response(false); } } @@ -918,6 +919,7 @@ void MPDConnection::onSocketStateChanged(QAbstractSocket::SocketState socketStat // Failed to connect idle socket - so close *both* disconnectFromMPD(); emit stateChanged(false); + emit error(i18n("Connection to %1 failed").arg(details.description()), true); } if (QAbstractSocket::ConnectedState==idleSocket.state()) { connect(&idleSocket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(onSocketStateChanged(QAbstractSocket::SocketState))); @@ -944,6 +946,7 @@ void MPDConnection::parseIdleReturn(const QByteArray &data) // Failed to connect idle socket - so close *both* disconnectFromMPD(); emit stateChanged(false); + emit error(i18n("Connection to %1 failed").arg(details.description()), true); } return; }