diff options
Diffstat (limited to 'kbattleship/kbattleship/kbattleshipserver.cpp')
-rw-r--r-- | kbattleship/kbattleship/kbattleshipserver.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/kbattleship/kbattleship/kbattleshipserver.cpp b/kbattleship/kbattleship/kbattleshipserver.cpp index d03bd213..a90533cc 100644 --- a/kbattleship/kbattleship/kbattleshipserver.cpp +++ b/kbattleship/kbattleship/kbattleshipserver.cpp @@ -25,13 +25,13 @@ #include <sys/filio.h> #endif #include <sys/ioctl.h> -#include <qtimer.h> +#include <tqtimer.h> #include <kmessagebox.h> #include <klocale.h> #include "kbattleshipserver.moc" -KBattleshipServer::KBattleshipServer(int port, const QString& name) - : KExtendedSocket(QString::null, port, inetSocket | passiveSocket), m_name(name) +KBattleshipServer::KBattleshipServer(int port, const TQString& name) + : KExtendedSocket(TQString::null, port, inetSocket | passiveSocket), m_name(name) { m_port = port; m_serverSocket = 0; @@ -49,8 +49,8 @@ void KBattleshipServer::init() m_service.setType(BATTLESHIP_SERVICE); m_service.setPort(m_port); m_service.publishAsync(); - m_connectNotifier = new QSocketNotifier(fd(), QSocketNotifier::Read, this); - QObject::connect(m_connectNotifier, SIGNAL(activated(int)), SLOT(slotNewConnection())); + m_connectNotifier = new TQSocketNotifier(fd(), TQSocketNotifier::Read, this); + TQObject::connect(m_connectNotifier, TQT_SIGNAL(activated(int)), TQT_SLOT(slotNewConnection())); } void KBattleshipServer::slotNewConnection() @@ -61,8 +61,8 @@ void KBattleshipServer::slotNewConnection() { m_service.stop(); m_serverSocket = sock; - m_readNotifier = new QSocketNotifier(sock->fd(), QSocketNotifier::Read, this); - QObject::connect(m_readNotifier, SIGNAL(activated(int)), this, SLOT(slotReadClient())); + m_readNotifier = new TQSocketNotifier(sock->fd(), TQSocketNotifier::Read, this); + TQObject::connect(m_readNotifier, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotReadClient())); emit sigNewConnect(); } else @@ -82,7 +82,7 @@ void KBattleshipServer::slotReadClient() char *buf = new char[len + 1]; m_serverSocket->readBlock(buf, len); buf[len] = 0; - m_readBuffer += QString::fromUtf8(buf); + m_readBuffer += TQString::fromUtf8(buf); delete []buf; int pos; while ((pos = m_readBuffer.find("</kmessage>")) >= 0) @@ -97,12 +97,12 @@ void KBattleshipServer::slotReadClient() void KBattleshipServer::sendMessage(KMessage *msg) { - QCString post = msg->sendStream().utf8(); + TQCString post = msg->sendStream().utf8(); m_serverSocket->writeBlock(post.data(), post.length()); emit sigMessageSent(msg); } -void KBattleshipServer::slotDiscardClient(const QString &reason, bool kmversion, bool bemit) +void KBattleshipServer::slotDiscardClient(const TQString &reason, bool kmversion, bool bemit) { KMessage *msg = new KMessage(KMessage::DISCARD); msg->addField("reason", reason); @@ -110,7 +110,7 @@ void KBattleshipServer::slotDiscardClient(const QString &reason, bool kmversion, msg->addField("kmversion", "true"); else msg->addField("kmversion", "false"); - QCString post = msg->sendStream().utf8(); + TQCString post = msg->sendStream().utf8(); m_serverSocket->writeBlock(post.data(), post.length()); delete msg; |