src/network/socket/qlocalserver.cpp
changeset 7 f7bc934e204c
parent 0 1918ee327afb
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtNetwork module of the Qt Toolkit.
     7 ** This file is part of the QtNetwork module of the Qt Toolkit.
     8 **
     8 **
   120     if (!isListening())
   120     if (!isListening())
   121         return;
   121         return;
   122     qDeleteAll(d->pendingConnections);
   122     qDeleteAll(d->pendingConnections);
   123     d->pendingConnections.clear();
   123     d->pendingConnections.clear();
   124     d->closeServer();
   124     d->closeServer();
   125     d->serverName = QString();
   125     d->serverName.clear();
   126     d->fullServerName = QString();
   126     d->fullServerName.clear();
   127     d->errorString = QString();
   127     d->errorString.clear();
   128     d->error = QAbstractSocket::UnknownSocketError;
   128     d->error = QAbstractSocket::UnknownSocketError;
   129 }
   129 }
   130 
   130 
   131 /*!
   131 /*!
   132     Returns the human-readable message appropriate to the current error
   132     Returns the human-readable message appropriate to the current error
   224         d->errorString = tr("%1: Name error").arg(function);
   224         d->errorString = tr("%1: Name error").arg(function);
   225         return false;
   225         return false;
   226     }
   226     }
   227 
   227 
   228     if (!d->listen(name)) {
   228     if (!d->listen(name)) {
   229         d->serverName = QString();
   229         d->serverName.clear();
   230         d->fullServerName = QString();
   230         d->fullServerName.clear();
   231         return false;
   231         return false;
   232     }
   232     }
   233 
   233 
   234     d->serverName = name;
   234     d->serverName = name;
   235     return true;
   235     return true;