summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Remove visibility attribute from function body in QtDBusThiago Macieira2012-10-171-2/+2
| | | | | | | | Those were using an inconsistent macro compared to the function declaration in qdbusthreaddebug_p.h. Change-Id: I3e77ba83ceedc99cb1f957fdfe318e34ab9c9628 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Modularize documenation buildTor Arne Vestbø2012-10-102-5/+4
| | | | | | | | | | qdocconf files can now reference $QT_INSTALL_DOCS to pick up e.g. global includes, instead of using relative paths. Qt modules will automatically get a doc target that builds and installs into the right place (including supporting shadow-builds) if they set QMAKE_DOCS before loading(qt_module). Change-Id: Ia408385199e56e3ead0afa45645a059d1a8b0d48 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* qdbusmetatype_p.h: add missing QT_NO_DBUS guardsJ-P Nurmi2012-09-241-0/+3
| | | | | Change-Id: Idb459fe6300f710b959247cd9c1997a4d5774b2d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-2281-1686/+1686
| | | | | | | | 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>
* QDBusMetaTypeId: replace a volatile bool with an atomic intMarc Mutz2012-09-221-3/+3
| | | | | | | | | Since there is no non-atomic data that is protected by 'initialized' anymore, the read from, and the store to, 'initialized' may now have relaxed memory ordering. Change-Id: I58004e782d9fd93122efb31fa5b30ee160646d99 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusMetaTypeId: don't cache the result of qMetaTypeId<>() in static intsMarc Mutz2012-09-2211-57/+77
| | | | | | | | | | | | | | | | | | | | | | | | | There's not much point in caching the result of qMetaTypeId<>, because it's already internally memoised. In addition, the code that initialised the static int caches wasn't protected against concurrent access under the assumption that the operations performed were thread-safe. That is true for most of them, but not for the stores to the static ints, which race against each other: // Thread A // Thread B r1 = initialized /*=false*/ r1 = initialized /*=false*/ r2 = qMetaTypeId<...>(); r2 = qMetaTypeId<...>(); message = r2; message = r2; // race, ditto for all other ints To fix, turn the ints into inline functions that just call the respective qMetaTypeId<>() function. Change-Id: I5aa80c624872c3867232abc26ffdcde70cd54022 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* dbus: Include own headers firstSergio Ahumada2012-09-197-8/+10
| | | | | | | cpp files should include their own headers first (but below config.h) Change-Id: I4115604aee3211118e2ecf604067f3559dbb9f4c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* make src/tools/ compile without CamelCase headersOswald Buddenhagen2012-09-192-2/+1
| | | | | | | | so the build works with syncqt -minimal Change-Id: Ief5e8eb9a504dd6c84cff76cc3e5257450386a0f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove qLowerBound usages from qtbaseGiuseppe D'Angelo2012-09-194-14/+22
| | | | | | | | | Replace them with std::lower_bound; this allows for deprecation of qLowerBound. Change-Id: I536e7338eb85ea6c7c1a5bf23121292767927e0b Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* QtDBus: added missing QT_NO_DBUS guardsJ-P Nurmi2012-09-142-0/+6
| | | | | | Change-Id: If3bbba7765a4949e5a7aefca063dc56c21c06687 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QDBusServer with more than one connectionJan Arne Petersen2012-09-143-11/+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: 24921 Change-Id: I4341e8d48d464f3fe0a314a6ab14f848545d65a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add qdbusconnectionmanager_p.h to the HEADER list.Thiago Macieira2012-09-141-0/+1
| | | | | | | Change-Id: Iacba510beb0ee72182931e97044eaa5b46df30af Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Do not include /examples in qdocconfs.Frederik Gladhorn2012-09-111-1/+1
| | | | | Change-Id: I84a925a8be4964fae667f5a2500157283a8057d2 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Doc: Centralize more common settings in 1 global qdocconf.Casper van Donderen2012-09-111-36/+1
| | | | | | | | | | All qdocconf settings that should be used by all Qt modules are now in qt-module-defaults.qdocconf. Change-Id: I2a0315a55db3fcbb0160c4392d2da98611043d83 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix missing or improper include guard in headersSergio Ahumada2012-09-099-19/+19
| | | | | | | | Use an include guard in headers to ensure the header is not included more than once. Make the header guard match its file name. Change-Id: Icf7d7d4bed91443b3b21ef5d4219dbd260dffef3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusIntegrator: fix unprotected QDBusPendingCallPrivate::waitingForFinished ↵Marc Mutz2012-09-081-1/+7
| | | | | | | | | | | | | | | | | call There probably is a happens-before relation to all the writes of the bool elsewhere, but the comment in QDBusPendingCallPrivate says waitingForFinsihed is one of the variables protected by the mutex, so don't make every reader of the code re-establish the safety (if indeed, it is safe) oneself again, but just wrap the access in a mutex lock. To be able to compile the mutex locking out of release builds, wrap the access in a function. Make the function static _inline_ so compilers won't complain about it being unused in release builds. Change-Id: I914ce91e64e776450c697a3243b35716390a218c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusPendingCallPrivate: save 8 bytes on 64-bit archsMarc Mutz2012-09-031-2/+1
| | | | | | | | | | Moved waitingForFinished out from between two large-type variables to save eight bytes per QDBusPendingCallPrivate on 64bit platforms. Many a mickle makes a muckle. Change-Id: I5612ad8bb907c6770be0245e667bdb2add30d38b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusPendingCall: remove unneeded volatile qualificationMarc Mutz2012-09-031-1/+1
| | | | | | | | The variable waitingForFinished is only ever read under mutex protection, so a volatile qualification isn't necessary. Change-Id: I17ce3fbfb090c8ae5e43dd2a93e4f48810dbbff3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusPendingCall: add a missing QWaitCondition::wakeAll() callMarc Mutz2012-09-031-0/+1
| | | | | | | | | | In QDBusConnectionPrivate::waitForFinished(), threads that see pcall->waitingForFinished == true go to sleep on pcall->waitForFinishedCondition, but there was no call to waitForFinishedCondition.wakeAll() anywhere in the code, so add it. Change-Id: I8d068dc0cc4f20786eb40fd7e2bb9840d8b70c7f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix docbuild when not using -developer-build.Casper van Donderen2012-09-011-2/+2
| | | | | | | | https://codereview.qt-project.org/#change,33974 only works in the case of a developer build. Not in a normal prefix build. Change-Id: I3a3e5029cefaa9f83c5deb71665f0efa9d812819 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Doc: Simplify qtbase qdocconfs.Casper van Donderen2012-08-311-15/+2
| | | | | | | | | | We should be using the global qdocconf for the common variables. This change also allows you to just specify -installdir without using a templatedir. Change-Id: I207d279d9b5199212e896fc5ccab5c212b1896c6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Exclude the examples/widgets/doc dir for all but widgets.Frederik Gladhorn2012-08-291-0/+2
| | | | | | | | There are too many references to the QWidget lib documentation in there. On the other hand this keeps snippets working. Change-Id: I7dd63b7fba1758accea2663f7b427940a8857e32 Reviewed-by: Martin Smith <martin.smith@nokia.com>
* Add a way for QtDBus to force a call to dbus_shutdownThiago Macieira2012-08-252-3/+17
| | | | | | | | | | | | This will ask the D-Bus library to free its caches. It's useful for running valgrind on a D-Bus based application, so we can detect real leaks. We can't run this by default because there could be other users of libdbus-1. Calling the shutdown function would make them stop working. Change-Id: I9854b82afcdbc4955d6f0a1a1b49a673186242c8 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Print some debugging from QDBusConnection when disconnectingThiago Macieira2012-08-251-0/+1
| | | | | Change-Id: I6e19cd8b16513faad6435d1713eab56675d07289 Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* QDBusMetaType: #if -> #ifdef QT_BOOTSTRAPPEDMarc Mutz2012-08-251-1/+1
| | | | | | | The rest of the code uses #ifdef/#ifndef, so do so here, too. Change-Id: I4811755f9a1c2a1cab371e3bea78d3c5f9af086e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdbus_loadLibDBus: remove unneeded volatile qualificationMarc Mutz2012-08-251-1/+1
| | | | | | | | | The variable is only ever accessed under mutex protection, and doesn't otherwise look like it could be changed by the hardware, so remove the volatile qualifier. Change-Id: I3bb00ed6f8017d662bbf73425a70d52116cc9297 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add \inmodule QtDBus to all QtDBus class doc bodiesThiago Macieira2012-08-232-0/+9
| | | | | Change-Id: I0aa273c355314effd563cfeda74ce7bacbef3db8 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QtDBus: use new qEnvironmentVariableIsEmpty()Marc Mutz2012-08-141-1/+1
| | | | | Change-Id: If983083cc7f360199716a060464344340c089236 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* rename qt_module_config.prf => qt_module.prfOswald Buddenhagen2012-08-081-1/+1
| | | | | | | this is more logical, following the qt_plugin and qt_tool scheme. Change-Id: Ib3b2abec6728cdab260e15128b1cd78e8e6f5d6a Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* Add possibility to add OpenSSL, DBUS, MySQL path under WindowsAndreas Holzammer2012-08-071-0/+5
| | | | | | | | | | | Under Windows it's quite possible that OpenSSL, DBUS or MySQL is not installed into a central place. If -I and -L is passed at configure time, it is added to all targets, and if that path contained a conflicting header things would go wrong. Change-Id: Ic3338c49aa6eaa91b3abf5341e709ef604bf7aab Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* change \img to \image in docsJeremy Katz2012-08-011-1/+1
| | | | | | | | \img was a macro defined in macros.qdocconf. This collection of macros is being phased out. Use the full command instead. Change-Id: Ia55212f87bb46349d61359d40568e0aa33882596 Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Create IMPORTED CMake targets for executables.Stephen Kelly2012-07-252-9/+28
| | | | | | | | | | | Although IMPORTED executables are not extra special, this is more future-proof in terms of both future CMake features and future our needs - it is possible that we would want to add a property to an executable at TARGET scope, which would not be possible if it is just a path. Change-Id: I649c601e004b21603c5fa97de0b7c397813ed68d Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* QtDBus: use qMetaTypeId<T>() instead of qRegisterMetaType<T>("T")Marc Mutz2012-07-245-10/+25
| | | | | | | | | | | | | | | | | | | | | | Using qMetaTypeId<T> has the advantage that multiple calls during a program run are much more efficient, since an inlined atomic is used to store the result. It also ensures that Q_DECLARE_METATYPE(T) has been used, whereas qRegisterMetaType<T> (the unary version) will happily register anything. Had to add a proper default constructor to QDBusError, as the one doubling as the default constructor wasn't available under QT_BOOTSTRAP, but Q_DECLARE_METATYPE requires a default ctor. Also changed a nullary qRegisterMetaType() to qMetaTypeId() in qDBusRegisterMetaType(). They're equivalent, since the former just calls the latter, but apart from the miniscule optimisation that the compiler has to instantiate one function less, the result is also used, so using qMetaTypeId() better expresses what 'id' is. Change-Id: Ib9dde17923ab9ee55f9464138a625ab8cd55c482 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Remove obsolete or commented use of Q_DECLARE_METATYPE.Stephen Kelly2012-07-243-12/+0
| | | | | Change-Id: I15bc845801b9f84a9252a0092fbd69f0e1b3f4ea Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* remove needless/commented INCLUDEPATHsOswald Buddenhagen2012-07-181-1/+0
| | | | | | | Change-Id: Id1d3afde424e0e17e68889d6f7b51e3056754536 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* doc/snippets: normalize signals/slotsMarc Mutz2012-07-131-4/+4
| | | | | | | | | | | | | There's one in corelib that has a comment // slower due to signature normalization at runtime I obviously didn't change that one. This is the result of running util/normalize --modify from Qt 4.7 with manual review. Change-Id: I0ffb2305800a9cb746b7f8a4eb710702d64f1b92 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* QtDBus: declare some classes as sharedMarc Mutz2012-07-102-0/+4
| | | | | Change-Id: I82f8d8d02f4a5276924f579871547c0a34605424 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix compilation with conforming compilers (e.g. GCC >= 4.7)Marc Mutz2012-07-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | In qdbus_cast(), qMetaTypeId<QDBusArgument> as well as qvariant_cast<QDBusArgument> are used. They don't depend on any template argument of qdbus_cast(), so their definitions need to be available at function template definition instead of instantiation time. But the necessary Q_DECLARE_METATYPE(QDBusArgument) was at the end of the header, after the defintion of qdbus_cast(), which is too late for conformin compilers. Fixed by moving it up just after the QDBusArgument definition. Similarly, in tst_qdatetime and tst_qvector, the Q_DECLARE_METATYPE() for Qt::DateFormat and QVector<int>, and with it the specialisation of QMetaTypeId<>, were issued after the first use of meta typing; too late for conforming compilers. Change-Id: I25ca0b06e68d5184597a22708404a8f2040b2de1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add some quotes to prevent damage from spaces in the pathsStephen Kelly2012-07-031-17/+17
| | | | | | | | | This is a forward-port of 0331a5adde45583e3bca351f2814aea971474671 in cmake.git. Change-Id: I8d889389a487f8b820182bd66e8a3df7aa5dc8d9 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Improve basename extraction in qt5_add_dbus_interfacesStephen Kelly2012-07-031-1/+2
| | | | | | | | | This is a forward port of f46903b4b21e5d1c8af9a60e9ea87805b170ed73 in cmake.git. Change-Id: I627b17259182497c1353ccf4cd3fa4a61546be5d Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Simplify the creation of QMetaTypeId specializations.Stephen Kelly2012-07-031-1/+1
| | | | | Change-Id: I07405f91b6f73a4e129859ca45a983d3ec7029ab Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Clean up the EXPORT macros in qglobal.h.Thiago Macieira2012-06-291-4/+15
| | | | | | | | | | | | | | | | | | | | QtPlatformSupport is a static library. It should never export anything, so Q_PLATFORMSUPPORT_EXPORT is unnecessary. QtSql, QtXml, QtDBus, QtOpenGL and QtPrintSupport now have the macros on their own source trees. It's possible these modules might be separated out from qtbase in the future. For QtDBus, the macros are moving back to where they used to be. This also leaves qglobal.h only creating the macros for QtCore, QtGui, QtWidgets and QtNetwork, the core libraries. Q_CANVAS_EXPORT, Q_OPENVG_EXPORT and Q_COMPAT_EXPORT aren't used anywhere in the Qt sources, so simply delete them. And the Q_QUICK1_EXPORT macro in the static section was wrong, so remove it too. Change-Id: I50bdf86e783338f814903b25979721f788a7becf Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Add const & to foreach 'iterators'Albert Astals Cid2012-06-271-2/+2
| | | | | | | Change-Id: I8c0600dfd919f45d14a0011f2da9b9fe0b9a0df3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* 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 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix misnomer: qt_module.prf => qt_build_config.prfOswald Buddenhagen2012-06-191-1/+1
| | | | | | qt_module suggests to be congruent to qt_plugin. Change-Id: I629530bcbe2ba6c0adbdc11a275119c8aff0c953
* automatically add QT_BUILD_FOO_LIB to DEFINESOswald Buddenhagen2012-06-191-2/+1
| | | | | Change-Id: I35d9861e48469eb5cc8824e361450684047e6559 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* clean up projects from QPRO_PWD nonsense, etc.Oswald Buddenhagen2012-06-191-1/+0
| | | | | Change-Id: I4c41aedf5bfb37e31ad202cacd2312b0bdb168e2 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* auto-generate QMAKE_PKGCONFIG_REQUIRES and QMAKE_PKGCONFIG_DESCRIPTIONOswald Buddenhagen2012-06-191-6/+0
| | | | | | | less boilerplate, more accuracy Change-Id: I6cc2abd50eafb4901d987c122f10a62ec9ea9da3 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* auto-generate module prisOswald Buddenhagen2012-06-191-2/+1
| | | | | Change-Id: I654428771034221ccf424be34d5d9c7764daf3b4 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>