summaryrefslogtreecommitdiffstats
path: root/src/remoteobjects/qconnectionfactories.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Fix template information for qRegisterRemoteObjectsServer/ClientLuca Di Sera2023-11-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QDoc parses a project, it parses the source code to extract the user-provided documentation and perform sanity checkings based on the code itself on it. When QDoc parses an "\fn" command as part of this process, it tries to understand, based on its intermediate representation built on the information extracted from the code-base, which "documentable element" the "\fn" refers to. When QDoc performs this "matching" process, it takes into consideration only a certain amount of information. For example, no checking is performed over the template declaration of a callable. Due to some upcoming documentation, where two callables are indistinguishable to the current process, as they differ only in their template declaration, QDoc will start to take into consideration the template declaration of a callable when matching. This implies that an "\fn" command should now provide information parity, with regards to template declaration for callables, with the code-base so that QDoc can perform the match correctly. The documentation for `qRegisterRemoteObjectsServer` / `qRegisterRemoteObjectssClient` are not in sync with the intended target template declaration. Hence, add the missing information to the relevant "\fn" commands. Task-number: QTBUG-118080 Change-Id: Ia70ad3a0ded11818b298b31d8fab64b62efdd0ce Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix missing QIODevice disconnect() signal connectionLionel Fafchamps2022-12-121-1/+1
| | | | | | | | | | | | | | | | | The QtROExternalIoDevice fails to register a disconnect() signal from the underlying QIODevice. If the server tries to initiate communication after the client disconnects, it will segfault trying to access the QIODevice. There is a metaObject check for the disconnect() signal before connecting, as disconnect() isn't part of the QIODevice interface. However, metaObject::indexOfSignal is being passed a SIGNAL(disconnect()), which is not the correct format. It should be passed the normalized signature "disconnect()" Pick-to: 5.15 6.2 6.4 Change-Id: I6cc6d51faff49d4106f4126352e1e9e6cf6165a2 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Use SPDX license identifiersLucie Gérard2022-06-141-38/+2
| | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I315d7ce1d6c6c3497afdfe8b61a113fdc181c935 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* 6.2 cleanupBrett Stottlemyer2021-09-081-0/+1
| | | | | | | | | | | | | | Several cleanup fixes prior to 6.2 release: * Bump the protocol version: several earlier patches are incompatible with version 1.3. * Set the datastream format to little endian. Most machines are LE, so this prevents unnecessary byte-swapping. * Use 6.2 datastream format * Update compatibility table in the documentation. Pick-to: 6.2 6.2.0 Change-Id: I3a96513d9edf351ee30f49bad237005878b54b8a Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Provide a schema for abstract local socketsBrett Stottlemyer2021-08-311-2/+8
| | | | | | | | | | | | | | | | Adds 'localabstract' schema, an extension of the 'local' schema. An abstract Unix domain socket (which is a non-portable Linux extension) avoids creating a file handle for local socket communication. This allows abstract sockets to run on systems that are non-writable, in particular Android environments. Pick-to: 6.2 Fixes: QTBUG-96006 Change-Id: I9f7f7854708264c38d05d704f3569bcc9e46cfbf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Rename the classes for adding a custom transport supportSona Kurazyan2021-06-171-52/+52
| | | | | | | | | | | | | 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>
* Remove the IoDeviceBase::stream() methodSona Kurazyan2021-06-041-6/+0
| | | | | | | | | | | 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>
* Fix static analyzer warningsSona Kurazyan2021-05-311-2/+2
| | | | | | | | | | 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>
* Move classes for adding a custom transport protocol to a public headerBrett Stottlemyer2021-05-271-31/+6
| | | | | | | | | | | 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-271-32/+96
| | | | | | | | | | 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>
* ExternalIODevice fixesBrett Stottlemyer2021-03-091-1/+1
| | | | | | | | | | Make sure the input QIODevice is valid and the disconnect signal (if available) is connected. Task-number: QTBUG-84640 Pick-to: 5.15 5.12 Change-Id: I9e65dc903ce0e92da4f4a1e07fd5d6b66815e2a4 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Doc: Improve the documentation landing pageKavindra Palaraja2019-07-081-2/+2
| | | | | | | | | | | | | * Merge the use cases into a more prominent location: the landing page, so that the reader has a better chance of visualizing how to use the module in real-life use cases. * Update the C++ Reference module documentation to suit other Qt modules. * Removed the include statements from the landing page as that's only for C++ and this module also provides QML. * Reduce the number of links to "Source" and "Replica" as we don't have to link to every single instance. Change-Id: Ic227cd7adcc25fc9d3bfdf3e2239d62403b36bba Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix compilation with gcc 4.8Ville Voutilainen2018-12-031-3/+3
| | | | | | | GCC 4.8 doesn't like using QPointers in signal connections. Change-Id: I261f6c7faecc97ef4023adfe2796c3a84e75fa8b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Support externally generated QIODevicesBrett Stottlemyer2018-08-151-1/+37
| | | | | | | | | | | | | | | This adds the APIs that will be necessary to create SSL sockets flexibly (and outside of QtRO) and pass them in. The integration tests are extended to show everything works if the tcp/ip connection is created outside QtRO. The Registry is supported by allowing an "external schema" to be set as the HostNode's url, which is then used by the registry as the address for any remoted() source objects. The client Node calls registerExternalSchema() with a std::function callback that can create the client-side QIODevice given the registry provided url. Change-Id: I0f2d0ea270771e096a787134ef87d537769045f6 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-301-2/+2
|\ | | | | | | Change-Id: I5f8bd33283c41e1394a472171fd9d573b5da08c7
| * Doc: Add missing dotsPaul Wicking2018-06-191-2/+2
| | | | | | | | | | | | Task-number: QTBUG-68933 Change-Id: I8e424d1a0d43009889e2ab52305dc84cd2b89ecc Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* | Refactor connection factories to shared base classBrett Stottlemyer2018-06-291-67/+49
|/ | | | | | | | | There was a lot of duplicate code, and having a common base class makes it easier to extend (in future changesets) to support connections made outside of QtRO. Change-Id: Ie2a436132df2f4c7a2503a67b4f8fc2b9e18ef4e Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Say hello to QRemoteObjectNode::heartbeatInterval propertyBogDan Vatra2017-12-081-0/+8
| | | | | | | | | | This property can be used to periodically check the connection between the replica and the source. If the connection is lost, the replica enters in the "Suspect" state and will attempt to reconnect. Task-number: QTBUG-64086 Change-Id: Icf67e173073c9d277575c8faf01a0a1ffab5bc07 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-241-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/remoteobjects/qremoteobjectabstractitemmodeladapter_p.h src/remoteobjects/qremoteobjectdynamicreplica.cpp src/remoteobjects/qremoteobjectnode_p.h src/remoteobjects/qremoteobjectregistry.cpp tests/auto/auto.pro tools/repc/repcodegenerator.cpp Done-with: BogDan Vatra <bogdan@kdab.com> Change-Id: I9d0230736b768eac44b06376aeaab1b0b09eb22a
| * Send and check the protocol versionv5.10.0-beta3BogDan Vatra2017-10-241-0/+1
| | | | | | | | | | | | | | | | [ChangeLog] This is a backwards incompatible change, but is required for future changes to the underlying datastream protocol Change-Id: I7399977b99ede6308ecfa81dbdd2387027b2007b Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* | Dissolve qconnectionfactories.h, make privateKevin Funk2017-10-061-1/+1
| | | | | | | | | | | | | | | | | | Make API previously exposed in qconnectionfactories.h private. It is only useful for backend implementations, and we recommend to develop backend implementations in-tree. Change-Id: I868b788ebefce9bc27f43376f619c6705b44afd5 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* | qconnectionfactories: Const'ify where possibleKevin Funk2017-09-281-1/+1
|/ | | | | | Change-Id: Iddb610ccda251b20385dbde281b8cbc928e86e30 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* QtRO{Client,Server}Factory: Make ctor privateKevin Funk2017-06-091-2/+2
| | | | | | | | Reduce exposed public API a little bit more. As suggested in a previous change-request. Change-Id: Ia64e9a2dc515969943deb2bca2c5702b4f26a52e Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Correct QtRO license headers and added missing license filesv5.9.0-beta4Jani Heikkinen2017-05-021-13/+19
| | | | | | | | | | | | | Unify licensing as it is in other submodules - Src is licensed under Commercial, LGPLv3, GPLv2 and GPLv3 licenses - Examples are licensed under Commercial and BSD licenses - Tools and tests are licensed under commercial and GPLv3 license with some exceptions Task-number: QTBUG-58921 Change-Id: I4494bf8b705568b243340c98316bedd706145db5 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Load backends properly in Qt static buildsKevin Funk2017-03-241-0/+109
| | | | | | | | | | | | We need a proper way to register the Client/Server backends. Registration via static initialization will not, thus turn the Client/Server factories into a global singleton and attempt to register the Client/Server backends whenever the create-function is called. Change-Id: I1c2fb5ad1e742e6480148254fe774ce2a1c6630f Task-number: QTBUG-59464 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Fixes for license checkBrett Stottlemyer2017-01-141-21/+13
| | | | | | | | Change-Id: I3cf39180b08b80ea65c46e7b6a9e81f3aa79d1af Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix namespaced buildVolker Krause2017-01-131-0/+2
| | | | | | Change-Id: I09710e06ec674d282b4298a7f881a7ff229f924e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
* Add QNX-specific backendBrett Stottlemyer2016-03-191-1/+1
| | | | | | | | | | | Provide a backend using QNX Native Messaging. Change-Id: Ie93ba5483573b35c0a9fe31c57a710b1163b4901 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: James McDonnell <jmcdonnell@qnx.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* Introduce qt.remoteobjects.io categoryKevin Funk2016-03-041-5/+5
| | | | | | | | Allows for more fine-grained control over debugging output Change-Id: Ia3607fbd6e0daf65920f564b6da9d9553084739d Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Use parent to handle ClientIoDevice deleteBrett Stottlemyer2015-12-311-0/+2
| | | | | | | | | | | A previous change added the parent QObject, but we still did manual close()/delete. Change-Id: I8e4e951b6da597dd14a9251c0db206b3ca8acd58 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Kevin Funk <kfunk@kde.org> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Make connection-factories publicBrett Stottlemyer2015-12-021-0/+218
This is a large change, but it is completely a refactoring of code, not code changes. The connectionfactory classes are now public and describe the connection backends (local and tcp/ip). Instead of putting the client code in a set of files and the server code in a set of files, we have local_backend and tcpip_backend which include both client/server code. The packet type enums were moved to the global header file to make them available to additional backends. Change-Id: I83efc9c1f2013f41f97a4350a31a708f484749e4 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Allen Winter <allen.winter@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>