This commit is contained in:
craig
2012-02-29 18:11:06 +00:00
committed by craig
parent aba0617a96
commit 6a11f80f72
6 changed files with 33 additions and 34 deletions

View File

@@ -23,6 +23,7 @@
#include "httpserver.h"
#include "httpsocket.h"
#include "utils.h"
#include <QtCore/QUrl>
#include <QtCore/QThread>
#ifdef ENABLE_KDE_SUPPORT
@@ -30,11 +31,6 @@
K_GLOBAL_STATIC(HttpServer, instance)
#endif
struct Thread : public QThread
{
static void sleep() { QThread::msleep(100); }
};
HttpServer * HttpServer::self()
{
#ifdef ENABLE_KDE_SUPPORT
@@ -56,10 +52,9 @@ void HttpServer::stop()
}
if (thread) {
thread->quit();
for(int i=0; i<10 && thread->isRunning(); ++i) {
Thread::sleep();
}
Utils::stopThread(thread);
thread->deleteLater();
thread=0;
}
}