summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusmetaobject.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Tidy nullptr usageAllan Sandfeld Jensen2019-12-061-10/+10
| | | | | | | | | | | Move away from using 0 as pointer literal. Done using clang-tidy. This is not complete as run-clang-tidy can't handle all of qtbase in one go. Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QtDBus: use new QLatin1String::arg()Marc Mutz2019-06-031-1/+1
| | | | | | | | | | | | | | | Saves more than 4KiB in text size (~0.7%) on optimized GCC 9.1 Linux AMD64 builds. Change-Id: I5b29eae620370abd91e3a7f98e660c32470aed1c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QMetaObject naming of class enum flagAllan Sandfeld Jensen2018-08-111-1/+1
| | | | | | | | | Adds an enumName to QMetaEnum to carry the name of the enum since for flags that doesn't match the name of the Qt type, but is needed if the flag is scoped. Change-Id: I1c0f77eb9e40e6fd1eb6a59bea77caf0f33fcf43 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add Intel copyright to files that Intel has had non-trivial contributionThiago Macieira2016-01-211-0/+1
| | | | | | | | | I wrote a script to help find the files, but I reviewed the contributions manually to be sure I wasn't claiming copyright for search & replace, adding Q_DECL_NOTHROW or adding "We mean it" headers. Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* QtDBus: eradicate all Q_FOREACH loopsMarc Mutz2016-01-121-2/+2
| | | | | | | | Saves a bit more than 0.5KiB in text size on optimized GCC 4.9 Linux AMD64 builds. Change-Id: I3b7e4751c4799c3e2c9f8f23b769e1659d863579 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Fix assignment within a Q_ASSERTHolger Hans Peter Freyther2015-01-161-1/+1
| | | | | | | | | This was introduced in 3b844c16e0988b017c67b2329cbe34d4da112b33 and doesn't seem to be right. Change-Id: I1c6a9445996650566d44f223651dd0c855619a88 Fixes: Coverity CID 21589 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update dbus to use new QMetaType::registerNormalizedType signatureJędrzej Nowacki2014-11-171-13/+1
| | | | | Change-Id: I5d755f383d8cd226a25bd495f6854c0db9719a51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Make D-Bus types without a matching Qt one prettier in qdbusThiago Macieira2014-02-221-1/+4
| | | | | | | | Print "QMap<QString,QString>" for "a{ss}" and print a nicer expansion of other types. Change-Id: I0a7a2ecf8f0a62bd97931f3c129cd4cb4f471ef1 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Also register complex D-Bus types when running under qdbusThiago Macieira2014-01-311-14/+19
| | | | | | | | | | | | | | | | When running inside qdbus, we generate the meta objects a little differently. Previously, for unknown types we'd simply have a -1 as the type ID in the meta object, but this doesn't work in Qt 5 (has apparently never worked). So simply register a type with the metatype system and let QMetaObject do its thing. [ChangeLog][qdbus]Fixed a bug that caused the qdbus tool to crash when trying to display remote interfaces that had complex types without a matching base Qt type. Task-number: QTBUG-36524 Change-Id: Ifef65b340dc89d3295ed6ef00f2dcc60849ecb02 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Fix quadratic behavior in QMetaObjectBuilder when writing string tableSimon Hausmann2013-12-061-2/+1
| | | | | | | | | | | | | | | QHash::key() is O(n) and we're calling it n times. That can make repeated calls to the meta object builder very slow, as for example QQmlPropertyMap when inserting properties repeatedly. Fortunately this is easy to fix, as the value in the hash map is also the index, so we can simply iterate over the hash once. With the exception of the class name, which we have to treat specially to ensure that it is always the first entry in the string table. Task-number: QTBUG-32720 Change-Id: Ic954c45c454107feee83216131f601cc69d4c63b Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QMetaMethod and QDBusMetaObject: Give public access to signal methodsCaroline Chao2013-09-091-1/+1
| | | | | | | To be consistent with signals which are public since Qt5. Change-Id: I633077e37d0851b118c22da0681e8b8b1892ddbb Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix crash on qdbus when return type is a raw dbus typeAlbert Astals Cid2013-07-301-2/+10
| | | | | | | | | | | | | | | Assigning a -1 to type is going to make things crash since it basically means unresolved and when you try to access the string data go to a index that doesn't exist So what I do is save the return type in rawReturnType if it is a raw one and reassign the type to IsUnresolvedType | strings.enter(mm.rawReturnType) instead of -1 when "saving" the metaobject Task-number: QTBUG-32671 Change-Id: I67898dea8a1926eee80c16417e877ef4e22aa06b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Replace QVariant::typeToName usage by QMetaType::typeName call.Jędrzej Nowacki2012-05-281-1/+1
| | | | | | | | | 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>
* Remove QMetaObjectExtraData and put everything into QMetaObjectOlivier Goffart2012-04-251-0/+4
| | | | | | | | | | | | | | | | 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>
* Finish cleaning up com.trolltech -> org.qtproject in QtDBusThiago Macieira2012-04-161-1/+11
| | | | | | | | | | | | | | 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>
* 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>
* Introduce QMetaType::UnknownType.Jędrzej Nowacki2012-03-021-7/+3
| | | | | | | | | | | | | | | | | 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-291-45/+107
| | | | | | | | | | | | | | 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-291-42/+7
| | | | | | | | | | | | | | | 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>
* Remove unused QtDBus meta-object extensionsKent Hansen2012-02-201-31/+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-031-1/+1
| | | | | | | | | | 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>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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>
* 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>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@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>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+703
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