Browse Source

Migrate to Qt protobuf 0.2.0

Alexey Edelev 4 năm trước cách đây
mục cha
commit
dbdfa14fdc
3 tập tin đã thay đổi với 4 bổ sung6 xóa
  1. 3 3
      neuralnetworkui/CMakeLists.txt
  2. 0 2
      neuralnetworkui/main.cpp
  3. 1 1
      neuralnetworkui/qtprotobuf

+ 3 - 3
neuralnetworkui/CMakeLists.txt

@@ -6,8 +6,8 @@ set(TARGET NeuralNetworkUi)
 
 find_package(Qt5 COMPONENTS Quick Gui Core Qml REQUIRED)
 
-set(QTPROTOBUF_MAKE_TESTS false)
-set(QTPROTOBUF_MAKE_EXAMPLES false)
+set(QT_PROTOBUF_MAKE_TESTS OFF)
+set(QT_PROTOBUF_MAKE_EXAMPLES OFF)
 add_subdirectory("qtprotobuf")
 
 find_package(QtProtobufProject CONFIG COMPONENTS QtProtobuf QtGrpc REQUIRED)
@@ -23,5 +23,5 @@ set(CMAKE_AUTOMOC ON)
 set(CMAKE_AUTORCC ON)
 
 add_executable(NeuralNetworkUi main.cpp qml.qrc valueindicator.cpp visualizermodel.cpp dense.cpp layertrigger.cpp)
-generate_qtprotobuf(TARGET ${TARGET} PROTO_FILES ${PROTO_FILES} ${VISUALIZATION_PROTO} QML TRUE)
+qtprotobuf_generate(TARGET ${TARGET} PROTO_FILES ${PROTO_FILES} ${VISUALIZATION_PROTO} QML)
 target_link_libraries(NeuralNetworkUi PRIVATE Qt5::Core Qt5::Gui Qt5::Qml Qt5::Quick QtProtobufProject::QtProtobuf QtProtobufProject::QtGrpc ${QtProtobuf_GENERATED})

+ 0 - 2
neuralnetworkui/main.cpp

@@ -29,7 +29,6 @@
 #include <QDebug>
 #include <QtProtobufTypes>
 
-#include "qtprotobuf_global.qpb.h"
 #include "remotecontrol_grpc.qpb.h"
 #include "visualization_grpc.qpb.h"
 
@@ -41,7 +40,6 @@
 
 int main(int argc, char *argv[])
 {
-    remotecontrol::qRegisterProtobufTypes();
     QtProtobuf::qRegisterProtobufTypes();
 
     QGuiApplication app(argc, argv);

+ 1 - 1
neuralnetworkui/qtprotobuf

@@ -1 +1 @@
-Subproject commit 8cd7bdd128a64f9b60cc335306c49e6dab6ed1c7
+Subproject commit 6a8f5622b9f5e22870443933322bfc49b9bc8305