summaryrefslogtreecommitdiffstats
path: root/kpf/src/WebServer.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /kpf/src/WebServer.cpp
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpf/src/WebServer.cpp')
-rw-r--r--kpf/src/WebServer.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kpf/src/WebServer.cpp b/kpf/src/WebServer.cpp
index 37301f09..b7fd944b 100644
--- a/kpf/src/WebServer.cpp
+++ b/kpf/src/WebServer.cpp
@@ -27,9 +27,9 @@
#include <unistd.h>
// Qt includes
-#include <qsocket.h>
-#include <qdatetime.h>
-#include <qtimer.h>
+#include <tqsocket.h>
+#include <tqdatetime.h>
+#include <tqtimer.h>
// KDE includes
#include "config.h"
@@ -81,13 +81,13 @@ namespace KPF
WebServerSocket * socket;
uint listenPort;
uint connectionLimit;
- QPtrList<Server> serverList;
- QString root;
- QString serverName;
- QTimer writeTimer;
- QTimer resetOutputTimer;
- QTimer bindTimer;
- QTimer backlogTimer;
+ TQPtrList<Server> serverList;
+ TQString root;
+ TQString serverName;
+ TQTimer writeTimer;
+ TQTimer resetOutputTimer;
+ TQTimer bindTimer;
+ TQTimer backlogTimer;
ulong bandwidthLimit;
ulong lastTotalOutput;
ulong totalOutput;
@@ -95,14 +95,14 @@ namespace KPF
bool paused;
bool followSymlinks;
bool customErrorMessages;
- QValueList<int> backlog;
+ TQValueList<int> backlog;
DNSSD::PublicService* service;
};
- WebServer::WebServer(const QString & root)
- : DCOPObject(QCString("WebServer_") + root.utf8()),
- QObject()
+ WebServer::WebServer(const TQString & root)
+ : DCOPObject(TQCString("WebServer_") + root.utf8()),
+ TQObject()
{
d = new Private;
@@ -110,10 +110,10 @@ namespace KPF
loadConfig();
publish();
- connect(&d->bindTimer, SIGNAL(timeout()), SLOT(slotBind()));
- connect(&d->writeTimer, SIGNAL(timeout()), SLOT(slotWrite()));
- connect(&d->resetOutputTimer, SIGNAL(timeout()), SLOT(slotCheckOutput()));
- connect(&d->backlogTimer, SIGNAL(timeout()), SLOT(slotClearBacklog()));
+ connect(&d->bindTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotBind()));
+ connect(&d->writeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotWrite()));
+ connect(&d->resetOutputTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckOutput()));
+ connect(&d->backlogTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotClearBacklog()));
d->bindTimer .start( 0, true);
d->resetOutputTimer .start(1000 / SamplesPerSecond, false);
@@ -122,15 +122,15 @@ namespace KPF
WebServer::WebServer
(
- const QString & root,
+ const TQString & root,
uint listenPort,
uint bandwidthLimit,
uint connectionLimit,
bool followSymlinks,
- const QString & serverName
+ const TQString & serverName
)
- : DCOPObject(QCString("WebServer_") + root.utf8()),
- QObject()
+ : DCOPObject(TQCString("WebServer_") + root.utf8()),
+ TQObject()
{
d = new Private;
@@ -144,10 +144,10 @@ namespace KPF
saveConfig();
publish();
- connect(&d->bindTimer, SIGNAL(timeout()), SLOT(slotBind()));
- connect(&d->writeTimer, SIGNAL(timeout()), SLOT(slotWrite()));
- connect(&d->resetOutputTimer, SIGNAL(timeout()), SLOT(slotCheckOutput()));
- connect(&d->backlogTimer, SIGNAL(timeout()), SLOT(slotClearBacklog()));
+ connect(&d->bindTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotBind()));
+ connect(&d->writeTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotWrite()));
+ connect(&d->resetOutputTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckOutput()));
+ connect(&d->backlogTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotClearBacklog()));
d->bindTimer .start( 0, true);
d->resetOutputTimer .start(1000 / SamplesPerSecond, false);
@@ -164,7 +164,7 @@ namespace KPF
void WebServer::publish()
{
d->service = new DNSSD::PublicService(d->serverName,"_http._tcp",d->listenPort);
- connect(d->service,SIGNAL(published(bool)),this,SLOT(wasPublished(bool)));
+ connect(d->service,TQT_SIGNAL(published(bool)),this,TQT_SLOT(wasPublished(bool)));
d->service->publishAsync();
}
@@ -195,7 +195,7 @@ namespace KPF
emit(contentionChange(d->portContention));
if (!d->portContention)
- connect(d->socket, SIGNAL(connection(int)), SLOT(slotConnection(int)));
+ connect(d->socket, TQT_SIGNAL(connection(int)), TQT_SLOT(slotConnection(int)));
else
{
@@ -277,18 +277,18 @@ namespace KPF
connect
(
s,
- SIGNAL(output(Server *, ulong)),
- SLOT(slotOutput(Server *, ulong))
+ TQT_SIGNAL(output(Server *, ulong)),
+ TQT_SLOT(slotOutput(Server *, ulong))
);
- connect(s, SIGNAL(finished(Server *)), SLOT(slotFinished(Server *)));
- connect(s, SIGNAL(request(Server *)), SIGNAL(request(Server *)));
- connect(s, SIGNAL(response(Server *)), SIGNAL(response(Server *)));
+ connect(s, TQT_SIGNAL(finished(Server *)), TQT_SLOT(slotFinished(Server *)));
+ connect(s, TQT_SIGNAL(request(Server *)), TQT_SIGNAL(request(Server *)));
+ connect(s, TQT_SIGNAL(response(Server *)), TQT_SIGNAL(response(Server *)));
d->serverList.append(s);
connect
- (s, SIGNAL(readyToWrite(Server *)), SLOT(slotReadyToWrite(Server *)));
+ (s, TQT_SIGNAL(readyToWrite(Server *)), TQT_SLOT(slotReadyToWrite(Server *)));
emit(connection(s));
@@ -311,7 +311,7 @@ namespace KPF
void
WebServer::killAllConnections()
{
- QPtrListIterator<Server> it(d->serverList);
+ TQPtrListIterator<Server> it(d->serverList);
for (; it.current(); ++it)
it.current()->cancel();
@@ -449,7 +449,7 @@ namespace KPF
if (d->serverList.isEmpty())
return;
- QPtrListIterator<Server> it(d->serverList);
+ TQPtrListIterator<Server> it(d->serverList);
for (; it.current(); ++it)
{
@@ -551,7 +551,7 @@ namespace KPF
return d->serverName;
}
void
- WebServer::setServerName(const QString& serverName)
+ WebServer::setServerName(const TQString& serverName)
{
d->serverName=serverName;
}
@@ -569,7 +569,7 @@ namespace KPF
ulong bandwidthLimit,
uint connectionLimit,
bool followSymlinks,
- const QString& serverName
+ const TQString& serverName
)
{
d->listenPort = listenPort;