mirror of https://github.com/qt/qtgrpc.git
Do not return error if the .proto file contain no type declarations
The missing message or enum declarations shouldn't lead to an error when running protobuf generator. This only means that the .proto file needs no processing. Pick-to: 6.5 6.6 Change-Id: I80c81ebd04024c1e08883b8a0b9cf572b0c3aa1d Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
This commit is contained in:
parent
fa1a88fe8f
commit
b94ba71cf7
|
|
@ -386,9 +386,9 @@ bool QProtobufGenerator::GenerateMessages(const FileDescriptor *file,
|
|||
assert(file != nullptr);
|
||||
assert(generatorContext != nullptr);
|
||||
|
||||
if (file->message_type_count() <= 0 && file->enum_type_count() <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (file->message_type_count() <= 0 && file->enum_type_count() <= 0)
|
||||
return true;
|
||||
|
||||
GenerateHeader(file, generatorContext);
|
||||
GenerateSources(file, generatorContext);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue