summaryrefslogtreecommitdiffstats
path: root/libraries/qt6/newer_protobuf_2.patch
blob: cfd5277570b9979d86fee9f5779d72372937daef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 &parameter,
                               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 &parameter,
                                   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);
 }