summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusintegrator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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-131-1/+1
| | | | | | 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-10-311-4/+10
| | | | | | | | | | | | | | | | 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-191-10/+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-291-24/+24
| | | | | | | | 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-011-2/+2
| | | | | | | | | | | | | - 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>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | 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>
* Add DBus VirtualObject to handle multiple paths.Frederik Gladhorn2011-07-041-2/+16
| | | | | | | | | | 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>
* Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Merge branch 'master' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into ↵Qt Continuous Integration System2011-04-181-45/+48
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 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-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: Fix registering objects using path '/' in peer-to-peer connectionsDaniele E. Domenichelli2011-04-181-0/+5
| | | | | | | | | | | | 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-181-9/+6
| | | | | | | | | | | | 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-181-8/+5
| | | | | | | | | | | | 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-181-0/+26
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * Fix compilation if D-Bus 1.4 isn't present.Thiago Macieira2011-04-141-0/+3
| |
| * Retrieve the connection capabilities in QDBusConnectionThiago Macieira2011-04-131-0/+23
| | | | | | | | Task-number: QTBUG-17477
* | Use the qt_static_metacall in QueuedConnectionOlivier Goffart2011-04-081-2/+1
|/ | | | | | And also in QMetaMethod::invoke Reviewed-by: brad
* Add a 'capabilities' flag to the marshaller and demarshallerThiago Macieira2011-03-291-7/+7
| | | | | | | | | | | | The marshaller and demarshaller need to know the features negotiated with the peer so as to determine what's permitted. This is especially important to the marshaller: the libdbus-1 API may "throw a fit" if we try to pass a type that isn't allowed or the server may disconnect us. The use of the capabilities in the demarshaller are for symmetry and for us to toggle the feature in unit tests. Task-number: QTBUG-17478
* Add a set of connection capabilities to QDBusConnectionThiago Macieira2011-03-291-1/+1
| | | | | | | | | | | | | | The capabilities are negotiated with the D-Bus peer or bus at connection time and may include extra features not available when D-Bus 1.0 was released. Currently (as of D-Bus 1.4), the only additional feature is Unix file descriptor passing. Proposed features are "maybe types" and single-precision floating point. They may be added to D-Bus 1.6. Task-number: QTBUG-17478
* Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-101-24/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: doc/src/development/qmake-manual.qdoc mkspecs/symbian-gcce/qmake.conf qmake/project.cpp src/corelib/global/qnamespace.qdoc src/declarative/graphicsitems/qdeclarativetext.cpp src/gui/text/qtextdocumentlayout.cpp src/gui/text/qtextdocumentlayout_p.h tests/auto/declarative/qdeclarativetext/tst_qdeclarativetext.cpp tests/auto/networkselftest/networkselftest.pro tests/auto/qscriptengine/tst_qscriptengine.cpp tools/designer/src/components/signalsloteditor/signalslot_utils.cpp tools/designer/src/components/signalsloteditor/signalsloteditorwindow.cpp tools/qdoc3/test/qt-build-docs.qdocconf tools/qdoc3/test/qt-html-templates.qdocconf tools/qdoc3/test/qt-html-templates_zh_CN.qdocconf tools/qdoc3/test/qt.qdocconf tools/qdoc3/test/qt_ja_JP.qdocconf tools/qdoc3/test/qt_zh_CN.qdocconf
| * QtDBus: do not wait for reply for AddMatch and RemoveMatchThiago Macieira2011-02-061-24/+14
| | | | | | | | | | | | | | | | We can't recover from these functions failing anyway, so don't ask for an error condition. The D-Bus library will set the no-reply flag under these conditions. Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-02-011-2/+3
|\ \ | |/ | | | | | | | | Conflicts: mkspecs/features/symbian/application_icon.prf src/sql/drivers/odbc/qsql_odbc.cpp
| * Change the D-Bus signal filter to return NOT_YET_HANDLED for signalsThiago Macieira2011-01-261-2/+3
| |
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-4/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | Reviewed-by: Trust Me
| * Do not crash in case a future version of libdbus has a new kind of message.Thiago Macieira2010-12-221-3/+1
| |
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-12-061-6/+29
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: configure qmake/generators/win32/msbuild_objectmodel.cpp src/gui/image/qpnghandler.cpp src/network/access/qnetworkaccessdatabackend.cpp src/opengl/qgl_x11egl.cpp tests/auto/qnetworkreply/tst_qnetworkreply.cpp
| * Fix a race condition related to service acquisition.Thiago Macieira2010-11-261-6/+29
| | | | | | | | | | | | | | | | | | | | | | The explanation is in the testcase and in the task. The reentrancy caused some deadlocks, that's why handleMessage() stops processing if the refcount has dropped down to zero. Should also save some CPU cycles at the application shutdown time. Task-number: QTBUG-15651 Reviewed-by: Trust Me
* | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2010-10-251-1/+1
|\ \ | |/
| * Fixed many spelling errors.Rohan McGovern2010-10-251-1/+1
| |
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-281-34/+42
|\ \ | |/ | | | | | | | | | | | | Conflicts: src/gui/painting/qrasterizer.cpp src/network/access/qnetworkaccessmanager.cpp tests/auto/qpainter/tst_qpainter.cpp tools/assistant/tools/assistant/mainwindow.cpp
| * We also don't need to watch for org.freedesktop.DBus changing ownersThiago Macieira2010-09-221-0/+4
| | | | | | | | | | | | | | | | It never does. Task-number: QT-3881 Reviewed-By: Robin Burchell Reviewed-By: Ritt Konstantin
| * Avoid adding match rules for NameAcquired and NameLostThiago Macieira2010-09-221-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | These two signals from org.freedesktop.DBus are delivered no matter what, because they are directed signals. So we don't need to add match rules for it. QDBusConnectionPrivate::connectSignal builds a match rule and adds it, so we shouldn't use it. Task-number: QT-3881 Reviewed-By: Robin Burchell Reviewed-By: Ritt Konstantin
| * We don't need to add a match rule to receive messages targetted at us.Thiago Macieira2010-09-221-18/+0
| | | | | | | | | | | | | | | | | | This wasn't explicit in the D-Bus specification until recently. The reference implementation of the daemon already does it. Task-number: QT-3881 Reviewed-By: Robin Burchell Reviewed-By: Ritt Konstantin
| * Save the D-Bus's base service earlier.Thiago Macieira2010-09-221-2/+4
| | | | | | | | | | | | | | | | It's impossible for it not to be present, so there's no need to test for it. Reviewed-By: Robin Burchell Reviewed-By: Ritt Konstantin
| * Pre-populate the watched services hash with org.freedesktop.DBusThiago Macieira2010-09-221-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | The D-Bus specification doesn't require GetNameOwner("org.freedesktop.DBus") to return anything in specific, but the reference implementation always returns "org.freedesktop.DBus". The Python D-Bus bindings even require it. So add the same assumption to QtDBus, which saves a round-trip at the application start to ask the server what its own owner is Reviewed-By: Robin Burchell Reviewed-By: Ritt Konstantin
| * Quick performance optimisation: cache a QString with "org.freedesktop.DBus"Thiago Macieira2010-09-221-9/+17
| | | | | | | | | | Reviewed-By: Robin Burchell Reviewed-By: Ritt Konstantin
* | Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2010-09-101-0/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: bin/syncqt demos/declarative/snake/content/snake.js demos/declarative/snake/snake.qml doc/src/development/qmake-manual.qdoc src/corelib/plugin/plugin.pri src/gui/kernel/qapplication_win.cpp src/gui/kernel/qdesktopwidget_win.cpp src/gui/painting/qdrawhelper.cpp tests/auto/qdir/tst_qdir.cpp tools/qdoc3/test/assistant.qdocconf tools/qdoc3/test/designer.qdocconf tools/qdoc3/test/linguist.qdocconf
| * Fix remote crash in delivering D-Bus calls with too few argumentsThiago Macieira2010-09-021-0/+3
| | | | | | | | | | | | Patch by Christoph Feck. Task-number: QTBUG-13348 Reviewed by me
* | Remove the use of deprecated qVariant*Olivier Goffart2010-08-061-2/+2
|/ | | | | | | | | | | | | | | Test directory untouched. This just apply those regexp: git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue git checkout src/corelib/kernal/qvariant* Rev-by: dev mailing list
* fixed QDBUS export errorEvan Nguyen2010-07-261-1/+1
|
* Q_INVOKABLES added to Qt-DBusEvan Nguyen2010-07-261-7/+15
| | | | Task-number: QTBUG-12397
* fix the export macros for the QtDBus moduleRomain Pokrzywka2010-07-211-1/+1
| | | | | Merge-request: 2439 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
* Merge remote branch 'origin/4.6' into qt-4.7-from-4.6Thiago Macieira2010-05-251-15/+31
|\ | | | | | | | | | | | | | | Conflicts: demos/spectrum/app/app.pro src/gui/egl/qegl.cpp tests/auto/qhttpnetworkconnection/qhttpnetworkconnection.pro tests/auto/qmenu/tst_qmenu.cpp
| * Fix a race condition with QtDBus blocking for replies.Thiago Macieira2010-05-241-14/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an auxiliary thread tried to block on waiting for a reply, and at the same time the main thread handled the reply, there's room for a race condition. So ensure only one thread is stopped at dbus_pending_call_block(). The other thread(s) will be waiting on the QWaitCondition. It's not a race condition for the main thread to process (and finish processing) the reply while the auxiliary thread hasn't even started to wait. The code will ensure that the reply is properly seen. Task-Id: https://projects.maemo.org/bugzilla/show_bug.cgi?id=155306 Reviewed-By: Trust Me
| * QtDBus: Debug message updateThiago Macieira2010-05-241-1/+1
| |
* | Introduce a qconfig feature for QtDBusTasuku Suzuki2010-04-081-0/+7
|/ | | | | | | | | | QtDBus module is useless with QT_NO_PROPERTIES. Add D-Bus section and DBUS feature which requires PROPERTIES. Update qfeatures.h. Disable QtDBus module, a bearer management plugin for NetworkManager and a script plugin for QtDBus when QT_NO_DBUS is defined. Merge-request: 511 Reviewed-by: Thiago Macieira <thiago.macieira@nokia.com>