From afec234f5903f00690f9ed6fa83fac22ec0a8f23 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 1 Apr 2011 18:43:42 +0200 Subject: QLocalSocket/Win: handle ERROR_ACCESS_DENIED When we're getting an ERROR_ACCESS_DENIED we're setting the socket's error to QLocalSocket::SocketAccessError. Task-number: QTBUG-13644 Reviewed-by: ossi --- src/network/socket/qlocalsocket_win.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp index 7bbe275..468bf8d 100644 --- a/src/network/socket/qlocalsocket_win.cpp +++ b/src/network/socket/qlocalsocket_win.cpp @@ -79,6 +79,11 @@ void QLocalSocketPrivate::setErrorString(const QString &function) errorString = QLocalSocket::tr("%1: Invalid name").arg(function); state = QLocalSocket::UnconnectedState; break; + case ERROR_ACCESS_DENIED: + error = QLocalSocket::SocketAccessError; + errorString = QLocalSocket::tr("%1: Access denied").arg(function); + state = QLocalSocket::UnconnectedState; + break; default: error = QLocalSocket::UnknownSocketError; errorString = QLocalSocket::tr("%1: Unknown error %2").arg(function).arg(windowsError); -- cgit v0.12