Fixed sdrbase resource init

pull/358/head
f4exb 2019-05-31 10:14:10 +02:00
rodzic af32260b51
commit 1eeb334a8f
3 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -143,7 +143,7 @@ set(sdrbase_SOURCES
mainparser.cpp
resources/res.qrc
resources/webapi.qrc
)
set(sdrbase_HEADERS

Wyświetl plik

@ -49,6 +49,7 @@ WebAPIRequestMapper::WebAPIRequestMapper(QObject* parent) :
HttpRequestHandler(parent),
m_adapter(0)
{
Q_INIT_RESOURCE(webapi);
qtwebapp::HttpDocrootSettings docrootSettings;
docrootSettings.path = ":/webapi";
m_staticFileController = new qtwebapp::StaticFileController(docrootSettings, parent);
@ -57,6 +58,7 @@ WebAPIRequestMapper::WebAPIRequestMapper(QObject* parent) :
WebAPIRequestMapper::~WebAPIRequestMapper()
{
delete m_staticFileController;
Q_CLEANUP_RESOURCE(webapi);
}
void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::HttpResponse& response)