Commit Graph

13 Commits

Author SHA1 Message Date
Alexey Edelev 032214e322 Complete qtprotobuf qtgprcgen tests refactoring
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>
2024-10-01 18:26:24 +02:00
Alexey Edelev fc773b35a1 Remove the outdated guard for protoc availability in tests
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>
2024-09-30 16:06:25 +02:00
Alexey Edelev 0ae6627df9 DRY qtgrpcgen and qtprotobufgen tests
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>
2024-09-30 16:06:20 +02:00
Alexey Edelev 2ee5062318 Support QT_NO_SIGNALS_SLOTS_KEYWORDS
Replace signals/slots macros with Q_SIGNALS/SLOTS counterparts.

Change-Id: Ie44734106c553f6e14e2ac0f406329b77bb5c17b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
2024-05-21 14:19:44 +02:00
Alexey Edelev 3f1eab9ad6 Replace the out-of-line equality operators with the inline one
Use the inline equality operators in the generated protobuf messages.
Replace the existing implementation of the operators with the
comparesEqual function, similar to the Qt data classes.

Change-Id: Ib7be026f3ad5c8d985c26dbd37b46bbf79f049b6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-24 17:25:36 +02:00
Lucie Gérard 3dc4dcc823 Correct license for tests file
According to QUIP-18 [1], all tests file should be
LicenseRef-Qt-Commercial OR GPL-3.0-only

[1]: https://contribute.qt-project.org/quips/18

Pick-to: 6.7
Task-number: QTBUG-121787
Change-Id: If8971276e27806c9cb5aad6511e3fb6770695ed0
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-03-15 14:27:46 +01:00
Alexey Edelev 56f7edbe26 Extract wrapping namespace from package but not from messages/enums/services
Use the package defined in a .proto file when generating the wrapping
namespace statements. This fixes the crash when .proto file contain no
message definitions.

Pick-to: 6.5 6.6 6.7
Fixes: QTBUG-122816
Change-Id: I0eb474217eb0126dee5919bbd7b12a20f8078124
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-02-29 12:19:27 +01:00
Alexey Edelev b75bc17c33 Add the missing generating of the C++ exports to the qtgrpcgen
Make the generating of C++ exports common for both generators.
The confilicting generation should be resolved by the tools that
running the generators. Qt CMake API handles this situation.

Fixes: QTBUG-121856
Pick-to: 6.7
Change-Id: Ie2452f52d755ade2909107885dac774ff8678daa
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-02-06 17:23:19 +01:00
Alexey Edelev f15db878a1 Require the PROTOC_EXECUTABLE definition in tests
Require the PROTOC_EXECUTABLE definition when compiling
qtprotobufgen/qtgrpcgen tests.

Pick-to: 6.5 6.6 6.7
Change-Id: I5e207c8402dbccd5254d6a9687303e56ff7a4bbb
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
2024-01-12 14:44:45 +01:00
Tatiana Borisova 42ce3ecdc5 qtgrpcgen code is updated for QtGrpcQuick plugin usage
Change generates QmlClient class inherited from CPP Client class,
and registers QmlClient in QML;
Also, added QML key usage into qtgrpcgen test,
updated tst_client object name;

Task-number: QTBUG-115184
Task-number: QTBUG-114893
Change-Id: I7b9fcab9c976ae7bc708d29eb14069018b79380b
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-07-28 14:21:10 +02:00
Tatiana Borisova fa202dd944 Test code is should be updated according the latest generator version
Add protobufgen output files to the grpcgen test for auto checking
them up to date

Pick-to: 6.5
Change-Id: Ia7c3fcedfc9b3a4f0e66e748db8d5d818b4fb069
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-16 13:25:48 +00:00
Konrad Kujawa 3d16e50a4b Remove QAbstractGrpcService and disable QtGrpc service generation
It's not in use for now, so there's no reason for it to exist in
the public API, even when we're in TP - and plans for future
releases are still unclear regarding server-side gRPC support,
so this feature may not be needed in the coming months.

Either way, it can easily be added again once we have all the
server functionality ready.

Split code generation of gRPC client and server to separate
functions and make GenerateServerService unused.

Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I65a2122ec5dba640614d97daec973567c57401f4
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-08 10:22:00 +01:00
Tatiana Borisova 326ebfaadb QtGrpc: Update code generator to generate gRPC structures
Split the .proto files generator into QtProtobuf and QtGrpc parts.

Pick-to: 6.5
Task-number: QTBUG-105496
Change-Id: Ib43abe4c1fb849ecf68952b82af9d3988e88e02a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-01-11 12:04:11 +01:00