72 qWarning(
"QLocalServer::listen: server name is already in use.");
94 tcpServer.waitForNewConnection(msec, timedOut);
102 QTcpSocket* tcpSocket = tcpServer.nextPendingConnection();
104 qWarning(
"QLocalServer: no pending connection");
110 q->incomingConnection(socketDescriptor);
120 serverName = prefix +
name;
124 settings.
remove(serverName);
The QVariant class acts like a union for the most common Qt data types.
void setValue(const QString &key, const QVariant &value)
Sets the value of setting key to value.
int socketDescriptor() const
Returns the native socket descriptor of the QAbstractSocket object if this is available; otherwise re...
bool listen(const QString &name)
QIntegerForSizeof< void * >::Unsigned quintptr
void waitForNewConnection(int msec, bool *timedOut)
#define QT_END_NAMESPACE
This macro expands to.
The QSettings class provides persistent platform-independent application settings.
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
void setParent(QObject *)
Makes the object a child of parent.
void _q_onNewConnection()
We have received a notification that we can read on the listen socket.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QQueue< QLocalSocket * > pendingConnections
Q_CORE_EXPORT void qWarning(const char *,...)
The QLocalServer class provides a local socket based server.
The QLatin1String class provides a thin wrapper around an US-ASCII/Latin-1 encoded string literal...
The QTcpSocket class provides a TCP socket.
void remove(const QString &key)
Removes the setting key and any sub-settings of key.
bool contains(const QString &key) const
Returns true if there exists a setting called key; returns false otherwise.
static bool removeServer(const QString &name)