summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Remove the usage of deprecated qdoc macros.Casper van Donderen2012-03-024-21/+21
| | | | | | | | | | | QDoc now has support for Doxygen style commands for italics, bold and list items. This change applies that change in QDoc to the actual documentation. Task-number: QTBUG-24578 Change-Id: I519bf9c29b14092e3ab6067612f42bf749eeedf5 Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Cleanup usage of QVariant::Type.Jędrzej Nowacki2012-02-271-3/+3
| | | | | | | | | QVariant::Type is marked as obsolete. It is not possible to get rid of it completely, in a source compatible way, but at least we can remove it safely from a method arguments list. Change-Id: I26b58099bfa6d32f3a583a8ae0047f0bb36bcd0d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* replace 'const QChar &' with 'QChar ' where appropriateKonstantin Ritt2012-02-211-3/+3
| | | | | | | | | as QChar is actually an ushort and there is no point in taking its address. Merge-request: 69 Change-Id: Idcc9d621e5627514ade006aa12a789a88929d48b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Port QDBusAdaptorConnector meta-object to revision 6Kent Hansen2012-02-202-21/+53
| | | | | | | | | | | | | | | | We want to drop support for old revisions in Qt 5. This commit brings the QDBusAdaptorConnector meta-object in sync with current moc output. The QtDBus implementation was assuming that the relaySlot() slot would be created at index methodOffset() in the meta-object, but since revision 4 that's no longer the case (signals always come first). Made the code more robust by actually querying the meta-object what the index is. Change-Id: Ie0791680cc2e9e5fb1472c4462c391f92ea22ea6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove unused QtDBus meta-object extensionsKent Hansen2012-02-202-33/+4
| | | | | | | | | | The inputSignature and outputSignature fields were not being used anymore. All tests still pass. Change-Id: Icbc8fdcd5179a2b1b4843d58b90af925f6bef133 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Store only unique strings in the QtDBus meta-object string tableKent Hansen2012-02-151-37/+51
| | | | | | | | | | | Do like moc: If the string has already been entered into the table, just return its position, don't make a new copy. This can save space, for example, if there are several properties of the same type; the typename only occurs once in the string table but will be referenced by several property descriptors. Change-Id: I63e5c73d28ba117fd00a5261d0e89f3a3d83df9a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Adapt QtDBus to QVariant property type changeKent Hansen2012-02-032-3/+3
| | | | | | | | | | Commit 00c8984b4e48b2a7eadfee6c3cd0cbb19f586118 changed other parts of Qt to use QMetaType::QVariant, not 0xff, as the type for QVariant properties. QtDBus should check for that type, and also use it for QDBusVariant properties. Change-Id: I21d81b59754ae44889766877a4c5066466b46d86 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Bring QtDBus meta-object generator in sync with mocKent Hansen2012-02-031-94/+54
| | | | | | | | | | | | | | | | | | | | | | QtDBus's meta-object generator should generate objects of the same version as moc; in the future, when the moc version is bumped, QtDBus's meta-object generator has to be adapted at the same time. Since QMetaObjectPrivate and related flags reside in qmetaobject_p.h, QtDBus can just include the header instead of duplicating code. qmetaobject_p.h also defines the meta-object revision QtDBus should be targeting. QtDBus was generating version 3 meta-objects. This patch makes it generate version 6 (the current version). Since a new field was added to QMetaObjectPrivate in revision 4 (signalCount), the generator had to be adapted. In particular, the signal definitions need to come before other methods (as they do with moc), since there are functions in QObject that rely on that (e.g. computeOffsets()). Change-Id: I37f102d8c1be372ef6cfaf013baa87f9abb0fd5e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Revert "Put the generated <module>version.h into build tree"Bradley T. Hughes2012-02-011-1/+1
| | | | | | | | | After discussion with Liang, I'm reverting it as he requested. This change put every header into the SYNCQT.HEADER_FILES twice for in-source builds, and the qtMODULEversion.h header did not include a path component. This reverts commit 2fbc45b58bba860abf67fb28aa1319c9f4ededaf Change-Id: Ie84cef19193ce5e49072f1f67a41140d9d2673b8 Reviewed-by: Liang Qi <liang.qi@nokia.com>
* QDateTime: Deprecate setYMD()John Layt2012-01-311-1/+1
| | | | | | Change-Id: I077332df554fb750666d51486c97724411276679 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3065-65/+65
| | | | | | | | | | 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>
* Put the generated <module>version.h into build treeLiang Qi2012-01-281-1/+1
| | | | | | | | | It was put in source tree before. Task-number: QTBUG-20439 Change-Id: Ib52d9c2e83ae375aad259ddc74138bbc728b3ed0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Code cleanup, remove QVariant::nameToType usage.Jędrzej Nowacki2012-01-281-3/+1
| | | | | | | | It is better to use QMetaType::type because it works well with custom types too. Change-Id: I30bc70d16b2aad4ba22682de1c215b917e64209b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove qDBusNameToTypeId function.Jędrzej Nowacki2012-01-275-26/+13
| | | | | | | | 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>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-2519-19/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-2365-65/+65
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove dependency of QtDBus onto QtXmlHarald Fernengel2012-01-225-305/+255
| | | | | | | | | Replace the QDom based code in qdbusxmlparser with code using QXmlStreamReader. Task-number: QTBUG-20856 Change-Id: I294e3ebd6faa813c20806be3ae225ac00befb622 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the default address parameter from QDBusServer's constructor.Raphael Kubo da Costa2012-01-172-1/+27
| | | | | | | | | | | | | | | | | | | 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. Fix it by splitting the current constructor with the broken default argument into one which takes a non-default QString and one which only takes a QObject* parent and calls the other with the current default argument. It would have been better not to have mostly duplicate code in both constructors, but QDBusConnectionPrivate is also used in other places. Task-number: QTBUG-23398 Change-Id: Ia001d63878e7ff720c6630a3372adc571124448d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdoc3: Don't put \relates in class member functions.Martin Smith2012-01-141-15/+14
| | | | | | | | | This removes two uses of \relates that were unnecessary. Task-number: QTBUG-23599 Change-Id: I3e10375159f6535f56622f9d24e16151938c63c3 Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* qdoc3: Don't put \relates in class member functions.Martin Smith2012-01-131-2/+0
| | | | | | | | | This removes two uses of \relates that were unnecessary. Task-number: QTBUG-23600 Change-Id: Id9bbcfa6f95d42ad552054e4839dbacb69fd1b2a Reviewed-by: Martin Smith <martin.smith@nokia.com> Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
* Rename private API to avoid conflict with mac OX macros.Stephen Kelly2012-01-092-14/+14
| | | | | | | | | Mac OS defines the check macro in /usr/include/AssertMacros.h http://boost.2283326.n4.nabble.com/Boost-with-Darwin-Mac-gcc-4-0-1-td2580330.html Change-Id: I99789e4dba25e80afd184c44d0781c4ebde46d74 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove documentation reference to non-existant class.Stephen Kelly2012-01-061-1/+1
| | | | | Change-Id: Idaaf16a9482edaa43e5b2389adc82cad701b1407 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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