Use Q_GLOBAL_STATIC for Qt only builds
This commit is contained in:
committed by
craig.p.drummond
parent
3d94b88df3
commit
7bcb40d159
@@ -28,16 +28,13 @@
|
||||
#endif
|
||||
#include "settings.h"
|
||||
#include "thread.h"
|
||||
#include "globalstatic.h"
|
||||
#include <QFile>
|
||||
#include <QUrl>
|
||||
#include <QTimer>
|
||||
#if QT_VERSION >= 0x050000
|
||||
#include <QUrlQuery>
|
||||
#endif
|
||||
#ifdef ENABLE_KDE_SUPPORT
|
||||
#include <KDE/KGlobal>
|
||||
K_GLOBAL_STATIC(HttpServer, instance)
|
||||
#endif
|
||||
|
||||
#include <QDebug>
|
||||
static bool debugIsEnabled=false;
|
||||
@@ -60,18 +57,7 @@ bool HttpServer::debugEnabled()
|
||||
return debugIsEnabled;
|
||||
}
|
||||
|
||||
HttpServer * HttpServer::self()
|
||||
{
|
||||
#ifdef ENABLE_KDE_SUPPORT
|
||||
return instance;
|
||||
#else
|
||||
static HttpServer *instance=0;
|
||||
if(!instance) {
|
||||
instance=new HttpServer;
|
||||
}
|
||||
return instance;
|
||||
#endif
|
||||
}
|
||||
GLOBAL_STATIC(HttpServer, instance)
|
||||
|
||||
#ifdef ENABLE_HTTP_SERVER
|
||||
HttpServer::HttpServer()
|
||||
|
||||
Reference in New Issue
Block a user