Add documentation for the QT_USE_PROTOBUF_LIST_ALIASES cmake property.
The property controls the \c QT_USE_PROTOBUF_LIST_ALIASES definition,
which enables/disables the type aliases for the QLists of protobuf
messages.
Task-number: QTBUG-129652
Pick-to: 6.9
Change-Id: Ib4feb4e641386f0bfce61ab9ed06709c019ab1f0
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Generating the aliases for protobuf QList types leads to the name
clashing when users want ot introduce messages that have name
consisting of previously defined message name and Repeated suffix,
e.g.:
message MyMessage {
}
message MyMessageRepeated {
}
We shouldn't prohibit the above scheme in our generators and generate
the respective messages correctly. The only possible solution -
complete removal of the protobuf messages QList aliases.
Generator still generates the aliases guarded by the
QT_USE_PROTOBUF_LIST_ALIASES macro. The macro is enabled by
Qt::Protobuf when building using CMake, but can be disabled at any
time by setting QT_USE_PROTOBUF_LIST_ALIASES property on protobuf
target to avoid name clashing.
[ChangeLog][Protobuf] qtprotobufgen doesn't generate protobuf message
QList aliases. All usages of aliases should be replace by respective
QList types. Aliases are still generated and are guarded by the
QT_USE_PROTOBUF_LIST_ALIASES macro in the generated code. The macro
is enabled by default and can be disabled using
QT_USE_PROTOBUF_LIST_ALIASES target property.
Fixes: QTBUG-129652
Pick-to: 6.8 6.9
Change-Id: I026755b36985eef01a6851156d9c9cfff141d247
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Value type classes in Qt usually contain an implicit QVariant opeartor.
Add it to comply with idiomatic Qt patterns.
Task-number: QTBUG-129161
Change-Id: Ib9ccd0cdfa7d6d6c2440323d1cc9b6088ea554c6
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The generation was broken for proto filenames, which where
invalid identifier, since the filename is used at several places in the
generation process.
This became evident for the protobuftyperegistrations and traditional
filename header guards.
Solve this by transforming the basename into a valid identifier.
Also add a testcase on the highest point of abstraction for the
generators (qtgrpcgen).
Fixes: QTBUG-131417
Pick-to: 6.8
Change-Id: I492907881913f8b43ebf365a9e1fe38062113c3c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
These files are autogenerated in the source directory when enabling
QT_QML_GENERATE_QMLLS_INI
Pick-to: 6.8.1 6.8
Change-Id: Iaa136e91b9a7d9c4d4ed881285a35967881153f5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This will work around the issue in debian-like platforms, where
relatively new protobuf doesn't deliver the proper config files.
The lookup still prefers looking for the config files, but not
the deprecated CMake module.
Change-Id: Ie1d5217e9023022976dd058be9dd7fd1ce37e39f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This reverts commit 3d6c2827a0.
Disabling the tests was a temporary measure taken to buy us time to fix
the underlying issues. Since commit
80c6d3c08b593471f3279f45c54fdd85222072eb in qtdeclarative the particular
code exercised by these tests is fixed. Therefore, we can re-enable
them.
Pick-to: 6.8
Task-number: QTBUG-127174
Change-Id: I304dc0318be50cdf2fded34bd33d9e3ba568089c
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Use the empty initialization for the google::protobuf:Any when it's
used as the oneof field.
Fixes: QTBUG-131415
Pick-to: 6.8
Change-Id: Ib2e9d9234b9cf90dce3c72b85001fa1b62a501e8
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Fix the invalid assignment of the string to an object. Assing
string values to the inner message field instead.
Pick-to: 6.8
Fixes: QTBUG-131577
Change-Id: I52dd735c0ffd3a00ac5f95f090c03b7ca3172081
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Ensure that QProtobufOneof can handle types like QtProtobuf::Any.
These types inherit QProtobufMessage but work differently and do
not contain the static property ordeing. They use the customized
serializer proxies instead and passed by value when accessing using
the gadget property.
Add QProtobufOneof specific constraints to ensure we cover the use
of types like QtProtobuf::Any as oneof field.
Pick-to: 6.8
Change-Id: Ib40df389cee3352803d0a85bab2229583f8e0727
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This is the idiomatic way of providing documentation files for our
examples.
Task-number: QTBUG-129571
Pick-to: 6.8
Change-Id: I821cf955371766ef473551607308f59c6c2e692b
Reviewed-by: Jaime Resano <Jaime.RESANO-AISA@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Since the documentation has been moved to the example folder, the path
is no longer valid
Task-number: QTBUG-129571
Pick-to: 6.8
Change-Id: Ia299de0801b89f98d13bbb9714e7ce597af90ac5
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
This is the idiomatic way of providing documentation files for our
examples.
Task-number: QTBUG-129571
Pick-to: 6.8
Change-Id: I3fda6a56d6de0d7378d2339bb8ca3930f06dd6ae
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
The channel options test should not check the SSL configuration when
SSL has not been configured
Fixes: QTBUG-131134
Pick-to: 6.8
Change-Id: I6356d0e7b9330a6b5d6830da93d4bb0958f6dcf7
Reviewed-by: Jaime Resano <Jaime.RESANO-AISA@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
REUSE.toml files are read by reuse to complement or override the
copyright and licensing information found in file.
The use of REUSE.toml files was introduced in REUSE version 3.1.0a1.
This reuse version is compatible with reuse specification
version 3.2 [1].
With this commit's files,
* The SPDX document generated by reuse spdx conforms to SPDX 2.3,
* The reuse lint command reports that the Qt project is reuse compliant.
In order to be reuse compliant all the licenses present in the
LICENSES directory must be used. License files not used are removed.
[1]: https://reuse.software/spec-3.2/
Task-number: QTBUG-124453
Task-number: QTBUG-125211
Pick-to: 6.8
Change-Id: I1d2b4f8cdd3464877eab3084a0087284c810f6ba
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The example server doesn't really need to use Qt. Remove the
dependency on Qt Core.
Pick-to: 6.8
Change-Id: I8b64e9765f529baa1bcf041a801723ceaed85334
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
The function now accepts two arguments, but not one. The second argument
is the main plugin target that the object library belongs to. It's used
to keep the set of flag-controlling properties consistent between
object library and plugin.
Change-Id: I695c613a70e56bf99cf1efabc3288fb720d10e66
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
These modules are not relevant anymore. After porting Qt::Grpc
relied on native gRPC implementation. But since we migrated to the
fully functional Qt HTTP/2 the need of reference gRPC and protobuf
gone.
Remove the WrapgRPC and WrapProtobuf modules, use the protobuf
gRPC modules directly in tests examples and tools. Since non of
those never add the build-time depdendcy on reference libraries,
we don't need to add the respective dependencies in Qt packages.
The only thing we still wrap is protoc. We either look for executable
but we never propagate it as the reference target, but utilize the
path from there.
Fixes: QTBUG-128809
Change-Id: Id5008f8dd935288cbaa8a9abb88d485824099d46
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Move the common logic of two tests to the base class. Adjust the
implementation of the qtgrpcgen test to the recent changes in
the qtprotobufgen test.
Pick-to: 6.8
Task-number: QTBUG-128753
Change-Id: I946cd132c6850ce56d8c3217169bb5c4e335e969
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
MacOS provisioning is fixed long time ago. Remove leftovers from
tests.
Pick-to: 6.8
Taks-number: QTBUG-109130
Change-Id: I4565ffecfd49ac7f6c56045027a6f564d0547e3e
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Add the protocplugintestcommon static library that contains a common
code for both tests.
Reuse the library in tests instead of code duplication.
Pick-to: 6.8
Task-number: QTBUG-128753
Change-Id: Ib56861462635d6a0fff0f1add9b2cd7765316e09
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Add the missing tests for the HEADER_GUARD. The test was not
provided by functional change, since it required the refactoring
in qtprotobufgen test kit.
Change-Id: I1e14ba29c61adb80d5af3775c7c729f1ab508448
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Use the common .proto scheme for all testcases, that defined lot of
message variants, so we can see how changes in generator affect
various types but not only restricted subset.
Rearrange the test cases according to the generator options.
Change the verification process for command line tests. Consider not
only some files but all generated files, so we can see if some new
file is added or some files are remove/renamed.
Simplify tests.
Add the COPY_TEST_RESULTS environment variable support. This variable
now allows copying test results to the source directory. The introduced
functionality is very handy when need update expected results after the
major changes in generator.
Add the respective feature guards for the QProcess usage. In case if
the feature is disabled in QtCore.
Pick-to: 6.8
Task-number: QTBUG-128753
Change-Id: I5ac33684c8cf4fd5dd133b404061db4435a87344
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Protobuf required the special strings for (-)Infinity and NaN floating
point numbers. Use the valid letter case when serializing those.
Pick-to: 6.8
Change-Id: I45a9190aee8d407eca63fd1b352d041d5063e7ec
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
The namespace contains the functionality that was a part of
QProtobufSerializerPrivate before. Move this functionality to a
separate file, since we want to unlink QProtobufJsonSerializer
implementation from the QProtobufSerializer one.
Pick-to: 6.8
Task-number: QTBUG-128812
Change-Id: I7b97ced9fbfa1076b2e898832575c1931923a2c3
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Avoid removing and appending header files suffixes where this is not
intentional. Change the default internal header file template and
always add the suffix explicitly, where required.
Pick-to: 6.8
Change-Id: I1fff1d3813700d6387964d5411970b21ecb4a2e6
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
In certain usecases users might need to know the RPC result message
type. Currently we do not store it anywhere, so API users decide
how to deserialize message when calling QGrpcOperation::read method.
Add RCP methods overloads to QGrpcClientBase that accept the meta
types of the RPC result messages. Generate the code that uses these
overloads by default, sot QGrpcClientBase can store the information
about the result type inside the QGrpcOperationContext.
Introduce QGrpcOperation::responseMetaType,
QGrpcOperationContext::responseMetaType and
QGrpcOperationContext::setResponseMetaType methods.
These methods are user-facing API to access or change the result meta
type.
Task-number: QTBUG-128743
Change-Id: Ide0ebc1c935dfbdf0d3b62e05acdf058f95bf367
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Guard the QLocalSocket implementation in QGrpcHttp2Channel
with the respective feature condition.
Fixes: QTBUG-129204
Pick-to: 6.8 6.8.0
Change-Id: Ie4de6576318305194735d76b46db1475faff3fdb
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>