when configuring for the first time.
Also mention how to increase output verbosity.
Unfortunately there is no way to check what is the current log
verbosity to only show the latter message conditionally.
Setting --log-level does not assign the same value to
CMAKE_MESSAGE_LOG_LEVEL.
Amends e2a0ddbb69
Pick-to: 6.2 6.3
Change-Id: I22101b9dc7c407cc54aa5e7964dec50c7490f8f5
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
- Replaced QLatin1String with QLatin1StringView in QString/QLatin1String
APIs and docs (except for QLatin1String class declaration and ctor
names).
- Made the docs look like QLatin1StringView is "The Real Thing".
[ChangeLog][QtCore] Made QLatin1StringView the recommended name for
referring to a Latin-1 string view (instead of QLatin1String).
Task-number: QTBUG-98434
Change-Id: I6d9a85cc956c6da0c910ad7d23be7956e4bd94ac
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Ensures we get a modicum of testing of the Qt7 32-bit code in.
Change-Id: I0838e4340265e19ab2b17a1a91a11ef5f9948893
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
With the public interface ported to QAnyStringView, we can now
internally optimize memory allocations _in a central place_ (e.g. by
returning std::u16string or QVarLengthArray<QChar> from normalizeKey()
instead of QString). But first we needed to get rid of all the
unwarranted allocations in user code.
Effects on Linux AMD64 stripped C++20 release builds:
GCC 11.2 libstdc++ (TEXT -= 6.5%):
text data bss dec hex filename
635148 10992 2824 648964 9e704 tst_qsettings-01-baseline
593691 10992 2824 607507 94513 tst_qsettings-02-qanystringview
Clang 10.0.0 libc++ (TEXT -= 11.6%(!)):
text data bss dec hex filename
790336 10640 2832 803808 c43e0 tst_qsettings-01-baseline
698572 10640 2832 712044 add6c tst_qsettings-02-qanystringview
That's the beauty of QAnyStringView: transparently reducing temporary
QString creation; and the simplest code is also the most efficient.
[ChangeLog][QtCore][QSettings] Keys can now be passed as
QAnyStringView (was: QString). The most efficient way to pass literal
keys is now "key"_L1, the backwards-compatible way is
QStringLiteral("key").
Fixes: QTBUG-101390
Change-Id: I510fb4ce17ef109dac7c9cdc5d90ede0d1a9db5f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Native dialogs on macOS haven't shown a title bar since macOS 10.11.
The caption string passed in might not be visible to the end user, which
can be problematic for certain applications that use the title text to
provide context to the user.
Pick-to: 6.3 6.2 5.15
Task-number: QTBUG-59805
Change-Id: I3a1cea8f11a62c0927a9ba00159a118e2b078956
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
The test is very flaky on Windows 11. Make sure that we have a secondary
window to close before proceeding, and wait for fade effects to finish,
otherwise we might never get the leave event from the windowing system.
Also replace a QVERIFY(qWaitFor) construct with a simple QTRY_VERIFY.
With these changes, a local run of 20 repeats of this test on a stressed
VM improves from 75% to 100%.
Pick-to: 6.3 6.2
Fixes: QTBUG-98477
Change-Id: Iedcc175b336e3cab23817b954aba1736d02f1b9d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
If libjpeg has detected a fatal error, wait until after the longjmp to
report the error using qCWarning(), as some compilers don't like that
happening before the stack has been restored.
Also avoids code duplication.
Fixes: QTBUG-100821
Pick-to: 6.3 6.2
Change-Id: I8d0e6e1bcc4f2a85dae06b3879453ee9077288c0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
... along with how QtTest soon shall be using it.
Change-Id: I9c723ebdb8ee5be1c4152aa911ae7c846ea61b5c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
We only need to look at the first byte to determine whether the length
is > 0; no need to count how many more bytes after it aren't '\0'.
Change-Id: Id2db2a9a993086c0aee02c99396fcb346b1a348e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
When a B?Fail's description doesn't match the QVERIFY/QCOMPARE
regexes, it got output as a comment in the YAML block after the test
line had already reported it as a TODO comment. An empty description
would also have lead to an empty comment in the YAML block. Condition
this fallback output case on there being a description that hasn't yet
been reported in the test line.
Task-number: QTBUG-96844
Change-Id: Id7fe81d26ddb01da3d8003ada8fa590a5e1a166f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
In all places but one they were treated the same; fix that last one to
match the rest. This removes one line from the YAML block for each
blacklisted XFail test; in each case, this message duplicates the one
on its "not ok ... # TODO..." test line.
Change-Id: Iff2028afccd979db7f2c84e85d1b78541900008e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reorder the different formats to match the order in the help output
and include missing entries from the list of formats supported by the
-o filename,format variant.
Change-Id: I884f9facc7cfde7cec0bee75944efdd72d66a83e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Provide basic (internal) documentation of each logging class and link
the command-line documentation to pages relevant to the formats not
defined by Qt.
Change-Id: I3251dd1304203c6ab87dfe1f2dec0e9787ab69f8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Codechecker complains about passing a forwarding reference to std::move,
which may unexpectedly cause lvalues to be moved. We should use
std::forward instead.
This amends cbf8fc0ac4
Change-Id: Ieba9e960b5dfb448e9cebabe9541967698995b8f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Also, use the global include snippets for the 'Using the Module'
section.
Task-number: QTBUG-100369
Pick-to: 6.3
Change-Id: Ib9e32dd48689879c91c7c307f8cf0f01dc478efe
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Fix indentation of a function declaration.
Pick-to: 6.3 6.3.0
Change-Id: Ib2aed12f2549e4b0ee5ee21a59c2c7b9db726a7e
Reviewed-by: Toni Saario <toni.saario@qt.io>
GCC 11 knows about it, meaning __has_attribute(retain) = 1 regardless of
whether GCC can emit code for it. Clang has a similar limitation.
See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99587
Fixes: QTBUG-101753
Change-Id: Ic30914a4448d4bc28974fffd16dce9a78cdefe5b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Network autotests cannot connect to services on docker containers from
QNX qemu without all ports explicitly defined (both host and container)
side.
Pick-to: 6.2 6.3
Task-number: QTQAINFRA-4684
Change-Id: Iba44cfa17d42d43ecec3e29985e404f75d5fc232
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
QtCopyFileIfDifferent needs to be both installed and copied to a build
folder as a public CMake helper. Otherwise it's not found when building
tests inside the Qt build tree.
Pick-to: 6.2 6.3
Fixes: QTBUG-101916
Change-Id: I8d081e594fe694f528ebac4c13bbdf6d3b8402b9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QMap was a transitive include, apparently; and we have mostly
standardized on specifying the module where each include comes from.
Change-Id: I1a54db879e744120f5b10eb0b16f8ba36cde8300
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
In some situation we want to notify even if the value didn't change.
Task-number: QTBUG-101771
Pick-to: 6.2 6.3
Change-Id: I7d82a9f6e0f7d5eb48065e3f428b814939181ea8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Explicitly move the argument into the return value to silence:
qfuture_impl.h:153:20: warning: local variable 'arg' will be copied
despite being returned by name [-Wreturn-std-move]
return arg;
^~~
[...]
qfuture_impl.h:153:20: note: call 'std::move' explicitly to avoid copying
Change-Id: I49fab7c31efb7d809182c8d56e6a5ed8f05a5622
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Don't use deprecated methods in tests, and don't refer to them in
documentation.
Change-Id: I110480742d9a7b9b0a2e194e3fe610208c1e07da
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
QTabBar::setTabTextColor's documentation and implementation suggests
that the set color will always be used unless invalid, and that the
foreground role is used otherwise. QTabBar then sets the foregroundRole
palette entry to the specified color before calling the style. The intent
is evidently that the tabTextColor is used no matter the foregroundRole
(which by default is the role that contrasts with the background role).
If the styles always paint the text with WindowText, then the tabTextColor
gets ignored if the foregroundRole is not WindowText (perhaps because
the backgroundRole is set to Base).
Fix this by respecting the widget's foregroundRole when painting the tab
label in the common style (which is the only style that implements
drawControl for CE_TabBarTabLabel). QMacStyle and QStyleSheetStyle
need to be adjusted to prepare the palette consistently with the logic
in QTabBar.
Pick-to: 6.3 6.2
Fixes: QTBUG-101456
Change-Id: I077a2034eebfe3f56cea28917494f4db01e48747
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
This has performance benefits when doing comparisons.
The check is only performed at compile time.
Task-number: QTBUG-101014
Change-Id: I55694b045fe5e75d9671d0a3a70c80d998cf98c8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Some autotest CMakeLists.txts need to know whether the target is webOS.
This change enables that.
Task-number: QTBUG-101933
Pick-to: 6.3
Change-Id: I7b4ebe89622a4ad8bc313e807d9fa50152c96d14
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The last 32 timer that could overflow was not used anymore since Qt 5.9,
see also commit aaa3184f8d. This appends commit aaa3184f8d.
Pick-to: 6.3 6.2 5.15
Change-Id: If033a5fa7a58427bcbc643cc19fc73a8dd36a169
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add common function that unifies the check for the DEPFILE support.
Update the check according to the recent CMake version.
Task-number: QTBUG-99354
Change-Id: Ia2abf46fe3a9a3d17ea7a37eaf6c9c6a697c5b84
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Building with Apple clang 13.1.6.13160021 (from command line tools 13.3)
results in
qhash.cpp:754:39: error: passing 16-byte aligned argument to 32-byte
aligned parameter 3 of 'operator()' may result in an unaligned pointer
access [-Werror,-Walign-mismatch]
hash2x32bytes(state0, state1, src, src + 1);
^
Help the compiler with deducing the right type for 'src' and 'srcend'.
Also makes 'src' const explicitly.
Change-Id: Id14a034f0fa4c2a002d9b37729d803a50a0e5e9c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The QNX raster backend worked on the assumption that child windows were
sharing their parent toplevel window buffer instead, and thus did not
have a buffer of their own. This piece of code dates back from the
BlackBerry days, and I am guessing the motivation was to tackle
mmrenderer/foreign windows.
In fact, not having buffers causes QWindow to malfunction, as
independent buffers are required.
This patch makes sure every QQnxWindow has a backing buffer, as
expected. Foreign widnows shall be dealt with via different means.
Change-Id: I059ac4f8ac684b3577048f874f82b866f21326b1
Reviewed-by: James McDonnell <jmcdonnell@blackberry.com>
Adapt to changes in QWidget::addAction API from 08e4d2db08.
Pick-to: 6.3
Change-Id: If6e05b47de88cf55070238f08b96586b855cc5c1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This is from a fix unrelated to the recent rhi-based composition
work, which means it still had to enclose the block in an ifdef
due to the variables being only present in OpenGL-enabled builds.
Now with the other patches in place, the variables are no longer
conditional, and the similar ifndef QT_NO_OPENGL checks are already
gone pretty much everywhere so the ifdef is not needed here either.
Change-Id: I497c7a4fad7cd7d8fc1a479e7032de3e2cbb3b32
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
And switch to using QLatin1StringView for bootstrap builds and Qt 7.
[ChangeLog][QtCore] Added QLatin1StringView as an alias for
QLatin1String.
Task-number: QTBUG-98434
Change-Id: Iefb860b63eb05ef4755b2e26de265e6e6e4420b3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Instead of using the overly-generic qSwap() monster, use
- qt_ptr_swap() for swapping raw pointers
- member-swap for swapping smart pointers
- std::swap() for swapping scalars
In QtCore, this has proven to give a nice reduction in compile time
for Qt users, cf. b1b0c2970e.
Pick-to: 6.3 6.2
Task-number: QTBUG-97601
Change-Id: I987ff95e8751a22a4f283655d8225dd16de21178
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The underscore symbol prefix is only used on 32 bit x86, not on
other 32 bit architectures such as arm.
Change-Id: Iac82f2d70c8b0c811faa7af5b59805b388b0a00c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This was lost when QtCore, QtGui and QtWidgets were split up. Restored
now via a virtual function on QObjectPrivate.
Chose to return std::string instead of QString or QByteArray because
its SSO is usually sufficient to hold these flag strings.
[ChangeLog][QtCore][QObject] Restored printing of Qt3-style
information from dumpObjectTree().
[ChangeLog][QtWidgets][QWidget] Restored printing of Qt3-style
information from QWidget::dumpObjectTree().
Fixes: QTBUG-101732
Change-Id: I39ff5728ea5f5abbdbf81b5d7e13b8d16b6ee8b7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>