Comments (6)
Sorry, all activities are temporary frozen, because of the migration to Qt6. I will try to cover this ASAP. :(
from qtprotobuf.
Just ran into this, any progress?
from qtprotobuf.
Hello,
have also encountered the problem described here and would like to add the following information. From version 3.12 and up to version 3.15 protoc still needs the addition of --experimental_allow_proto3_optional, which is unfortunately not supported with Qt6 using qt_add_protobuf.
Unable to execute /usr/bin/protoc:(1) xxx.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.
A workaround here is to edit the file lib/cmake/Qt6ProtobufTools/Qt6ProtobufToolsMacros.cmake
string(JOIN "\\$<SEMICOLON>" protoc_arguments
"--plugin=protoc-gen-${generator}=${generator_file}"
"--${generator}_out=${tmp_output_directory}"
"--${generator}_opt=${generation_options_string}"
"${proto_files_string}"
"${proto_includes_string}"
"--experimental_allow_proto3_optional"
)
Following this, one comes very close to the problem described here, since the error message that now arises is identical.
Unable to execute /usr/bin/protoc:(1) xxx.proto: is a proto3 file that contains optional fields, but code generator protoc-gen-qtprotobufgen hasn't been updated to support optional fields in proto3. Please ask the owner of this code generator to support proto3 optional.
More information about supporting optional can be found in the protobuf repository and I would start by implementing the method uint64_t GetSupportedFeatures() const override
in generatorbase.h
King regards
from qtprotobuf.
Hi, @glaubnichtalles the 'optional' fields support is planned for Qt6: QTBUG-103978
Unfortunately I don't plan any backporting from Qt6 to this repo because of complexity.
from qtprotobuf.
Hi, I can't open https://bugreports.qt.io/browse/QTBUG-103978 even after login. The problem does exist in Qt 6.5.1 and Qt 6.6.0 (beta).
from qtprotobuf.
Hi, thanks for the development regarding "Optional fields" support. My latest tests with Qt 6.6.0 beta 3 show that there are problems with the use of reserved c++ keywords. It would be great if for example the following entries could be added to the tests for the proto files:
optional bool private = 13; optional bool public = 42;
Kind reagrds
from qtprotobuf.
Related Issues (20)
- -Wall -Werror makes qtprotobuf depend on exact compiler and version
- Building with Qt 6 HOT 5
- How to use qtprotobuf 0.6.0 Windows release HOT 3
- "Container is less than required fields number. Deserialization failed" error HOT 1
- Nested messages and handling HOT 2
- repeated enum is not accessible from QML HOT 3
- Support enum field for Oneof HOT 1
- Build fail with Qt 5.15.2 at linux HOT 1
- simplechat client requires restart after authentication failure HOT 1
- Shared Lib option does not work for MSVC build HOT 3
- Qt module nstall does not work HOT 1
- Proto compiler does not work (MSVC Build) HOT 3
- Unnecessary Logs in Application Output HOT 1
- Cmake build examples : Trying to enable QML support for 'any', but Qt::Qml is not a target HOT 2
- error: specialization of ‘template in different namespace in qprotobufserializer.cpp HOT 2
- Accessing Messages Qproperties from Qml cause GUI app to crash HOT 4
- Build errors when cross compiling HOT 1
- Build errors HOT 1
- Make message generation configurable HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtprotobuf.