summaryrefslogtreecommitdiffstats
path: root/src/network/socket
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-05-06 10:51:46 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-05-06 11:43:41 (GMT)
commite13aab33bc1aa68bcf5a18e2d77b2db7f9f44e1e (patch)
treec422e1b5b73ab82ce52d60d4b378bf3d9cae2d26 /src/network/socket
parent3e89f8d598a677f004cb273dd2c3cc03d68f32eb (diff)
downloadQt-e13aab33bc1aa68bcf5a18e2d77b2db7f9f44e1e.zip
Qt-e13aab33bc1aa68bcf5a18e2d77b2db7f9f44e1e.tar.gz
Qt-e13aab33bc1aa68bcf5a18e2d77b2db7f9f44e1e.tar.bz2
standardize on one name for the socket connection slot
Diffstat (limited to 'src/network/socket')
-rw-r--r--src/network/socket/qlocalserver.h6
-rw-r--r--src/network/socket/qlocalserver_p.h4
-rw-r--r--src/network/socket/qlocalserver_unix.cpp6
3 files changed, 4 insertions, 12 deletions
diff --git a/src/network/socket/qlocalserver.h b/src/network/socket/qlocalserver.h
index c745ccb..1488a75 100644
--- a/src/network/socket/qlocalserver.h
+++ b/src/network/socket/qlocalserver.h
@@ -86,13 +86,7 @@ protected:
private:
Q_DISABLE_COPY(QLocalServer)
-#if defined(QT_LOCALSOCKET_TCP)
Q_PRIVATE_SLOT(d_func(), void _q_onNewConnection())
-#elif defined(Q_OS_WIN)
- Q_PRIVATE_SLOT(d_func(), void _q_onNewConnection())
-#else
- Q_PRIVATE_SLOT(d_func(), void _q_socketActivated())
-#endif
};
#endif // QT_NO_LOCALSERVER
diff --git a/src/network/socket/qlocalserver_p.h b/src/network/socket/qlocalserver_p.h
index 9af4a20..7b31082 100644
--- a/src/network/socket/qlocalserver_p.h
+++ b/src/network/socket/qlocalserver_p.h
@@ -89,9 +89,9 @@ public:
static bool removeServer(const QString &name);
void closeServer();
void waitForNewConnection(int msec, bool *timedOut);
+ void _q_onNewConnection();
#if defined(QT_LOCALSOCKET_TCP)
- void _q_onNewConnection();
QTcpServer tcpServer;
QMap<quintptr, QTcpSocket*> socketMap;
@@ -103,14 +103,12 @@ public:
void setError(const QString &function);
bool addListener();
- void _q_onNewConnection();
QList<Listener> listeners;
HANDLE eventHandle;
QWinEventNotifier *connectionEventNotifier;
#else
void setError(const QString &function);
- void _q_socketActivated();
int listenSocket;
QSocketNotifier *socketNotifier;
diff --git a/src/network/socket/qlocalserver_unix.cpp b/src/network/socket/qlocalserver_unix.cpp
index e7d2252..53ee6b6 100644
--- a/src/network/socket/qlocalserver_unix.cpp
+++ b/src/network/socket/qlocalserver_unix.cpp
@@ -132,7 +132,7 @@ bool QLocalServerPrivate::listen(const QString &requestedServerName)
socketNotifier = new QSocketNotifier(listenSocket,
QSocketNotifier::Read, q);
q->connect(socketNotifier, SIGNAL(activated(int)),
- q, SLOT(_q_socketActivated()));
+ q, SLOT(_q_onNewConnection()));
socketNotifier->setEnabled(maxPendingConnections > 0);
return true;
}
@@ -164,7 +164,7 @@ void QLocalServerPrivate::closeServer()
We have received a notification that we can read on the listen socket.
Accept the new socket.
*/
-void QLocalServerPrivate::_q_socketActivated()
+void QLocalServerPrivate::_q_onNewConnection()
{
Q_Q(QLocalServer);
if (-1 == listenSocket)
@@ -209,7 +209,7 @@ void QLocalServerPrivate::waitForNewConnection(int msec, bool *timedOut)
break;
}
if (result > 0)
- _q_socketActivated();
+ _q_onNewConnection();
}
if (timedOut)
*timedOut = (result == 0);