Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.6.1
-
None
-
Boot2Qt from a linux desktop host machine
-
-
e1c3e5446 (dev)
Description
I am surprised why I needed to find this forum to solve my problem: https://forum.qt.io/post/771711
My protobuf file is as follows:
syntax="proto3"; package edge.connections; option go_package = "github.com/flowy-live/flowy/genproto/connections;pbconnections"; import "google/protobuf/timestamp.proto"; import "user/user.proto"; message UserConnection { user.User connection_user = 1; // whether the user is tuned into this contact bool tuned_in = 2; // whether the connection is tuned into the user bool is_tuned_into_me = 3; // when the connection was made google.protobuf.Timestamp created_at = 4; } // Responsible for managing connections between users // ALL protected service ConnectionsService { rpc FindPeople(FindPeopleRequest) returns (FindPeopleResponse) {}
......goes on and on...
The error I get is `qt.protobuf: No deserializer for type QList<edge::connections::UserConnection>`
My protobuf files are generated fine into my build folder with the proper CMake adjustments (although this took all day for me to figure out with the confusing APIs where `PROTO_INCLUDES` doesn't work). The problem is when I actually make a call, I run into the error above. This is true for other messages as well.
The post I mentioned (https://forum.qt.io/post/771711) saved the day by telling me that I needed `qRegisterProtobufTypes()`. I tried putting it in my main function and that fixed it. I used f1 to see what it is, and there is a note that it should not need to be manually called. I am unsure why any of this information is not in the QtProtobuf docs entrypoint although I know the whole thing is in technical preview.