The autogenerated list of overviews was adding the \group command which
included all the groups instead of overviews.
The idea here is to categorize the overviews later on once we have
the list of all overviews.
Task-number: QTBUG-114762
Pick-to: 6.5 6.6
Change-Id: I3cf53886be277abc86b5ec54d399cd6933fbe882
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
It's clean now, keep it as such.
Enabling it for QtCore is still OK, because it just hides a function
template declared in a header.
Change-Id: I8e7dfae179732ba04241a6a3258c2d722e8259df
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
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>
This would allow to emit parser-related diagnostics
from tools like qdbusxml2cpp. Also such tools could
stop processing if there were parse errors.
Task-number: QTBUG-2597
Change-Id: I573296bb57613d5a443b8c4dbe645b7e82f65adc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
Add an abstract class QDBusIntrospection::DiagnosticsReporter
for reporting errors and warnings. Extend QDBusXmlParser
to accept optional diagnostics reporter and use it when
available.
Report unexpected elements as warnings and the rest of
problems as errors.
This will allow tools like qdbusxml2cpp to show parsing
diagnostics using a custom format.
While at it, s/D-BUS/D-Bus/a
Task-number: QTBUG-2597
Change-Id: Ibec3f5f282cf717d1127eb64c82b4fc695f14a74
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add source location to the introspection structs so
that errors and warning produced by qdbusxml2cpp can
be related to the source location.
Task-number: QTBUG-2597
Change-Id: I9a6ada45f9c0357dbfb846f13789c5f261e59d55
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
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>
... 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>
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>
The code is commented out since 12 years ago.
Change-Id: I5cd7380f8f1e778ea62b510aeece1aced111d662
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
\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>
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>
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>
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>
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>
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>
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>
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>