qlocalserver_unix.cpp

Absolute File Name:/home/qt/qt5_coco/qt5/qtbase/src/network/socket/qlocalserver_unix.cpp
Source codeSwitch to Preprocessed file
LineSourceCount
1/****************************************************************************-
2**-
3** Copyright (C) 2016 The Qt Company Ltd.-
4** Contact: https://www.qt.io/licensing/-
5**-
6** This file is part of the QtNetwork module of the Qt Toolkit.-
7**-
8** $QT_BEGIN_LICENSE:LGPL$-
9** Commercial License Usage-
10** Licensees holding valid commercial Qt licenses may use this file in-
11** accordance with the commercial license agreement provided with the-
12** Software or, alternatively, in accordance with the terms contained in-
13** a written agreement between you and The Qt Company. For licensing terms-
14** and conditions see https://www.qt.io/terms-conditions. For further-
15** information use the contact form at https://www.qt.io/contact-us.-
16**-
17** GNU Lesser General Public License Usage-
18** Alternatively, this file may be used under the terms of the GNU Lesser-
19** General Public License version 3 as published by the Free Software-
20** Foundation and appearing in the file LICENSE.LGPL3 included in the-
21** packaging of this file. Please review the following information to-
22** ensure the GNU Lesser General Public License version 3 requirements-
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.-
24**-
25** GNU General Public License Usage-
26** Alternatively, this file may be used under the terms of the GNU-
27** General Public License version 2.0 or (at your option) the GNU General-
28** Public license version 3 or any later version approved by the KDE Free-
29** Qt Foundation. The licenses are as published by the Free Software-
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3-
31** included in the packaging of this file. Please review the following-
32** information to ensure the GNU General Public License requirements will-
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and-
34** https://www.gnu.org/licenses/gpl-3.0.html.-
35**-
36** $QT_END_LICENSE$-
37**-
38****************************************************************************/-
39-
40#include "qlocalserver.h"-
41#include "qlocalserver_p.h"-
42#include "qlocalsocket.h"-
43#include "qlocalsocket_p.h"-
44#include "qnet_unix_p.h"-
45#include "qtemporarydir.h"-
46-
47#ifndef QT_NO_LOCALSERVER-
48-
49#include <sys/socket.h>-
50#include <sys/un.h>-
51-
52#include <qdebug.h>-
53#include <qdir.h>-
54#include <qdatetime.h>-
55-
56#ifdef Q_OS_VXWORKS-
57# include <selectLib.h>-
58#endif-
59-
60QT_BEGIN_NAMESPACE-
61-
62void QLocalServerPrivate::init()-
63{-
64}-
65-
66bool QLocalServerPrivate::removeServer(const QString &name)-
67{-
68 QString fileName;-
69 if (name.startsWith(QLatin1Char('/'))) {
name.startsWit...tin1Char('/'))Description
TRUEnever evaluated
FALSEevaluated 35 times by 2 tests
Evaluated by:
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
0-35
70 fileName = name;-
71 } else {
never executed: end of block
0
72 fileName = QDir::cleanPath(QDir::tempPath());-
73 fileName += QLatin1Char('/') + name;-
74 }
executed 35 times by 2 tests: end of block
Executed by:
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
35
75 if (QFile::exists(fileName))
QFile::exists(fileName)Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 26 times by 2 tests
Evaluated by:
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
9-26
76 return QFile::remove(fileName);
executed 9 times by 1 test: return QFile::remove(fileName);
Executed by:
  • tst_qlocalsocket - unknown status
9
77 else-
78 return true;
executed 26 times by 2 tests: return true;
Executed by:
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
26
79}-
80-
81bool QLocalServerPrivate::listen(const QString &requestedServerName)-
82{-
83 Q_Q(QLocalServer);-
84-
85 // determine the full server path-
86 if (requestedServerName.startsWith(QLatin1Char('/'))) {
requestedServe...tin1Char('/'))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 47 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
1-47
87 fullServerName = requestedServerName;-
88 } else {
executed 1 time by 1 test: end of block
Executed by:
  • tst_qlocalsocket - unknown status
1
89 fullServerName = QDir::cleanPath(QDir::tempPath());-
90 fullServerName += QLatin1Char('/') + requestedServerName;-
91 }
executed 47 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
47
92 serverName = requestedServerName;-
93-
94 QByteArray encodedTempPath;-
95 const QByteArray encodedFullServerName = QFile::encodeName(fullServerName);-
96 QScopedPointer<QTemporaryDir> tempDir;-
97-
98 // Check any of the flags-
99 if (socketOptions & QLocalServer::WorldAccessOption) {
socketOptions ...ldAccessOptionDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 44 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
4-44
100 QFileInfo serverNameFileInfo(fullServerName);-
101 tempDir.reset(new QTemporaryDir(serverNameFileInfo.absolutePath() + QLatin1Char('/')));-
102 if (!tempDir->isValid()) {
!tempDir->isValid()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
0-4
103 setError(QLatin1String("QLocalServer::listen"));-
104 return false;
never executed: return false;
0
105 }-
106 encodedTempPath = QFile::encodeName(tempDir->path() + QLatin1String("/s"));-
107 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qlocalsocket - unknown status
4
108-
109 // create the unix socket-
110 listenSocket = qt_safe_socket(PF_UNIX, SOCK_STREAM, 0);-
111 if (-1 == listenSocket) {
-1 == listenSocketDescription
TRUEnever evaluated
FALSEevaluated 48 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
0-48
112 setError(QLatin1String("QLocalServer::listen"));-
113 closeServer();-
114 return false;
never executed: return false;
0
115 }-
116-
117 // Construct the unix address-
118 struct ::sockaddr_un addr;-
119 addr.sun_family = PF_UNIX;-
120 if (sizeof(addr.sun_path) < (uint)encodedFullServerName.size() + 1) {
sizeof(addr.su...ame.size() + 1Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 47 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
1-47
121 setError(QLatin1String("QLocalServer::listen"));-
122 closeServer();-
123 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_qlocalsocket - unknown status
1
124 }-
125-
126 if (socketOptions & QLocalServer::WorldAccessOption) {
socketOptions ...ldAccessOptionDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 43 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
4-43
127 if (sizeof(addr.sun_path) < (uint)encodedTempPath.size() + 1) {
sizeof(addr.su...ath.size() + 1Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
0-4
128 setError(QLatin1String("QLocalServer::listen"));-
129 closeServer();-
130 return false;
never executed: return false;
0
131 }-
132 ::memcpy(addr.sun_path, encodedTempPath.constData(),-
133 encodedTempPath.size() + 1);-
134 } else {
executed 4 times by 1 test: end of block
Executed by:
  • tst_qlocalsocket - unknown status
4
135 ::memcpy(addr.sun_path, encodedFullServerName.constData(),-
136 encodedFullServerName.size() + 1);-
137 }
executed 43 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
43
138-
139 // bind-
140 if(-1 == QT_SOCKET_BIND(listenSocket, (sockaddr *)&addr, sizeof(sockaddr_un))) {
-1 == ::bind(l...(sockaddr_un))Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 46 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
1-46
141 setError(QLatin1String("QLocalServer::listen"));-
142 // if address is in use already, just close the socket, but do not delete the file-
143 if(errno == EADDRINUSE)
(*__errno_location ()) == 98Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEnever evaluated
0-1
144 QT_CLOSE(listenSocket);
executed 1 time by 1 test: qt_safe_close(listenSocket);
Executed by:
  • tst_qlocalsocket - unknown status
1
145 // otherwise, close the socket and delete the file-
146 else-
147 closeServer();
never executed: closeServer();
0
148 listenSocket = -1;-
149 return false;
executed 1 time by 1 test: return false;
Executed by:
  • tst_qlocalsocket - unknown status
1
150 }-
151-
152 // listen for connections-
153 if (-1 == qt_safe_listen(listenSocket, 50)) {
-1 == qt_safe_...tenSocket, 50)Description
TRUEnever evaluated
FALSEevaluated 46 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
0-46
154 setError(QLatin1String("QLocalServer::listen"));-
155 closeServer();-
156 listenSocket = -1;-
157 if (error != QAbstractSocket::AddressInUseError)
error != QAbst...ressInUseErrorDescription
TRUEnever evaluated
FALSEnever evaluated
0
158 QFile::remove(fullServerName);
never executed: QFile::remove(fullServerName);
0
159 return false;
never executed: return false;
0
160 }-
161-
162 if (socketOptions & QLocalServer::WorldAccessOption) {
socketOptions ...ldAccessOptionDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 42 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
4-42
163 mode_t mode = 000;-
164-
165 if (socketOptions & QLocalServer::UserAccessOption)
socketOptions ...erAccessOptionDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
2
166 mode |= S_IRWXU;
executed 2 times by 1 test: mode |= (0400|0200|0100);
Executed by:
  • tst_qlocalsocket - unknown status
2
167-
168 if (socketOptions & QLocalServer::GroupAccessOption)
socketOptions ...upAccessOptionDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
2
169 mode |= S_IRWXG;
executed 2 times by 1 test: mode |= ((0400|0200|0100) >> 3);
Executed by:
  • tst_qlocalsocket - unknown status
2
170-
171 if (socketOptions & QLocalServer::OtherAccessOption)
socketOptions ...erAccessOptionDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
2
172 mode |= S_IRWXO;
executed 2 times by 1 test: mode |= (((0400|0200|0100) >> 3) >> 3);
Executed by:
  • tst_qlocalsocket - unknown status
2
173-
174 if (::chmod(encodedTempPath.constData(), mode) == -1) {
::chmod(encode...), mode) == -1Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
0-4
175 setError(QLatin1String("QLocalServer::listen"));-
176 closeServer();-
177 return false;
never executed: return false;
0
178 }-
179-
180 if (::rename(encodedTempPath.constData(), encodedFullServerName.constData()) == -1) {
::rename(encod...tData()) == -1Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
0-4
181 setError(QLatin1String("QLocalServer::listen"));-
182 closeServer();-
183 return false;
never executed: return false;
0
184 }-
185 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qlocalsocket - unknown status
4
186-
187 Q_ASSERT(!socketNotifier);-
188 socketNotifier = new QSocketNotifier(listenSocket,-
189 QSocketNotifier::Read, q);-
190 q->connect(socketNotifier, SIGNAL(activated(int)),-
191 q, SLOT(_q_onNewConnection()));-
192 socketNotifier->setEnabled(maxPendingConnections > 0);-
193 return true;
executed 46 times by 3 tests: return true;
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
46
194}-
195-
196bool QLocalServerPrivate::listen(qintptr socketDescriptor)-
197{-
198 Q_Q(QLocalServer);-
199-
200 // Attach to the localsocket-
201 listenSocket = socketDescriptor;-
202-
203 ::fcntl(listenSocket, F_SETFD, FD_CLOEXEC);-
204 ::fcntl(listenSocket, F_SETFL, ::fcntl(listenSocket, F_GETFL) | O_NONBLOCK);-
205-
206#ifdef Q_OS_LINUX-
207 struct ::sockaddr_un addr;-
208 QT_SOCKLEN_T len = sizeof(addr);-
209 memset(&addr, 0, sizeof(addr));-
210 if (0 == ::getsockname(listenSocket, (sockaddr *)&addr, &len)) {
0 == ::getsock...*)&addr, &len)Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEnever evaluated
0-4
211 // check for absract sockets-
212 if (addr.sun_family == PF_UNIX && addr.sun_path[0] == 0) {
addr.sun_family == 1Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEnever evaluated
addr.sun_path[0] == 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
0-4
213 addr.sun_path[0] = '@';-
214 }
executed 3 times by 1 test: end of block
Executed by:
  • tst_qlocalsocket - unknown status
3
215 QString name = QString::fromLatin1(addr.sun_path);-
216 if (!name.isEmpty()) {
!name.isEmpty()Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEnever evaluated
0-4
217 fullServerName = name;-
218 serverName = fullServerName.mid(fullServerName.lastIndexOf(QLatin1Char('/')) + 1);-
219 if (serverName.isEmpty()) {
serverName.isEmpty()Description
TRUEnever evaluated
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
0-4
220 serverName = fullServerName;-
221 }
never executed: end of block
0
222 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qlocalsocket - unknown status
4
223 }
executed 4 times by 1 test: end of block
Executed by:
  • tst_qlocalsocket - unknown status
4
224#else-
225 serverName.clear();-
226 fullServerName.clear();-
227#endif-
228-
229 Q_ASSERT(!socketNotifier);-
230 socketNotifier = new QSocketNotifier(listenSocket,-
231 QSocketNotifier::Read, q);-
232 q->connect(socketNotifier, SIGNAL(activated(int)),-
233 q, SLOT(_q_onNewConnection()));-
234 socketNotifier->setEnabled(maxPendingConnections > 0);-
235 return true;
executed 4 times by 1 test: return true;
Executed by:
  • tst_qlocalsocket - unknown status
4
236}-
237-
238/*!-
239 \internal-
240-
241 \sa QLocalServer::closeServer()-
242 */-
243void QLocalServerPrivate::closeServer()-
244{-
245 if (socketNotifier) {
socketNotifierDescription
TRUEevaluated 50 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
FALSEevaluated 1 time by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
1-50
246 socketNotifier->setEnabled(false); // Otherwise, closed socket is checked before deleter runs-
247 socketNotifier->deleteLater();-
248 socketNotifier = 0;-
249 }
executed 50 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
50
250-
251 if (-1 != listenSocket)
-1 != listenSocketDescription
TRUEevaluated 51 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
FALSEnever evaluated
0-51
252 QT_CLOSE(listenSocket);
executed 51 times by 3 tests: qt_safe_close(listenSocket);
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
51
253 listenSocket = -1;-
254-
255 if (!fullServerName.isEmpty())
!fullServerName.isEmpty()Description
TRUEevaluated 51 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
FALSEnever evaluated
0-51
256 QFile::remove(fullServerName);
executed 51 times by 3 tests: QFile::remove(fullServerName);
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
51
257}
executed 51 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
51
258-
259/*!-
260 \internal-
261-
262 We have received a notification that we can read on the listen socket.-
263 Accept the new socket.-
264 */-
265void QLocalServerPrivate::_q_onNewConnection()-
266{-
267 Q_Q(QLocalServer);-
268 if (-1 == listenSocket)
-1 == listenSocketDescription
TRUEnever evaluated
FALSEevaluated 77 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
0-77
269 return;
never executed: return;
0
270-
271 ::sockaddr_un addr;-
272 QT_SOCKLEN_T length = sizeof(sockaddr_un);-
273 int connectedSocket = qt_safe_accept(listenSocket, (sockaddr *)&addr, &length);-
274 if(-1 == connectedSocket) {
-1 == connectedSocketDescription
TRUEnever evaluated
FALSEevaluated 77 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
0-77
275 setError(QLatin1String("QLocalSocket::activated"));-
276 closeServer();-
277 } else {
never executed: end of block
0
278 socketNotifier->setEnabled(pendingConnections.size()-
279 <= maxPendingConnections);-
280 q->incomingConnection(connectedSocket);-
281 }
executed 77 times by 3 tests: end of block
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
77
282}-
283-
284void QLocalServerPrivate::waitForNewConnection(int msec, bool *timedOut)-
285{-
286 pollfd pfd = qt_make_pollfd(listenSocket, POLLIN);-
287-
288 switch (qt_poll_msecs(&pfd, 1, msec)) {-
289 case 0:
executed 2 times by 1 test: case 0:
Executed by:
  • tst_qlocalsocket - unknown status
2
290 if (timedOut)
timedOutDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
FALSEnever evaluated
0-2
291 *timedOut = true;
executed 2 times by 1 test: *timedOut = true;
Executed by:
  • tst_qlocalsocket - unknown status
2
292-
293 return;
executed 2 times by 1 test: return;
Executed by:
  • tst_qlocalsocket - unknown status
2
294 break;
dead code: break;
-
295 default:
executed 77 times by 3 tests: default:
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
77
296 if ((pfd.revents & POLLNVAL) == 0) {
(pfd.revents & 0x020) == 0Description
TRUEevaluated 77 times by 3 tests
Evaluated by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
FALSEnever evaluated
0-77
297 _q_onNewConnection();-
298 return;
executed 77 times by 3 tests: return;
Executed by:
  • tst_QNetworkReply
  • tst_QNetworkSession
  • tst_qlocalsocket - unknown status
77
299 }-
300-
301 errno = EBADF;-
302 // FALLTHROUGH-
303 case -1:
code before this statement never executed: case -1:
never executed: case -1:
0
304 setError(QLatin1String("QLocalServer::waitForNewConnection"));-
305 closeServer();-
306 break;
never executed: break;
0
307 }-
308}-
309-
310void QLocalServerPrivate::setError(const QString &function)-
311{-
312 if (EAGAIN == errno)
11 == (*__errno_location ())Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tst_qlocalsocket - unknown status
0-2
313 return;
never executed: return;
0
314-
315 switch (errno) {-
316 case EACCES:
never executed: case 13:
0
317 errorString = QLocalServer::tr("%1: Permission denied").arg(function);-
318 error = QAbstractSocket::SocketAccessError;-
319 break;
never executed: break;
0
320 case ELOOP:
never executed: case 40:
0
321 case ENOENT:
never executed: case 2:
0
322 case ENAMETOOLONG:
executed 1 time by 1 test: case 36:
Executed by:
  • tst_qlocalsocket - unknown status
1
323 case EROFS:
never executed: case 30:
0
324 case ENOTDIR:
never executed: case 20:
0
325 errorString = QLocalServer::tr("%1: Name error").arg(function);-
326 error = QAbstractSocket::HostNotFoundError;-
327 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_qlocalsocket - unknown status
1
328 case EADDRINUSE:
executed 1 time by 1 test: case 98:
Executed by:
  • tst_qlocalsocket - unknown status
1
329 errorString = QLocalServer::tr("%1: Address in use").arg(function);-
330 error = QAbstractSocket::AddressInUseError;-
331 break;
executed 1 time by 1 test: break;
Executed by:
  • tst_qlocalsocket - unknown status
1
332-
333 default:
never executed: default:
0
334 errorString = QLocalServer::tr("%1: Unknown error %2")-
335 .arg(function).arg(errno);-
336 error = QAbstractSocket::UnknownSocketError;-
337#if defined QLOCALSERVER_DEBUG-
338 qWarning() << errorString << "fullServerName:" << fullServerName;-
339#endif-
340 }
never executed: end of block
0
341}-
342-
343QT_END_NAMESPACE-
344-
345#endif // QT_NO_LOCALSERVER-
Source codeSwitch to Preprocessed file

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9