summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Pass configured timeout to callWithCallback too.David Faure2012-05-021-1/+2
| | | | | | | This was missing in ccf3b9e48b2d773999a9a88e249f79380618cde6. Change-Id: I8bc8239591b893aad361b372a36ed5b9478aff24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix unit confusion in ccf3b9e48b2d773999a9a88e249f79380618cde6David Faure2012-05-021-2/+2
| | | | | | | | | I wrote nonsense in that commit. The older methods that take a timeout all take milliseconds, and the comments in the unit test really meant milliseconds, not seconds. 1s is not shorter than 100ms.... Change-Id: Ic18899bb0462d89575dc5a9a311478adc4dea1cb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Don't use obsolete qVariantValue, qVariantCanConvert, etc.Debao Zhang2012-05-021-1/+1
| | | | | | | | | | qVariantValue and qVariantCanConvert are Compatibility members, while in Qt4.8 they are marked as Qt 3 Support Members. qVariantFromValue and qVariantSetValue are Obsolete members. Change-Id: Ie8505cad1e0950e40c6f6710fde9f6fb2ac670fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Port QtDBus to QMetaMethod-based connectNotify()Kent Hansen2012-05-016-31/+51
| | | | | | | The const char *-based API is deprecated and will be removed in Qt5. Change-Id: I1c7f0e46149964367f42faccfff4b89acbf16511 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QMetaObjectExtraData and put everything into QMetaObjectOlivier Goffart2012-04-252-5/+5
| | | | | | | | | | | | | | | | QMetaObjectExtraData was added when support for QMetaObject::newInstance was added. One needed a place to put the pointer to static_metacall in the QMetaObject. But as we break binary compatibility, one can change the size of QMetaObject, and put everything back inside QMetaObject's own structure. Meaning it is not required anymore to have one QMetaObjectExtraData instance per QMetaObject anymore. Change-Id: If0b8f586cbaf633eed10045adee3ba3366826c86 Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* qdbusxml2cpp: fix build on WindowsKonstantin Ritt2012-04-191-0/+2
| | | | | | | | | bootstrapped process defines QT_NO_LIBRARY but QT_NO_LIBRARY is not supported on Windows Change-Id: I353a8690832e292522ed6c39a7e0ca19b0980e01 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Introduce the new UnknownProperty and PropertyReadOnly errorsThiago Macieira2012-04-163-3/+24
| | | | | | | | | | Those error codes have been standardised for years but we haven't used them until now. Task-number: QTBUG-23274 Change-Id: Iebc9ded949f363281a4d43fd9d29a284f2e2df08 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Finish cleaning up com.trolltech -> org.qtproject in QtDBusThiago Macieira2012-04-165-10/+20
| | | | | | | | | | | | | | Lots of uses of the annotations and error names, plus a bunch of local unit test names (including one file that had to be renamed). The meta object generator is updated to support both the old and new names. That means some references to com.trolltech *must* remain in the source code. Task-number: QTBUG-23274 Change-Id: Icc38ae040232f07c437e7546ee744a4703f41726 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com> Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
* Update the error codes in QtDBusThiago Macieira2012-04-162-19/+20
| | | | | | | | | | | Change the old com.trolltech ones to org.qtproject and introduce Use the alternate domain name for the Qt Project because the dash character is not valid in interface and error names. Task-number: QTBUG-23274 Change-Id: Iac1699e70525d67f983c10560932acff6b2ecde6 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* More qHash(T, uint) overloads for Qt typesGiuseppe D'Angelo2012-04-071-4/+4
| | | | | | | The more we get in 5.0, the better. Change-Id: If00084477709db4fc3f6b2e15024d046491be2ae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Introduce initializer macros for QString- and QByteArrayDataJoão Abecasis2012-04-041-3/+3
| | | | | | | | | This enables easier updating of those structs, by reducing the amount of code that needs to be fixed. The common (and known) use cases are covered by the two macros being introduced in each case. Change-Id: I44981ca9b9b034f99238a11797b30bb85471cfb7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QHash security fix (1.5/2): qHash two arguments overload supportGiuseppe D'Angelo2012-04-041-3/+1
| | | | | | | | | | | | | | | | | | | | | | | Algorithmic complexity attacks against hash tables have been known since 2003 (cf. [1, 2]), and they have been left unpatched for years until the 2011 attacks [3] against many libraries / (reference) implementations of programming languages. This patch adds a qHash overload taking two arguments: the value to be hashed, and a uint to be used as a seed for the hash function itself (support the global QHash seed was added in a previous patch). The seed itself is not used just yet; instead, 0 is passed. Compatibility with the one-argument qHash(T) implementation is kept through a catch-all template. [1] http://www.cs.rice.edu/~scrosby/hash/CrosbyWallach_UsenixSec2003.pdf [2] http://perldoc.perl.org/perlsec.html#Algorithmic-Complexity-Attacks [3] http://www.ocert.org/advisories/ocert-2011-003.html Task-number: QTBUG-23529 Change-Id: I1d0a84899476d134db455418c8043a349a7e5317 Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* Merge master into api_changesKent Hansen2012-03-279-28/+25
|\ | | | | | | | | | | | | | | | | | | 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-248-23/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * Update the header list for the QtDBus moduleThiago Macieira2012-03-241-3/+4
| | | | | | | | | | | | | | | | qdbusintrospection_p.h was missing from the header list. And this module has the public headers in a separate variable. Change-Id: I9fd85a2930af71d081b7cabd04eb29d94c285382 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Merge master into api_changesKent Hansen2012-03-231-6/+10
|\| | | | | | | Change-Id: I93551e4d13a1b0815b359b9415060e9089477db1
| * Fix assert in libdbus-1 from tst_qdbusmarshall.David Faure2012-03-221-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | Serializing an empty object path was crashing with > arguments to dbus_message_iter_append_basic() were incorrect, > assertion "_dbus_check_is_valid_path (*string_p)" failed in file > dbus-message.c line 2555. Thiago says this depends on the libdbus build settings, which is why it didn't happen to everyone. OpenSUSE-12.1 here. Change-Id: I657d28d5d915706a22abfd273aad88d20e2d112a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtDBus: don't inherit from QString, QVariantMarc Mutz2012-03-232-30/+25
| | | | | | | | | | | | | | | | | | | | | | QString and QVariant are about to be marked Q_DECL_FINAL_CLASS, so change inheritance to composition. At least this was private inheritance... Change-Id: I43caaa6c03041b8f0bd0f7987ddb4c6ff8309e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use the new QMetaMethod API in QtDBusKent Hansen2012-03-204-15/+10
| | | | | | | | | | | | | | | | | | Use QMetaMethod::name() instead of parsing the signature. Use QMetaMethod::returnType() instead of resolving the type id via the type name. Change-Id: If5d0198c5f1329fd9d9340acd58bd4a36933d960 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add API and reserve space for storing the QMetaObject with the QMetaType.Stephen Kelly2012-03-201-1/+2
| | | | | | | | | | | | | | | | In Qt 5.1, http://codereview.qt-project.org/#change,19113 can be rebased on top of this change in a compatible way. Change-Id: If7ac0481a3b2a874528de4ef6ea7535501a4ac71 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* | Merge master into api_changesKent Hansen2012-03-191-3/+0
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvector.h tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp Change-Id: I877256e95f3788e617437f4e9661a88047f38cd6
| * Removed move constructor.Wolf-Michael Bolle2012-03-161-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | The provided implementation breaks backward compatiblity, and therefore has to disappear altogether. See also the discussion at http://codereview.qt-project.org/#change,19150 Change-Id: Idf6e4a2c4b623458217541485e4aab0837909d66 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Move CMake macros and tests for dbus tools from qttools.Stephen Kelly2012-03-182-0/+165
| | | | | | | | | | Change-Id: I9d589a2d33eb8fcac63443565bb3e2319be3e04f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Don't treat QByteArray(0, char) as nullJoão Abecasis2012-03-161-1/+1
| | | | | | | | | | | | | | | | This also changes behavior for negative sizes, but those cases could be viewed as errors on the client side, anyway. Change-Id: I9e56f2ba53b1edcd9f2faa5384c7d77f6823e24a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make more of QDBus bootstrapping-ready.Stephen Kelly2012-03-153-25/+33
| | | | | | | | | | | | | | | | The DBus metatype system and marshaller is required for determining the dbus-signature of built-in Qt types, for example QPoint. Change-Id: I8860ab3b88827aeb8063dfb79c4a9b28c0a20c0f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make some DBus classes bootstrapping-ready.Stephen Kelly2012-03-146-3/+55
| | | | | | | | | | Change-Id: Ib7611fb0bf8e226a36064a100280e1ab7a0e159d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QDBusError: add assignment operator from QDBusMessageMarc Mutz2012-03-122-0/+19
| | | | | | | | | | | | | | | | | | There's an implicit constructor for this conversion, so there should be an assignment operator, too, as an optimisation. Change-Id: I1d1646cbafdea5a4f80b11b011a8940b65a9fb9f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QtDBus: make some constructors explicitMarc Mutz2012-03-1212-18/+18
| | | | | | | | | | | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: I314d341ad0db4e9d4bbf353a9537c9422ad8a54b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/api_changes' into containtersJoão Abecasis2012-03-084-21/+21
|\| | | | | | | | | | | | | | | | | Conflicts: src/corelib/kernel/qmetaobject.cpp src/corelib/kernel/qvariant.cpp src/tools/moc/moc.h Change-Id: I2cd3d95b41d2636738c6b98064864941e3b0b4e6
| * 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>
* | Introduce QMetaType::UnknownType.Jędrzej Nowacki2012-03-024-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QMetaType::Void was ambiguous, it was pointing to a valid type (void) and in the same time it was signaling errors in QMetaType. There was no clean way to check if returned type was valid void or some unregistered type. This feature will be used by new QMetaObject revision which will store type ids instead of type names. So it will be easy to distinguish between: void mySlot(); MyUnregisteredType mySlot(); Change-Id: I73ff097f75585a95e12df74d50c6f3141153e771 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Port QDBusMetaObject to Qt5 meta-property/method descriptor formatKent Hansen2012-02-293-47/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapts QDBusMetaObject to be in sync with the moc/meta-object changes for property and method descriptors (storing the name and argument count of methods, and more elaborate type information). Now that the method name is stored in the standard method descriptor, QtDBus doesn't need to store it separately anymore, and the QMetaObjectPrivate::rawStringData() function can be removed. Change-Id: I04efdbe05b52bbd85405e1713509e55308ac42da Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Port QDBusMetaObject to new meta-object string formatKent Hansen2012-02-292-43/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring QDBusMetaObject up-to-date with latest moc changes (generating the string table as an array of QByteArrayData). QDBusMetaObject now uses the same string table generator as QMetaObjectBuilder. The Q_CORE_EXPORT for rawStringData() will be removed once QtDBus has been ported to the new meta-method data format (the method name will be stored directly in the standard method descriptor, no need for QtDBus to store it as a separate string). Change-Id: I41165f48501b9b11c0288208cdc770926677a8aa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Rename QMetaMethod::signature() to methodSignature()Kent Hansen2012-02-295-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt5 the meta-data format will be changed to not store the method signature string explicitly; the signature will be reconstructed on demand from the method name and parameter type information. The QMetaMethod::signature() method returns a const char pointer. Changing the return type to QByteArray can lead to silent bugs due to the implicit conversion to char *. Even though it's a source- incompatible change, it's therefore better to introduce a new function, methodSignature(), and remove the old signature(). Task-number: QTBUG-24154 Change-Id: Ib3579dedd27a3c7c8914d5f1b231947be2cf4027 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
* | Update QDBusAbstractConnector to meta-object revision 7Kent Hansen2012-02-291-14/+43
|/ | | | | | | | Regenerate the moc output so that it's in sync with the latest moc. Change-Id: I86001f88bbc0127fc26414cf6eef512cd6c71e44 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@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>