summaryrefslogtreecommitdiffstats
path: root/src/dbus
Commit message (Collapse)AuthorAgeFilesLines
* QDBusSignature: accept empty strings as validThiago Macieira46 hours4-6/+11
| | | | | | | | | | | | | | | | QDBusSignature holds a D-Bus value of type SIGNATURE, which is zero or more signatures, not one or more. This changes the default constructor to create a valid signature, which we denote by not being a null QString. That means we need to use something other than the default constructor in our tests for attempting to pass invalid signatures. [ChangeLog][QtDBus][QDBusSignature] Fixed a bug that caused the class not to accept an empty string as a valid D-Bus SIGNATURE value. Fixes: QTBUG-124919 Pick-to: 6.5 6.7 Change-Id: I262c3499666e4f4fbcfbfffd17cb3793dcf2eae3 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QTimer/QObject::startTimer: improve the detection of overflowThiago Macieira2024-04-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | Converting from int milliseconds to int64_t nanoseconds can't overflow (it won't even for picoseconds, so we'll be fine for a couple more decades), so we only need to address the cases where the millisecond value was passed in int64_t: that is, in the std::chrono::milliseconds overloads. For the other cases, I added a comment. Amends bfc7535a10f7a6e3723f354b41f08a0fe1d18719 to not allow the detected overflow to happen at all, which could cause the timer to become very small. Instead, we saturate to the maximum, which is about 292 years (just under 106752 days). That's longer than computers have existed, so the chance that some Qt application is still running on a computer without any reboots from today to 24th century is remote at best. This parallels QDeadlineTimer, which already has code to saturate when using milliseconds. Change-Id: I6818d78a57394e37857bfffd17b9b1465b6a5d19 Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* Long live [[nodiscard]] QFile::openGiuseppe D'Angelo2024-04-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having already caught some bugs in real code because of unchecked calls to QFile::open, this commit marks QFile::open (and open() in other file-I/O classes) as [[nodiscard]]. Since it's going to raise warnings, the plan is to keep the existing behavior up to and including the next LTS. Then the warnings will switch on by default. All of this is protected by system of macros to opt-in or opt-out the behavioral change at any time. A possible counter-argument for doing this is that QFile::open is also used for opening files in the the resource system, and that opening "cannot fail". It clearly can, if the resource is moved away or renamed; code should at a minimum use a Q_ASSERT in debug builds. Another counter-argument is the opening of file handles or descriptors; but again, that opening may fail in case the handle has been closed or if the flags are incompatible. --- Why not marking *every* open() override? Because some are not meant to be called directly -- for instance sockets are supposed to be open via calls to `connectToHost` or similar. One notable exception is QIODevice::open() itself. Although rarely called directly by user code (which just calls open() on a specific subclass, which likely has an override), it may be called: 1) By code that just takes a `QIODevice *` and does something with it. That code is arguably more rare than code using QFile directly. Still, being "generic" code, they have an extra responsibility when making sure to handle a possible opening failure. 2) By QIODevice subclasses, which are even more rare. However, they usually ignore the return from QIODevice::open() as it's unconditionally true. (QIODevice::open() doesn't use the protected virtual pattern.) I'll try and tackle QIODevice in a future commit. [ChangeLog][QtCore][QFileDevice] The open() functions of file-related I/O classes (such as QFile, QSaveFile, QTemporaryFile) can now be marked with the "nodiscard" attribute, in order to prevent a category of bugs where the return value of open() is not checked and the file is then used. In order to avoid warnings in existing code, the marking can be opted in or out, by defining QT_USE_NODISCARD_FILE_OPEN or the QT_NO_USE_NODISCARD_FILE_OPEN macros. By default, Qt will automatically enable nodiscard on these functions starting from Qt 6.10. Change-Id: Ied940e1c0a37344f5200b2c51b05cd1afcb2557d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDBusObjectPath: Add QDebug stream operatorKai Uwe Broulik2024-03-012-0/+12
| | | | | | | Prints its path. Change-Id: I9467f9d33b927cf6b6d4692b2e2824001366625c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Correct doc snippet licenseLucie Gérard2024-02-282-2/+2
| | | | | | | | | | | | | | All file under doc/snippet should be license as Documentation snippets and according to QUIP-18 [1] this is LicenseRef-Qt-Commercial OR BSD-3-Clause [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I76eedfb6b15c4091f726a5652e3530001d7cdaf7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* QDBusUtil: document the D-Bus signature grammarMarc Mutz2024-02-271-0/+15
| | | | | | | | | | | | | | The specification doesn't provide an explicit grammar, so I turned the prose into ABNF for easier reference. The goal is both to aid review of the validateSingleType() function and to eventually use this to write a parser that doesn't use, or at least limits, recursion. Pick-to: 6.7 6.6 6.5 6.2 5.15 Change-Id: I21f81aa83cde356ab48105ea98f066024e0b7b5e Reviewed-by: Juha Vuolle <juha.vuolle@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* [docs] QDBusUtil::isValidObjectPath(): simplify descriptionMarc Mutz2024-02-271-3/+2
| | | | | | | | | | | The "does not contain two slashes in sequence" condition reads a bit unmotivated. It's easier written as "each part is not empty", so do that. Pick-to: 6.7 6.6 6.5 Change-Id: Ibb204429521910582bd8ee03ff54f72d7e15ce84 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QDBusIntrospection: make DiagnosticsReporter safe to useMarc Mutz2024-02-222-1/+7
| | | | | | | | | | | | | Add a virtual destructor to this polymorphic class and disable copying (requires to bring the default ctor back manually, and to export the class nested in an exported class). Amends 248d2103b5ef8f9cf8c1189cb67d78e1b6e741b7. Pick-to: 6.7 Change-Id: I9008e4ecebca34feac6ae92fa026f2673b652ba9 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QDBusIntrospection: fix position of Annotation definitionMarc Mutz2024-02-221-12/+12
| | | | | | | | | | | | | | | | | | | | | When 2e8a48c1cdc8547ec47f097a41dd53c641715b77 made Annotations::mapped_type a struct Annotation instead of just QString, it inserted the Annotation definition after the first inline user of Annotations (struct Method). I don't know why this compiled in the first place, but it did, probably because of the re-parse-everything-at-closing-of-class rule, but there's no reason to not move it to before the first users, so do that. Found while trying to make QDBusIntrospection a namespace instead of a struct. Amends 2e8a48c1cdc8547ec47f097a41dd53c641715b77. Pick-to: 6.7 Change-Id: I316cb5e49f3476adc5ff5abb023b9d74303ab640 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* QDBusUtil::isValidBusName(): remove an impossible condition guardMarc Mutz2024-02-221-3/+0
| | | | | | | | | | | | | | | | | | QStringView::split() only returns an empty container if a) the haystack is empty and b) SkipEmptyParts is in effect. Neither is the case here: We use the implicit default of KeepEmptyParts, and we've already checked that the haystack isn't empty in the first line of the function. So the result of split() can never be empty here. Remove the check to avoid confusing more readers than just yours truly. Amends the start of the public history. Pick-to: 6.7 6.6 6.5 Change-Id: I423e747ae4de0708d063a6bb2befd625dbd5c591 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* [docs] QDBusUtil: remove documentation of bygone functionsMarc Mutz2024-02-211-19/+0
| | | | | | | | | | | | | | The referenced QString overloads were removed when 6bbfae9457248f1f65cf18f87ecc6ff66a6fdd70 ported from QString/QStringRef overload sets to single QStringView functions. Remove the docs. Amends 6bbfae9457248f1f65cf18f87ecc6ff66a6fdd70. Pick-to: 6.7 6.6 6.5 6.2 Change-Id: I766ad104f83aa19d90eeefe5b67524184869640a Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Doc: Resolve qdoc link warningsPaul Wicking2024-02-141-2/+1
| | | | | | | | | | | - Drop link to non-existing documentation. - Reorder links such that the target becomes the text and vice versa. - Use correct link target names. - Add missing qttestlib doc project dependency to qtwidgets. Pick-to: 6.7 Change-Id: Iaa0ea7b22326c82271b14b17c4b78c3a25a834f1 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QDBusAdaptors/Doc: fix missing preposition "in" in documentationThiago Macieira2024-02-101-2/+2
| | | | | | | | | | Drive-by clarify a bit the text what "it" means, because it's different from the "it" in "its" two words later. Fixes: QTBUG-121875 Pick-to: 6.6 6.7 Change-Id: I664b9f014ffc48cbb49bfffd17b0959e7b3495fd Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* QDBusAbstractInterface/Doc: fix example to match the descriptionThiago Macieira2024-02-052-5/+17
| | | | | | | | | | | | | | | The docs say "This example illustrates function calling with 0, 1 and 2 parameters" because it was copied from the synchronous call() documentation. But the snippet didn't do that, because back in Qt 4 when this was created, it was too difficult to exemplify that for asynchronous use. It now no longer is, with lambdas. Drive-by update the docs for both functions to refer to each other. Fixes: QTBUG-121873 Pick-to: 6.6 6.7 Change-Id: I664b9f014ffc48cbb49bfffd17b089b7f77c1cde Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Change license of .qdoc filesLucie Gérard2024-02-011-1/+1
| | | | | | | | | | | According to QUIP-18 [1], all .qdoc files should be LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Change-Id: I4559af21fc9069efa9bf0cbd29c5e86cfdac9082 Reviewed-by: Kai Köhne <kai.koehne@qt.io>
* Doc: Improve documentation around setting ALLOW_INTERACTIVE_AUTHORIZATION in ↵Kai Köhne2024-01-162-19/+38
| | | | | | | | D-Bus Pick-to: 6.7 Change-Id: I4830b375c5f8c7986985c1d6caddc51348fb45ed Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusMessage: make private ctor explicitMarc Mutz2024-01-101-1/+1
| | | | | | | | Found in API review. Pick-to: 6.7 Change-Id: Ia0a3fa388c13d76c2b12b73d5e760b13021fa072 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: Rearrange best practices and how to documentationJaishree Vyas2023-12-281-1/+1
| | | | | | | | | | Change the best practices to how-tos, which are categorized now on a new page. Fixes: QTBUG-118044 Pick-to: 6.7 6.6 6.5 Change-Id: I78dba2a1fde03b346f110ecd54e11485a0869540 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QtDBus: port away from QPairMarc Mutz2023-12-142-2/+3
| | | | | | | | Pick-to: 6.7 Task-number: QTBUG-115841 Change-Id: I1eaba630f003df695412dbb2353ce4870f9b9782 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
* QDBusConnectionPrivate: Close connection after failed q_dbus_bus_register()Ievgenii Meshcheriakov2023-12-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | The connection should be closed before executing q_dbus_connection_unref(). Failing to do so results in an assertion inside libdbus: dbus[1573958]: The last reference on a connection was dropped without closing the connection. This is a bug in an application. See dbus_connection_unref() documentation for details. Most likely, the application was supposed to call dbus_connection_close(), since this is a private connection. The q_dbus_bus_register() may fail if maximum number of active connections for a bus was reached. This can be tested by creating a custom bus with "max_completed_connections" parameter set to 0. Add such a test to tst_qdbusconnection. Fixes: QTBUG-34613 Change-Id: I6ae7df19bf8b6546c2a504931ba852dc15d35f78 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBus: Document that calls to local objects are never asynchronousIevgenii Meshcheriakov2023-12-072-0/+12
| | | | | | | | This is a limitation of current implementation. Task-number: QTBUG-92107 Change-Id: Idb1543f432348e66ca20aa67a2498034c2f05fa6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove the DBusMessage* members from QDBusMessagePrivateThiago Macieira2023-12-013-37/+49
| | | | | | | | | | | | | | We don't need to keep the entire original message in QDBusMessagePrivate after we've demarshalled it, nor do we need to keep a link to the message we're replying to. In order to reply properly to a message, we only need two pieces of information: the serial of the method call being replied to and the service that originated the call. Fixes: QTBUG-69919 Change-Id: Ic5d393bfd36e48a193fcffff13b7375db459e619 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* QDBusAbstractAdaptor: Assert that the parent is not nullIevgenii Meshcheriakov2023-11-291-0/+3
| | | | | | | | | | | QDBusAbstractAdaptor is expected to be used with a parent. Add an assertion that will fail if a user is using this class incorrectly. That's easier to debug than a null pointer dereference in QDBusAdaptorConnector::polish(). Fixes: QTBUG-18525 Change-Id: I1934475fe277e0cc08435d79f1d453d6576f0b1c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdbuscpp2xml: Register QtDBus metatypesIevgenii Meshcheriakov2023-11-281-1/+1
| | | | | | | | | | | | Explicitly register QtDBus-specific metatypes before attempting to generate output. This fixes a bug when types like QDBusObjectPath are sometimes ignored by this tool. Export QDBusMetaTypeId::init() for that reason. Add a regression test to tst_qdbuscpp2xml. Fixes: QTBUG-34550 Change-Id: I16faa79a794d09a26bad45e18730379681a20b50 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusConnection: output error message from findSlotDavid Faure2023-11-221-1/+11
| | | | | | | | | | | | | This helps debugging why an adaptor's method fails to be called. Example output: QDBusConnection: couldn't handle call to LaunchCommand: Type not registered with QtDBus in parameter list: QByteArrayList tests/auto/dbus/qdbusmarshall/tst_qdbusmarshall shows many warnings after this commit, since it's testing many cases of "no such slot". Pick-to: 6.0 6.1 5.15 Change-Id: Ic4ddcd91d005555a02d531fc8960aea2c809e20b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: Fix \fn template arguments for Qt DBusTopi Reinio2023-11-181-1/+1
| | | | | | | | | Upcoming changes to QDoc require accurate definition for template arguments in \fn commands. Task-number: QTBUG-118080 Change-Id: I761e99060caa64750eecf4fde4acc7f68d029936 Reviewed-by: Luca Di Sera <luca.disera@qt.io>
* Implement QDBusAbstractInterface::setInteractiveAuthorizationAllowedGleb Popov2023-11-073-0/+31
| | | | | | Task-number: QTBUG-100458 Change-Id: I48d6f17943a554c1173d16a2320eb460c3d5c387 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Fix unity build on WindowsFriedemann Kleint2023-11-011-0/+2
| | | | | | | | | | Exclude qdbusconnectionmanager.cpp which includes qt_windows.h, clashing with the "interface" parameter name in qdbusinterface.h. Task-number: QTBUG-115352 Pick-to: 6.6 6.5 Change-Id: Id41910857cb203ec5a1b784fa171eeb189ca4eca Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtDBus: Use explicitly meta type name instead of method typeKai Uwe Broulik2023-10-231-1/+13
| | | | | | | | | | | | In Qt 6, QMetaType sees the underlying type the compiler knows, so a "using VariantMapMap = QMap<QString, QVariantMap>" typedef will fail to match a signature of VariantMapMap to QMap<...> because qDBusParametersForMethod looks for the method type name whose QMetaType::fromName lookup will fail later. Pick-to: 6.6 6.5 Change-Id: I142dc42ca86aa8a96f73424ec5da5780f2c1e6a3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Modify copyright format in qt_attribution.jsonLucie Gérard2023-10-231-2/+2
| | | | | | | | | Multiline copyright entries are entered via string array. Task-number: QTBUG-111873 Pick-to: 6.5 6.6 Change-Id: Ib8203163db8d5d579117f402b7a89b59ae1a5169 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Add missing return type to QDBusReply::valueLuca Di Sera2023-10-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QDoc reads an `\fn` command it saves it to a file to parse it with Clang, with the objective of using the produced AST to perform certain sanity checks on the documented element. Generally, `\fn` commands that do not represent correct C++ code are accepted as long as Clang is still able to build an AST Node that QDoc can work with, not resulting in any issue in the output documentation. For example, an `\fn` that doesn't state a return type might be able to be parsed correctly enough by Clang to produce a sensible Node for the function that QDoc is interested into. The documentation for `QDBusReply::value` make use of this possibility by not stating a return type. Up to Clang 15 this was not an issue, and a correct-enough AST was produced when the `\fn` commands for those methods were parsed. On Clang 16, Clang chokes on the missing return type, being unable to recognize the function definition and produce an AST that QDoc can work with. This has the effect of losing those documented element in the output documentation. To avoid the issue, a return type is now added to the relevant `\fn` commands. Task-number: QTBUG-111580 Change-Id: Ia70404c7ad548cb1e144bec99943cf72c990bb83 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Doc: Fix warnings and linking issuesTopi Reinio2023-10-091-0/+3
| | | | | | | | | | | | | | | | | | | | Remove or replace links to examples that were removed or moved under manual tests. Replace code snippets that were quoting the now-missing examples. Fix documentation of QSet::removeIf(). Fix typo in documentation macro: Unknown command '\examplecateogry'. Add qtopengl, qtshadertools dependencies to Qt Widgets documentation project to enable correct linking to those topics. Mark all documentation sets in qtbase as free of warnings. Pick-to: 6.6 6.5 Change-Id: I058cd5f2063aa933ea310bceff906f05422a7cb2 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QDBusConnectionPrivate: Fix race in sendWithReply()Ievgenii Meshcheriakov2023-09-223-14/+26
| | | | | | | | | | | | | | The message processing may finish before watcherHelper is setup. Use locking and an additional check for message processing completion to avoid the race condition. Move the code to new function inside QDBusPendingCallPrivate, close to where the waiting without GUI is done. Add assertions that check that watcherHelper is not overwritten. Change-Id: I24e54598135edf293c41b3a80369b0a3b46f775c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusConnectionPrivate: Protect access to serverConnectionNames with mutexIevgenii Meshcheriakov2023-09-181-1/+4
| | | | | | | | This list is accessed by ~QDBusServerConnection in a user thead. Task-number: QTBUG-116621 Change-Id: Ic115612b2a0f12fd9f69f38f4662dc36fffbf178 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Check if QDBusServer is destroyed before accessing itIevgenii Meshcheriakov2023-09-181-1/+5
| | | | | | | | | Also lock before accessing serverObject member, it is cleared by ~QDBusServer(). Task-number: QTBUG-116621 Change-Id: I14c96e34316a46fe43ecd929e44cd1800ba8b803 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusConnection: Print error from prepareHookNicolas Fella2023-09-172-20/+25
| | | | | | | | | | | | When the operation fails we print a warning, but that warning does not include the error message that prepareHook internally collects but ignores. Printing the error is useful for debugging. Pick-to: 6.6 Change-Id: I946c4781942115a17ffd43a79bff7676b6674be1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusArgumentPrivate: Disable copy and move, make constructor protectedIevgenii Meshcheriakov2023-09-141-7/+10
| | | | | | | | | | | | Disable copy and move for the class because it is polymorphic. Make the constructor protected because instances of this class are not supposed to be created directly. Mark drived classes final. Change-Id: Ia6f2d640f3642ad4a6ecb3830fba152155e237b3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Resolve libdbus functions in a thread-safe wayIevgenii Meshcheriakov2023-09-141-20/+28
| | | | | | | | | | | | Use atomic pointers. While at it, declare the function type with `using` instead of a typedef for better readability, do the declaration locally so that less preprocessor concatenation is needed, use reinterpret_cast instead of C-style cast. Change-Id: I5ed0d35b7ddfdd62ef6c12403fe7052019453f34 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusArgumentPrivate: Specify direction as argument to constructorIevgenii Meshcheriakov2023-09-143-15/+13
| | | | | | | | | | This avoids having direction member uninitialized by mistake. Make the member variable const as it is never modified. While at it, make Direction and enum class. Change-Id: I53814ae9e1d6bcf786433674619145a1ee61e063 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusArgumentPrivate: Use type-safe enum for flagsIevgenii Meshcheriakov2023-09-142-6/+18
| | | | | | | | | | | Declare flags as QDBusConnection::ConnectionCapabilities instead of bare int. Do the same for derived classes QDBusMarshaller and QDBusDemarshaller. Make the constructors explicit, replacing useless `inline` where it was used. Make flags argument default to empty flags. Change-Id: I6caedde06b2ef41d725f15348ee780d1cc20b355 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusArgumentPrivate: Initialize member variables inlineIevgenii Meshcheriakov2023-09-141-15/+11
| | | | | | | | For better readability and ease of modification. Do the same for derived classes. Change-Id: I9601f0b280feb5e3d0e71ed4a3405fdd9cca8dd2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdbus_symbols: Make major version list contexprIevgenii Meshcheriakov2023-09-121-1/+1
| | | | | | | It is never modified. Change-Id: Ie87a0705e258c5977f352afdcfc3bee513b3bfb6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdbus_symbols: Use QFunctionPointer typedefIevgenii Meshcheriakov2023-09-122-4/+4
| | | | | | | This makes function declarations much easier to read. Change-Id: Ib05433cda97a39f4a3b8c2759c32309a60716bfb Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* qdbus_symbols.cpp: Include qdbus_symbols_p.hIevgenii Meshcheriakov2023-09-121-5/+1
| | | | | | | Remove external declarations from the source file. Change-Id: I9e43666fd646a2d3372607a4514f727ee80d2daf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusArgumentPrivate::createSignature: Accept QMetaType as argumentIevgenii Meshcheriakov2023-09-123-6/+6
| | | | | | | | This gives more information than an int, also simplifies the code slightly. Change-Id: I76c00230386d74c70d294e638b4927de883f03ff Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* QDBusConnectionPrivate: Use write lock inside handleSignal()Ievgenii Meshcheriakov2023-09-111-1/+1
| | | | | | | | | | Slots like (un)registerServiceNoLock() modify shared state and should be run with write lock taken. Having only read lock results in hard to reproduce crashes. Task-number: QTBUG-116621 Change-Id: I4456b64f9f2200378012822143e1a05345859d62 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusArgumentPrivate: Remove duplicate public sectionsIevgenii Meshcheriakov2023-09-111-3/+0
| | | | | | | | Do the same for the derived classes. Change-Id: Ieec1d222a96775d57af91f9c6757648561b75e53 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QDBusConnectionPrivate: Remove parent argumentIevgenii Meshcheriakov2023-09-112-5/+4
| | | | | | | | This class is reference counted, having a parent would interfere with this reference counting code. Change-Id: I5ab4fdfa74af94d8b760bd3600bd1f828e3d2b91 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Doc: All overviews list categorizationJaishree Vyas2023-09-111-1/+1
| | | | | | | | | | | | The \generate list names are added for each categorized section with some explanation. Here, calling the overviews as explanations-(name of the section). The idea is to give general terms instead of specific phrases like 'core' etc, for better understanding. Task-number: QTBUG-115347 Pick-to: 6.5 6.6 Change-Id: I673e38c0e9193b7f7d54008bfcf82c2d3a10be3f Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* QDBusConnectionPrivate: Remove declaration of messageFilter()Ievgenii Meshcheriakov2023-09-111-1/+0
| | | | | | | The function is declared but never defined. Change-Id: Ic9c4369ecaee3103b74d2dc9b84cbece99379603 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>