Browse Source

Fix qtprotobuf compilation

Tatyana Borisova 5 years ago
parent
commit
879a1dae66

+ 1 - 1
src/generator/generator.cpp

@@ -34,8 +34,8 @@
 #include "clientgenerator.h"
 #include "clientsourcegenerator.h"
 #include "utils.h"
-#include "iostream"
 
+#include <iostream>
 #include <google/protobuf/stubs/logging.h>
 #include <google/protobuf/stubs/common.h>
 #include <google/protobuf/io/printer.h>

+ 0 - 3
src/protobuf/qprotobufserializerregistry.cpp

@@ -30,8 +30,6 @@
 #include <QString>
 #include <QHash>
 
-//TODO: remove once migration to 5.14 as minimum required version is completed
-#if QT_VERSION < 0x050D00
 namespace std {
   template<> struct hash<QString> {
     std::size_t operator()(const QString &s) const {
@@ -39,7 +37,6 @@ namespace std {
     }
   };
 }
-#endif
 
 namespace QtProtobuf {
 class QProtobufSerializerRegistryPrivate {

+ 1 - 1
tests/test_qml/CMakeLists.txt

@@ -9,7 +9,7 @@ file(GLOB SOURCES main.cpp)
 file(GLOB QML_FILES qml/tst_simple.qml)
 
 add_executable(${TARGET} ${SOURCES} ${QML_FILES})
-target_link_libraries(${TARGET} Qt5::Core Qt5::Qml Qt5::Network Qt5::Quick Qt5::Test Qt5::QuickTest QtProtobufProject::QtProtobuf qtprotobuf_test_qtprotobuf_gen)
+target_link_libraries(${TARGET} Qt5::Core Qt5::Qml Qt5::Network Qt5::Quick Qt5::Test Qt5::QuickTest qtprotobuf_test_qtprotobuf_gen QtProtobufProject::QtProtobuf)
 
 add_target_qml(TARGET ${TARGET} QML_FILES ${QML_FILES})
 add_target_windeployqt(TARGET ${TARGET} QML_DIR ${CMAKE_CURRENT_SOURCE_DIR}/qml)