Android logs have a tag/category field in each log entry,
which currently if defined by Qt, it's being included as part
of the message and not used as a tag as it's supposed to be.
This patch fixes that behavior. If a non-default category
is defined, it will be used as a tag, otherwise the application
name is used as before.
Pick-to: 6.2
Fixes: QTBUG-94708
Change-Id: Ie56187f23a47cda6d82e14fdec7c8903d3ee40b6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Add --restrict definition, because GHS compiler doesn't support it by default
Pick-to: 6.2
Change-Id: I6766f2fe309802ad9de333edd6ed43f7a187616f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Otherwise touch pad and wheel + ctrl cause the window to be zoomed,
which is not what happens on desktop.
Pick-to: 6.2
Change-Id: Ic841b7c2ab56846db9f030abaeb9efa7d3dd4dcf
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Replace the hardcoded cpp exports with a generated one where it's
applicable.
Task-number: QTBUG-90492
Change-Id: Idc160b594987b2c765e75bd669aae851b4366282
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Change all outbound links in user-facing documentation.
* Reflow lines that exceed 100 cols as mandated by clang-format.
* Add unicode.org as a global \externalsite.
Pick-to: 6.2 6.1 5.15
Change-Id: I2ba1e434aa913e678406d62c2801f1a8b2d9e4f4
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Consider a release-only, non-framework Qt build on macOS. Building a
debug user project would fail, because qmake tried to link
against *_debug.dylib and *_debug.a libraries.
Building a debug user project that uses QtUiTools against a release-only
framework-build Qt posed the same problem. QMake tried to link against
the libQt5UiTools_debug.a, which does not exist.
Fix this by maintaining a list of library file candidates, and use the
first existing one (or just the first one if none exists). This favors
the library matching the user project's configuration but falls back to
the release version of the library if necessary.
Fixes: QTBUG-81251
Pick-to: 6.2
Change-Id: I8d641104718edb16500c6d6e3994e736fa5ddcf4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- QString/QStringView overloads were designed to be compatible for all
possible argument types, so check that it stays that way
- QString/QAnyStringView overloads have several known ambiguities that
we cannot and don't want to fix, because it would make
QAnyStringView less versatile, but at one should at least be able to
overload QString and weak-QAnyStringView.
Change-Id: I5e5ae3c96060c93bfe070f6c19213328dae9c5f9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
For flush() it's not clear what they wanted to test.
isEncrypted() is tested indirectly in many of the other tests.
Change-Id: Id6dfecbb25b7bba8f1a99518fd9c9e06280aaa9f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
If user specifies non-existing platform build fails in some non-obvious
place, since qplatfromdefs.h couldn't be found.
Add an explicit error if the defined platform folder doesn't exists in
Qt sources.
Change-Id: Id847d57a6f9cc4f463e697b474b8a669cd041fb8
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
QMutexLocker is declared in qmutex.h, which is already included.
Pick-to: 6.2
Task-number: QTBUG-94407
Change-Id: I78e0630c27ef7f85feae68e98f8cdcbe4e142cd8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Otherwise, for the first day of a negative year, we'd get an invalid
day of the week (required to be in the range 1 through 7).
This is a follow-up to commit 1f4b237dad.
Change-Id: If1afcd42065c26d5fa5799b0cd47921a3d424dc8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Ensure that Qt user projects build with sanitizer flags if Qt was
configured with any of the sanitizers enabled.
To compile Qt with sanitizer support enable any of Qt sanitizer
features.
Passing -DECM_ENABLE_SANITIZERS=address to CMake is NOT supported
anymore.
When configuring Qt using CMake directly, pass
-DFEATURE_sanitizer_address=ON
-DFEATURE_sanitizer_undefined=ON
instead of
-DECM_ENABLE_SANITIZERS=address;undefined
When configuring Qt with the configure script pass
-sanitize address -sanitize undefined
as usual.
QtConfig.cmake now records the sanitizer options that should be
enabled for all consuming projects based on the enabled Qt features.
This applies to internal Qt builds as well as well as tests an
examples.
The recorded sanitizer options are assigned to the ECM_ENABLE_SANITIZERS
variable in the directory scope where find_package(Qt6) is called.
The ECMEnableSanitizers module is included to add the necessary flags to
all targets in that directory scope or its children.
This behavior can be opted out by setting the
QT_NO_ADD_SANITIZER_OPTIONS variable in projects that use Qt and might
be handling sanitizer options differently.
Amends 7e03bc39b8
Pick-to: 6.2
Fixes: QTBUG-87989
Task-number: QTBUG-92083
Change-Id: I2e3371147277bdf8f55a39abaa34478dea4853a6
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Restores addition of 'float-divide-by-zero' to undefined sanitizer
flags as well as the custom fuzzer-no-link option.
Pick-to: 6.2
Task-number: QTBUG-87989
Change-Id: Icde1e5d31083ce1b6128ab45b0e9df5ae69736a3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
No need to check if we're running on windows 8.1 or above.
We always are.
Pick-to: 6.2
Change-Id: I9f2e7a58631064e573725705882a603e900c7e39
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
It needs to be checked at runtime to know if the current backend
supports it
Pick-to: 6.2
Change-Id: I0998309149b109e2075a008b2b8d8115fa3688cc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
With MSVC the current way we mark it (potentially) unused ends up with a
warning:
warning C4551: function call missing argument list
We require c++17 core language support so let's use [[maybe_unused]]
instead.
Pick-to: 6.2
Change-Id: I125986b729cb7cd540901702a47365f0491e7887
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
As per the best practice laid forth in RFC-8996.
TLS 1.2 was recommended from 2008 until TLS 1.3 was released in 2018.
[ChangeLog][QtNetwork][QSslSocket] TLS 1.0, 1.1 and DTLS 1.0 are now
deprecated, as recommended by RFC-8996.
Fixes: QTBUG-92880
Change-Id: I90cebcfb07cfce623af7ac9f2b66ce9d02586b54
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Since we're no longer connected, much less encrypted.
Was done in schannel backend, but not in ST or OpenSSL
Pick-to: 6.2
Change-Id: Ia49387be0088f899a0c89091f7e468dba1c0eee6
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
With the recent change, 'system' headers gone: not in the test code anymore,
so, for example OPENSSL_VERSION_NUMBER is undefined, making the test
to select a wrong code-path - 'h2c', instead of encrypted h2.
Pick-to: 6.2
Pick-to: 6.1
Change-Id: I3b201e21fac56875c9045c7463e2ae69af4c6470
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Use autogeneratedd cpp exports in the Gui module.
Task-number: QTBUG-90492
Change-Id: Ifc5d3dd138ef9f86f6003ed9adb66a9eefdd64db
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Add an option that automatically generates an export header for a Qt
module. The header contains only Q_DECL_EXPORT/Q_DECL_IMPORT related
content, so it's not a full replacement of 'global' header files.
Task-number: QTBUG-90492
Change-Id: I250d1201b11d4096b7e78e61cbf4565945fe6517
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Triggered by API review in Gerrit patch 355960.
Task-number: QTBUG-94407
Pick-to: 6.2
Change-Id: I7cafc1cc9d4b929040b53c6bf92c91d73c3b39f2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Clear the cache when cursor theme changed.
Idealy we should subscribe root window's RESOURCE_MANAGER property
to update cursor theme via Xcursor. KDE already has a daemon
KDE GTK Configurator to sync KDE settings to GTK. Then we can
register the fallback there both for KDE and GTK changes. See also
https://invent.kde.org/plasma/kde-gtk-config
Fixes: QTBUG-94538
Pick-to: 6.2 6.1 6.0 5.15
Change-Id: Ia4de30930a0dc1dc306c61e1553970c3dab67bd6
Reviewed-by: Liang Qi <liang.qi@qt.io>
We made a signal const. This does not make sense.
Task-number: QTBUG-94407
Pick-to: 6.2
Change-Id: I372da9c045ba880f8fba48399e441b53c1683e93
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Match the checks in the constructor test that are similar.
Change-Id: Ifb62af09e31aac339f001f44bc30789330c85be6
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This is a collection of SVGs provided in the process of addressing
QTBUG-38776. As of now, they are converted to PNGs or XPMs in different
resolutions, which are then built into Qt as resources that are loaded
into QIcon instances at runtime.
Task-number: QTBUG-38776
Change-Id: Ib03f82cf1b1d2dc6260845fc46ad193046aff44c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
The QCommonStyle provides explicit pixmaps for the SP_TitleBarCloseButton
and SP_TitleBarNormalButton, but never showed the "down" pixmap on macOS
because the button has no frame, so the On state flag was never set.
Set the style states so that the "down" pixmap is used on a button that
is either pressed or checked if it doesn't have a frame. Since QIcon
only has two states, use the "On" state for both pressed and checked.
Pick-to: 6.2
Task-number: QTBUG-38776
Change-Id: Ic04070196b97a4fb66d7a2669e9894fd7960230e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Found by clang 12:
qsctpsocket.cpp:172:56: error: result of comparison of constant 9223372036854775782 with expression of type 'int' is always true [-Werror,-Wtautological-constant-out-of-range-compare]
Q_ASSERT((datagramSize + int(bytesToRead)) < MaxByteArraySize);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~
Change-Id: I7246c3e7bb894e0d9521fffd168af11764956d8f
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In a Qt build that was configured with INSTALL_MKSPECSDIR set to
something different than INSTALL_DATADIR, the qmake property
QT_HOST_DATA was wrong. Consequently, mkspecs could not be loaded,
rendering qmake dysfunctional.
The reason was that we considered every QT_HOST_xxx property to have the
same value as QT_INSTALL_xxx in a non-cross build.
This is not true for QT_HOST_DATA, because users might want to set
INSTALL_DATADIR to "foo" but INSTALL_MKSPECSDIR to "bar/mkspecs".
Move the unused determination of the host data dir to the QtLibraryInfo
lib and handle QT_HOST_DATA specially.
Fixes: QTBUG-94591
Pick-to: 6.2
Change-Id: I2c44cda8405ff1d14391254fcd1d9b1361cb5855
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
- Add information about symlinks and file metadata.
- Reflow text.
- Extract text common to both overloads to a .qdocinc file
for consistency and to avoid duplication.
Pick-to: 6.2 6.1 5.15
Fixes: QTBUG-94706
Change-Id: I3c730fd63f4018a1a573bb56751fedd2270a3247
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since qt-internal-configure-tests.bat is located in the same folder as
qt-cmake.bat the relative_path_from_libexec_dir_to_bin_dir is empty.
Passing doubled backslash in the windows path causes an issue for the
cmd.exe batch interpreter. Extra backslashes are treated by %~dp0 as a
start of the relative path. The following error appears:
Could not find toolchain file:
...\install\bin\..\/../lib/cmake/Qt6/qt.toolchain.cmake
This appends an extra backslash to relative_bin_dir only if
relative_path_from_libexec_dir_to_bin_dir is not empty.
Change-Id: Id2fd6c5fa9d73060350f298262c6e93a4887eeb3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This should reduce the amount of fall-out from DST complications.
Also document the assumptions of QDateTimeParser's two fromString()
methods (and fix the punctuation on the QDateTime parameter).
Adjusted some tests to match.
Since only QDateTime-returning methods will show the difference, and
it's at least somewhat odd to be using those on QDateEdit or
QTimeEdit, this should have little impact on API users.
[ChangeLog][QtCore][Behavior Change] QDateEdit and QTimeEdit now
operate in UTC, to avoid spurious complications arising from time-zone
transitions (e.g. DST) causing the implicit other half to combine with
the part being edited to make an invalid result. Returns from their
dateTime() and other methods returning QDateTime (max/min) shall thus
be in UTC where previously they were in local time. QDateTimeEdit
continues using local time. The default can be over-ridden by
setTimeSpec(), as ever.
Change-Id: I44fece004c12342fe536bbe3048217d236fd97b2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Thanks to Giuseppe for pointing it out in API change review.
Task-number: QTBUG-94407
Pick-to: 6.2
Change-Id: I3b8fb653b5efa7ded51f81aadb35d361e7dbf19c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
QDTP's absoluteMax(), setDigit() and getDigit() simply treated
day-of-week as synonym for day-of-month.
Consequently, QDTE::stepBy() did the same.
This meant that wrapping happened at the month boundary, so would jump
within the week if it wrapped around, otherwise the up/down arrow
would "jam" at a particular day of the week when further steps would
leave the month. Instead, when wrapping, wrap round the week while
still moving the day-of-month to match, jumping back or forward a week
to stay within the month on hitting a month boundary; otherwise, stop
backwards stepping on hitting the locale-specific day of the week, or
forward stepping when the step would be to or past this first day.
Fixed various bugs found in the course of testing this.
[ChangeLog][QtWidgets][QDateTimeEdit] Corrected handling of weekdays.
Previously, changes to the week-day were simply changes to the day of
the month. Weekday fields are now handled as such: changes to them do
change the day of the month, but a change that would step past the end
(or start) of the month is adjusted to the relevant day of the nearest
week within the month. When wrapping is disabled, the locale-specific
first and last days of the week are the bounds. Formats which specify
day of week but not day of month will now preserve day of week when
changing month or year, selecting the nearest day of month that
matches.
Change-Id: I7868b000fea7a4bc17a1b5687c44bcd56d42ae90
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If QMAKE_APPLE_DEVICE_ARCHS is not set, we pick up the available archs
based on what Qt was built with (QT_ARCS), but only build the active
arch.
Pick-to: 6.2
Change-Id: I83273f878022af34a3a0d0eeae8b11d781f78c49
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
In the case of a plugin, the plugin might be unloaded, and destroy its
QGuiApplication. We don't want the screen notification handlers to outlive
the application, as that results in crashes.
Fixes: QTBUG-91919
Pick-to: 6.2 6.1 5.15
Done-with: Yang Yang
Change-Id: I3a4c0fcf97b785357516d1dac34489511400f154
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>