This allows for a shared version of Qt and linking against static
version of OpenSSL.
Tested and reported by Yuhang Zhao.
Change-Id: I8af8ad5eb698f719aae644ce1fcf12d2a78cdb31
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
In the presence of QT_CONFIG(opensslv30).
Fixes: QTBUG-107027
Change-Id: I481db3cdf3bbb1aa7127cc5498f0c0217df8c35b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Qt6's minimum supported platform is Win10 1809, and all pre-Win10
code have already been removed from QtBase long time ago.
These code are trying to support Windows 7 to Windows 8.1, which
nowadays become legacy code and should be removed.
Pick-to: 6.4
Change-Id: I21a979d32d99977107964bccc06fdec7b38cd727
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Use HiliteMenuItem() can do the same thing but code less.
Change-Id: I53510668a9bed25bdb7db8a0225a165322b8959c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
F16C is an Ivy Bridge (third generation Intel Core), not Haswell (fourth
generation). This allows compiling with -march=native on Ivy Bridge and
equivalent systems.
Fixes: QTBUG-107072
Pick-to: 6.4
Change-Id: I810d70e579eb4e2c8e45fffd171962f8a8d2bbb1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Orca only accepts string or list type for
object:property-change:accessible-name events. This fixes
NameChanged not being announced by Orca.
Pick-to: 6.4 6.2
Change-Id: Ib30fed94aad70b98400deec5e31630b4f8c22e26
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This introduces a way to trace each entry in the glyph index
array to a specific index in the original text passed to
QTextLayout, as well as a convenience function to access
the original string from the QGlyphRun.
The index information is stored in the logClusters array internally
in Qt, but it contains the inverse information: For each
character in the output string, it contains an index into the
glyph array. In order to get the string indexes for each glyph,
which makes a lot more sense in the context of the QGlyphRun
API, we need to do a little search to construct the data.
To avoid adding unnecessary allocations, we make the new APIs
opt-in. If you do not specify anything, you will only get the
glyph indexes and glyph positions as before. However, you
can now specify exactly which parts of the layout to extract
using an optional flags parameter.
This also adds a manual test which can be very handy to
visualize QTextLayouts and how they are split into QGlyphRuns.
Fixes: QTBUG-103932
Change-Id: Ie4288fff338b9482aba0aba29fc7e1e59fa60900
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
The keyboardAutoRepeatRate() function returning an int assumes
the rate can not be lower than one event per second, but this
is not always the case, e.g. on macOS where the slowest setting
for key repeat results in a two second delay between events.
Change-Id: I806fb57883ce0085c835fb0a43d6b86bd6da375a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The KeyboardAutoRepeatRate is unfortunately exposed in QStyleHints as
an int, so any rate below 1 event per second will not be reflected
accurately.
Pick-to: 6.2 6.4
Change-Id: I506762545a1838cf007320e73827def006f5f0c2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We were getting the appearance (light/dark) through the traitCollection
of the UIWindow's rootViewController. It looks like this does not
report the correct value when the appearance changes through
System Settings.
If we get it directly from the UIWindow's traitCollection property,
it works as it should. Also, in traitCollectionDidChange: we are
checking for changes in the traitCollection of the UIWindow's, not
of the viewController's.
Change-Id: I437e6922b268fd0069d80557a1034391ed52644b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
After switching qtbase to use the syncqt tool (in
b89d63515b), these OpenGL specific
headers aren't available at all, when the build is configured
to not use OpenGL.
In one case, add a missing check for QT_NO_OPENGL, and in another
case, include the necessary <QtGui/qtgui-config.h> header to
make the potential QT_NO_OPENGL define available, to make a
preexisting ifdef actually do what it was meant to do.
Change-Id: Ie12deff2eee8e3b59193175551fbb28b7480f1f8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Given a QTaggedPointer, users may write
taggedPtr = {};
to mean "reset it". This is error-prone: due to overload resolution,
this actually ends up calling QTaggedPointer<T>::operator=(T *),
which changes the pointer but *not* the tag, and not the implicitly
declared QTaggedPointer<T>:operator=(const QTaggedPointer<T> &)
which would reset both pointer and tag.
Given the idiomatic usage of {} is indeed to perform a full reset (cf.
std::exchange(obj, {}), std::take, etc.), work around this by disabling
the operator= overload for pointers in case an initializer list is
passed. In other words, make `={}` fall back to the implicitly
declared overload.
Note, this breaks some usages, such as
taggedPtr = {rawPtr};
but at least we get a compile error for these, and they don't look
common at all.
[ChangeLog][QtCore][QTaggedPointer] The operator assignment
taking a raw pointer has been reimplemented in order to avoid
subtle issues when assigning `{}` to a QTaggedPointer. This will
cause code that assigns a braced-init-list to a QTaggedPointer object
to stop compiling (for instance, `tagPtr = {ptr}` is now ill-formed).
Change-Id: I5e572a9b0f119ddb2df17f1797934933dff2ba7b
Task-number: QTBUG-106070
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QDateTime] The 't' format character in a
toString() template can now be repeated to get alternatives to the
(unparseable) zone abbreviation. Thus 'tt' now gets the zone offset
without colon, [+-]hhmm; 'ttt' gets the same with colon, [+-]hh:mm,
and 'tttt' gets the zone name. Previously, each 't' was replaced by
another copy of the abbreviation.
Task-number: QTBUG-95966
Change-Id: Iccccd11f06fa732ed27c0e5d4e40a3d4b5f79f8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
[ChangeLog][QtCore][QDateTime] The 't' format used in fromString() can
now be repeated to restrict parsing to particular forms. Thus 'tt' now
matches the [+-]hhmm offset format (no colon), 'ttt' the [+-]hh:mm
offset format (with colon), and 'tttt' matches an actual zone
name. When used singly, 't' still matches anything the parser knows
how to interpret as a zone specifier.
[ChangeLog][QtCore][QLocale] The 't' format in toDateTime() now has
repeated forms, as for QDateTime::fromString().
Task-number: QTBUG-95966
Change-Id: I73753145cb66a56bc25a5c2dd5cb051ba982fa2c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Otherwise, qmake won't work if the host Qt was built with custom
INSTALL_BINDIR and friends.
Pick-to: 6.4
Task-number: QTBUG-106712
Change-Id: I436103efc21f245cc220f4706adcab369feba836
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The placeholder text was given its own QPalette color role in Qt 5.12,
but there has been no way to specify it from a Qt style sheet.
Fixes: QTBUG-93009
Change-Id: If58ca844c19c65b7eee14c6d5730a4ba27640c33
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Although the code is legal in C++20 (due to the new CTAD rules for
alias templates), clang-cl errors out on it. Just specify the template
parameter, which we know anyways.
Change-Id: Ifdea31853d4281601cf40ed8adeb14e493a5ce04
Pick-to: 6.4
Fixes: QTBUG-107043
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
It was our old, HP-UX machine on Itanium (ran on big-endian mode). We
don't support HP-UX any more; HP will still support the 11i v3 release
until 2025, but I doubt anyone wants to run any new software there. One
hopes that HP has long since fixed the issue, but I doubt it since the
last release is from 2007. Gravlaks probably ran HP-UX 11i v3.
There are a couple other left-overs of ".troll.no" in the repository,
the majority of which are URL manipulation in tst_qurl.cpp and in
tst_qnetworkcookie.cpp, then the certificates for fluke.troll.no (valid
until 2035) and aspiriniks.troll.no (expired in 2009, but we don't need
it for validity).
Change-Id: I810d70e579eb4e2c8e45fffd1719122747d7b85a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@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>
QODBCResult::isNull() incorrectly checked for the validity of the
internal row cache which lead to wrong results when the requested
column was not yet cached.
Pick-to: 6.4 6.2 5.15
Change-Id: Ic7dcc2117e6f05b63c83f21c6a84ba7e0bda2b2d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
qExchange is one of the few remaining functionalities that have not been
moved out of qglobal. Given that std::exchange exists in the standard, we
can simply move to it everywhere...
...if it weren't for the fact that std::exchange is only constexpr in
C++20, and only has its noexceptness specified in (most likely) C++23.
Still, we want to move to the existing std functionality where
possible, to allow the removal of qglobal includes in lieu of something
more fine-grained in the future.
So leave any constexpr calls[1] alone for now (and observe that none of
our current usages cares about the conditional noexceptness), but
replace everything else.
[1] QScopedValueRollback' ctor and QExplicitlySharedDataPointerV2::take
Task-number: QTBUG-99313
Change-Id: I599cb9846cf319c7ffd3457130938347a75aad25
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The mentioned variable in the configure note is qmake only and not used
anymore. Also, it seems pointless to show such a note on successful
configuration.
FindOpenSSL.cmake of CMake already takes care of library names of
different OpenSSL installations.
Task-number: QTBUG-93948
Change-Id: I5994df231ed4fd664f6ab17b983e88c744feb21a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Pre-requisite for a fix for qHash. The classes inherits from QString
and after the upcoming fix their single-arg qHash overload is no longer
preferred since we want to use a seed. This has been the case since
Qt 5.
Pick-to: 6.2 6.4
Change-Id: I6e8601ab8d591742e2399d10521dec8cfa46f71a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
This also affects things like line breaks, effectively preventing the paste of copied text to non-Qt applications.
This reverts commit 17eb0f2d8a.
[ChangeLog][QtGui][Drag&Drop] The fix to preserve special characters
like the text/plain part of the clipboard when copied from
a QTextEdit or QLineEdit had to be reverted (QTBUG-107004).
Pick-to: 6.4
Fixes: QTBUG-107004
Change-Id: Ia226f38f31a368c381910e1d43b6422395a5744f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@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>
The target_qt.conf file contained a wrong HostData value if the
effective data dirs were set to paths of different levels in the host
and target Qt builds. Fix this by computing the relative path from the
mkspec dir's parent to the ext prefix' data dir.
Note that qmake's HostData dir is the root directory of the mkspecs
directory.
Pick-to: 6.4
Task-number: QTBUG-106712
Change-Id: Id8c9de925f5ff51901677b7218621747169a5cec
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Wasm doesn't play well with these baseline tests in general,
so we can disable them for now.
Pick-to: 6.4
Change-Id: I5a66a932449c8934d88b94e419aae5ddcc89ee78
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Introduce UseCredentialsAttribute that indicates whether
the underlying fetch/XMLHttpRequest should use credentials
https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials
Fixes: QTBUG-90893
Change-Id: I2c43e286db52df387c0a22737d027b9a2a8dd2d3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The define has always been set, so we can simplify all the code that
checked for it.
Change-Id: I9133ba95dbd6e1da465ade1d1306310bd3fb9a45
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
C++11 atomics should be available everywhere, even it bootstrapped
builds. This will allow further simplificattions.
Task-number: QTBUG-103847
Change-Id: Ic8aaec5667ef7616a6aa1f0dfc2f64d327308501
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
In some OSes, the function takes a plain void*.
Pick-to: 6.4
Fixes: QTBUG-106980
Change-Id: I810d70e579eb4e2c8e45fffd1718bdaf94d8ac0e
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Pre-requisite for a fix for qHash. The Qt50String inherits from QString
and becomes ambiguous once it no longer goes through a catch-all
template function because qHash(QString, size_t) has a better match for
the second argument.
Pick-to: 6.2 6.4
Change-Id: I23c7afb1b3aa167d40dc4838e82b7763de015f6b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
IDEs (vscode) have problems with missing includes.
Change-Id: I2618aaaf79c81a2c3566682e13caf31133ece631
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This fixes loading plugins on Windows on ARM
since 892d5607d0.
IMAGE_FILE_MACHINE_ARM was used for older Windows targets on ARM,
in particular Windows CE.
Pick-to: 6.4 6.3
Change-Id: I61ef7a6b5920af9192c55209f2641a6c469ad1d2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
To indicate success of a conversion, the public API has previously only
supported registering member functions of the form To (From::*)(bool *).
When adding custom converters for types that cannot be modified, this is
usually not a possibility.
As an alternative, this patch adds support for std::optional in the
UnaryFunction overload of QMetaType::registerConverter. If the returned
optional has no value, the conversion is considered failed.
Task-number: QTBUG-92902
Change-Id: Ibac52d2cb9b5a2457081b4bebb0def1f03e3c55d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>