summaryrefslogtreecommitdiffstats
path: root/src/remoteobjects/qremoteobjectsourceio.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Mark QtRemoteObjects as security criticalØystein Heskestad2025-07-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | The QtRemoteObjects serialization is built on top of QDataStream, but QDataStream is not secure. Mark all files parsing data as security critical. The security is dependent on the backend used. The local and QNX backends communicate only locally but are insecure on a compromised host. The TCP backend is by default insecure, but it supports TLS, and can be secure if that is used. The two files in the repparser directory are used for parsing, but only at build time, and are therefore kept at security significant. The remaining files are marked as security signifcant. QUIP: 23 Task-number: QTBUG-135570 Pick-to: 6.10 6.9 6.8 Change-Id: I11176c036d95f8c706bd05e1cab1ba499003f683 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add a static method setLocalServerOptions to QRemoteObjectHostØystein Heskestad2023-09-111-0/+14
| | | | | | | | | | | | | | | This method must be called before a QRemoteObjectHost object using the QLocalServer backend starts listening for it to have an effect. It starts listening during construction when the address argument is non-empty, otherwise when the address is set via setHostUrl(). Also added another error code QRemoteObjectNode::SocketAccessError for when the QRemoteobjectNode is not allowed to connect to the QRemoteObjectHost. Fixes: QTBUG-72921 Change-Id: I4303b25dbc37d9f4d4eb2bdaeff1ef02089e6b5d Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-2/+2
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: Ifc205a53ed6809f98d6cd552de901ea7e90716f5 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* 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>
* Refactor decodeVariant to pass by rvalue ref/std::moveBrett Stottlemyer2021-08-041-1/+1
| | | | | | | | | | | | | | The decodeVariant calls were weird in how their parameters were pass by reference so they could be changed, but without forcing a copy. It is clearer to pass by rvalue ref, using std::move on the calling side. This rippled up to calls that called the method, including setProperties which is part of the repc generated code. Because of the repc change, this should *not* be picked to Qt5. Pick-to: 6.2 Change-Id: Ieb1b0620569ad8eb9797edc57cc189d0b426510c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Rename the classes for adding a custom transport supportSona Kurazyan2021-06-171-6/+6
| | | | | | | | | | | | | 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-2/+2
| | | | | | | | | | | 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>
* Refactor serialization code into an abstracted classBrett Stottlemyer2021-05-271-15/+14
| | | | | | | | | | | This hides implementation details and allows for different implementations in the future. Change-Id: I5502bb040afe502f7b127668cf7ff81ee79f5e89 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>
* Avoid constructing QMetaType from type id when possibleSona Kurazyan2021-02-161-1/+1
| | | | | | Change-Id: I013bd3f3a6e7bb9e2a4ff45a3ca9534048643144 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Fix QMetaType Deprecation warningsBrett Stottlemyer2021-02-151-4/+4
| | | | | Change-Id: If7de5da3e7ad6d345e8b483486bb7177bccbc0df Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix compilation with Qt 6Sona Kurazyan2021-02-151-1/+1
| | | | | | | Task-number: QTBUG-90685 Change-Id: Iba9ee0a28ec0ceeca5ae318204deb14190042533 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Annual QStringLiteral sweepMarc Mutz2019-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It makes little sense to use QStringLiteral in the following situations: - for comparison to a QString, because operator==, startsWith(), indexOf() etc are overloaded for QLatin1String. - for strings which are immediately appended to, or which are appended or prepended to other strings. because no dynamic memory allocation is saved by doing so. But if the only advantage of QStringLiteral does not apply, all its disadvantages dominate, to wit: injection of calls to the QString dtor, non-sharability of data between C strings and QStringLiterals and among QStringLiterals, and doubled storage requirements. Fix by replacing QStringLiteral with QLatin1String, or char16_t literals, whichever is more fitting. Also use new QLatin1String::arg() more. Change-Id: I55d05783889f521001a1cb8dedd276d0a183882f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Eradicate some more tricky Q_FOREACH loopsMarc Mutz2019-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These all have a non-neglible chance of somewhere indirectly modifying the container they iterate over: - In QRemoteObjectNode::timerEvent(), the loop calls a virtual function and it's unclear whether that could reenter into QRemoteObjectNode and modify d->pendingRequests. The name of the virtual function suggests that it shouldn't, so this is ported without taking a copy. - In QRemoteObjectNodePrivate::onClientRead(), the loop calls handleReplicaConnection(), which I didn't prove to not reenter into QRemoteObjectNodePrivate and cause modifications to rxObjects. A quick analysis indicates that the only writer to the object is onClientRead() itself, in which case the question must be asked why rxObjects is a member and not a local. Ported without copy. - In QRemoteObjectSourceBase::handleMetaCall(), the loop again calls a virtual function and it's uncler whether that could reenter and cause a modification to d->m_listeners. The name of the virtual function suggests that it shouldn't, so this is ported without taking a copy. - In QRemoteObjectSourceIo::onServerDisconnect(), the loop removes listeners. While the immediate call does not modify m_sourceRoots, it does call virtual functions which are not proven to not reenter into the object and modify m_sourceRoots. The name of the function suggests that it's not unlikely that an unregister may cause another, indirect, unregistration, but after consultation with the code's maintainer it has been decided to port this without taking a copy and fix up once such use cases manifest themselves. Change-Id: Ib9950ffd90718d8527e9f86818e2fb357a65db75 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Eradicate some simple Q_FOREACH loopsMarc Mutz2019-07-041-1/+2
| | | | | | | | | | | | | | | | | | | | | All these are relatively easily verified to be safe: They clearly don't modify the container they iterate over, are already const or trivially marked as such. In QRegistrySource::removeServer(), merge with an adjacent loop. In tst_modelview.cpp, replaced a loop over QHash::keys() + QHash::op[] with an STL-style loop and it.key()/it.value(). In tst_signature.cpp, replaced a QStringList with a C array of QLatin1Strings, saving a qAsConst call. Add some reserve() as a drive-by. Change-Id: Ibf09371ca8b58437834734c3bab997527219c823 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix dynamic use_enum logic (Qt types only)Brett Stottlemyer2019-05-181-8/+4
| | | | | | | | This is the first step in getting use_enum working. Since Qt types are already declared, we just need to register them get support into QtRO. Change-Id: I9b1b52f3012fa066acede921db338a755295d8d7 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* More fixes for (dynamic) enums in signals and slotsBrett Stottlemyer2019-05-171-2/+11
| | | | | | | | | | | | | | | | | | | | | | | This addresses two larger issues with enums and several smaller fixes. First, unlike the recent fix for properties, we need to register enums for queued connections to work and get signal/slot updates over QtRO to work. This change adds said registration. Second, enums are identified with the class they are defined in, so passing updates through a dynamic object requires converting the typenames. The templated enableRemoting methods become interesting here, as the class name depends on the type passed as a template parameter. This change also updates the repc output so enums are properly resolved via the templates. Smaller fixes include updates to some tests and several places where enums were converted to/from int. Note: we need (and have always needed) to convert enums to ints, since the class name is passed as part of the variant serialization which cannot be changed without major digging into qvariant and QDataStream serialization internals. Change-Id: I0a77f85df6a400a7a44394a05c9c2401bee4e4a8 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix return value propagation through proxiesBrett Stottlemyer2019-05-131-2/+20
| | | | | | | | | | | A slot with return values returns a PendingCall object on the replica. If such a replica is used in a proxy, a client would get an invalid QVariant as the reply. This was because the proxy would try to return the pending- call, not wait for the slot return from the original source. This change fixes that issue. Change-Id: I1a25ed49ce51729dde4fa4593845946041493ea1 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Merge remote-tracking branch 'origin/5.12.1' into 5.12Qt Forward Merge Bot2019-02-011-2/+2
|\ | | | | | | Change-Id: I3822ef45344b07191c3b32883241db5e43e04187
| * QVariant is also a standalone type and we must treated accordinglyBogDan Vatra2018-12-211-2/+2
| | | | | | | | | | | | | | | | | | | | QVariant::data() gives us access to its internal pointer of the internal data type, but if the type is a QVariant we can't use QVariant::data() anymore. Change-Id: Ifad5f5d5884913c38b289c69b50630c735eea7d6 Fix: QTBUG-72064 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* | Fix include directivesFriedemann Kleint2019-01-181-1/+1
|/ | | | | | | | | | Always prepend the module and use headers directly. Qt for Python requires the modules to be present. Task-number: PYSIDE-862 Fixes: QTBUG-72675 Change-Id: I94e38fbab0f041370ca9d67ca13c78f0d33816b7 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Break socket listen out of QRemoteObjectSourceIo constructorv5.12.0-beta4Lee Helpingstine2018-11-061-14/+17
| | | | | | | | | The QRemoteObjectSourceIo constructor that accepted a host address attempted to start listening on that address. This could result in an invalid state with no way to propagate the error. Change-Id: I80c103122794b164788702ba5c37fd10080e9ecd Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Support externally generated QIODevicesBrett Stottlemyer2018-08-151-16/+35
| | | | | | | | | | | | | | | 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>
* Make (internal) Source objects hierarchicalBrett Stottlemyer2018-04-041-53/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | QRemoteObjectSource is the class used to handle forwarding QObject changes over QtRO, internally storing the listener pointers and managing the send and receive of packets when changes occur. Previously, MODEL and CLASS objects in a parent class were handled by calling enableRemoting separately for each nested pointer type, resulting in separate (and independent) QRemoteObjectSource instances. This change defines a "Root" object (tied to the object enableRemoting() is called on), and any nested QObject types are then created as child source objects of the root object. The implementation creates an abstract QRemoteObjectSourceBase class, with QRemoteObjectRootSource and QRemoteObjectSource types derived from it. Only the Root objects become "known" types on the bus (and thus only Root objects can be acquired. A Private class instance is created by the Root object and the pointer passed to all child sources, providing a mechanism for sharing needed information (such as the list of listeners) amonst all members of the hierarchy. Change-Id: I632e847cad288b4540c7de6676f791ca2e675f46 Reviewed-by: Konstantin Tokarev <annulen@yandex.ru> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Add/extend Class/Model keywords for repcBrett Stottlemyer2017-12-131-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Class and Model extensions to QML are very similar in that they come down to additional QObject derived types that need to be made available to the QtRO bus. The original Model behavior only supported c++ templated calls on the source and replica side. This change adds support for nested classes, via an extension to the .rep file format. Similar to how POD types work, if multiple classes are described in a .rep file, a class can include other classes as children. When the `parent` is acquired, all child classes will be acquired as well, automatically. The syntax is `CLASS <name>(<type>), where type needs to be a class defined in the same rep file, and the name is the getter name used to access the sub-QObject. See tests/auto/subclassreplica/class.rep for an example of usage. This change includes supporting the non-templated enableRemoting() call, as well as using/constructing replica types from QML for both Class and Model. Future TODO - update docs Change-Id: Ib1e75c1a6db44497f78026e7f89caab5da94375b Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Say hello to QRemoteObjectNode::heartbeatInterval propertyBogDan Vatra2017-12-081-0/+4
| | | | | | | | | | 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>
* Send and check the protocol versionv5.10.0-beta3BogDan Vatra2017-10-241-0/+3
| | | | | | | | [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>
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-061-13/+19
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I2dacf93b383ca1b8d56caefb8ff9c4e5aa5e4fca
| * 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>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-121-2/+2
|\| | | | | | | Change-Id: Icb1840ff398c65335b8b7352af088aeae01f7c1d
| * Replace Q_NULLPTR -> nullptrKevin Funk2017-03-291-1/+1
| | | | | | | | | | | | | | | | Skip the moc/ directory intentionally, since it contains third-party code Change-Id: I97105e475c109231e001dc4525b3096a06601868 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
| * Load backends properly in Qt static buildsKevin Funk2017-03-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Convert from QSignalMapper to lambdaKevin Funk2017-03-241-6/+6
|/ | | | | | | | | Since qtbase.git commit 29bcbeab90210da80234529905d17280374f9684, QSignalMapper is deprecated Change-Id: Iedd6aaed8d4a6eaff12298aff4b0c01a781fe1af Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Continuous Integration (KDAB) <build@kdab.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>
* Make it build on VS2013Tobias Nätterlund2016-09-211-1/+1
| | | | | | Change-Id: Ib2806cf9810ee5225ba9ddcf1fb9d4d420424318 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Generate, send and check class signature for .rep generated classesBogDan Vatra2016-09-081-2/+2
| | | | | | | | | If the signature mismatch it will not complete the connection and will signal the error. Change-Id: Idd4a7a5290bb60d7428e16047a1b82db5e52b372 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Send property information of the changed signalsBogDan Vatra2016-06-201-2/+2
| | | | | | | | The new property is sent just before the signal invoke package, there fore we just need to pass the propertyIndex not to serialized it again. Change-Id: Id82030968b0e18f9f95e281e4f3fda950852857b Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* [fix] Correct sent typeNameBrett Stottlemyer2016-03-281-2/+2
| | | | | | | | | | | | | | Commit 0e294632142a5f34036cdbe60c5daae2f9f72e67 ("Provide type name for source locations") sends the typeName as well as the instance name over QtRO. However, certain codepaths it used metaObject's className for the value. We now use the .rep class name instead, which doesn't include the Source or SimpleSource suffix. Change-Id: I584b63b09641361934ecfe71ff09bd1cd3918b0d Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Provide type name for source locationsKevin Funk2016-03-211-5/+11
| | | | | | | | | Extend QRemoteObjectSourceLocation to also carry the type name of the object. Change-Id: Ic50b3682343b92099a5e2f6c564bd10cc543356c Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Fix SourceIo objectBrett Stottlemyer2015-12-311-2/+3
| | | | | | | | | | | | It didn't properly initialize QObject. Also, it is not exported, so data members can also be made public. Change-Id: If5edbd71e88d3da0f44efa045ca1df68ae0fa0fd 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-1/+3
| | | | | | | | | | | | | | | | | | | | | 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>
* Make connection factories staticBrett Stottlemyer2015-12-011-1/+1
| | | | | | | | | | | | | Removed qconnectionabstractfactory_p.h and made static versions of the client/server factories. This will make it possible to add more backends without having to re- compile the factory constructors. Change-Id: I5da780cc871c507d5cc67eaeac96817a785355bc Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix handling of invalid urlsBrett Stottlemyer2015-11-301-3/+5
| | | | | | | | | | Unhappy paths for invalid urls cleaned up. Change-Id: I8b979f00cc7bd108cf342980201b3a09b5a82763 Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Fix crash.BogDan Vatra2015-09-241-2/+3
| | | | | | | | If the address in not supported m_factory.createServer return 0. Change-Id: I424824f59b1a0dc89c2a2605c879676d4c4c37e0 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* [internal] Don't use QRemoteObjectPacketBrett Stottlemyer2015-08-311-40/+38
| | | | | | | | | | | | | | | This is a large change, but it is the same thing repeated. QRemoteObjectPacket was a set of types for (de-)serializing QtRO changes to send over the wire. But it required copying the changes to/from the packet before using those changes. This goes directly to/from QDataStream instead. I think it also makes the InitPacket/InitDynamic steps a bit easier to read, and should improve the init performance. Change-Id: I62b1776858ff74a8532c8f2682aa94ac7248a803 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
* [internal] Remove packet->serialize()Brett Stottlemyer2015-08-311-6/+3
| | | | | | | | | | | Remove QRemoteObjectPacket::serialize() functions in favor of direct serialize<Type>Packet() functions. This remove the need to copy data into the Packet type before serializing. Change-Id: Ic5953a6e63731b64e79ffa5bef38a5b62179dd35 Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
* [internal] Separate packet enum from classBrett Stottlemyer2015-08-311-3/+3
| | | | | | | | | | Pull the QRemoteObjectPacketTypeEnum definition out of the QRemoteObjectPacket class. This is in preparation for some performance changes. Change-Id: Iedfa1798f18ec723327dc68a8ad039c6600a694a Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
* Improved backend transmission performance.Björn Breitmeyer2015-08-271-6/+8
| | | | | | | | | Reduced the memory overhead by removing the allocation of a QDataStream QByteArray pair per packet. Change-Id: I600fdbdd86b89e94ce2a025e95c9188e8b4a1c9c Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
* Add setName() to NodesBrett Stottlemyer2015-07-031-23/+24
| | | | | | | | | | | | | | | | | | | | This is primarily for debugging, as the unit tests will log messages from many node objects at once, and this patch includes the node name in the output. This doesn't actually give a name to the node. Instead it sets objectName on the private Node object as well as the Source control object. More objects could use this with their logging, but this seems like a good start. Change-Id: Id1aa78dc49a640d9c590eb41f52c7afe5b494ea6 Reviewed-by: Continuous Integration (KDAB) <build@kdab.com> Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
* Make sure new Source objects are sharedBrett Stottlemyer2015-06-091-0/+6
| | | | | | | | | | | This addresses a bug where the list of available Source objects is sent on initial connection, and any Source objects added aren't conveyed to established connections. Change-Id: Ifa3159ee3cad8868651d5de724f3b7e17a81ad49 Reviewed-by: Brett Stottlemyer <bstottle@ford.com> Reviewed-by: Sebastian Sauer <sebastian.sauer@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* QRemoteObjectSourcePrivate -> QRemoteObjectSourceKevin Funk2015-04-301-8/+8
| | | | | | | Consistency++ Change-Id: I80b0a949790ca52a6c061278f4cd6b1452463729 Reviewed-by: Brett Stottlemyer <bstottle@ford.com>