Causes newlines between lines in the output:
QtBluetooth: WARNING: adapter1_bluez5_p.h does not have the "We mean
it." warning
QtBluetooth: WARNING: battery1_p.h does not have the "We mean it."
warning
QtBluetooth: WARNING: device1_bluez5_p.h does not have the "We mean it."
warning
Change-Id: I810d70e579eb4e2c8e45fffd1719b415dd74ee43
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Add the -warningsAreErrors command line argument to syncqt.cpp that
causes a fail at build step if any of header files doesn't fit the
syncqt standards. The argument reflects the WARNIGS_ARE_ERRORS CMake
variable state.
Output the syncqt.cpp warnings at configure time.
Fix the faulty positive IncludeChecks failure flag.
Task-number: QTBUG-107088
Change-Id: Id30af4c7b78fd44c1c99c7e9306965d03a0f992d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Skip sanity checks if a -help option is detected.
Otherwise, syncqt bails out with e.g.
You need to specify either -headers or -all option.
Change-Id: I49eee48cd1825244cb6d04152734cb0dfa03fc5f
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
I got build-time errors for memcpy() not being declared, that
helpfully told me to #include <cstring> to get it.
Change-Id: I6ae9e881e5accf496e9c3694ca43701972d64722
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Addressing a comment from the review of QTBUG-98434.
Drop the exta QString() call, it is unnecessary.
Task-number: QTBUG-103100
Change-Id: I5a13deb5d3c52166919302bc4bb45bd0b6b5c770
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Addressing a comment from the review of QTBUG-98434.
Instead of assigning an initial value to the QString, create an empty
QString first and then append to the QString.
Task-number: QTBUG-103100
Change-Id: I8f2569ac2a2203e6459bbc7df789c9ef34f598d0
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Addressing some comments from the review of QTBUG-98434.
Fix the mismatches between string types and string literals.
Task-number: QTBUG-103100
Change-Id: Id619d7b99b9133c983f31ec5a5c2d9cc9d927416
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The fix for QTBUG-39177 was to append Qt's bin dir to PATH. But if we
have a Qt bin dir in PATH that is different from the one windeployqt
belongs to, then we end up calling qtpaths from the former Qt.
Change-Id: I373a3270d1ec950479049b4cdaf0ff13dd8813c7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Use QDir::listSeparator() for additional entries in PATH instead of the
hard-coded semicolon. This is a preparation for running windeployqt on
non-Windows platforms.
Change-Id: I84f1da130508da7a0f3190d811acf35477564bf7
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
syncqt.pl adds an extra dependency on perl when building Qt. Modern C++
provides the convenient cross-platform way to access a filesystem and
to use regular expressions, so we may replace the perl script with C++
application. The syncqt executable is built at configure time and
installed as QtCore tool. It's running at configure time to deliver the
required header files for IDE to build a consistent code model and at
the build time to keep tracking changes in header files and generate
the missing aliases without reconfiguring. 'syncqt' only parses header
files from a CMake build tree, so the resulting Qt installation only
contains interfacing headers that belong to the platform that Qt is
built for. 'sync.profile' files are not used as the 'source of truth'
for sync qt procedure anymore, all the necessary information is taken
from either CMake files at configure time or from the module header
files while parsing them.
syncqt.pl is still in place since it's required as fallback solution
for a smooth transition to the new syncqt implementation for all qt
repositories.
This patchset only enables the C++ based syncqt for 'qtbase'
repository.
From the performance perspective C++ version works faster then perl
script, also the configure time is reduced significally on subsequent
reconfigurations - up x2 times faster when re-configuring repository,
but it also takes time to compile the tool itself the first time.
Numbers for qtbase:
syncqt.pl syncqt.cpp
initial: 0m16,035s 0m20,413s
reconfig: 0m6,819s 0m3,725s
The syncing procedure can be run separately for each module using
<ModuleName>_sync_headers targets. The 'sync_headers' target can be
used to sync all the modules at once.
Task-number: QTBUG-87480
Task-number: QTBUG-103196
Change-Id: I8c938bcaf88a8713b39bbfd66d9e7ef12b2c3523
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Scanning of the Qml imports should be run if either Qml root paths or
.qrc files are specified for androiddeployqt.
Task-number: QTBUG-106939
Pick-to: 6.2 6.4
Change-Id: I3229ec6d3f2ac17ef751b4a6ed74e8e98db7465e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This improves moc's support for nested inline namespaces, so that code
containing them will not break compilation.
For simplicity, we allow nested inline namespaces even in C++17 mode
(the actual C++ compiler will reject the code anyway, and probably with
a better error message than moc could output).
moc still has no real awareness how inline namespaces work, but that is
a preexisting issue.
Pick-to: 6.4 6.2
Fixes: QTBUG-106920
Change-Id: I7b415a99133575f101bc81d01d4670a5f752917f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Addressing a comment from the review of QTBUG-98434. Instead of
creating a QL1SV from the concatenation, create the QL1SV first and
concatenate after, using QStringBuilder.
Task-number: QTBUG-103100
Change-Id: Ic082da410db15dd9e2c341711c24150d7a0dc0c2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit addresses a comment from the review of QTBUG-98434.
Drop the extra QString(), .arg can be called on _L1 as well.
Task-number: QTBUG-103100
Change-Id: I4891d42536f6ea413464bea78de4b82aa6363a11
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Noticed during the review of QTBUG-98434. The variable includeGuard is
a QString, that is converted into a Latin1 string and then converted
back to QString. Remove these unnecessary lines.
Task-number: QTBUG-103100
Change-Id: I335d49ef990cb6de24031be380b5c2c7e12e961e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Addressing some remarks made during the review of QTBUG-98434.
Fix the mismatches between strings and string literals.
Task-number: QTBUG-103100
Change-Id: I3a7d2574f55fcffa81b8c87fb510aba0a8853330
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
We already have:
a, a timeout as part of QtTest. By default it lets each test function
run for 5 minutes. This timeout can be configured using
QTEST_FUNCTION_TIMEOUT.
b, maxTimeBetweenOutput in the CI. The CI will kill the process if too
much time passes between individual output lines of a test.
c, maxTimeInSeconds in the CI. This does exactly the same as the
androidtestrunner timeout.
The CI timeouts can be centrally tuned per platform and Qt module. This
is preferable over a special timeout just for android.
As other people may be using androidtestrunner for unrelated projects,
don't delete the timeout, but simply disable it from CMake by setting
it to -1.
Task-number: QTBUG-106479
Task-number: QTBUG-101596
Task-number: QTBUG-100242
Change-Id: If4ce00948e204182bb12ac4859d3b0dd193de7ad
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Historically, resource imports were generated as "import file_rc",
however, pyside6-project generates files by prepending "rc_". Add an
option to flip this.
Pick-to: 6.4
Change-Id: Iee0f161cb2101c8080bd131a6401bbaf4682186d
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
While working on QTBUG-98434 some improvements for the pre-existing
code were found during the code review.
The first parameter is the base of the QString created by the
function but it is not needed as an actual QString, it is just
appended to. Change the type from QString to QL1SV.
Task-number: QTBUG-103100
Change-Id: I8042a921628e84d951dcfd2fd12154bf74dd5162
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
As a potential improvement discovered while working on QTBUG-98434,
replace the current comparison in toBool with QString::compare.
Task-number: QTBUG-103100
Change-Id: If5482adeea1537d24a97a4dda2d27ecc3b12b5bf
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
While working on QTBUG-98434 some potential improvements were
found in the pre-existing code.
Some of the QLatin1String literals are used to initialize
QStrings or are converted to QStrings and so it makes sense to
replace them with QString literals.
As a related change, change the type of namespaceDelimitier from
QString to QL1SV, since it is used only for a function call and
that function has an overload to take QL1SV.
Task-number: QTBUG-103100
Change-Id: I56db6ddd84ad2a7133a765bb49ecd8f962ac5c13
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
While working on QTBUG-98434 some potential improvements were found
for pre-existing issues, for example some variables were wrongly
initialized. Fix the mismatches between QString/QLatin1StringView.
Task-number: QTBUG-103100
Change-Id: Ib120452fe8012cda3f9becea8f9837efc38cf199
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
The indentation is only required for C++.
Pick-to: 6.4 6.3 6.2
Change-Id: Ie861b12ba262fd56995c11d883129bafd11eface
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This reverts commit 756c65d367.
"justified_worry" is an incorrect workaround which attempted to silence
tracegen when invalid types were being used. This caused Qt to compile,
but with broken/invalid tracepoints.
The proper solution involves fixing the tracepoints in question.
Change-Id: I96de254944f0367808527d215e87a5d66bb442f4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
qdbusxml2cpp has a -m/--moc option. Change and modify the behavior
such that
-p foo -m includes moc_foo.cpp in the generated .cpp
-p :foo.cpp includes moc_foo.cpp in the generated .cpp
-p foo.h:foo.cpp includes moc_foo.cpp in the generated .cpp
Change the Qt6DbusMacros.cmake file accordingly.
[ChangeLog][qdbusxml2cpp] The -m/--moc option now generates
idiomatic moc file names (moc_base.cpp for headers, base.moc
for implementation files)(was: always base.moc). Build systems
using workarounds for the non-idiomatic naming of moc files
used by qdbusxml2cpp in the past can now drop these workarounds
for Qt versions >= 6.5.
Fixes: QTBUG-103313
Change-Id: I754b1b276f130cb8645166470e1b457a676590f7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
QRegularExpression::isValid returns true on default constructed objects,
so the filter was always matching even though it was not meant to be
applied at all.
Fix this by checking that there is a non-empty pattern string set and
applying the filter only then.
Fixes: QTBUG-87764
Pick-to: 6.4
Change-Id: If37f8abaecacba3dc6f0b14da681a6e025367c10
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
A couple of variables contained "Destianation" instead of "Destination"
Change-Id: I98a15652347d1b0dad640bc49925ec296830147b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Fixes deploying libgcc, currently it fails to change the rpaths with the
following error:
ERROR: Could not parse otool output line:
"\t/usr/local/opt/gcc/lib/gcc/11/libgcc_s.1.1.dylib
(compatibility version 1.0.0, current version 1.1.0, reexport)"
Pick-to: 6.3 6.4
Change-Id: I5c866a375f88e3b222cbdbebc167b04174f753b2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since we had code to default to zstd as the default algorithm instead of
"Best", we ended up not compressing anything.
[ChangeLog][rcc] Fixed a bug that caused rcc not to compress files with
any compression algorithm if the --no-zstd option was present.
Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-106012
Change-Id: Ic6547f8247454b47baa8fffd170fddae429f82d2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Unifies our approach to calling CoInitializeEx and CoUninitialize,
removing a lot of boilerplate in the process, and also fixes a few
bugs where we would incorrectly balance our calls to CoInitializeEx
and CoUninitialize.
The optimistic approach of qfilesystemengine_win.cpp of calling
CoCreateInstance without initializing the COM library explicitly
has been removed, as calling CoInitializeEx should be a noop in
the situation where it's already been loaded.
Change-Id: I9e2ec101678c2ebb9946504b5e8034e58f1bb56a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Before, we added the preprocessor define QT_RELOCATABLE if the
relocatable feature was set and checked for the define in the source
code. This indirection is unnecessary.
Also, widen the scope of the feature check to avoid some unnecessary
code.
Change-Id: Ib5f38bf310699d528efdd24edbf14b861bf33935
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Inline the data members into the only remaining user (qdir.cpp) and
remove the class.
As a drive-by, fix the non-idiomatic use of QT_BUILD_CORE_LIB to mean
!QT_BOOTSTRAPPED and apply the guard consistently to the declaration,
too.
Pick-to: 6.4 6.3 6.2
Fixes: QTBUG-105747
Change-Id: If2c780dd96e2a2e331cabdc42fd920874e7737b0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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 c62f717226 .
[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>
Some lines were suggesting the method name as context, while most of the
others were the parameter or property name.
Pick-to: 6.4
Change-Id: Ie4bb662dcb274440ab8bfffd1709c0a71abc27dc
Reviewed-by: David Faure <david.faure@kdab.com>
Currently, arguments passed to the app through applicationArguments
extra bundle treat every space as an argument separator. This then
doesn't handle the case where an argument is a space separated quoted
multi-word. This is more apparent when androidtestrunner is passing
test arguments to the app where an argument can be a test case with
a data tag that contains a space, which then is treated as two separate
tag names.
This change makes sure that androidtestrunner quotes each argument,
and the app doesn't split the arguments list by spaces, but rather
passed the argument string directly to c++ where
QProcess::splitCommand() is used to get the correct set of arguments
that will be passed to main().
Pick-to: 6.4 6.3 6.2
Task-number: QTBUG-104730
Change-Id: I45d8ca979d90f2a383c84623f0eb2eec29bba727
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This is required to make the header file self-contained from the
syncqt procedure point of view.
Change-Id: Ic32e12bc914c62b907bbc75909d9b4e26994d696
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
For now qassert.h is included in the middle of qglobal.h, since some of
the code below needs it, but this will be cleaned up when that code is
moved in its own header.
Task-number: QTBUG-99313
Change-Id: I2cdfed44f5c8772c1dad4797cf8edc6cb4c964b4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This avoids having to rely on moc precalculating everything and getting
its sums right, as the main integer table only has a string index
(unlike my original 5.0 plan which would have stored the offset).
For example, for:
struct Object : QObject { Q_OBJECT signals: void changed(const QVariant &v); }
moc now generates:
struct qt_meta_stringdata_Object_t {};
static constexpr auto qt_meta_stringdata_Object = QtMocHelpers::stringData(
"Object",
"foobar",
"",
"v"
);
Notes on the implementation:
* the old code is retained because we need moc 6.5 to generate code
compatible with QtCore 6.2-6.4. It's marked for removal in Qt 6.9.
* the struct qt_meta_stringdata_%s_t remains because we need a
TU-specific type for QtPrivate::is_complete (via
qt_incomplete_metaTypeArray). This can be cleaned up.
* after this change, GDB complains while loading QtCore:
warning: internal error: string "StringData<long sequence of numbers>" failed to be canonicalized
but debugging does not appear to be impacted. It's just annoying
because it shows up when QtTest detects a crash too.
Change-Id: Id0fb9ab0089845ee8843fffd16f9d5493e9bd708
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Update vk.xml to 1.3.223 and make qvkgen output the Vulkan 1.3 functions
as well.
[ChangeLog][QtGui] QVulkanFunctions and QVulkanDeviceFunctions are
updated to expose the Vulkan 1.3 API as long as the build environment's
vulkan.h is 1.3-capable.
Fixes: QTBUG-105270
Change-Id: Iabe04f0a74cdbd94efcc1869f545da058a553fed
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
We already had code to handle attributes on funtcions, but we didn't
handle them correctly for classes so far.
Fix this by simply skipping over the attribute.
Fixes: QTBUG-105310
Pick-to: 5.15 6.2 6.3 6.4
Change-Id: Ic4149f940e74820de4f2fa9540d9dc5b4e626a3a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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>
qcontainerfwd.h was relying on the forward declaration of QByteArray in
qglobal.h, so add the missing forward declaration there.
Additionally, had to move the implementations of qTzSet() and qMkTime()
to qenvironmentvariables.cpp along with environmentMutex.
Task-number: QTBUG-99313
Change-Id: I233aff305c2fedaf0a48362cc99ff2d6f6c0ee54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Commit 42d0089d44 added support
for multiple root paths. This works fine but it also added
"options->inputFileName" as fallback if nothing was provided.
The inputFileName cannot be used as root path (directory).
So let's use absolutePath() of that file.
Pick-to: 6.4 6.3 6.2
Change-Id: Id76a2cd79a82966bdac8240644b3c03ac4248066
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>