Commit Graph

823 Commits

Author SHA1 Message Date
Ievgenii Meshcheriakov
058d993611 QDBusXmlParser: Make parser functions members of the class
Also make QXmlStreamReader instance and the current interface
members of the class. This reduces amount of arguments that
need to be passed arounds.

Task-number: QTBUG-2597
Change-Id: Iebd2db98a34019923b7a4fe198cc081cd010c8a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-07-06 21:51:01 +02:00
Alexey Edelev
dfddde0b53 Do not generate the deprecated 'QtDBus/qdbusmacros.h'
Task-number: QTBUG-115029
Change-Id: I1ff6e83435820d6be0b70fa4fcf370d9e0c682a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-07-06 21:22:43 +02:00
Topi Reinio
43ea57b901 Use a global value for warning limit when testing documentation in CI
The most common limit for the maximum number of allowed documentation
warnings is zero. Use a global value for 'warninglimit', adopted by
all Qt module documentation projects that include the configuration
from qtbase/doc/global.

This allows for a temporary increase of the limit across all modules as
needed - for example, when updating the QDoc binary that the CI
provisions to a version that introduces new types of documentation
warnings.

Increase this base limit temporarily to 10 to help re-enable
documentation testing in CI as it's currently disabled.

Task-number: QTBUG-113326
Change-Id: I8b66951ca9324bcfaec3b5a7ec2cff544c62feb0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-06-27 15:12:31 +00:00
Marc Mutz
31d834a1c0 Mark all remaining RAII/smart pointer class ctors [[nodiscard]]
... 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>
2023-06-22 16:20:10 +00:00
Ievgenii Meshcheriakov
2509fc508a QDBus: Transform fallback interface names according to the spec
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>
2023-06-20 19:53:47 +02:00
Ievgenii Meshcheriakov
a12abc2614 QDBus: Remove commented out code
The code is commented out since 12 years ago.

Change-Id: I5cd7380f8f1e778ea62b510aeece1aced111d662
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-06-20 15:39:14 +02:00
Ievgenii Meshcheriakov
4f65f91d6f QDBus: Fix typo in a function name
Rename connectionCapabilies -> connectionCapabilities

Change-Id: I07deff1b944b30404548181d5c930b76fb1a575c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-26 15:46:34 +02:00
Ievgenii Meshcheriakov
c968405455 QDBusAbstractAdaptor: Send signals using correct interface
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>
2023-05-25 11:30:40 +02:00
Ievgenii Meshcheriakov
8d13a9e387 QtDBus: Move dispatch enabling code into a single function
Remove the helper class.

Change-Id: I82edd7fa1ce1d8b9044938a1378f992a40a0bbdf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-22 11:49:30 +02:00
Ievgenii Meshcheriakov
a035e8b768 QDBusMetaObjectGenerator: Use uniform loops to iterate over methods
Use the same structure for iterating over signals and other
methods in 3 places. Introduce MethodMap type alias to make
types shorter.

Change-Id: I732b582fc8c47616037087b77a79eb13ecf17019
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-15 14:02:47 +02:00
Ievgenii Meshcheriakov
0f37c47713 QtDBus: Convert some loops to ranged for loops
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>
2023-05-15 14:02:47 +02:00
Ievgenii Meshcheriakov
859ef05633 QDBusConnectionPrivate: Fix handling of queued messages
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>
2023-05-11 19:58:12 +02:00
Ievgenii Meshcheriakov
e5ecebef4f QtDBus: Remove unused extern declaration of qDBusInitThreads()
Change-Id: I318ca15d9da9fe9f9a0d68494d0f55061d88987e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-11 09:23:43 +02:00
Jaishree Vyas
8f6ec8cea2 Clarify module changes in Qt6
Changed Briefs for better understanding

Fixes: QTBUG-109324
Pick-to: 6.5
Change-Id: I15b0c0dc12b1bf96626fb8ea4ad16d04b2b118ca
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-05-09 22:36:06 +00:00
Ievgenii Meshcheriakov
1403b63a57 QtDBus: Convert QDBusMetaTypeId into namespace
There are no member variables in this private struct, so it can
as well be a namespace.

Change-Id: I397b9680ee70e17d780db9de33ad44a00ac7792a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-04 15:05:17 +02:00
Ievgenii Meshcheriakov
08a37f9cee QtDBus: Use non-textual version of QMetaObject::invokeMethod
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>
2023-05-04 15:05:17 +02:00
Ievgenii Meshcheriakov
6f05e91695 QtDBus: Replace some text-based singnal-slot connections
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>
2023-05-04 15:05:16 +02:00
Ievgenii Meshcheriakov
3ef514f8d3 QtDBus: Use QMetaObject::invokeMethod instead of QTimer::singleShot
Change-Id: I1a9ecdcb8df7804d13fdcf676fc12b1e0f6bddae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-05-02 12:54:20 +00:00
Ievgenii Meshcheriakov
90d3c5b951 QDBusServer: Fix potential crash when private pointer is null
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>
2023-05-02 14:54:19 +02:00
Marc Mutz
426b5fbce4 D-Bus: use move() on QVariants in writeProperty()
The writeProperty() function takes the QVariant value by value, so we
can move from it, using the newly-added QMetaProperty::write() rvalue
overload.

As a drive-by, replace a copy-assignment with a move.

Task-number: QTBUG-112762
Change-Id: I6d5361830b4874fa846be513882ede4ab881246b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-05-02 14:51:01 +02:00
Edward Welbourne
ce8839e056 Deploy Comment fields in qt_attribution.json files
Replace the old abuse of other fields as comments, to be overwritten
by a later setting to a proper value, with actual Comment fields, now
that we have them.

Added a new comment to the valgrind files to say where they come from
in the upstream.

Pick-to: 6.5
Change-Id: I2edcfa2949fa9e59f3f67d3e578d8e5009854cf6
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2023-04-20 14:17:26 +01:00
Alexey Edelev
4fb7eebc70 Rid of 'special case' markers
It's unlikely we will ever use pro2cmake at this project stage,
so it doesn't make any sense to keep the 'special case' markers
in the CMake scripts. Remove them and replace with TODO where
needed.

Change-Id: I84290c20679dabbfdec3c5937ce0428fecb3e5a7
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-04-13 18:30:58 +02:00
Volker Hilsheimer
d7aa6109b1 Docs: fix links to D-Bus examples
"Example" was removed from the titles.

Pick-to: 6.5
Change-Id: Ie322180fbda328cd6e3e03c7c15f6255809b619c
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2023-04-11 19:25:42 +02:00
Ulf Hermann
b83de5f9a4 moc: Record types of enumerations
This will be helpful in a number of places, in particular in order to
support enums of different sizes in QML. We record the type as string in
the JSON output and as QMetaTypeInterface in the generated C++.

Task-number: QTBUG-112180
Change-Id: I943fac67f8b25b013d3860301416cdd293c0c69e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-31 17:42:58 +02:00
Ievgenii Meshcheriakov
8faf2511da dbus examples: Remove "Example" from example names
Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: Ia34c60ed4c0ffe5b01cc507dd5e45521c096b0bf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-24 19:29:11 +01:00
Ievgenii Meshcheriakov
d243ab7d00 QtDBus: Don't list removed listnames example in manifestmeta.thumbnail.names
This amends eea83bac26.

Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: Ic9f57a4d99f7f2a1132c15ae8e999386678dbec3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-16 13:17:24 +00:00
Ahmad Samir
e426a4e3fa QObject: implement startTimer(int) in terms of startTimer(chrono)
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>
2023-03-11 12:40:04 +02:00
Marc Mutz
b955648224 QDBusError: don't refer to a QT_NAMESPACE'ed get() as ::get()
This code predates the public history. I don't know exactly how this
worked before, but I guess it's because the QT_USE_NAMESPACE in our
headers.

If there's _any_ get() function at the global scope, then name lookup
stops there and considers _only_ that function. And if that happens to
have a compatible signature, good night.

Use unqualified lookup instead. That will find the QT_NAMESPACE one,
ignoring other overloads at global scope. And when non-namespaced,
will emit an ambiguity error in the presence of another matching get()
function at global scope.

Task-number: QTBUG-111598
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Iea141ea543193394ba527b414caf31c1f3a2355b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-05 21:57:21 +01:00
Friedemann Kleint
465438e1b1 QtDBus: Fix declaration of helper qDBusGenerateMetaObjectXml()
Add export to be consistent with the declaration in
qdbusxmlgenerator.cpp.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I08c915a7ee737617388db4c0d1a3d116cb8bc3a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-21 09:36:58 +01:00
Tasuku Suzuki
9b30774ad3 Fix build with -no-feature-library
qtbase/src/dbus/qdbus_symbols.cpp:18:17: error: ‘Qt’ has not been declared
   18 | using namespace Qt::StringLiterals;
      |                 ^~

Change-Id: Iaa5f1947bb832706b69e954103761193509644d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-11 15:25:36 +09:00
Friedemann Kleint
08c2010708 src: Remove remains of qmake conversion from CMakeLists.txt files
Pick-to: 6.5
Change-Id: Id644d322a602038403bb7f46c532744575fbf6d3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-02-10 23:36:51 +01:00
Albert Astals Cid
d619a952cd dbus: Register QDBusObjectPath
Fixes: QTBUG-108822
Pick-to: 6.2 6.4 6.5
Change-Id: Ib6d1a9cfc449df80cb7e5ad6211b07bdfd556093
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 21:15:18 +00:00
Ahmad Samir
498f345228 QtMiscUtils: add some more character helpers
isHexDigit, isOctalDigit, isAsciiDigit, isAsciiLower, isAsciiUpper,
isAsciiLetterOrNumber.

This de-duplicates some code through out.

Rename two local lambdas that were called "isAsciiLetterOrNumber" to not
conflict with the method in QtMiscUtils.

Change-Id: I5b631f95b9f109136d19515f7e20b8e2fbca3d43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-07 20:04:11 +02:00
Kai Köhne
958dc5c1cd Doc: Use \keyword for alternative name of CMake command
\target will let the browser jump right below the title. Instead,
open the page from the start.

Pick-to: 6.5
Change-Id: Ia58664aa2696aca4f299d57b8dbaa9b6cda90f27
Reviewed-by: Pranta Ghosh Dastider <pranta.dastider@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-01-30 13:56:16 +01:00
Ville Voutilainen
18def77d27 Fix dangling references
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>
2023-01-12 06:23:58 +00:00
Ahmad Samir
a608744c90 Docs: adjust docs after the QLatin1String to QLatin1StringView rename
Unify wording as "{Latin-1,UTF-16} string viewed by \a str".

Drive-by change: Fix a grammatical error, it's "a US-ASCII", not an
(because it's pronounced by the letter name "U" which is pronounced
like "you", so "a" not "an").

Task-number: QTBUG-108711
Pick-to: 6.5
Change-Id: Iff763f4008341c35317bb3d7a2a228767ff6a648
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2023-01-05 14:46:38 +02:00
Edward Welbourne
2f440169c0 Adapt to QTimeZone replacing Qt::TimeSpec usage
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>
2022-12-10 06:39:44 +01:00
Kai Köhne
2e241d1537 Add \brief descriptions to CMake overviews
Add brief descriptions of the pages that are shown in
  https://doc.qt.io/qt-6/overviews.html

Pick-to: 6.4
Change-Id: I177e4ba82cd7b8e264122375bf9a595509918fdd
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-03 10:35:19 +01:00
Alexey Edelev
7f4aa1a3fa Remove perl related functionality from CMake files
Avoid using perl in CMake scripts. Remove the syncqt.pl specific
code.

Task-number: QTBUG-87480
Change-Id: I7fcd5cc83d173ec463c275b5b50b84f25044a118
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-11-29 12:35:47 +01:00
Aleix Pol
683ed1e526 dbus: Put the qWarnings in qdbusintegrator.cpp into its own category
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>
2022-11-28 02:06:47 +01:00
Aleix Pol
479072791b dbus: Include some debug messages when failing to connect
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>
2022-11-26 01:45:43 +01:00
Marc Mutz
1c6bf3e09e Port from container::count() and length() to size() - V5
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>
2022-11-03 14:59:24 +01:00
Kai Köhne
3834fee3d3 Doc: Normalize page names
qdoc does enforce lowercase file names for .html pages, and also
replaces underscore with a dash. Make sure that the original \page name
already is normalized, so that it's easier to search.

This was done by
  find . -name "*.qdoc" -exec perl -p -i -E "s/\\\page (.*)/\\\page \L\1/ && s/_/-/g" {} ;

Pick-to: 6.4
Change-Id: Ib50b85af8ffd985edf06856266eefdebf8b328a3
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-11-02 17:21:28 +01:00
Amir Masoud Abdol
10d5c0adaf Remove the Unnecessary CMake Module, include(CMakeParseArguments)
From CMake 3.7 both flavors of `cmake_parse_arguments` are natively
available in CMake, and loading the
`CMakeParseArguments` module is not needed anymore.

Fixes: QTBUG-107574
Pick-to: 6.4
Change-Id: I7c8a6c5871cdb2f92a4aa43932b6f2ee99e1f57f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-10-25 20:14:35 +02:00
Maxime Roussin-Bélanger
3f8e3c3335 dbus: use same type of matching quotes
There is no reason to use different style of quotes when printing
messages.

Change-Id: I7d513ec04c803702974054569d28f26947942fbf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-21 12:02:34 -04:00
Luca Di Sera
e2fef733be Replace usages of Q_CLANG_QDOC with Q_QDOC
To allow the user to customize the C++ code that QDoc sees, so as to be
able to work-around some limitations on QDoc itself, QDoc defines two
symbols: Q_QDOC and Q_CLANG_QDOC, both of which are "true" during an
entire execution of QDoc.

At a certain point in time, QDoc allowed the user the choice between a
custom C++ parser and a Clang based one.

The Q_QDOC symbol would always be defined while the Q_CLANG_QDOC symbol
would be defined only when the Clang based parser was chosen.

In more recent times, QDoc always uses a Clang based parser, such that
both Q_CLANG_QDOC and Q_QDOC are always defined, making them equivalent.

To avoid using different symbols, and the possible confusion and
fragmentation that derives from it, all usages of Q_CLANG_QDOC are now
replaced by the equivalent usages of Q_QDOC.

Change-Id: I5810abb9ad1016a4c5bbea99acd03381b8514b3f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-10-21 09:48:36 +02:00
Maxime Roussin-Bélanger
f3bcf92216 Fix DBus cmake component name
If a user would copy paste the cmake line shown in the documentation
it would fail to find the package because it has the wrong case.

Change-Id: Ia5354cf408a5744bcb1c13f2624b10a6a1dbea4b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-10-14 10:34:47 -04:00
Marc Mutz
aa37e67ef7 Port from qAsConst() to std::as_const()
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.

Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace, with manual
unstaging of the actual definition and documentation in dist/,
src/corelib/doc/ and src/corelib/global/.

Task-number: QTBUG-99313
Change-Id: I4c7114444a325ad4e62d0fcbfd347d2bbfb21541
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-10-11 23:17:18 +02:00
Thiago Macieira
184717e3a7 dbus_minimal_p.h: copy the libdbus-1 copyright to the top
See qt_attributions.json too.

Pick-to: 6.4
Fixes: QTBUG-107128
Change-Id: I810d70e579eb4e2c8e45fffd1719fbf448154abf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-10-10 11:19:55 -07:00
Ahmad Samir
394b4c9e49 QDBusMarshaller: ignore false-positive -Wformat-overflow gcc warning
Change-Id: Icd5d21ec7ebd16476a1070a18ac618b87575d5f6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-10-08 16:51:14 +02:00