summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add example of reading CBOR data from pythonwip/serializationBrett Stottlemyer2021-07-1523-136/+2258
| | | | | | | | | | | | This is currently a test harness that will expand as the CBOR functionality is prototyped. A start at changes to repc to autogenerate python code for Replica types is also included. Change-Id: I97c3ad4c62c7d747c1918f88be41fb7643bbb46d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Provide methods to set the Host codecBrett Stottlemyer2021-07-1212-28/+199
| | | | | | | | | | | | | | | | | | | | | | | | | Each codec will have different ways of sending packet size, so we need an agnostic way of passing along the choice of codec. This is done in the Handshake, which now passes 3 bytes and a utf-8 string. Byte 1: Size of the packet (< 255 bytes), excluding the size byte itself. Byte 2: PacketID enum, must be Handshake, truncated to 1 byte. Byte 3: A revision number for the Codec (unused in this patch) String: utf08 encoded name for the Codec. This also provides a codec manager for each node. The codec holds a packet buffer, so each node needs its own instance (but only one instance) of each type of codec used. The eventloop ensures we don't have simultaneous reads/writes to different objects. Additionally: A clearCodec() method was added to ExternalIoDevice, so on disconnect and reconnect, the pipe will be ready to receive a new Handshake packet. The CodecBase getPayload() method now returns non-const reference, so the value can be written to, not just read. Change-Id: Id46e78339ef6814a7b55c524ba1963862a8f75eb Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-07-061-2/+2
| | | | | Change-Id: I5c39d7e2ebd435fb663cdd93e175f52a0c32ce96 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-07-051-2/+2
| | | | | Change-Id: Ie5c0cdbd0a2e8a6c74e12493033acea992fbbf7e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-07-021-2/+2
| | | | | Change-Id: I74e7732ade8c07e72267b96dddfe4070fd1e7f05 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-07-011-2/+2
| | | | | Change-Id: I7b31546ec9567836a439437d802d66131c6c8b4e Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-07-011-1/+1
| | | | | Change-Id: I7424e4b281c0b1ef85334bd67698a1bcf7ea9beb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Make sure dynamic types set enumCount properlyBrett Stottlemyer2021-06-291-1/+2
| | | | | | | | | Future commits will check QDataStream status, and this led to ReadPastEnd (which in this case didn't cause a issue because it would default to zero anyway). Change-Id: Ibef6959c8fdbbe09c302ad286f13ecabd7428062 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Switch usage of QList<QVariant> to QVariantListBrett Stottlemyer2021-06-293-5/+5
| | | | | | | This is a holdover of QVector -> QList conversion Change-Id: I8f7677617ad96d3b45e78e44cbbe7fa97a430c79 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-291-2/+2
| | | | | Change-Id: Ib3dcc1605112bd67dcb0bea83ae8a318a87e01bf Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Don't try to access replica's connection when it's not initialized yetSona Kurazyan2021-06-282-10/+43
| | | | | | | | | | | | | | | | | | | | After the recent changes for supporting different serialization backends, we need to get the proper codec from the connection for serializing data. However, it's possible that we will be trying to serialize data, when the connection is not established, e.g. client started without a host, and is trying to send heartbeat packets to check for connection (like in the attached bugreport), or the host is destroyed while the client is still trying to send data). Check if the connection with the source is not null, before using it. Note, that these checks were done also before, but after serializing the data. Now we do them before. Pick-to: 6.2 Fixes: QTBUG-94513 Change-Id: Ie2ca558fc11044513b7886aed736383b16b7464b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-281-1/+1
| | | | | Change-Id: I3588c5ea71b237a448f5e76e59d04ec94ddc2577 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-261-2/+2
| | | | | Change-Id: I6ffc95a24284486960e63c1f414149a4aa76aa75 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-251-2/+2
| | | | | Change-Id: Id61d66f005474279c84768c396814f73348c04fb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-251-2/+2
| | | | | Change-Id: I5607e4db368f1d8cac131fe4f2ed09a759838ba3 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-241-2/+2
| | | | | Change-Id: I17269dd69cc920a6bf4a8aff9f62904b92646591 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update the outdated '### Qt 6' commentSona Kurazyan2021-06-242-4/+8
| | | | | | | | | | | | | There are plans to enable the reserve proxy functionality for QRemoteObjectHost, so remove the comment suggesting to move it out from its base. Additionally update docs and fix some related pre-existing issues. Task-number: QTBUG-94407 Pick-to: 6.2 Change-Id: I60da0580648c2b5536e88193d034ed4cfb8d6f7c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Move items from qremoteobjectabstractitemmodeltypes_p.h to QtPrivateSona Kurazyan2021-06-245-156/+160
| | | | | | | | | | | | Move the classes and methods to QtPrivate namespace, to avoid clashes with user code when static linking. Task-number: QTBUG-94407 Pick-to: 6.2 Change-Id: I9194a13fa923429aa1a294d41befc1a05ff12d78 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Make qremoteobjectabstractitemmodeltypes.h privateSona Kurazyan2021-06-244-6/+17
| | | | | | | | | | | | This header is included only from private headers, doesn't have any exported symbols and can be private. Task-number: QTBUG-94407 Pick-to: 6.2 Change-Id: I8be45b1b3fe0936d628859ce04c5d79ac5d769ba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Encapsulate raw string with QLatin1StringKai Köhne2021-06-211-5/+5
| | | | | | | | | Fixes C4996: 'QString::QString': Use fromUtf8, QStringLiteral, or QLatin1String Pick-to: 5.15 6.2 Change-Id: I1642bcae6ad88ceb0487e227e635fa35f6a0520f Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-211-2/+2
| | | | | Change-Id: I40819f07726a333dce0c6c575481ea21d41b120c Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove old configure-related filesJoerg Bornemann2021-06-172-29/+0
| | | | | | | | | | | | | Remove the configure.json and configure.pri files that were used for the qmake-based configure. Remove the .prev_*.cmake files that were a by-product of configurejson2cmake.py. Pick-to: 6.2 Task-number: QTBUG-89536 Change-Id: Ib0c67ef861216f4d64a00c80ed0a9366eab8f262 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-171-2/+2
| | | | | Change-Id: I590d4096c80251ecedda8b9c4dbd0b1913b69029 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Document the renamed classes in the porting guideSona Kurazyan2021-06-171-0/+15
| | | | | | | | Pick-to: 6.2 Change-Id: I0ed937d1ff73b917bf46bd1385e4bcacd9068d7a Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Document the SC and BC guarantees for APIs from qconnectionfactories.hSona Kurazyan2021-06-173-5/+77
| | | | | | | | | | | Updated the warning in qconnectionfactories.h to mention source and binary compatibility guarantees for the classes exported by that header. Added a short overview documentation for these classes. Pick-to: 6.2 Change-Id: Iabeb865908ca05ced1bfb191971806e291915e7e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Rename the classes for adding a custom transport supportSona Kurazyan2021-06-1719-167/+167
| | | | | | | | | | | | | Added QtRO prefix to IoDeviceBase, ServerIoDevice and ClientIoDevice classes. These classes are exported and can be used externally for supporting a custom transport by deriving from them and implementing the virtual methods. Added the prefix also to ExternalIoDevice, to keep the naming consistent. Pick-to: 6.2 Change-Id: I64845cff55687a127d2c43de03ecc65ac9bd321b Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-171-2/+2
| | | | | Change-Id: Ib3aaed8721bc16c9a51453adf75f806406787fbd Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove unneeded CMake variable assignmentsJoerg Bornemann2021-06-141-6/+0
| | | | | | | | | | | | Remove assignments to the transitionary variables QT_NO_INTERNAL_COMPATIBILITY_FUNCTIONS and QT_USE_FIXED_QT_ADD_RESOURCE_BASE. Both are not needed anymore. Task-number: QTBUG-94444 Change-Id: I57bff906ea18f12ce0a011ff06ff7913f4d0261c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Use QStringLiteral in repc-generated codeMårten Nordheim2021-06-081-2/+2
| | | | | | | This will save some copying at runtime. Change-Id: I87ada8b8afe0e6338049135d2c3c00dd3febbe1d Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-071-2/+2
| | | | | Change-Id: I4367d4c712e845dd42c29b3780d9901e7586663b Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-051-2/+2
| | | | | Change-Id: I593f44f78f5ea169f23089d2d99403d1b8298202 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-051-2/+2
| | | | | Change-Id: I210dad823b42a42a7592ce027598bee2915d6a69 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-051-2/+2
| | | | | Change-Id: I0290214d6910dd6fb3c49995f8d5e0645a7dc912 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* CMake: Update to latest qml CMake APIAlexandru Croitor2021-06-058-93/+21
| | | | | | Task-number: QTBUG-91621 Change-Id: I35ef90f6df40fac3808fb19054c66d73b18137c8 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove the IoDeviceBase::stream() methodSona Kurazyan2021-06-045-17/+14
| | | | | | | | | | | When support for multiple serialization backends is added, IoDeviceBase shouldn't be aware of the serialization method used (serialization is handled by the codec), so it should have no QDataStream-specific methods. Moved the method returning QDataStream to the private part, so that it can be easily removed later, without breaking SC. Change-Id: I511306ac520c5b745576f5db31dc22f0eadacc62 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Port QRemoteObjectRegistry to new property systemSona Kurazyan2021-06-044-2/+110
| | | | | | | | Task-number: QTBUG-90687 Change-Id: I6c75b7e4cac09f110c377ebc7ed1d72774ffb765 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Andreas Buhr <andreas.buhr@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-041-2/+2
| | | | | Change-Id: Iaa229640348439e4ec2a69c108e8e6e151c62f43 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-031-2/+2
| | | | | Change-Id: I3217f0ae153c998f85d97d8e1a89efff15f87f28 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-011-2/+2
| | | | | Change-Id: Ifb46e4a425dc5a6daa322f998f3657356ca743d5 Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-06-011-2/+2
| | | | | Change-Id: Ie8873c54c05693a63efa65ee920ae96ba3e1f13f Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Make qt6_add_repc_{replica, source} pluralSona Kurazyan2021-05-3144-53/+53
| | | | | | | | | Since these functions can take multiple *.rep files, it makes sense to make them plural. Change-Id: I99894e9ee1f6f0035eb8c3e5cdd1292316324577 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Fix static analyzer warningsSona Kurazyan2021-05-313-3/+7
| | | | | | | | | | Removed or added default constructors/destructors/operators definitions where needed, to silence clang static analyzer warnings. Also moved the definition of IoDeviceBasePrivate to a correct location. Change-Id: If0886b8c2315648a6f430776b5d1e78dc70eba0b Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-05-311-2/+2
| | | | | Change-Id: I2ef0a51a7b1efc1b7e83b55373121468b70bbaeb Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Update dependencies on 'dev' in qt/qtremoteobjectsQt Submodule Update Bot2021-05-281-2/+2
| | | | | Change-Id: I9a668ae8596f4df9a92a32887cc9141fb8627c9d Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
* Remove the old qt5_generate_repc macroSona Kurazyan2021-05-281-112/+0
| | | | | | | In Qt 6 we now have new qt6_add_repc_* commands for running repc. Change-Id: I5739ed9f3525ade48f005da704667d8f343a0288 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Update porting guide with CMake instructions for repc-generationSona Kurazyan2021-05-281-0/+32
| | | | | | | Task-number: QTBUG-93855 Change-Id: I7337288310fac94ef4ec289fa105bbed37a44720 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Document the CMake commands for running repc compilerSona Kurazyan2021-05-286-74/+109
| | | | | | | | | | | Also added the missing instructions for adding the QtRemoteObjects module to a CMake-based project and removed the docs for qt5_generate_repc macro. Task-number: QTBUG-93855 Change-Id: I5116dacba76674217421657dfc404442e3f12701 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Move client-side Codec to IoDeviceBaseBrett Stottlemyer2021-05-278-62/+60
| | | | | | | | | | This is more appropriate than having a separate mapping of connection to Codec. Change-Id: I3b54bfb479de04706a3f9563e7a987af91d0282d Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Move classes for adding a custom transport protocol to a public headerBrett Stottlemyer2021-05-274-210/+274
| | | | | | | | | | | Although these classes weren't documented, they could be used externally to specify a custom transport via inheriting from them and registering the custom classes using qRegisterRemoteObjectsClient() and qRegisterRemoteObjectsServer() methods. Change-Id: Id4cfddf77cd5b55278b5780f4fca447f0706d464 Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Refactor Factory code to hide implementationBrett Stottlemyer2021-05-272-43/+111
| | | | | | | | | | Change to pimpl pattern to allow extension/changes in the future. Change-Id: I289661155aca574430cdbf2d09ea36be7117057b Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>