summaryrefslogtreecommitdiff
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang warning about bool to pointer conversion.Jędrzej Nowacki2013-05-102-2/+2
| | | | | | | | | | | The operation is legal from C++ perspective but only for "false" as it is guaranteed to be 0. Anyway returning 0 instead of "false" is logical and it follows coding style used in the modified functions. (cherry-picked from qt5 commit 50995e6936c5ca75a0a8a48c29bbbedd2cc60567) Change-Id: Ia09758e8d28599097f5c40eb24722890508afdbc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fixed -dbus-linked when cross-compiling from WindowsMatt Fischer2013-04-291-2/+6
| | | | | | | | | | | | | | | | Since Windows doesn't have pkg-config, it doesn't get -ldbus-1 added to the command line automatically like Linux does. Code was present to deal with this case, however it was only configured to work when native-compiling Qt. The flag was not added when cross-compiling, meaning that -dbus-linked did not work correctly in that case. This patch changes the code to add the flag properly in both cases. Change-Id: I67881643bd658161f4929f3932859ccf636ca7a9 Task-number: QTBUG-29984 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry-picked from qtbase/c82b0815ec80b3750a110d47c68142bb448ddf56) Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QtDBus: Garbage collect deleted objects now and then.David Faure2013-01-181-0/+17
| | | | | | | | | Fixes performance issues in apps which register and deregister objects very frequently (like nepomukstorage). Change-Id: Id7d6ef508336758c55fa894868241f143b3e30e0 Backport-Of: ac9ab9703ff299c94dca7585d5a12ecde28931bb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-1365-65/+65
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix QDBusServer with more than one connectionJan Arne Petersen2012-11-013-8/+15
| | | | | | | | | | | | | | | | Create a new QDBusConnectionPrivate for every new connection in qDBusNewConnection instead of creating a single QDBusConnectionPrivate in the QDBusServer constructor which gets assigned the latest connected DBusConnection in qDBusNewConnection (and loses track on all previous DBusConnections). Also extend tst_QDBusConnection::registerObjectPeer() test with multiple connections to the server. Task-Number: QTBUG-24921 Change-Id: I4341e8d48d464f3fe0a314a6ab14f848545d65a0 (cherry picked from qtbase/a386194f9952683c0be5028f2b7f0ce9617fe404) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make QtDBus work again with D-Bus 1.0 and 1.1Thiago Macieira2012-10-192-22/+9
| | | | | | | | | | | | The dbus_get_version function was introduced in 1.2, so we'd need to detect pre-1.2 by the absence of the function. But if we're going to detect the presence or absence of any function, we might as well do it on dbus_connection_can_send_type, which is the function we wanted anyway. Change-Id: I6e17a3a8f1382c6a489490084f6e3f61aa5a1947 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> (cherry picked from qtbase/0510fc149e0c6b955ee9b93917e72ee378369197) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix g++/MinGW compiler warnings.Friedemann Kleint2012-09-291-2/+0
| | | | | | | | | | - Assigned/Unused variables. - Unsigned comparison >= 0 is always true. - Constructor initialization order. - Signed/Unsigned comparisons. Change-Id: I1f9edab0506573420ed0bf3055252ba48625c8eb Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2965-1560/+1560
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-0165-130/+130
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Use improved QLibrary search heuristics for loading libdbusSean Harmer2012-07-271-0/+1
| | | | | Change-Id: I0a8ddb61e573f1e87dbdd0b29f4418beb2d7b494 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qtdbus: Export org.freedesktop.DBus.Peer interface when introspectedDaniele E. Domenichelli2012-06-221-0/+9
| | | | | | | | | | | | | | | | | | The ofD.Peer interface is automatically implemented when an object is registered on DBus, but the ofD.Introspectable.Introspect method does not show it. You can test it by running $ qdbus --literal <some service> <some object> \ > org.freedesktop.DBus.Peer.Ping $ qdbus --literal <some service> <some object> \ > org.freedesktop.DBus.Peer.GetMachineId Change-Id: I7062ba0cdae486d443011ee19cf3874aabf90205 (cherry picked from commit 7767eed7d678dbd51d3857e6d8353f249ab5487a) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Pass configured timeout to callWithCallback too.David Faure2012-05-041-1/+2
| | | | | | | | | This was missing in ccf3b9e48b2d773999a9a88e249f79380618cde6. Backport of ac86c8397ceca7c46de6f104c7031716e053f9fb Change-Id: Ia473ef581db91506ea72e777a727d4b786ae3fee Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix unit confusion in ccf3b9e48b2d773999a9a88e249f79380618cde6David Faure2012-05-041-2/+2
| | | | | | | | | | | I wrote nonsense in that commit. The older methods that take a timeout all take milliseconds, and the comments in the unit test really meant milliseconds, not seconds. 1s is not shorter than 100ms.... Backport of 972464262166752df0015fe1209a7ab307cc7105 Change-Id: I3539cf196848b483b8c3a96b45851a465fc2dfcb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fixed crash issue in QtDBus if D-Bus not installedTero Ahola2012-05-031-1/+1
| | | | | | Task-number: QTBUG-23128 Change-Id: Iba47ddf2fbbfa56499c4c4e28899190f6b63efac Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Finish cleaning up com.trolltech -> org.qtproject in QtDBusThiago Macieira2012-04-205-10/+20
| | | | | | | | | | | | | | | Lots of uses of the annotations and error names, plus a bunch of local unit test names (including one file that had to be renamed). The meta object generator is updated to support both the old and new names. That means some references to com.trolltech *must* remain in the source code. Task-number: QTBUG-23274 Change-Id: Icc38ae040232f07c437e7546ee744a4703f41726 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com> (cherry-picked from commit e02a144a3c8e7858d879ac2d0038bc7d00906ae6)
* Fix crashes and non-portable functionality in QDBusDemarshaller QByteArray ↵Sami Rosendahl2012-01-252-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | extraction QDBusArgument QByteArray extraction operator and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. When extracting a QByteArray when the value actually is e.g. a struct of mixed types the byte array extraction will crash as it attempts to extract the struct data as a fixed array. The fix adds DBus type checks to QDBusArgument byte array extraction operator implementations. The checks invalidate extracting arrays of other types than bytes to a QByteArray that worked with the unchecked implementation. The rationale for this restriction is 1) extracting a QByteArray to a variant checks already that the array element type is byte 2) Results of extracting arrays of types wider than a byte to a QByteArray are architecture-dependent making such code inherently non-portable. Task-number: QTBUG-22840 Change-Id: Iaa284603c65d7a431a3fd020c18240cd8199ceb9 (From Qt5 commit b9acd85b2f92f887521b952f84ced9a2d1a8a57e) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QDBusDemarshaller QStringList extractionSami Rosendahl2012-01-252-2/+12
| | | | | | | | | | | | | | | | | QDBusArgument QStringList extraction operator and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. When extracting a QStringList and the value actually is e.g. an array of bytes the string list extraction will crash as it interprets the bytes as char pointers. The fix adds DBus type checks to QDBusArgument QStringList extraction operator implementations. The checks are as permissive as possible provided crashes are avoided. Task-number: QTBUG-22840 Change-Id: I83a98097a7cf36f8448afba81d0ad619cdf864e3 (From Qt5 commit b4398dc4e372dbe829b21423e1a0a93a6a542994) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QDBusDemarshaller basic string-like type extractionSami Rosendahl2012-01-252-7/+48
| | | | | | | | | | | | | | | | | | | QDBusArgument string extraction operators and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. When extracting string-like basic DBus type that actually is e.g. an integer the string extraction will crash as it blindly attempts to use the integer as a pointer to char. The fix adds DBus type checks to QDBusArgument string type extraction operator implementations. The checks are as permissive as possible provided crashes are avoided. Previously supported functionality of extracting an object path or type signature to a string type is retained. Task-number: QTBUG-22840 Change-Id: Ia27d4f4d461e5c4d3eac52f3cac85d6734f000b3 (From Qt5 commit 8f19f142745f3cb0690dcd51cebc66153e396805) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove implicit const char*->QString cast from QDBusServer's constructorRaphael Kubo da Costa2012-01-121-1/+1
| | | | | | | | | | | Commit 5be6cf0a6e306ed3a51ed5ba89317b1317544eea introduced an implicit cast from const char* to QString in QDBusServer's constructor, which breaks the compilation of applications which use QtDBus when QT_NO_CAST_FROM_ASCII is defined and clang is used. Task-number: QTBUG-23398 Change-Id: Iaba66ab05ae6232f69a3981c2ca168f1ffd7bb05 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-1165-65/+65
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix stack overwrite in QDBusDemarshallerSami Rosendahl2011-11-301-3/+21
| | | | | | | | | | | | | | | | | | | | | QDBusArgument extraction operators and QDBusDemarshaller that implements the extraction do not check the type of the extracted value. Helper function template qIterGet in qdbusdemarshaller.cpp that is used for extracting basic data types only reserves space from the stack for the expected type as specified by client. If the actual type in the DBus parameter is larger stack will be overwritten in the helper function by at most 7 bytes (expected one byte, received dbus_uint_64_t of size 8 bytes). The fix always reserves space for the largest basic type dbus_uint64_t readable by dbus_message_iter_get_basic API. See also http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#ga41c23a05e552d0574d0444d4693d18ab PMO 280456 Task-number: QTBUG-22735 Merge-request: 1469 Reviewed-by: thiago
* Don't directly access QList contentsAlberto Mardegan2011-11-111-3/+6
| | | | | | | | | The existing code doesn't work on 64bit machines. We must first convert the list into a QVector, which guarantees that elements are laid out correctly as an array. Merge-request: 1467 Reviewed-by: thiago
* Make the DBus timeout configurable in QDBusAbstractInterface.David Faure2011-08-183-4/+31
| | | | | | Merge-request: 1253 Reviewed-by: Thiago Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Don't include qdbusvirtualobject header twice.Frederik Gladhorn2011-07-211-2/+1
| | | | | | It was in the public and private headers section. Reviewed-by: Thiago
* Fix license header.Frederik Gladhorn2011-07-072-34/+34
| | | | Reviewed-by: TrustMe
* Add DBus VirtualObject to handle multiple paths.Frederik Gladhorn2011-07-048-10/+284
| | | | | | | | | | When a virtual object is registered with the SubPath option it will handle all dbus calls to itself and all child paths. It needs to reimplement handleMessage for that purpose. Introspection needs to be implemented manually in the introspect function. Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-06-233-0/+25
|\ | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: Add a function that returns the D-Bus local machine ID Add an SSE4.2 even simpler version of toLatin1
| * Add a function that returns the D-Bus local machine IDThiago Macieira2011-06-233-0/+25
| | | | | | | | Reviewed-by: Lars Knoll
* | Merge branch '4.8' of scm.dev.nokia.troll.no:qt/qtDavid Boddie2011-05-2463-1071/+1071
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/gui/text/qrawfont.cpp src/gui/text/qtextlayout.cpp src/gui/util/qscroller.cpp src/gui/widgets/qlineedit.cpp
| * Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-1363-1071/+1071
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Doc: Fixed qdoc warnings.David Boddie2011-05-122-3/+14
| |
* | Doc: Fixed qdoc warnings.David Boddie2011-05-111-4/+4
|/
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-04-198-81/+234
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: QtDBus: Add unit tests for QDBusAbstractAdaptor QtDBus: Add unit tests for QDBusInterface QtDBus: Add unit tests for QDBusAbstractInterface QtDBus: Register QDBusServer connection name in QDBusConnectionManager QtDBus: Skip bus name check for peer-to-peer connection QtDBus: Fix minor coding style issues QtDBus: Add default constructor to QDBusServer QtDBus: Add unit tests for peer-to-peer connection QtDBus: Add method QDBusConnection::disconnectFromPeer() QtDBus: Add method QDBusConnection::connectToPeer() QtDBus: Fix QDBusConnection::disconnectFromBus() for peer-to-peer connections QtDBus: Fix bus in peer-to-peer connections should not be used QtDBus: Fix empty service name in peer-to-peer connections QtDBus: Fix registering objects using path '/' in peer-to-peer connections QtDBus: Fix QDBusServer to handle correctly new dbus connections QtDBus: Cleaning comments, spacing, etc.
| * QtDBus: Register QDBusServer connection name in QDBusConnectionManagerDaniele E. Domenichelli2011-04-184-22/+109
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Skip bus name check for peer-to-peer connectionDaniele E. Domenichelli2011-04-181-3/+4
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Fix minor coding style issuesDaniele E. Domenichelli2011-04-182-5/+5
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Add default constructor to QDBusServerDaniele E. Domenichelli2011-04-181-1/+1
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Add method QDBusConnection::disconnectFromPeer()Daniele E. Domenichelli2011-04-182-0/+22
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Add method QDBusConnection::connectToPeer()Daniele E. Domenichelli2011-04-182-0/+35
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Fix QDBusConnection::disconnectFromBus() for peer-to-peer connectionsDaniele E. Domenichelli2011-04-181-0/+3
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Fix bus in peer-to-peer connections should not be usedDaniele E. Domenichelli2011-04-181-27/+31
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Fix empty service name in peer-to-peer connectionsDaniele E. Domenichelli2011-04-182-2/+2
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Fix registering objects using path '/' in peer-to-peer connectionsDaniele E. Domenichelli2011-04-182-1/+6
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Fix QDBusServer to handle correctly new dbus connectionsDaniele E. Domenichelli2011-04-182-11/+10
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
| * QtDBus: Cleaning comments, spacing, etc.Daniele E. Domenichelli2011-04-183-13/+10
| | | | | | | | | | | | Merge-request: 2343 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-04-1914-20/+659
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (29 commits) Use s/static/Q_GLOBAL_STATIC/g in QScroller Alternative fix to the strict-aliasing violation warnings Revert "Fix strict-alias breaking warnings with GCC." Fix warning about vSize not being used in this function Do not try to test UnixFDs with the system API because it may be too old L10n: German translations for Qt 4.8 Compile with namespace support. Replace the handcoded math and change the timer buckets again. Move the constants up, preparing for refactoring Fix strict-alias breaking warnings with GCC. Fix compilation if D-Bus 1.4 isn't present. Change the number of entries in the first timer bucket. Change the error message in the timer ID deallocator. Add a benchmark for testing our QtDBus type-validation Move the QDBusPerformance test to the tests/benchmark dir Use the Qt code for validating types in QtDBus Add routines to validate D-Bus signature in QtDBus Remove the unused QDBusUnixFileDescriptor::isShared function Doc: document the QDBusUnixFileDescriptor class Autotest: really ensure that two fds are equal ...
| * Compile with namespace support.Thiago Macieira2011-04-141-0/+4
| |
| * Fix compilation if D-Bus 1.4 isn't present.Thiago Macieira2011-04-141-0/+3
| |
| * Use the Qt code for validating types in QtDBusThiago Macieira2011-04-132-15/+3
| |
| * Add routines to validate D-Bus signature in QtDBusThiago Macieira2011-04-132-2/+97
| |