diff --git a/src/http/EntryConfig.cpp b/src/http/EntryConfig.cpp index d5a518755..6dbbf63b0 100644 --- a/src/http/EntryConfig.cpp +++ b/src/http/EntryConfig.cpp @@ -14,9 +14,9 @@ #include "EntryConfig.h" #include "core/Entry.h" #include "core/EntryAttributes.h" -#include "qjson/parser.h" -#include "qjson/qobjecthelper.h" -#include "qjson/serializer.h" +#include "qjson/src/parser.h" +#include "qjson/src/qobjecthelper.h" +#include "qjson/src/serializer.h" static const char KEEPASSHTTP_NAME[] = "KeePassHttp Settings"; //TODO: duplicated string (also in Service.cpp) diff --git a/src/http/Protocol.cpp b/src/http/Protocol.cpp index 2c9b4d1b1..018050294 100644 --- a/src/http/Protocol.cpp +++ b/src/http/Protocol.cpp @@ -17,9 +17,9 @@ #include #include -#include "qjson/parser.h" -#include "qjson/qobjecthelper.h" -#include "qjson/serializer.h" +#include "qjson/src/parser.h" +#include "qjson/src/qobjecthelper.h" +#include "qjson/src/serializer.h" #include "crypto/Random.h" #include "crypto/SymmetricCipher.h" diff --git a/src/http/qjson/src/CMakeLists.txt b/src/http/qjson/src/CMakeLists.txt index d2f2ebe66..82ba6a6a3 100644 --- a/src/http/qjson/src/CMakeLists.txt +++ b/src/http/qjson/src/CMakeLists.txt @@ -23,7 +23,7 @@ set (qjson_HEADERS parser.h parserrunnable.h qobjecthelper.h serializer.h serial # Required to use the intree copy of FlexLexer.h INCLUDE_DIRECTORIES(.) -add_library (qjson SHARED ${qjson_SRCS} ${qjson_MOC_SRCS} ${qjson_HEADERS}) +add_library (qjson STATIC ${qjson_SRCS} ${qjson_MOC_SRCS} ${qjson_HEADERS}) IF (Qt5Core_FOUND) target_link_libraries( qjson ${Qt5Core_LIBRARIES}) ELSE() @@ -42,6 +42,8 @@ set_target_properties(qjson PROPERTIES FRAMEWORK ${OSX_FRAMEWORK} ) +add_gcc_compiler_cxxflags("-fexceptions") + INSTALL(TARGETS qjson EXPORT qjson-export LIBRARY DESTINATION ${LIB_INSTALL_DIR} RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin diff --git a/src/http/qjson/src/parserrunnable.cpp b/src/http/qjson/src/parserrunnable.cpp index 88baf4cf6..5eb92883b 100644 --- a/src/http/qjson/src/parserrunnable.cpp +++ b/src/http/qjson/src/parserrunnable.cpp @@ -59,10 +59,10 @@ void ParserRunnable::run() QVariant result = parser.parse (d->m_data, &ok); if (ok) { qDebug() << "successfully converted json item to QVariant object"; - emit parsingFinished(result, true, QString()); + Q_EMIT parsingFinished(result, true, QString()); } else { const QString errorText = tr("An error occurred while parsing json: %1").arg(parser.errorString()); qCritical() << errorText; - emit parsingFinished(QVariant(), false, errorText); + Q_EMIT parsingFinished(QVariant(), false, errorText); } } diff --git a/src/http/qjson/src/serializerrunnable.cpp b/src/http/qjson/src/serializerrunnable.cpp index b1894a238..1af03c366 100644 --- a/src/http/qjson/src/serializerrunnable.cpp +++ b/src/http/qjson/src/serializerrunnable.cpp @@ -58,5 +58,5 @@ void SerializerRunnable::run() Serializer serializer; bool ok; const QByteArray serialized = serializer.serialize( d->json, &ok); - emit parsingFinished( serialized, ok, serializer.errorMessage() ); + Q_EMIT parsingFinished( serialized, ok, serializer.errorMessage() ); }