Some chatcleaner fixes for Qt5 (and other stuff).

This commit is contained in:
lotodore
2013-08-29 19:54:34 +02:00
parent 2db9ea1a93
commit 8adbe8edb9
4 changed files with 10 additions and 3 deletions
+2 -2
View File
@@ -29,6 +29,8 @@
* as that of the covered work. *
*****************************************************************************/
#include "cleanerconfig.h"
#include <QtCore>
#include <tinyxml.h>
#define MODUS 0711
@@ -46,8 +48,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <QtCore>
using namespace std;
+4 -1
View File
@@ -77,7 +77,9 @@ CleanerServer::~CleanerServer()
void CleanerServer::newCon()
{
if(!blockConnection) {
if(blockConnection) {
tcpServer->nextPendingConnection()->close();
} else {
tcpSocket = tcpServer->nextPendingConnection();
connect(tcpSocket, SIGNAL(readyRead()), this, SLOT(onRead()));
connect(tcpSocket, SIGNAL(stateChanged(QAbstractSocket::SocketState)), this, SLOT(socketStateChanged(QAbstractSocket::SocketState)));
@@ -113,6 +115,7 @@ void CleanerServer::onRead()
if (error) {
qDebug() << "Error handling packets from client.";
tcpSocket->close();
blockConnection = false;
}
/* char buf[1024];
+2
View File
@@ -33,7 +33,9 @@
#include <QtCore>
#include <stdlib.h>
#ifndef Q_MOC_RUN
#include <third_party/boost/timers.hpp>
#endif
class BadWordCheck;
class TextFloodCheck;
+2
View File
@@ -32,7 +32,9 @@
#define TEXTFLOODCHECK_H
#include <QtCore>
#ifndef Q_MOC_RUN
#include <third_party/boost/timers.hpp>
#endif
#include <stdlib.h>