summaryrefslogtreecommitdiffabout
path: root/pwmanager/pwmanager/ipc.cpp
Side-by-side diff
Diffstat (limited to 'pwmanager/pwmanager/ipc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/ipc.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/pwmanager/pwmanager/ipc.cpp b/pwmanager/pwmanager/ipc.cpp
index 643b022..4c65f1d 100644
--- a/pwmanager/pwmanager/ipc.cpp
+++ b/pwmanager/pwmanager/ipc.cpp
@@ -19,25 +19,25 @@
#include "ipc.h"
#include "pwmexception.h"
#include <qsocketnotifier.h>
#ifndef _WIN32_
#include <sys/socket.h>
#endif
#ifndef PWM_EMBEDDED
#include <sys/types.h>
#include <stdio.h>
#else
-#include <qsocket.h>
+#include <q3socket.h>
#endif
#define END_OF_LINE '\n'
#define INIT_LINEBUF_LEN 64 /* byte */
#ifndef PWM_EMBEDDED
Ipc::Ipc()
: stream (0)
, notifier (0)
, rdBuf (0)
{
@@ -68,36 +68,36 @@ Ipc::Ipc()
host = true;
}
#else
Ipc::Ipc()
: notifier (0)
, rdBuf (0)
{
#ifndef _WIN32_
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sock)) {
qDebug("Ipc: socketpair() failed");
}
#endif
- QSocket* qsock = new QSocket();
+ Q3Socket* qsock = new Q3Socket();
qsock->setSocket(sock[0]);
rdBufSize = INIT_LINEBUF_LEN;
rdBuf = (char *)(malloc(rdBufSize));
if (!rdBuf) {
close(sock[0]);
close(sock[1]);
qDebug("Ipc: OOM");
}
- qsock = new QSocket();
+ qsock = new Q3Socket();
qsock->setSocket(sock[0]);
/*US
stream = fdopen(sock[0], "r");
if (!stream) {
close(sock[0]);
close(sock[1]);
free(rdBuf);
qDebug("Ipc: fdopen() failed");
}
*/
@@ -143,25 +143,25 @@ Ipc::Ipc(const Ipc *ipc)
Ipc::Ipc(const Ipc *ipc)
: notifier (0)
, rdBuf (0)
{
rdBufSize = INIT_LINEBUF_LEN;
rdBuf = (char *)(malloc(rdBufSize));
if (!rdBuf) {
qDebug("Ipc: OOM");
}
sock[0] = ipc->sock[1];
sock[1] = ipc->sock[0];
- qSock = new QSocket();
+ qSock = new Q3Socket();
qSock->setSocket(sock[0]);
/*US
stream = fdopen(sock[0], "r");
if (!stream) {
free(rdBuf);
qDebug("Ipc: fdopen() failed");
}
*/
notifier = new QSocketNotifier(sock[0], QSocketNotifier::Read);
connect(notifier, SIGNAL(activated(int)),
@@ -203,15 +203,15 @@ void Ipc::receiveData(int s)
}
#else
int rd;
rd = qSock->readLine(rdBuf, rdBufSize);
if (rd > 0) {
emit lineAvailable(rdBuf, rd);
}
#endif
qDebug("void Ipc::receiveData(int s) has to be implemented.");
}
-#ifndef PWM_EMBEDDED
-#include "ipc.moc"
+#ifndef PWM_EMBEDDED_
+#include "moc_ipc.cpp"
#endif