summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Avoid accessing QObjectPrivate::currentSender directly from QtDBusKent Hansen2012-06-011-2/+1
| | | | | | | | | | | | | | In particular, currentSender->signal is about to be changed from the method index range to the signal index range (i.e., excluding non-signal methods). The public senderSignalIndex() function will still return the index in the method range, so QtDBus will then continue to work without change. If necessary, QtDBus can afterwards be ported back to using the internal API again (including the new QMetaObjectPrivate API for working with methods in the signal range). Change-Id: I58212e859560a8e241adee99dd2da9ef009d4e5b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QtDBus: compile with QT_STRICT_ITERATORSThiago Macieira2012-05-292-5/+5
| | | | | | | | Unlike most other modules, QtDBus in its use of QVector also needs to check if the item isn't null, which makes for some special changes. Change-Id: Ia22ad2a6b26c9c34dc09ab882d81323a941d166a Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Replace QVariant::typeToName usage by QMetaType::typeName call.Jędrzej Nowacki2012-05-284-14/+14
| | | | | | | | | Type information is kept in QMetaType class. QVariant is delegating operations, so it is better to use QMetaType directly. Change-Id: I91209fa1c9dc4303d6bd47c96824d3cd64ce5291 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Replace `const QLatin1String &` with `QLatin1String` where appropriateKonstantin Ritt2012-05-252-6/+6
| | | | | | | Task-Id: QTBUG-24502 Change-Id: I360dee4dc68c165de0631ce4cf34e76fd873080e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix QtDBus compilation for -qconfig largeTasuku Suzuki2012-05-211-0/+4
| | | | | Change-Id: I016dd3cdab10136af04bd10605efe0a665490d8e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Use QMetaType API directly instead of going through QVariant.Jędrzej Nowacki2012-05-181-4/+4
| | | | | | Change-Id: I418ccca7cb6e2aa1ba678e24dd36b39ebecadcbe Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove duplicate include for the macros.Stephen Kelly2012-05-161-2/+0
| | | | | | | | The basic config file includes the macros file already if needed. Change-Id: I8b03360ce1e9fff4a3be5270f659dbe22fc1b295 Reviewed-by: Clinton Stimpson <clinton@elemtech.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* Doc: Add a default license footer.Casper van Donderen2012-05-111-0/+1
| | | | | | | | The CSS for the footer is not completely correct, but at this time it is better to have something than nothing. Change-Id: I7371e1e458a2abafcdb0fca5564ad73e209d64c3 Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
* Merge branch 'docs-refactoring' into masterMarius Storm-Olsen2012-05-1028-26/+1984
|\ | | | | | | Change-Id: Iebd1966abace3cdf7f9428dcfc1ded5b124ab113
| * Don't add C-style copyright headers to qmake project filesMarius Storm-Olsen2012-05-101-40/+0
| | | | | | | | | | | | | | | | Leads to parse errors, and we don't really put copyrights into these files anyways. Change-Id: I4b423b3f4f5c4f1f5051d8e3613133c4f1df342a Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
| * Doc: Add "make docs" targets for libraries.Casper van Donderen2012-05-091-0/+3
| | | | | | | | | | Change-Id: I249c238f4986f443f84aaa6a3ac4ce102abff4db Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
| * Doc: Modularize QtDBus documentation and add missing file to QtNetwork.Casper van Donderen2012-05-0927-26/+2021
| | | | | | | | | | | | | | | | This change moves the snippets and images to the modularized directories. Change-Id: Idacff866735d00b048d65318bc4c3ee1dfa16310 Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
* | QtDBus: add member-swap to shared classesMarc Mutz2012-05-094-0/+21
|/ | | | | | | Implemented as in other shared classes (e.g. QPen). Change-Id: Ic827540b535fc5506165b5395b796a53a00bb096 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change remaining uses of {to,from}Ascii to {to,from}Latin1 [QtDBus]Thiago Macieira2012-05-071-1/+1
| | | | | | | | | | This operation should be a no-op anyway, since at this point in time, the fromAscii and toAscii functions simply call their fromLatin1 and toLatin1 counterparts. Task-number: QTBUG-21872 Change-Id: I052a3412a568ad639f2bf169b4491b56dddff1c7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>