Allow to use system QJson. Closes #1744.

This commit is contained in:
sledgehammer999
2015-04-12 01:02:13 +03:00
parent 3047681951
commit 4493fd9c31
5 changed files with 165 additions and 4 deletions

View File

@@ -50,7 +50,7 @@
#endif // DISABLE_GUI
#ifndef DISABLE_WEBUI
#include "webui.h"
#include "../webui/webui.h"
#endif
#include "application.h"

View File

@@ -36,8 +36,13 @@
#include <QJsonArray>
#else
#include <QString>
#ifndef USE_SYSTEM_QJSON
#include "qjson/parser.h"
#include "qjson/serializer.h"
#else // USE_SYSTEM_QJSON
#include <qjson/parser.h>
#include <qjson/serializer.h>
#endif // USE_SYSTEM_QJSON
#endif
namespace json {

View File

@@ -1,5 +1,3 @@
INCLUDEPATH += $$PWD
HEADERS += \
$$PWD/webui.h \
$$PWD/btjson.h \
@@ -20,6 +18,9 @@ SOURCES += \
$$PWD/abstractwebapplication.cpp
# QJson JSON parser/serializer for using with Qt4
lessThan(QT_MAJOR_VERSION, 5): include(qjson/qjson.pri)
lessThan(QT_MAJOR_VERSION, 5) {
!usesystemqjson: include(qjson/qjson.pri)
else: DEFINES += USE_SYSTEM_QJSON
}
RESOURCES += $$PWD/webui.qrc