summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* Fix QDBusInterface crashing with empty path on constructionMårten Nordheim7 days1-0/+5
| | | | | | | | | | | | | On some machines having an empty path passed to QDBusInterface would cause a crash. This happened because the code created a QDBusMessage and manually marked it as validated when it was not. The validation would not pass for this object. Change-Id: I496dd922fa64353399655a1e84996b99990f5879 Pick-to: 6.4 6.3 6.2 5.15 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix typos in docs and commentsKai Köhne2022-06-152-2/+2
| | | | | | | | | Found by codespell Pick-to: 6.4 Change-Id: Ie3e301a23830c773a2e9aff487c702a223d246eb Reviewed-by: Nicholas Bennett <nicholas.bennett@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove more unused qreadwritelock.h includesMarc Mutz2022-05-171-1/+0
| | | | | | Pick-to: 6.3 6.2 Change-Id: I4962c1abcc58d36500a56ccca680f6f36c3b5d89 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QDBusArgument: ensure std::vector isn't seen as an associative containerDavid Faure2022-05-171-1/+1
| | | | | | | | | This broke compilation of qDBusRegisterMetaType<std::vector<MyStruct>> because std::vector<T> is in fact std::vector<T, std::allocator<T>>. Pick-to: 6.2 Change-Id: I6a13f5f0476a3faa3a43da54d90d652b4bdd8186 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1687-3340/+195
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Add missing header files to the module sourcesAlexey Edelev2022-05-121-2/+2
| | | | | | | | | All module header files should be listed in the corresponding sections of modules SOURCEs to be accessible in CMake routines. Task-number: QTBUG-103196 Change-Id: Ieb77ae70557e35e546a5b00387e1e0aa40338239 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix a QDBusConnection crash with pending calls when connection is closedJohannes Rosenqvist2022-05-111-1/+7
| | | | | | | | | | | | QDBusConnection::closeConnection does not use deref() on pendingCall list so if there is an QDBusPendingCallWatcher watching the pending call the QDbusPendingCallPrivate destructor will run twice causing a crash. Pick-to: 5.15 6.2 6.3 Change-Id: Ib811da36d3510f4292aa310c52c0617b885947b7 Reviewed-by: Johannes Rosenqvist <xeroc81@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: qt_add_dbus_interface: fix wrong cmake command nameDavid Faure2022-04-291-2/+2
| | | | | | | | set_source_file_property doesn't exist, it's set_source_files_properties Change-Id: I696db4e35831ebbf4c871248bd87e6d666354a54 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* QtDBus: includemocsMarc Mutz2022-04-286-0/+14
| | | | | | | | | | | Including moc files directly into their classes' TU tends to improve codegen and enables extended compiler warnings, e.g. about unused private functions or fields. Pick-to: 6.3 6.2 5.15 Task-number: QTBUG-102886 Change-Id: Id5892f146f9792a0c5c8df24c7750a4089b07c6e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Revise Qt dbus module landing pageAndreas Eliasson2022-04-252-172/+229
| | | | | | | | | | Move some of the detailed information into its own overview page and reorganize the contents structure. Also, escape the _ character. Task-number: QTBUG-100369 Pick-to: 6.3 Change-Id: I396877912bed66537e4a97ee3d109ff92e15d843 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QtDBus: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-04-1216-68/+68
| | | | | | | Task-number: QTBUG-98434 Change-Id: I733af3126f126e5025f709cfe023b9f6bbc13e3e Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QtDBus: use _L1 for for creating Latin-1 string literalsSona Kurazyan2022-04-1216-206/+228
| | | | | | Task-number: QTBUG-98434 Change-Id: I99d9a82c77d00124ea8953b98406959f1bf9413a Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QtDBus: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-128-60/+60
| | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. Change-Id: I48e2946c4cc8d0a6c3e0cc37e1f73510b878d574 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: optimize handling of isDebuggingMarc Mutz2022-04-031-4/+4
| | | | | | | | | | | | | | | | | | | | This is part of a series of patches deprecating implicit conversions of QAtomic<T> variables to T. Use relaxed atomic loads and stores on the 'isDebugging' variable. The old code used the implict conversions to and from int and therefore loadAcquire/storeRelease. Here, the int is the only value, it's not guarding the construction of any other data, so relaxed loads and stores suffice. A further optimization would be to make the initial value of isDebugging 0, to send it into the BSS instead of the TEXT/DATA segment, but seeing as this is just compiled in for the auto-tests, this patch leaves that particular change for another round (or never). Pick-to: 6.3 Change-Id: Ide92f6c1a12137fcbc3ec15e146f6dcbdb6b481b Reviewed-by: David Faure <david.faure@kdab.com>
* QtDBus: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERNMarc Mutz2022-04-034-2/+6
| | | | | | | | | | | | It's one of our best tools to improve compile times. Can't backport to Qt 6.3 or 6.2 because this change introduces new exported symbols. Task-number: QTBUG-102206 Change-Id: Iae9d4017a984c845a76d0b9b088ad3e467fe1d54 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Apply Q_CONSTINIT across the codebaseMarc Mutz2022-03-292-2/+2
| | | | | | | | | Still not complete. Just grepping for static and thread_local. Task-number: QTBUG-100486 Change-Id: I90ca14e8db3a95590ecde5f89924cf6fcc9755a3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Short live Q_CONSTINIT!Marc Mutz2022-03-263-10/+10
| | | | | | | | | | | | | | | | | | It expands to the first available of - constinit (C++20) - [[clang::require_constant_initialization]] (Clang) - __constinit (GCC >= 10) Use it around the code (on and near static QBasicAtomic; this patch makes no attempt to find all statics in qtbase). [ChangeLog][QtCore][QtGlobal] Added macro Q_CONSTINIT. Fixes: QTBUG-100484 Change-Id: I11e0363a7acb3464476859d12ec7f94319d82be7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Misc: Do not depend on transitive includesFabian Kosmale2022-03-172-0/+6
| | | | | | | | As a drive-by, remove superfluous includes from qnetworkmanagerservice.h and obey the coding conventions for includes in a few more places. Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: compile-optimize inline swap functionsMarc Mutz2022-03-177-11/+11
| | | | | | | | | | | | | | | | | Instead of using the overly-generic qSwap() monster, use - qt_ptr_swap() for swapping raw pointers - member-swap for swapping smart pointers and owning containers - std::swap() for swapping scalars In QtCore, this has proven to give a nice reduction in compile time for Qt users, cf. b1b0c2970e480ef460a61f37fa430dc443390358. Pick-to: 6.3 6.2 Task-number: QTBUG-97601 Change-Id: I2cb0dd3cef3a2923e7d08bb9d93c692308797e5b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix deprecated use of QBA/Q*String::countMårten Nordheim2022-03-151-1/+1
| | | | | | | 'Use size() or length() instead' Change-Id: I284fce29727c4c1ec9ea38a4e8ea13a9e0af5390 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Doc: Fix erraneous auto-link on Qt D-Bus landing pageTopi Reinio2022-03-111-1/+1
| | | | | | | | | | QDoc interprets a sequence of special characters as something to auto- link to; Escape the underscore character to prevent this. Fixes: QTBUG-100562 Pick-to: 6.3 Change-Id: I61a10d7ea6878ef93197b0d329e16b8867d8ad30 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* CMake: Document source file propertiesAlexandru Croitor2022-02-151-0/+61
| | | | | | | | Pick-to: 6.2 6.3 Task-number: QTBUG-100224 Change-Id: Id4d0e0d84762d9eee2beb10e850d1775ad4f3245 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Doc: Fix minor grammar issues in qtdbus-indexAndreas Eliasson2022-02-091-5/+5
| | | | | | | Task-number: QTBUG-100369 Pick-to: 6.3 Change-Id: Id224b7838b49934b46f00ea44c67aa1c201648d6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QDBusAdaptorConnector: place a static int into BSS instead of DATAMarc Mutz2022-02-051-3/+3
| | | | | | | | | | | | | | | | The cachedRelaySlotMethodIndex started out as -1, assuming no slot could have that index. But 0 is just as good a marker, because we know that method index 0 will be one of QObject's (destroyed() or deleteLater()). So start out with a zero initial value, which means the variable can be placed in the BSS segment now and doesn't need to be stored in DATA. Pick-to: 6.3 6.2 Change-Id: I40b96d54f11e60348f465cafa15af98d41038c95 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: State Qt versions for when CMake commands etc. were introducedJoerg Bornemann2022-02-011-0/+8
| | | | | | | | | | | | | | | | | | | Introduce the qdoc macros \cmakecommandsince, \cmakepropertysince, and \cmakevariablesince that insert a paragraph akin to the \since context command. Example: \cmakecommandsince 6.3 produces the paragraph This command was introduced in Qt 6.3 The macro text is wrapped in \n\n to ensure that we always generate a new paragraph. Pick-to: 6.2 6.3 Task-number: QTBUG-100212 Change-Id: Id5c8e8812e6b0b915674d108a0e775091e9eacd8 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Prevent repeated instantiations of some qRegisterNormalizedMetaType<>s [1/N] ↵Marc Mutz2022-01-218-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (QtGui) Create macros that wrap the magic developed in 7d63efc16f65f98c657caa90e0d7e9b72a879ade and apply it to all Q_DECLARE_METATYPE invocations that show up in Clang -ftime-trace for a PCH'ed QtGui build. Effects on compile times: Clang 10 -ftme-trace: $ ClangBuildAnalyzer --analyze qtgui-before.trace | head -n6 Analyzing build trace from 'qtgui-before.trace'... **** Time summary: Compilation (523 times): Parsing (frontend): 628.3 s Codegen & opts (backend): 304.5 s $ ClangBuildAnalyzer --analyze qtgui-after.trace | head -n6 Analyzing build trace from 'qtgui-after.trace'... **** Time summary: Compilation (523 times): Parsing (frontend): 546.0 s Codegen & opts (backend): 304.4 s GCC 11 time (bash builtin): before: $ time for ((i=0; i < 3; ++i)) do touch src/gui/painting/qpolygon.h ; ninja libQt6Gui.so; done real 4m13,539s user 49m24,416s sys 3m18,177s after: $ time for ((i=0; i < 3; ++i)) do touch src/gui/painting/qpolygon.h ; ninja libQt6Gui.so; done real 3m55,697s user 45m19,941s sys 3m7,370s Task-number: QTBUG-97601 Pick-to: 6.3 Change-Id: Ia8e37a58937568a7ed21cfeb4b27274deca4d53b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QDBusMessage: de-inline createReply(QVariant)Marc Mutz2022-01-192-4/+5
| | | | | | | | | | | | | | | | | | | | | The building of the QList has percolated to the top of the lists of most expensive template instantiations in Clang -ftime-trace PCH builds of libQt6Gui.so: **** Templates that took longest to instantiate: 7137 ms: QList<QVariant>::operator<< (260 times, avg 27 ms) 7115 ms: QList<QVariant>::append (263 times, avg 27 ms) 7071 ms: QList<QVariant>::emplaceBack<const QVariant &> (256 times, avg 27 ms) 6651 ms: QtPrivate::QMovableArrayOps<QVariant>::emplace<const QVariant &> (256 times, avg 25 ms) [...] 5649 ms: QArrayDataPointer<QVariant>::detachAndGrow (256 times, avg 22 ms) [...] 4668 ms: QArrayDataPointer<QVariant>::reallocateAndGrow (256 times, avg 18 ms) Task-number: QTBUG-97601 Pick-to: 6.3 Change-Id: Ib766e70e4f741e057f9032bf232160cf6e83f4b9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiomKai Köhne2021-12-093-3/+3
| | | | | | | | | | Using REQUIRED as a prefix instead of suffix works better with OPTIONAL_COMPONENTS, and is also the order in the CMake manual. Task-number: QTBUG-98867 Pick-to: 6.2 Change-Id: I1ab68408b95d8edf06272a3b9fceccd8d8e597fc Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Doc: Fix qdoc warningsVenugopal Shivashankar2021-11-111-0/+3
| | | | | | | | | | In addition, added the missing warninglimit entry to a few doc configs. Change-Id: I51b9d2ad66123a2a9673a3b42870662641375e6b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* dbus: Fix typosJonas Kvinge2021-10-144-4/+4
| | | | | | Pick-to: 5.15 6.2 Change-Id: I9efce6a3163ca6564d511c994776ff96999909b4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix usage of \summary macroTopi Reinio2021-10-121-6/+6
| | | | | | | | | The macro takes only one parameter, sentences must be wrapped in {}. Pick-to: 6.2 Fixes: QTBUG-97441 Change-Id: I7177548a32a67d720c2b551d16c09d898b0fda51 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Make it explicit when CMake API is definedKai Köhne2021-10-052-0/+13
| | | | | | | | Task-number: QTBUG-96239 Pick-to: 6.2 Change-Id: Iaa99024f98f5422aa39f148a89594186b40344bf Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add overview pages to CMake APIKai Köhne2021-10-042-0/+15
| | | | | | | | | | | | | | So far the pages were only 'rooted' in the separate qtcmake documentation. Let them have a page per module too, so that it's easy to navigate. At the same time rename the cmake-macros-qtcore group to cmake-commands-qtcore. This will require a fixup in qtdoc repository. Pick-to: 6.2 Change-Id: Ifc09b27a6c220b5feab64686ca47c60d3342e71a Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Add summary to CMake commandsKai Köhne2021-10-041-5/+5
| | | | | | | | | | | | For normal \page elements, \brief is just showing in the \generatelist or \annotatedlist commands. Make sure the description is also visible in the actual CMake command/variable/property page by defining a \summary macro. Pick-to: 6.2 Change-Id: I12bc854d547059a2f6309a5922bb0b2a36d4e41c Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* DBus: do not mix QList iterators and raw pointersGiuseppe D'Angelo2021-09-202-7/+8
| | | | | | | | | | | | | In Qt 5, QVector::iterator was actually a raw pointer. In Qt 6, QVector = QList, and QList::iterator isn't a pointer, but converts to one (for backwards compatibility). Some code in QtDBus exploits this by mixing iterators and raw pointers. In preparation for deprecating conversions between them, adjust this code by "converting" explicitly when needed. Change-Id: I1efab72b33d27742b339cf848cefd5cc258cd215 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Handle empty string args for versionless wrappers of dbus CMake commandsCraig Scott2021-09-201-6/+46
| | | | | | | | | | | | | | | | | | | | | | | | CMake silently drops empty list items when passing ${someVar} to a function unquoted. The versionless wrapper functions typically use ${ARGV} or ${ARGN} to pass through arguments from the caller to the versioned implementation, but this doesn't preserve empty arguments. For qt_add_dbus_adaptor() in particular, this was problematic because that meant arguments after the empty arg effectively "moved left" and were interpreted as the wrong arguments. Use named arguments and pass through each one explicitly for the qt_add_dbus_adaptor(). This takes advantage of the implementation of the versioned function, which also checks each optional positional argument explicitly. We can only do this because we know the upper bound on the number of arguments, so it is possible to represent each argument with its own variable. A more general solution that didn't need to know the number of arguments would require the cmake_language(EVAL) command, but that requires CMake 3.18 or later. Fixes: QTBUG-96594 Pick-to: 6.2 Change-Id: Ibb1de19217191768ca5ead969b20a1d28c466868 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Doc: Add version and description to Qt-DBus documentationKai Köhne2021-09-171-1/+3
| | | | | | | | This makes sure that the Qt version is part of the HTML title. Pick-to: 6.2 Change-Id: I2ad8535a9289616d21c18bd9e92d4a91f6faced0 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Revert "Ensure versionless wrappers do not introduce a new variable scope"Craig Scott2021-09-061-14/+17
| | | | | | | | | | | | | This reverts commit 08180e76e6116f0ef66476ca00b2b676b3aa50da. Macros add another level of escaping that functions do not. The conversion of the versionless wrappers to macros may alter the behavior, so revert that change. Task-number: QTBUG-96219 Pick-to: 6.2 Change-Id: Ic5dcff3081123d957888584ba1d76ae0580d9083 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Ensure versionless wrappers do not introduce a new variable scopeCraig Scott2021-08-311-17/+14
| | | | | | | | | | | | | | Using function instead of macro prevented the wrappers from being able to pass back any variables set in the wrapped function. In some cases, these variables were being explicitly passed back to the caller, but that isn't needed if you just make each wrapper a macro. This also makes things more future-proof because any newly introduced output variables will work without having to update the wrappers. Task-number: QTBUG-96121 Pick-to: 6.2 Change-Id: Ic4486de668694c06b47e466587b2cdcb969ea047 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qdbuscpp2xml: add support for custom types with a new -t optionDavid Faure2021-08-252-0/+19
| | | | | | | | | | | | | | | | | qdbuscpp2xml can't know about custom types registered with qDBusRegisterMetaType<> in the server application whose header file it's parsing. So add support for custom types using a command line argument. For example: qdbuscpp2xml -t 'std::vector<Person>=a{ssss}' peopleserver.h which generates <arg name="people" type="a{ssss}" direction="in"/> <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="std::vector&lt;Person&gt;"/> [ChangeLog][QtDBus][qdbuscpp2xml] Added a -t option to specify how to handle custom types. Change-Id: Ic0cad4f4eec8d5dfa48055c3a46cc772b1a60174 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBus: fix ExportScriptableInvokables to allow calling scriptable invokablesDavid Faure2021-08-231-6/+11
| | | | | | | | | The "wantedMask" check in the xml generator didn't distinguish slots from invokables, so exporting an object with just ExportScriptableInvokables didn't allow calling Q_SCRIPTABLE methods. Change-Id: I7b408755da5b28e67a9384d9df95e22dc5de2369 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Add global \versionlessCMakeCommandsNote qdoc macroJoerg Bornemann2021-08-231-15/+8
| | | | | | | | | | | | | | When documenting a CMake command, document the unversioned command 'qt_foo' and use '\versionlessCMakeCommandNote qt6_foo' to refer to the versioned command. This avoids duplicating the command signature. Use the new macro where applicable. Pick-to: 6.2 Task-number: QTBUG-95796 Change-Id: I2e4180fbda0b89acf3d8c036459f591eb2f46475 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QDBusMarshaller: fix -Wformat-overflowMarc Mutz2021-07-082-26/+16
| | | | | | | | | | | | | | | | | | | | | Says GCC: qdbusmarshaller.cpp: In member function ‘QDBusMarshaller* QDBusMarshaller::beginMap(QMetaType, QMetaType)’: qdbusmarshaller.cpp:286:17: warning: ‘%s’ directive argument is null [-Wformat-overflow=] 286 | qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. " | ^ Fix by manual checking. It's a False Positive, because QString::asprintf() can handle nullptr strings just find, but let's make GCC happy. Since the code snippet appears multiple times, even though GCC only warns about one of them, take this opportunity to factor the code out into a cold helper function. Change-Id: I1d642f2465f34b670b179646185cba05cb16e573 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Migrate to autogenerated cpp exportsAlexey Edelev2021-06-252-15/+2
| | | | | | | | | Replace the hardcoded cpp exports with a generated one where it's applicable. Task-number: QTBUG-90492 Change-Id: Idc160b594987b2c765e75bd669aae851b4366282 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* qdbus: add support for "aay" (QByteArrayList)David Faure2021-05-021-0/+3
| | | | | | | | | (I wish these common mappings were centralized though, so that annotations in the XML file wouldn't be needed) Pick-to: 6.0 6.1 5.15 Change-Id: Ie3e8731e44b6e0338c8a044408c34160cf0a3a1e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port QDBusServiceWatcher::watchedServices to bindable propertiesAndreas Buhr2021-04-282-12/+50
| | | | | | | | Fixes: QTBUG-92993 Change-Id: I379c67c75bc536e387889de5303b01aef9399fcd Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Port of QDBusServiceWatcher::watchMode to new property systemAndreas Buhr2021-04-192-6/+22
| | | | | | | | | | | Port watchMode in QDBusServiceWatcher to the new property system. This is the easiest part. Task-number: QTBUG-85520 Change-Id: I588212af205e77765862b8fecdbdcbf871717142 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Introduce QMetaObject::metaTypeFabian Kosmale2021-03-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This function returns the metatype corresponding to the metaobject, or an invalid metatype for namespaces. This works as follows: First we increment the metaobject revision for new metaobjects. Metaobjects with older revisions are handled by doing a lookup by name. That fallback is also used for dynamic metaobjects (from QtDBUS and those created by QMetaObjectBuilder). For new metaobjects, we store the metatype in its metatype array, behind the property metatypes. This avoids any changes to the property and method metatype extraction logic: For properties, the metatype access does not change, as the new metatype is after their metatypes. For method metatypes, we already have an indirection layer (using offsets), so by adjusting those offsets by one, the same logic keeps working. To distinguish between namespaces and dynamic metaobjects, namespaces store the metatypeinterface pointer for void in the metatype array, whereas dynamic metaobjects store a nullptr. One nice additional benefit is that this simplifies the generator logic in moc, as the metatype array is now never empty. Task-number: QTBUG-92077 Change-Id: Id3f920f28553f12032a71a1a87dad29e5374dbe7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
* Doc: Change section titles that cause bad linksPaul Wicking2021-03-111-5/+5
| | | | | | | | | | | Section titles are valid targets for QDoc's autolinker. When they are identical to other valid link targets, such as for example a class, these sections may cause invalid links. Pick-to: 6.0 6.1 Fixes: QTBUG-91141 Change-Id: Ie9a6258d2bf83932335976d8c0b5fc59f2028ae5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Doc: Fix warnings about wrong snippet path or missing .pro fileNico Vertriest2021-02-191-0/+3
| | | | | | Task-number: QTBUG-91147 Change-Id: I6a55b2b713dd70cf1cbb0b93a8d4152e175e2c4d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>