Backported to 6.5.2 from 2297f2da520b7eebe10dd6b5304e5a4c3c18a57c in v6.7.0-beta1~220 https://codereview.qt-project.org/gitweb?p=qt/qtgrpc.git;a=commit;h=2297f2da520b7eebe10dd6b5304e5a4c3c18a57c diff -Naur qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp --- qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp 2023-07-07 14:29:20.000000000 +0200 +++ qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtgrpcgen/qgrpcgenerator.cpp 2024-03-12 08:40:27.884741000 +0100 @@ -32,13 +32,9 @@ bool QGrpcGenerator::Generate(const FileDescriptor *file, [[maybe_unused]] const std::string ¶meter, GeneratorContext *generatorContext, - std::string *error) const + [[maybe_unused]] std::string *error) const { assert(file != nullptr && generatorContext != nullptr); - if (file->syntax() != FileDescriptor::SYNTAX_PROTO3) { - *error = "Invalid proto used. qtgrpcgen only supports 'proto3' syntax"; - return false; - } return GenerateClientServices(file, generatorContext); } diff -Naur qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp --- qt-everywhere-src-6.5.2.orig/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp 2023-07-07 14:29:20.000000000 +0200 +++ qt-everywhere-src-6.5.2/qtgrpc/src/tools/qtprotobufgen/qprotobufgenerator.cpp 2024-03-12 08:42:48.976741000 +0100 @@ -37,15 +37,10 @@ bool QProtobufGenerator::Generate(const FileDescriptor *file, [[maybe_unused]] const std::string ¶meter, GeneratorContext *generatorContext, - std::string *error) const + [[maybe_unused]] std::string *error) const { assert(file != nullptr && generatorContext != nullptr); - if (file->syntax() != FileDescriptor::SYNTAX_PROTO3) { - *error = "Invalid proto used. qtprotobufgen only supports 'proto3' syntax"; - return false; - } - return GenerateMessages(file, generatorContext); }