summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in license headers.Jason McDonald2012-01-0565-65/+65
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix crashes and non-portable functionality in QDBusDemarshaller QByteArray ↵Sami Rosendahl2011-12-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: Ie20f2adc06c697a68055c803215fb408568fdd90 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QDBusDemarshaller QStringList extractionSami Rosendahl2011-12-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: I4b67d75b59c5052d939f3a69f3e92dabdb3bdd6b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix crash in QDBusDemarshaller basic string-like type extractionSami Rosendahl2011-12-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: I29be1ae592658ca268c65ed692e1d42619d52280 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix clang warning about bool to pointer conversion.Jędrzej Nowacki2011-11-282-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. Change-Id: Ia09758e8d28599097f5c40eb24722890508afdbc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix stack overwrite in QDBusDemarshallerSami Rosendahl2011-11-231-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#ga41c23a05e552d0574d04 Task-number: QTBUG-22735 Change-Id: I9aa25b279852ac8acc40199a39910ea4002042d7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't directly access QList contentsAlberto Mardegan2011-11-161-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 (cherry picked from commit 00020eed3fa948f69cfa776e92121edec6f975cc) Change-Id: I00020eed3fa948f69cfa776e92121edec6f975cc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Un-internalized QDBusServerPekka Vuorela2011-11-091-1/+0
| | | | | | | | Was marked internal earlier because of missing implementation. That should be now in place. Change-Id: I9005da4455299386556e567847474c8d8b6fd5ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix most warnings about assignments of QAtomicInt.Friedemann Kleint2011-10-313-11/+13
| | | | | Change-Id: Ide409d72d2637b68ec2a85aaca4bc783a7e911e7 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
* Remove unused variable from qdbusintegrator.cpp.Jędrzej Nowacki2011-10-201-2/+0
| | | | | | | The variable was set but unused. Change-Id: Ibce123916f56ec90662f6118a696dfb2f4962169 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Make the DBus timeout configurable in QDBusAbstractInterface.David Faure2011-08-253-4/+31
| | | | | | | | | | | | Merge-request: 1253 Reviewed-by: Thiago Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com> (cherry picked from commit e58a402fbee2fc8af8cd651acafdc28525ed1314) Change-Id: I4246047b149193e510f2984a0b1a1fae655b9a51 Reviewed-on: http://codereview.qt.nokia.com/3580 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Add DBus VirtualObject to handle multiple paths.Frederik Gladhorn2011-08-188-9/+282
| | | | | | | | | | | | | | | | | | 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>
* Flag meta objects generated by QtDBusAaron Kennedy2011-07-291-1/+11
| | | | | | | | | | | | | | QtDBus requires a QVariant argument to be passed to property reads and writes. For performance reasons QtDeclarative does not do this. By flagging the meta object as requiring this, QtDeclarative can do so only required. Task-number: QTBUG-15052 Change-Id: I032c946f079523f5f10217ed56642fb315265d9f Reviewed-on: http://codereview.qt.nokia.com/2365 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Changed QLibrary::resolve() to return a function pointer.Kim Motoyoshi Kalland2011-07-252-7/+6
| | | | | | | | | | | According to the C++ standard, there is no guarantee that you can cast between function pointers and void pointers without data loss (section 5.2.10-6). Change-Id: I27f4d835e4c8ca8ecca0d76cfea9ce34491956bd Reviewed-on: http://codereview.qt.nokia.com/1995 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Fix a crash when D-Bus library can't be loadedHarald Fernengel2011-07-072-1/+7
| | | | | | | | | | | In certain sandboxes, we have libQtDBus, but not D-Bus. QtDBus shouldn't crash in that case, but return non-working QDBusConnection instances instead. Change-Id: Ia4ac78d1197bae50cde0cf07e6fc66fc25b85011 Reviewed-on: http://codereview.qt.nokia.com/1319 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Robert Griebl <robert.griebl@nokia.com>
* fixed typo in .pro fileMatthew Cattell2011-07-041-1/+1
| | | | | | | Change-Id: I78a23177deb55a9be15fe19fc841dbf2223332ec Reviewed-on: http://codereview.qt.nokia.com/1088 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Liang Qi <liang.qi@nokia.com>
* Add a function that returns the D-Bus local machine IDThiago Macieira2011-06-233-0/+25
| | | | | | | | | Cherry-picked from 4.8 59bd3bcd961fb3198dc9ba24996f7f9af67aeda3 Change-Id: Id3c8f9edbcbe9bbea83d4d54a6eb25500ab80b68 Reviewed-on: http://codereview.qt.nokia.com/655 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix modules to load(qt_module) firstMarius Storm-Olsen2011-06-081-0/+2
| | | | | | | Change-Id: Iabdfffff09088243863a8661add73298ed8baaf3 Reviewed-on: http://codereview.qt.nokia.com/413 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Moved common module profiles to be feature profiles.axis2011-06-051-1/+1
| | | | | | | | | | This enables external modules to also make use of them without having access to the complete QtBase source code. Change-Id: I056e45cba6c6798b76670b8d238dadb2d9f9c092 Task: QTBUG-19585 Reviewed-on: http://codereview.qt.nokia.com/234 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-2463-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-232-3/+14
|
* Doc: Fixed qdoc warnings.David Boddie2011-05-231-4/+4
|
* Add QT_xxx_VERSION macros for each library in qtbaseLiang Qi2011-05-101-0/+3
| | | | | | | Provide version info for each library like QTCORE_VERSION and etc. Task-number: QTMODULARIZATION-44 Reviewed-by: axis
* Move private headers into versioned subdirectoryMarius Storm-Olsen2011-05-021-1/+1
| | | | | | | This will allow us to expose private headers in a controlled manner, and ensure that they are not used by accident. This also means that we internally will have to enable the private headers for the modules we wish to use in the project.
* Add module.prf, and install MODULE_PRI for each moduleMarius Storm-Olsen2011-05-021-1/+4
| | | | Output warning if not present
* Initial import from the monolithic Qt.Qt by Nokia2011-04-2764-0/+20376
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