summaryrefslogtreecommitdiffstats
path: root/src/dbus/qdbusintegrator.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QTimer/QObject::startTimer: improve the detection of overflowThiago Macieira8 days1-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>
* 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>
* QDBusConnectionPrivate: Fix race in sendWithReply()Ievgenii Meshcheriakov2023-09-221-14/+5
| | | | | | | | | | | | | | 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-171-15/+21
| | | | | | | | | | | | 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>
* 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>
* QDBusConnectionPrivate: Remove parent argumentIevgenii Meshcheriakov2023-09-111-4/+3
| | | | | | | | 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>
* QtDBus: Remove uses of Q_UNUSED on used variablesIevgenii Meshcheriakov2023-09-111-5/+0
| | | | | | | | This also includes variables only used in Q_ASSERT, those don't generate warnings anymore even when asserts are disabled. Change-Id: Ia557120d442c100c9437b106a01a4079d48640af Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBus: Use type-safe object tree node flagsIevgenii Meshcheriakov2023-09-111-5/+6
| | | | | Change-Id: I7078b11d19d7a6444a020e0d400efbaea22f84a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusSlotCache: Include flags into the hash keyIevgenii Meshcheriakov2023-09-111-9/+5
| | | | | | | | | This removes the need for doing two separate iteration to find entries in the hash. Also QMultyHash can now be replaced by plain QHash. Change-Id: Ie704e74c1dbb0c8e40d22a7cd572fcc8a3bfcd5d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusCallDeliveryEvent: Remove unused flags memberIevgenii Meshcheriakov2023-09-031-4/+4
| | | | | | | Also remove flags argument of QDBusConnectionPrivate::deliverCall(). Change-Id: Idd569f531891ffd21e6f57c17e5d03539c3fd230 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusConnectionPrivate: Emit newConnection signal on QDBusServer directlyIevgenii Meshcheriakov2023-09-021-8/+2
| | | | | | | | | | | | | Remove indirection via _q_newConnection() because the server object may not exist anymore when this method is invoked. This amends commit d865e3ef1db53770f96f3800f75467edd7cdf3c7. Task-number: QTBUG-116621 Change-Id: I5f9a667bc0e2e3cd36492c24767505031fe0e1d7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QDBusServer: Remove private slotIevgenii Meshcheriakov2023-08-281-1/+2
| | | | | | | | | Use QMetaObject::invokeMethod() to schedule call to QDBusConnectionPrivate::_q_newConnectioni() instead. This also gets rid of a by name signal/slot connection. Change-Id: I8725c4e3815c5580c5561bdddda0ab722b06346e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Use invokeMethod accepting member functions with argumentsIevgenii Meshcheriakov2023-08-261-2/+2
| | | | | | | | | | | This makes the code slightly more readable. Rename one overload of QDBusConnectionManager::doConnectToBus to avoid using qOverload. Change-Id: Id878e5baade539c3f748b5bf66a5aff726604b89 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* QDBusconnectionPrivate: Replace permanent connections with invokeMethodIevgenii Meshcheriakov2023-08-261-8/+24
| | | | | | Change-Id: Ife8d4495a98e34c8364293f3423b52f65ac187c4 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusConnectionManager: Move all locking inside the classIevgenii Meshcheriakov2023-08-221-3/+6
| | | | | | | | | Make `mutex` member private and make all former users call new public member functions that perform locking. Make old non-locking member functions private. Change-Id: I29092d1bd785aa6b830183c1c1fe125b16e0d633 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusConnectionPrivate: Define _q_newConnection outside of extern "C" blockIevgenii Meshcheriakov2023-08-161-2/+2
| | | | | | | That's weird and I have no idea how that worked. Change-Id: I6ecb967e108256ebf1609e08ef02fc2ec83ef2ca Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Remove assertion inside qDBusAddTimeout()Ievgenii Meshcheriakov2023-08-111-1/+0
| | | | | | | | | | | | | | | The assertion is triggered when a timer cannot be started. This is normal occurrence when an application exits before all pending D-Bus calls are processed. And there is a code handling such failure in the same function. Qt also prints a warning message in this case: QEventDispatcherGlib::registerTimer: invalid arguments Task-number: QTBUG-58732 Pick-to: 6.6 Change-Id: I37859443fa90ae1bf7da1572ac9b02a54c8e1b99 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Encapsulate hooks addition and invocation into QDBusSpyHookListIevgenii Meshcheriakov2023-08-111-14/+25
| | | | | | | This makes the rest of the code slightly cleaner. Change-Id: I67606b369f00d54fc24f7d6f41c004a728d37b5f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Make access to spy hook list thread safeIevgenii Meshcheriakov2023-08-111-11/+31
| | | | | | | | | | | | | | Introduce a mutex that protects access to the spy hooks list. Also don't pass around raw pointers to the spy hook list, those can change when new hooks are added and storage is reallocated. Change the type of the hooks list to QList to take advantage of copy-on-write in common case. Check whether the global static is destroyed in qDBusAddSpyHook(). Change-Id: I440a88ce088d6fb5817660c8e1e02901281b842f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusConnectionPrivate: Use enum for mode argument of sendWithReplyIevgenii Meshcheriakov2023-07-101-3/+2
| | | | | | | | | | | Change type of mode argument to QDBus::CallMode instead of int. Also change the argument name in the implementation to much the declaration. Change-Id: Ice19bfff72f3bf1f4a5748f2caa16999e87a131f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Mark all remaining RAII/smart pointer class ctors [[nodiscard]]Marc Mutz2023-06-221-1/+1
| | | | | | | | | | | | | | | | | | | ... like QUIP-0019 suggests. The main problem here is finding these classes. We don't have markup for RAII classes, so I had to find them by name. This patch is based on the output of git grep -we Q[A-Z0-9a-z_]+er extracting the matches and piping them through sort -u, then removing a lot of suffixes like Manager and Handler, then visually inspecting the remaining list. Task-number: QTBUG-104164 Pick-to: 6.6 Change-Id: I59b18d8d0a0237fcc11047857adc39b984ad7fcb Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QDBus: Fix typo in a function nameIevgenii Meshcheriakov2023-05-261-2/+2
| | | | | | | Rename connectionCapabilies -> connectionCapabilities Change-Id: I07deff1b944b30404548181d5c930b76fb1a575c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Move dispatch enabling code into a single functionIevgenii Meshcheriakov2023-05-221-5/+23
| | | | | | | Remove the helper class. Change-Id: I82edd7fa1ce1d8b9044938a1378f992a40a0bbdf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Convert some loops to ranged for loopsIevgenii Meshcheriakov2023-05-151-45/+25
| | | | | | | | Convert some loops that are using Java-style iterators into ranged for loops for better readability. Change-Id: I14f6339608d201fe06a753be236db52815cbf5c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusConnectionPrivate: Fix handling of queued messagesIevgenii Meshcheriakov2023-05-111-1/+1
| | | | | | | | | | | | | | | | Handle any queued messages before attempting to dispatch any newly received messages. This ensures that messages are processed in the order they were sent. Add a regression test for this bug using code adapted from the bug report by Pascal Weisser. Because of the nature of the bug, this new test does not always fail even when compiled with affected versions of Qt though. Fixes: QTBUG-105457 Pick-to: 6.2 6.5 Change-Id: I2725f3450ad537d63d6660e21645ac2c578e1768 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Remove unused extern declaration of qDBusInitThreads()Ievgenii Meshcheriakov2023-05-111-2/+0
| | | | | Change-Id: I318ca15d9da9fe9f9a0d68494d0f55061d88987e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Use non-textual version of QMetaObject::invokeMethodIevgenii Meshcheriakov2023-05-041-2/+2
| | | | | | | | Use type-checked version for better run-time performance and compile-time type checking. Change-Id: I92c97d162137770bc373e28fa8e4e115ac5533e6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Replace some text-based singnal-slot connectionsIevgenii Meshcheriakov2023-05-041-2/+2
| | | | | | | | | | | Use type-checked connections for better run-time performance and compile-time type checking. This excludes connections to private slots that are not trivial to replace. Change-Id: I97f591dba880f8d09c73565f2b5555524f6ab4a8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QtDBus: Use QMetaObject::invokeMethod instead of QTimer::singleShotIevgenii Meshcheriakov2023-05-021-1/+1
| | | | | Change-Id: I1a9ecdcb8df7804d13fdcf676fc12b1e0f6bddae Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QObject: implement startTimer(int) in terms of startTimer(chrono)Ahmad Samir2023-03-111-1/+1
| | | | | | | | | | I.e. use chrono first, this means the API isn't limited by the size of int, but by the size of whatever chrono::milliseconds uses (typically int64_t), and chrono units are much more readable as well. Task-number: QTBUG-110059 Change-Id: Ie7f2d90864782361a89866693011803be6f8545e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix dangling referencesVille Voutilainen2023-01-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | These were found with the help of -Wdangling-reference, which is new in GCC 13. The one in qtpaths.cpp is a false positive: parseLocationOrError() returns a reference, so there's nothing for the full expression to destroy. Moreover, it returns a reference to a static object, so there's no destruction inside the function either. The other two aren't, but are also harmless. QDBusMessage::arguments() and QVariant::toList() return a stored QVariantList by value, so QList's COW mechanism means at() returns a reference that will not be destroyed. However, the compiler has no way of knowing that. And since it depends on the implementation details, change the code to not depend on that. Pick-to: 6.5 Change-Id: If53aa16fcc24586d752ffc76c193c81e43dc9d95 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* dbus: Put the qWarnings in qdbusintegrator.cpp into its own categoryAleix Pol2022-11-281-36/+58
| | | | | | | | We already have a category for the integrator debug information, we might as well start using it for all warnings. Change-Id: I13239035a334a03036611ccac49cb8c2bf9233b7 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* dbus: Include some debug messages when failing to connectAleix Pol2022-11-261-11/+28
| | | | | | | | | | | | | | When using dbus, there's a number of cases where resolution happens at runtime. It's useful to see dbus complain when connects don't work, because otherwise the system doesn't work but we don't know what is happening. Added this to debug such an issue, already helped me address other cases that had gone unnoticed elsewhere, so this is something that benefits from being in QtDBus. Change-Id: I5eefb94fcf775182edf1ad0c24e8a6692f84b15f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8, but extended to handle typedefs and accesses through pointers, too: const std::string o = "object"; auto hasTypeIgnoringPointer = [](auto type) { return anyOf(hasType(type), hasType(pointsTo(type))); }; auto derivedFromAnyOfClasses = [&](ArrayRef<StringRef> classes) { auto exprOfDeclaredType = [&](auto decl) { return expr(hasTypeIgnoringPointer(hasUnqualifiedDesugaredType(recordType(hasDeclaration(decl))))).bind(o); }; return exprOfDeclaredType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes)))); }; auto renameMethod = [&] (ArrayRef<StringRef> classes, StringRef from, StringRef to) { return makeRule(cxxMemberCallExpr(on(derivedFromAnyOfClasses(classes)), callee(cxxMethodDecl(hasName(from), parameterCountIs(0)))), changeTo(cat(access(o, cat(to)), "()")), cat("use '", to, "' instead of '", from, "'")); }; renameMethod(<classes>, "count", "size"); renameMethod(<classes>, "length", "size"); except that the on() matcher has been replaced by one that doesn't ignoreParens(). a.k.a qt-port-to-std-compatible-api V5 with config Scope: 'Container'. Added two NOLINTNEXTLINEs in tst_qbitarray and tst_qcontiguouscache, to avoid porting calls that explicitly test count(). Change-Id: Icfb8808c2ff4a30187e9935a51cad26987451c22 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from container.count()/length() to size()Marc Mutz2022-10-041-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is semantic patch using ClangTidyTransformator: auto QtContainerClass = expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o) makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container'. <classes> are: // sequential: "QByteArray", "QList", "QQueue", "QStack", "QString", "QVarLengthArray", "QVector", // associative: "QHash", "QMultiHash", "QMap", "QMultiMap", "QSet", // Qt has no QMultiSet Change-Id: Ibe8837be96e8d30d1846881ecd65180c1bc459af Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Apply Q_CONSTINIT where beneficialSona Kurazyan2022-09-011-1/+1
| | | | | | | | | | Applied Q_CONSTINIT to variables with static storage duration, but skipped the POD types with core constant initializers. Task-number: QTBUG-100486 Change-Id: Iaabf824e9cb0f29a405a149912200d4e4b3573c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix QDBusInterface crashing with empty path on constructionMårten Nordheim2022-06-271-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>
* Use SPDX license identifiersLucie Gérard2022-05-161-39/+3
| | | | | | | | | | | | | 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>
* 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>
* QtDBus: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-04-121-3/+3
| | | | | | | 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-121-35/+35
| | | | | | 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-121-13/+13
| | | | | | | | | 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-031-0/+2
| | | | | | | | | | | | 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>
* Short live Q_CONSTINIT!Marc Mutz2022-03-261-6/+6
| | | | | | | | | | | | | | | | | | 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-171-0/+1
| | | | | | | | 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>
* DBus: do not mix QList iterators and raw pointersGiuseppe D'Angelo2021-09-201-3/+3
| | | | | | | | | | | | | 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>
* Use (new) erase()/erase_if() algorithmsMarc Mutz2020-12-051-5/+2
| | | | | Change-Id: I45c18fd45c20b226e44d16315e3ebb6c305d4ab0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>