summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusconnection_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Add method to QDBusServer to allow anonymous client connections.Roland Winklmeier2014-01-151-0/+2
| | | | | | | | | | | | | | | | This change adds a new method to QDBusServer to allow anonymous connections. This is part of the DBus API and was not yet possible to use with QDBusServer. It is set in the newConnection callback when a new client tries to connect. Anonymous connections are enabled by default in DBus but not allowed by default. [ChangeLog][QtDBus][QDBusServer] Added method to QDBusServer to allow anonymous client connections, even if the connecting client is not authenticated as a user. Change-Id: I984c9e634101ecd2e67bb25c8d12bb1071836fd3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't leak pending call objects when peer disconnectsRobin Burchell2013-12-301-0/+2
| | | | | | | | | | | | | Unlike in regular connection to DBus server, we don't get pending call notifies when a peer drops the connection in peer-to-peer mode. Thus, we need to keep track of pending calls in such cases and get rid of them in ~QDBusConnectionPrivate(). Change-Id: I83e20db0bc7b2ebf509c7fdb1382ffc7d0ede9d3 Done-with: Kalle Vahlman <kalle.vahlman@movial.com> Reviewed-by: Daniele E. Domenichelli <daniele.domenichelli@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-09-161-4/+11
|\ | | | | | | | | | | | | Conflicts: src/corelib/tools/qstring.cpp Change-Id: Ifc6cd3a0f1cf14cc0fe6cf30afb0c7f40cfdbc3e
| * QtDBus: fix build on MSVC2008 Debug mode.Nicolás Alvarez2013-09-151-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally, searching for a V in a container of T using std::lower_bound only needs an operator<(T,V). But in MSVC2008 debug mode, STL algorithms perform some extra checks, such as ensuring the range passed to std::lower_bound is sorted. This adds a requirement for operator<(T,T) and operator<(V,T). QtDBus didn't compile on MSVC2008+Debug since 1e37d854 (Sept 2012!) because it missed those operator overloads for some private types. Task-number: QTBUG-33473 Change-Id: I18902d86e6c58349eb7ba3601dc383ad5431c460 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Fix loss of valid dbus objects after unregisterObjectJohn Brooks2013-09-141-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partial revert of 3c6bb0ed8bfc9a2c679f4154585a16e47275ad21 and 57aed703d21c3a360d95fd9f85396d1283d3fdd0. When registering an object that was previously unregistered but not yet garbage collected, the activeChildren count on the parent node was not incremented, which could result in other registered objects disappearing after a later unregisterObject. Copying objects in the tree is not free, but it's not expensive enough or used frequently enough to justify that error-prone logic. It's much safer to simply remove objects immediately. Change-Id: I3dc59c2ebd07b237518424fcd8ea7371a22d6d15 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-141-3/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/macx-xcode/Info.plist.app mkspecs/macx-xcode/Info.plist.lib qmake/doc/qmake.qdocconf src/corelib/global/qglobal.h tests/auto/other/exceptionsafety/exceptionsafety.pro tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp Change-Id: I3c769a4a82dc2e99a12c69123fbf17613fd2ac2a
| * Change QDBusPendingCallPrivate to full reference counting for deletion.Peter Seiderer2013-07-291-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes race between QDBusConnectionPrivate::processFinishedCall() releasing the mutex before emitting signals (using various members of QDBusPendingCallPrivate) and deletion of the QDBusPendingCallPrivate object through QDBusPendingCall::d's destructor (a member of type QExplicitlySharedDataPointer<QDBusPendingCallPrivate>) leeds to segmentation fault with CrashTest example on slow/single core arm cpu). Task-number: QTBUG-27809 Change-Id: I3590d74d1cfa5816ede764b50b83a7008ec780ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QDBus: improve error handling, to give the developer feedback.David Faure2013-07-011-2/+2
|/ | | | | | | | | | | | | For instance, exporting an object with a slot like QString complexMethod(const MyVariantMap& vars); (even with a simple typedef QVariantMap MyVariantMap) used to silently skip that method in the introspection. Now it outputs: generateInterfaceXml: Skipped method "complexMethod" : Invalid type in parameter list: MyVariantMap Change-Id: I7964cfb63e973257ce1abe47b9625e361b2ad23f Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* don't bootstrap tools when not necessaryOswald Buddenhagen2013-03-141-2/+2
| | | | | | | | bootstrapping is only necessary if we are cross-compiling or have a circular build dependency. Change-Id: I17244457652ca9d4fc797043e57070c2ae3ee5d1 Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵Frederik Gladhorn2013-01-231-1/+1
|\ | | | | | | refs/staging/dev
| * Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | | | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Make the QtDBus object tree keep a count of active childrenThiago Macieira2013-01-231-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The new member variable activeChildren shall contain the number of direct children that are active. This number differs from children.count() because the vector may contain empty entries that haven't been garbage-collected yet (obj == NULL and activeChildren == 0). When this count drops to zero, we know we can simply erase the vector of children. Change-Id: Ia20604d3fac852ea4a6e8862d934fbb936fa5e18 Reviewed-by: David Faure (KDE) <faure@kde.org>
* | Rewrite QDBusConnection::unregisterObject to be recursiveThiago Macieira2013-01-231-0/+1
|/ | | | | | | | | The current implementation is a loop. We need it to be recursive so that we can execute more operations when unwinding. This will be necessary in the next commit. Change-Id: Ia3c98fed0719cede0a0d92d3e343cf016ec7baf2 Reviewed-by: David Faure (KDE) <faure@kde.org>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix QDBusServer with more than one connectionJan Arne Petersen2012-09-141-0/+1
| | | | | | | | | | | | | | | 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: 24921 Change-Id: I4341e8d48d464f3fe0a314a6ab14f848545d65a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port QtDBus to QMetaMethod-based connectNotify()Kent Hansen2012-05-011-2/+2
| | | | | | | The const char *-based API is deprecated and will be removed in Qt5. Change-Id: I1c7f0e46149964367f42faccfff4b89acbf16511 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge master into api_changesKent Hansen2012-03-271-6/+6
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qisenum.h src/dbus/qdbusconnection_p.h src/widgets/kernel/qwidget.cpp tests/auto/other/qaccessibility/tst_qaccessibility.cpp Change-Id: I85102515d5fec835832cc20ffdc5c1ba578bd01d
| * Use QVector<int> instead of QList<int> for storing metatypes in QtDBusThiago Macieira2012-03-241-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change I00020eed fixed a bug present in 64-bit machines because it tried to access QList<int>'s internal array data, assuming it was a vector of ints. That worked in 32-bit, but not 64-bit. The fix involves a conversion between QList and QVector. Now fix it properly by changing everything to be QVector. The benefit is that on 64-bit, they are real vectors, not the 50%-overhead pointer array that QList is. Change-Id: I989ad279d0d8b2c9ab262a1eed413ab2365b5461 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Make some DBus classes bootstrapping-ready.Stephen Kelly2012-03-141-0/+6
|/ | | | | Change-Id: Ib7611fb0bf8e226a36064a100280e1ab7a0e159d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove qDBusNameToTypeId function.Jędrzej Nowacki2012-01-271-1/+0
| | | | | | | | The function is redundant and can be replaced by QMetaType::type(). Change-Id: I131a7fd285a60d8bd0f3b958668a43bd5da2d6c4 Reviewed-by: Jonas Gastal <jgastal@profusion.mobi> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add DBus VirtualObject to handle multiple paths.Frederik Gladhorn2011-08-181-2/+11
| | | | | | | | | | | | | | | | | | 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> (cherry picked from commit b07919b3de8cff3e44b7271062372b14bcda5b83) (cherry picked from commit 997c2dfed7a04da2fac577f1c29b89bda4939e2d) (cherry picked from commit c676b7095d826dc2d006f52a4b234546af5e2137) Change-Id: I003007604b286af8000959756ce9d25c17306f5b Reviewed-on: http://codereview.qt.nokia.com/3051 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+347
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12