summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* automatically add the version header to HEADERSOswald Buddenhagen2012-06-191-2/+0
| | | | | Change-Id: I7c2e1d852ebdbc5cca7a3a31ab2b4c9ab9faffd9 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* make qt_module_config.prf install the module pri fileOswald Buddenhagen2012-06-191-1/+1
| | | | | | | | | absorb module.prf into qt_installs.prf, as that's where it belongs. add qt_install_module option and automatically set it in qt_module_config. make qt_installs use that option. Change-Id: I860616f3a29a456f7b88ddaffa09375400c8911e Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
* 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