summaryrefslogtreecommitdiffstats
path: root/tests/auto/dbus
Commit message (Collapse)AuthorAgeFilesLines
* QDBusArgument: disambiguate between QMap on std::pair and std::mapThiago Macieira2024-03-182-0/+15
| | | | | | | | | | | | | For QMap on a std::pair, QMap::iterator{}.operator->() would result in a type that has "first" and "second" members: std::pair itself. But it would be wrong to marshall and demarshall the first and second elements thereof as the key and value, so give preference to the .key() and .value() selection, which would store the std::pair as the type. Fixes: QTBUG-123401 Pick-to: 6.5 6.6 6.7 Change-Id: I6818d78a57394e37857bfffd17bd69bb692dd03b Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Remove extra semi-colonsTasuku Suzuki2024-02-061-1/+1
| | | | | Change-Id: I92fddb36cd136fd1bd627955f15d0559b9942d7e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Change license for tests filesLucie Gérard2024-02-0432-32/+32
| | | | | | | | | | | | According to QUIP-18 [1], all tests file should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I9657df5d660820e56c96d511ea49d321c54682e8 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
* QDBusConnectionPrivate: Close connection after failed q_dbus_bus_register()Ievgenii Meshcheriakov2023-12-074-0/+54
| | | | | | | | | | | | | | | | | | | | | | 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>
* tst_qdbuslocalcalls: Remove casts to int in arguments to QCOMPAREIevgenii Meshcheriakov2023-12-071-10/+10
| | | | | | | | Those casts serve no useful purpose. Not having them results in a slightly cleaner output. Change-Id: If8ce1c680ce6f80a15534f9f4fe6d19d137f6443 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qdbusabstractadapter: Don't skip testsIevgenii Meshcheriakov2023-12-041-19/+0
| | | | | | | | | | | | The tests were skipped since 2018 due to QTBUG-66223. The tests were never re-enabled even though the issue log indicates that failure were not reproducible anymore. Task-number: QTBUG-66223 Task-number: QTBUG-59336 Change-Id: I96ddfb2cd4ddbcac82feddcd15279e218104a9b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Purge empty BLACKLIST files from testsEdward Welbourne2023-11-242-0/+0
| | | | | | | There's no point to the file if it has no content. Change-Id: Ie0deb59a63d5f7a654fcab1218e0a814710072ff Reviewed-by: Jason McDonald <macadder1@gmail.com>
* QDBusConnection: output error message from findSlotDavid Faure2023-11-222-0/+5
| | | | | | | | | | | | | 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>
* tst_qdbusmarshall: disambiguate unittest data tag namesAhmad Samir2023-10-181-19/+20
| | | | | | | | | Drive-by change, initialize a QList with std::initializer list instead of old style operator()<<. Change-Id: If5745a4554772661df438e757518f8cb55a8a55c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDBusMarshall test: avoid an atomic assignmentGiuseppe D'Angelo2023-09-141-5/+5
| | | | | | | | | | There's no need for atomic semantics for a simple "scope value rollback" (not sure why the code doesn't use the real thing). There's also no semantics that make sense. Extract the integer out of the atomic and store it back. Change-Id: I8ba89216d1931a73ff22a8af7fd656c3f6948793 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests/auto/: port Q_FOREACH to ranged-for, local const containersAhmad Samir2023-08-193-10/+4
| | | | | | | | | | | | | | | | | | | | These are local containers that are either: - Already const and didn't need Q_FOREACH to begin with - Can be simply made const, just by adding const keyword In one case the unittest checked that the container's size is 1, so use list.first() instead of a for-loop. In files where Q_FOREACH isn't used any more, remove "#undef QT_NO_FOREACH". Also remove those files from NO_PCH_SOURCES. Drive-by changes: - Remove parenthesis from one-line for-loops - Make the for-loop variable a const& where a copy isn't needed Task-number: QTBUG-115839 Change-Id: Ide34122b9cda798b80c4ca9d2d5af76024bc7a92 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Mark all of Qt as free of Q_FOREACH, except where it isn'tMarc Mutz2023-08-193-0/+7
| | | | | | | | | | | | | | | | | | | | | | The density of Q_FOREACH uses in this and some other modules is still extremely high, too high for anyone to tackle in a short amount of time. Even if they're not concentrated in just a few TUs, we need to make progress on a global QT_NO_FOREACH default, so grab the nettle and stick to our strategy: Mark the whole of Qt with QT_NO_FOREACH, to prevent new uses from creeping in, and whitelist the affected TUs by #undef'ing QT_NO_FOREACH locally, at the top of each file. For TUs that are part of a larger executable, this requires these files to be compiled separately, so add them to NO_PCH_SOURCES (which implies NO_UNITY_BUILD_SOURCES, too). In tst_qglobal.cpp and tst_qcollections.cpp change the comment on the #undef QT_NO_FOREACH to indicate that these actually test the macro. Task-number: QTBUG-115839 Change-Id: Iecc444eb7d43d7e4d037f6e155abe0e14a00a5d6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* tst_qdbusconnection: iterate over member container directlyAhmad Samir2023-08-151-4/+2
| | | | | | | | | | | | | | | | | | | | | The loops don't change the m_connections container. The call chain is: - registerObjectPeer() unittest constructs a MyServer, which connects QDBusServer::newConnection to MyServer::handleConnection(), the latter stores each new connection's name in m_connections - An QTestEventLoop is entered, which triggers handleConnection(), handleConnection() calls exitLoop() at the bottom (this is repeated multiple times) - server.unregisterObject() is called, iterating over m_connections - server.registerObject() is called iterating over m_connections - between the unregisterObject() call and the registerObject() calls m_connections is not modified AFAICS Thus no need for taking a copy of m_connections (not that it matters much, it's a QStringList with size() == 3). Change-Id: Idaea2ca4d3b27fc88d39f8434e3817a2a4098c72 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* dbus test headers: port away from Q_FOREACHMarc Mutz2023-08-132-5/+10
| | | | | | | | | | | | | | | | | | | Headers must be free of Q_FOREACH uses if we want to white-list only those .cpp files that still use Q_FOREACH in order to enable QT_NO_FOREACH by default. In common.h, the situation is pretty clear: the loop bodies clearly don't modify the container being iterated over. In MyServer, the situation is not clear at all, and this author doesn't have the time to investigate, so take a copy and iterate over that (eactly what Q_FOREACH does), and leave a comment. As a drive-by, fix missing {} around multi-line loop bodies. Task-number: QTBUG-115839 Change-Id: I06311a641c83daeee25f45522c694ac355ee86b6 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
* Fix spelling of D-Bus in the source codeIevgenii Meshcheriakov2023-07-062-10/+10
| | | | | | | | | Replace D-BUS with correct splling D-Bus in the source code, Keep the old spelling inside XML DTD declarations for compatibility. Change-Id: Ifa5d43f9fa1417431c81cf1bce0d897a966409b9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusIntrospection: Add Annotation structIevgenii Meshcheriakov2023-07-062-9/+17
| | | | | | | | | | | | Add a structure for annotation data containing name, value and location information. This is done to be able to emit diagnostics related to annotations that include source location. Task-number: QTBUG-2597 Change-Id: Ie990bcd0a16752b5f44f4314f8d730dd1b1a30b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Make qtbase tests standalone projectsAlexandru Croitor2023-07-0522-0/+132
| | | | | | | | | | | | | | | | | Add the boilerplate standalone test prelude to each test, so that they can be opened with an IDE without the qt-cmake-standalone-test script, but directly with qt-cmake or cmake. Boilerplate was added using the following scripts: https://git.qt.io/alcroito/cmake_refactor Manual adjustments were made where the code was inserted in the wrong location. Task-number: QTBUG-93020 Change-Id: I77299f990692b4fe4721a9bc35071608d0d23982 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
* Handle a couple of GCC 13 warnings about dangling referencesAhmad Samir2023-06-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | There are two temporaries, reply.arguments() returns a temporary QList and list.at(0) returns a temporary reference to the first element. The local reference variable would only extend the lifetime of the temporary object it's bound to, list.at(0), but not the temporary list itself. Even though this a false positive in this case because QList is implicilty shared, the compiler can't tell the difference and the fix is simple. tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp:1845:21: warning: possibly dangling reference to a temporary [-Wdangling-reference] 1845 | const QVariant &retval = reply.arguments().at(0); | ^~~~~~ tests/auto/dbus/qdbusabstractadaptor/tst_qdbusabstractadaptor.cpp:1845:50: note: the temporary was destroyed at the end of the full expression ‘QDBusMessage::arguments() const().QList<QVariant>::at(0)’ 1845 | const QVariant &retval = reply.arguments().at(0); | ~~~~~~~~~~~~~~~~~~~~^~~ Pick-to: 6.6 6.5 5.15 Change-Id: I03d54b56769cbd0f9f1165e4679ec4947267181a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBus: Transform fallback interface names according to the specIevgenii Meshcheriakov2023-06-201-0/+60
| | | | | | | | | | | | ACE-encode the domain names, replace dashes with underscores, prepend underscore to domain name parts that start with a digit. Add a regression test into tst_qdbusinterface. Fixes: QTBUG-71674 Change-Id: I92e0c6889163c0eccc4c833f2058d759631f562c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QDBus: Fix typo in a function nameIevgenii Meshcheriakov2023-05-261-1/+1
| | | | | | | Rename connectionCapabilies -> connectionCapabilities Change-Id: I07deff1b944b30404548181d5c930b76fb1a575c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QDBusAbstractAdaptor: Send signals using correct interfaceIevgenii Meshcheriakov2023-05-252-0/+36
| | | | | | | | | | | | | | | When forwarding a signal, associate this signal with its enclosing metaobject instead of its sender's metaobject. Those two may be different if the signal is declared in a base class. Add a regression test into tst_qdbusconnection. Fixes: QTBUG-33142 Pick-to: 6.5 Change-Id: I532ab3bb6c0671a480568f46d63fceff0c82c097 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QDBusConnectionPrivate: Fix handling of queued messagesIevgenii Meshcheriakov2023-05-113-0/+117
| | | | | | | | | | | | | | | | 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>
* QDBusServer: Fix potential crash when private pointer is nullIevgenii Meshcheriakov2023-05-022-0/+7
| | | | | | | | | | | | | | | | Check that the private pointer is not null before attempting to dereference it. This can happen, for example, when a QDBusServer instance was constructed with an empty string as address. Attempting to destroy an object constructed this way was causing a segmentation fault on Linux. Add a test case that attempts to construct a QDBusServer object with an empty string as address to check that this does not cause a segmentation fault anymore. Pick-to: 6.5 6.2 Change-Id: I5fe63134026e2a9f509b61d452285891b1ec624d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QThread: add sleep(std::chrono::nanoseconds) overloadAhmad Samir2023-03-131-8/+1
| | | | | | | | | | | | | | All the other overloads are implemented using the new one. Windows change relies on the pre-check in the code review making sure it compiles. [ChangeLog][QtCore][QThread] Added sleep(std::chrono::nanoseconds) overload. Task-number: QTBUG-110059 Change-Id: I9a4f4bf09041788ec9275093b6b8d0386521e286 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make sure helper executables used by unittests are builtAhmad Samir2023-03-112-3/+4
| | | | | | | | | | | E.g. tst_qprocess_and_guieventloop uses write-read-write. This is useful e.g. when not building all of qtbase, but only a specific unittest while hacking code. Change-Id: Id97c6c09c180ba35554d75877a434cb258a6243d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* tests: Remove remains of qmake conversion from CMakeLists.txt filesFriedemann Kleint2023-02-1728-73/+3
| | | | | | | Pick-to: 6.5 Change-Id: I8d106554bb86ac1ec9bb7a4083de4c376bcbab1d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Adapt to QTimeZone replacing Qt::TimeSpec usageEdward Welbourne2022-12-101-2/+2
| | | | | | | | | | | | In the process actually handle all time-spec cases in various places that only handled UTC or LocalTime, or at least note that they don't where that's not practical. Also tidy up header ordering and ensure QDateTime's header is included wherever it's used, while adding the include for QTimeZone where needed. Task-number: QTBUG-108199 Change-Id: Ic1a5cdf0aaf737bf1396aa8ac58ce2004cef7e19 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* tst_qdbusmetatype: fix build with Clang (and probably MSVC)Thiago Macieira2022-12-091-0/+9
| | | | | | | | | | | | | This test makes use of a GCC extension-slash-defect in matching of template template parameters. Either Clang has recently changed its behavior not to accept them any more, or we've never compiled this test with Clang. Tested with Clang 15.0.6. Pick-to: 6.4 Change-Id: I69ecc04064514f939896fffd172e98d826989ca3 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
* Port from container::count() and length() to size() - V5Marc Mutz2022-11-035-59/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* dbus: use same type of matching quotesMaxime Roussin-Bélanger2022-10-212-10/+10
| | | | | | | | There is no reason to use different style of quotes when printing messages. Change-Id: I7d513ec04c803702974054569d28f26947942fbf Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_QDBusTypes::isValidFixedType: don't duplicate fixed typesEdward Welbourne2022-10-181-1/+0
| | | | | | | | | tst_QDBusType::isValidFixedType_data() called addFixedTypes() and then addBasicTypes(); but the latter calls addFixedTypes(), too; so those rows got duplicated. Only add the fixed types once. Change-Id: If0d6f44ec7defb12117dad251878850ca75beb48 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port from container.count()/length() to size()Marc Mutz2022-10-047-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Port tests away from using q{Set}GlobalQHashSeedIvan Solovev2022-08-261-2/+2
| | | | | | | | These functions are marked as deprecated in future Qt releases. Task-number: QTBUG-104858 Change-Id: I25d2932455d8c9e3e2d722b1c48fc2cfa2d1e679 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* DBus tests: port away from deprecated APIsIvan Solovev2022-08-245-38/+38
| | | | | | | | | | Replacing QVariant::Type with QMetaType::Type Task-number: QTBUG-104858 Change-Id: If03e2ad72b46c33f68f4382c7ed5c5801d2e70b2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Change the license of all CMakeLists.txt and *.cmake files to BSDLucie Gérard2022-08-2328-28/+28
| | | | | | | Task-number: QTBUG-105718 Change-Id: I5d3ef70a31235868b9be6cb479b7621bf2a8ba39 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* qdbusxml2cpp: remove the old "In"-for-signal compatibility codeThiago Macieira2022-08-161-1/+1
| | | | | | | | | | | | | | | This led to an infinite recursion in case the annotation was completely missing. Instead of trying to fix that, I'm simply implementing the "### Qt6" request from c62f71722639c39f210ddbec0c4d832521b3f187 . [ChangeLog][qdbusxml2cpp] Removed the old compatibility code that accepted "In" annotations for signal argument names, introduced in Qt 5.8. Pick-to: 6.4 Fixes: QTBUG-104722 Change-Id: Ie4bb662dcb274440ab8bfffd1709bfc3daf0846d Reviewed-by: David Faure <david.faure@kdab.com>
* Add license headers to cmake filesLucie Gérard2022-08-0328-0/+84
| | | | | | | | | | | | CMakeLists.txt and .cmake files of significant size (more than 2 lines according to our check in tst_license.pl) now have the copyright and license header. Existing copyright statements remain intact Task-number: QTBUG-88621 Change-Id: I3b98cdc55ead806ec81ce09af9271f9b95af97fa Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-2822-25/+25
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* CMake: Make tst_qdbusabstractadaptor depend on qmyserverAlexandru Croitor2022-07-261-0/+1
| | | | | | | Pick-to: 6.2 6.3 6.4 Change-Id: I8a38c6e2de7639ac8cd07e36a4f6d79830d34dc8 Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
* Fix QDBusInterface crashing with empty path on constructionMårten Nordheim2022-06-271-0/+7
| | | | | | | | | | | | | 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>
* unblacklist passing tests 2022Anna Wojciechowska2022-06-231-2/+0
| | | | | Change-Id: Ifb09a997d39fc2c92503e77cf372d443c13c4c2b Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
* QDBusArgument: ensure std::vector isn't seen as an associative containerDavid Faure2022-05-171-0/+3
| | | | | | | | | 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-1631-848/+73
| | | | | | | | | | | | | 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 test-helper as dependency to tst_qdbusinterfaceMårten Nordheim2022-05-041-0/+2
| | | | | | | | | Then the test-helper is (re)built as part of `ninja tst_qdbusinterface` or `ninja tst_qdbusinterface_check` Pick-to: 6.3 6.2 Change-Id: Id129c2fdc5980ea268ef1383f0747589876e2a9f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* tests: Remove unused SRCDIR definesIevgenii Meshcheriakov2021-08-173-4/+0
| | | | | | | | | | | Remove SRCDIR defines from tests that don't use them. There is a standard define called QT_TESTCASE_SOURCEDIR that is available to all tests and serves the same purpose. Pick-to: 6.2 Change-Id: I2aa237739c011495e31641cca525dc0eeef3c870 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Port QDBusServiceWatcher::watchedServices to bindable propertiesAndreas Buhr2021-04-282-1/+32
| | | | | | | | 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-191-0/+41
| | | | | | | | | | | 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>
* dbus: Fix missing QVersionNumber includeKevin Funk2021-01-251-0/+1
| | | | | | | | Fixes the build Change-Id: Ie0b7a1476bb1f80ee2ccfe1cbc6ca37e9c93e758 Reviewed-by: David Skoland <david.skoland@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-128-101/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove QtDBus includesDavid Skoland2021-01-1227-93/+163
| | | | | | | | | | | | | | Per the discussion of QTBUG-88831, we determined that module-wide imports are unfortunate, especially for compile times. Following this, all QtDBus includes have been replaced with the headers for the classes actually used in each file. Additionally, some cleanup of header file order and format has been performed in the changed files. Pick-to: 6.0 Change-Id: I62c1b75682a48422f0ba1168dd5d7bd0952808ac Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>