It is an important and useful part of the API contract that the
QFutureWatcher signals will emit complete information after
setFuture() on an already started QFuture. If that wasn't so, some
API clients would need two code paths to gather state and progress
information: one through the signals for not yet started QFutures,
and one through the state querying APIs for already started
QFutures.
The previous documentation was not precise enough to rely on, even
though the implemented behavior - cf.
QFutureInterfaceBasePrivate::connectOutputInterface() -
seems well thought out and implemented to rely on.
Pick-to: 6.3 6.2
Change-Id: Iaf3db37a851f07ac85881adaea5c83612a7fd843
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Remove a couple of unnecessary string literals that only coped with an
impossible situation (default return after a switch that cover all the
enumerators).
Add a Q_UNREACHABLE() for good measure.
Change-Id: I8065218554edf98408d9c0823b8c301932681c59
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Avoid, for years before the first rule, a whole lot of complications
needed when handling dates later than that rule's start. It is not
entirely clear the code would previously have Done The Right Thing; it
now is clear what it does.
Change-Id: I00a79c0a4733f1deb0bbfecb03e1c64a104d08a3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
While investigating an assertion failure I noticed that the existing
tests didn't even exercise these methods for local time or zone time.
Of course, we can't robustly test these time-specs, due to vagueries
of offset details and zone availability, but we can at least verify
that they return date-times on the specified date. Add a test-case for
the start of 1900, on which the assertions were first seen; it is the
earliest moment representable with tm_year >= 0, after all.
One of these tests fails on 6.2 but the fix for that (as opposed to
the the assertion) requires 6.3's improvements to the handling of
time_t's fuller range - too risky a change to pick back to 6.2.
Pick-to: 6.3
Task-number: QTBUG-99747
Change-Id: I98f5d7850a701972b2d8ea2ce203a2b3e7071354
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
When passing a directory to qmake, it tries to detect a .pro file in
that directory. Whenever the detection failed, qmake printed an error
message like "Access is denied." or "file to open is a directory".
Now, qmake prints an actually helpful error message:
***Cannot detect .pro file in directory '../foo'.
QMake expects the file '../foo/foo.pro' or exactly one .pro file in
the given directory.
Fixes: QTBUG-34673
Change-Id: I3d21ead247734172eee4eb68d3f9782d3ddaea52
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
The C API we've used so far underlies stronger restrictions regarding
path length than QFile. Since qmake is not bootstrapped anymore, we can
use QFile.
Task-number: QTBUG-99791
Change-Id: Ic7765b0c09a8aa07c208c1b1d02efe0c54bb44f2
Reviewed-by: Dominik Holland <dominik.holland@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
The diagonal resize cursors provided by Qt does not
quite look like the ones used everywhere else on macOS,
especially for scaled desktops. After some googling this
seems to be how everyone else uses the native versions
since they are private API.
Pick-to: 5.15 6.2 6.3
Change-Id: I3461d07638f4e49cd3e25ab65ef5aa65730bb3a6
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
[ChangeLog][QtGui] Clipping of visible glyphs when doing
partial updates of a graphics view was off by 1. Also fixed
an issue that caused rounding errors when transforming
the clip rect into the glyphs draw space which was caused
by transforming a QRect instead of a QRectF.
Fixes: QTBUG-93432
Pick-to: 5.15 6.2 6.3
Change-Id: Ibdb0e4116872af0f88bf03d9b3ac95331058b882
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
qt_internal_undefine_global_definition disables an internal global
definition that is defined by the qt_internal_add_global_definition
function for a specific target.
Remove the ability to set the custom "undefine" flag for the
definitions since it's hard to control it using the introduced
function.
Pick-to: 6.2 6.3
Task-number: QTBUG-100334
Change-Id: Ic1637d97aa51bbdd06c5b191c57a941aa208d4dc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
To support clang-cl builds, until we add the necessary logic to enable
function targets for this case.
Pick-to: 6.3
Fixes: QTBUG-98253
Change-Id: Ied296babaa85a13321663d50019fad49134f0f44
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Not MSVC, but pretends to be.
Pick-to: 6.3 6.2
Change-Id: I5c201dd917e79a22d6ef15715bf1d3a7010d123e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The slots connected to rowsAboutToBeRemoved and columnsAboutToBeRemoved
attempt to find a new current index by scanning the model around the
existing current index -- in case that index is indeed about to be
removed.
The problem is that the scanning was done without any sorts of bounds
checking; instead it was relying on the model's index() to return an
invalid index for an out of bounds request.
Fix that by adding bounds checking. Since models are not supposed
to return invalid indices for in-bounds index() calls, added some
warnings if that happens.
For some reason, the code handling rows and columns isn't perfectly
symmetrical. Rows are searched both forwards and backwards, while
columns only backwards, and the related code is slightly different.
Filed QTBUG-100273 to try and understand what's going on.
Change-Id: I7452d8c521e74daa4408e6cc969ce5a6059f53ea
Pick-to: 5.15 6.2 6.3
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
In 63eea5e5c69434871eaef9d9dc7184d7e54d7276, the
Qt::ItemNeverHasChildren flag was introduced. QFileSystemModel
was modified to use this flag for items which are not directories,
but only if the QFileSystemModel is not read-only and
the directory is writable.
This patch modifies QFileSystemModel to use the ItemNeverHasChildren
flags also if the model is read-only and if the item
is read-only.
Amends 63eea5e5c69434871eaef9d9dc7184d7e54d7276
Change-Id: Ie7f7d58ecf7baade93f9f03d120da84d3c005d42
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Looks like Integrity doesn't deal well with external test data either.
Pick-to: 6.3
Change-Id: I8beb5ac4d2440d40a7efdceae973e430a2354e9d
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Amends e3b2b12a91, which made the
style sheet calculate the font-dependent text size, but didn't
add the space needed for the close button or a tab icon.
QTabBar's layout code already adds the space needed for icons
and margins to the size; so instead of overwriting that size,
subtract the size needed by the normal font, and then add the
size needed for the font form the style rule, considering both
vertical and horizontal tab bars.
Fix the test case to style only one tab rather than the entire
tab bar, otherwise the font is applied to the entire tab bar,
and not just to a specific tab, which is the style sheet style
code in question.
Pick-to: 6.2 6.3
Task-number: QTBUG-6905
Change-Id: Ieed0ba146a32e81229419adecaf41f467cfd5959
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Adds a new state Phase1 to QAuthenticatorPrivate::Phase which is used
when authenticating using Ntlm. The new state forces an emit of the
authenticationRequired signal and tracks that it is called only once.
Fixes: QTBUG-44096
Pick-to: 6.2 6.3 5.15
Change-Id: Icc9662d4fdc1f0f8c8e8bc5538f211baaa055d4c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Task-number: QTBUG-100362
Change-Id: Ib09aec5ea03867163d476a2c92562bc949fc1b1a
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
The code was trying to avoid a detach in the case no element needed to
be removed, by first running find_if() on const_iterators, and then,
after converting its result to (mutable) iterators, start the
remove_if() algorithm where find_if() left off.
But this applies the predicate to the element found by find_if() (if
any) _twice_: first just before we exit the first find_if() and then
just as we enter remove_if(), which will start by running find_if()
again, with the result of the initial find_if as 'first'.
Apart from being needlessly inefficient, this violates the
specification of Uniform Erasure, which defines sequential erase_if()
as being equivalent to remove_if() + container erase(), with the
former being specified to apply the predicate exactly once per
element.
Fix by writing the remove_if() part by hand.
Instead of doing the dance with the loop invariant documentation
twice, simply implement erase() via erase_if() (complicated a bit by
the weird passing of predicates by lvalue reference instead of by
value, as would be idiomatic). This exposes users to:
[ChangeLog][QtCore][Potentially Source-Incompatible Changes] A fix in
the implementation of the erase-like algorithms of sequential Qt
container may re-enable signed/unsigned comparison warnings previously
suppressed by having occurred in std library code. To fix, cast the
value to look for such that it has the same signedness as the
container's elements.
... but the issue would be the same had we inlined std::remove()
instead of passing a lambda to sequential_erase_if(), so it's nothing
we can, nor should, work around.
[ChangeLog][QtCore][Containers] Fixed a bug in the implementation of
most sequential Qt container's erase-like algorithms (member
removeAll()/removeIf() and free erase()/erase_if()) where the equality
operator or the predicate, respectively, was applied to the first
matching element twice. Each element is now tested exactly once.
Pick-to: 6.3 6.2
Change-Id: Ib6d24b01b40866c125406f1cd6042d4cd083ea0d
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Some calling code did this beforehand, other didn't. Now, the function
itself checks for an existing handler before doing anything else.
Change-Id: I8fc43fb8788c9dfe825b15ffa2fa69ee43915cd6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The default value was true, which is non-zero, forcing the variable
out of the BSS and into the DATA segment.
Fix by inverting the meaning so the default value can be false.
Since qt_is_gui_unused sounds a bit complicated, however, take a cue
from the variable's only writer and rename it qt_is_tty_app.
Pick-to: 6.3
Change-Id: I198e9786f7e71178d69fecb5179287bf39b3a1d6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Slightly simpler implementation for the tail because of the OpMask
support.
Change-Id: I60fdef243d0c4e04890dfffd16266facd53d78aa
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
When converting to cmake, aliases from the (now deleted) qstyle.qrc were omitted and
now we have to use the original names.
Pick-to: 6.3 6.2
Fixes: QTBUG-100317
Change-Id: Ieb83e95c62f10c0e2193602e4c12c5fc1667e15a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Since we require C++17 now we can use auto for the retain and release
template arguments, which allows us to get rid of the wrapper functions
for IOObjectRetain and IOObjectRelease.
Pick-to: 6.2 6.3
Change-Id: Ifc4bf0fe50dfd0eaf6bb2e143acce6df7df17bdc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The recommended way to register defaults on macOS is via registerDefaults:
which puts the key/value into the volatile NSRegistrationDomain.
This stops testlib from dumping preference files into ~/Library/Preferences:
❯ plutil -p tst_qwidget.plist
{
"ApplePersistenceIgnoreState" => 1
}
Pick-to: 6.2 6.3 5.15
Change-Id: I4ac812014f9ff97bc446806eaf2108cd1c8b89c3
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Some configurations (like MSVC2019 with c++20 on Windows 10) fail
to compile winrt/cpp headers as these include experimental
coroutines unconditionally. In these cases we can fall back to the
legacy implementation.
Pick-to: 6.2 6.3
Change-Id: Ibd574995f8ca1f865bbcdabede1ffcd0c340022f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Introduce the qdoc macros \cmakecommandsince, \cmakepropertysince, and
\cmakevariablesince that insert a paragraph akin to the \since context
command.
Example:
\cmakecommandsince 6.3
produces the paragraph
This command was introduced in Qt 6.3
The macro text is wrapped in \n\n to ensure that we always generate a
new paragraph.
Pick-to: 6.2 6.3
Task-number: QTBUG-100212
Change-Id: Id5c8e8812e6b0b915674d108a0e775091e9eacd8
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Introduce a new QT_INTERNAL_CUSTOM_INSTALL_DIR variable to
allow specifying an 'examples install dir' outside of the Qt prefix.
It will be used in a follow-up change to ensure we don't package
the example binaries in our CI artifacts (thus saving space).
This will be even more important when the examples will contain code
to deploy Qt libraries alongside each deployed example (which would
significantly increase the package size).
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I06b4a8f9e8c57a712a356bca0f5c351a9362bc30
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Change prefix builds to use ExternalProjects to build examples
by default. This will affect our CI which only does prefix builds.
To make it work, we have to do a few adjustments:
- look for Config files in the build-tree (before Qt is installed)
- build only one examples with only a single config,
even if Qt is a multi-config build
- install examples as part of main make install step, rather than
as part of the make step (which is the default for EPs)
- adjust CXX flags when building with MSVC to ensure we can still
use sccache and separate debug info
- derive the correct install prefix for each example and pass it
to the ExternalProject
As a drive-by, add TODOs to address tidiness of the code and corner
cases that likely don't work (Conan).
Amends d97fd7af2b
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: I3060da5dc64e7b06052f9dcb720d4d250f876450
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
They are used by build dir Qt6FooConfig.cmake files in conjunction
with export(EXPORT)'ed target files when building ExternalProjects
against a non-installed Qt (or in a top-level build).
Change-Id: I688caf1bd1b8a8fe7e549cebade2aef6f928bd6c
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
We want to get rid of the INSTALL_EXAMPLEDIR and INSTALL_EXAMPLESDIR
code in each example project.
This was an internal workaround to ensure examples are installed into
a relative path somewhere under $qt_prefix/examples and not in
$qt_prefix/bin or similar.
To achieve that we do two things.
First, deduce the install prefix for each example in the
implementation of qt_internal_add_example (our add_subdirectory
wrapper) and assign it to CMAKE_INSTALL_PREFIX before calling
add_subdirectory. We need to make sure to remove the default
value of CMAKE_INSTALL_PREFIX in the generated
cmake_install.cmake file.
Second, we set an internal variable called
QT_INTERNAL_SET_EXAMPLE_INSTALL_DIR_TO_DOT before the add_subdirectory
call, which will be checked whenever find_package(Qt6Core) is called
in an example project. If the variable is set, the
INSTALL_EXAMPLEDIR var is set to "." in the scope of where Qt6Core
is found.
This ensures that the hardcoded INSTALL_EXAMPLEDIR values in our
example projects are changed to ".".
With both changes, our example project install(TARGET DESTINATION)
calls will now install to
"${CMAKE_INSTALL_PREFIX}/examples/${example_relative_dir}/."
Once all repositories are updated to use qt_internal_add_example
instead of add_subdirectory, we can get rid of the
QT_INTERNAL_SET_EXAMPLE_INSTALL_DIR_TO_DOT workaround.
For repositories that still don't use qt_internal_add_example,
the install prefix rewriting will not happen, but the examples will
still be installed to the proper place because they use their own
hardcoded INSTALL_EXAMPLEDIR value.
Amends d97fd7af2b
Pick-to: 6.2 6.3
Task-number: QTBUG-96232
Task-number: QTBUG-98545
Change-Id: I78c118e10c41b519c570c7d87529afd15aeed900
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Instead of nesting the external project build dir under the current
binary dir, place the EP build dir where it would usually be when we
use add_subdirectory.
Shorten the name of the external project to just ${subdir} instead
of using the relative current binary dir path.
Place the EP prefix and stamp dirs under a new ${subdir}-ep folder
next to the example build dir.
Overall this places example executables where you'd usually expect
them to be, as well as shortens a bunch of build paths to circumvent
path limit issues when building on Windows.
Pick-to: 6.2 6.3
Fixes: QTBUG-94608
Task-number: QTBUG-96232
Change-Id: Ifb921c5a6397385e8a914111bf56ee59cda003fd
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
One for building using ExternalProject_Add and one when examples are
built in-tree by calling add_subdirectory directly.
Pick-to: 6.2 6.3
Change-Id: If4c5301163aefed9f15148a70a8f7014bc817ac0
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This is necessary to be able to find Qt6 modules in CMake
ExternalProjects before Qt is installed, regardless of top-level or
per-repo builds.
One use case is examples that are built as ExternalProjects.
Pick-to: 6.2 6.3
Task-number: QTBUG-90820
Task-number: QTBUG-96232
Change-Id: Ic6a9bfd1c52a04e34b221deab40f419a6fee9463
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
[ChangeLog][QtGui][QRhi] With Direct3D 11 the default swap effect is now
DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL combined with DXGI_SCALING_NONE. This
should provide a better (less "jumpy") resizing experience for Qt Quick
content in particular, because the stretch effect for size-mismatched
present is not ideal for user interfaces. We'd rather want to keep the
size as-is and have the white border on the right/bottom (which we will
have anyway, inevitably). This is also closer to what one gets with
OpenGL (though that may depend on the driver as well). For Vulkan on
Windows, the behavior will remain very similar to what
DXGI_SCALING_STRETCH does, depending on the implementation probably,
because the Vulkan spec fails to address the handling of scaling modes
for size-mismatched presents. To get the old D3D behavior, i.e.
FLIP_DISCARD+SCALING_STRETCH, set the environment variable
QT_D3D_FLIP_DISCARD to a non-zero value.
Pick-to: 6.3
Fixes: QTBUG-99637
Change-Id: Ic8a219fbf3cdb6458b7ec9149bf27e771d9f7ddd
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Use IMPORTED_LOCATION of rcc target when generating Android
deployment settings, instead of the hardcoded host path.
Introduce a helper function to find the location of the imported tool
target.
Change-Id: Icfa51ee7a01b3f58fc4892da03055f9ed531cc0b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
There seems to be bizarre issues with IID_* as they are not always
exported or are in a different library depending on the SDK and where
dxguid.lib comes from. If not mistaken, we don't need these symbols at
all because in C++ one can use __uuidof instead (which would not be
possible in C code and there the IID_ objects are necessary).
Pick-to: 6.3
Change-Id: I04712382630768a742bb5f42cc5fca9ad10ff719
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
On code review of previous RHI patches it was noted that many switch on
enum statements contain a default. This is discouraged as it prevents
the compiler from automatically identifying switch statements that do
not cover all enum cases.
This patch addresses rhi base classes. Further patches required for
specific backend implementations.
Change-Id: Ib2bb30c66fd214b65a4ca7b787c7c610f3c313f5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Similar to the parent patch, the private selectAll() was doing
two out of bounds accesses on an empty model. Guard it.
Change-Id: If0f3ce1e6c44a152791313e47db79985e71ef955
Pick-to: 5.15 6.2 6.3
Reviewed-by: David Faure <david.faure@kdab.com>
Calling selectAll() on a view with an empty model, with the view
in ContiguousSelection, causes an out of bounds access into the model.
Guard the access.
Change-Id: I3830a979bad760e9e1526c1c8b12d9767d41fc99
Pick-to: 5.15 6.2 6.3
Reviewed-by: David Faure <david.faure@kdab.com>
In preparation for an upcoming fix, refactor an if over an enumerator
to a switch (which is how this code should've been to begin with).
Change-Id: I11a2de6d66f0359b985b587b7fd37022a7bf56e6
Pick-to: 5.15 6.2 6.3
Reviewed-by: David Faure <david.faure@kdab.com>
Even in C++98 one could declare variables in if statements and
contextually convert them to bool:
if (D* d = dynamic_cast<D*>(base))
~~~
else if (D2* d = dynamic_cast<D2*>(base))
~~~
std::optional is contextually convertible to bool, so we don't need
C++17 if initializers. Just use
if (auto optional = ~~~~)
Pick-to: 6.3
Change-Id: Ie64c2c1ceb7b608eda0534d837f46d3c4be49bf8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
A single global QT_REMOVED_SINCE will start hurting us once more
modules downstream of QtCore start using the mechanism.
With every use of feature, the set of code that needs to compile under
QT_BUILD_REMOVED_API increases. Since we use QT_REMOVED_SINCE in
situations where overloading the new and the old function don't work
in general, this means all code included by any removed_api.cpp needs
to be very carefully written to ensure that any calls to the overload
set formed by the combination of old and new function(s) don't create
ambiguities.
Likewise, the set of APIs that change semantics under
QT_BUILD_REMOVED_API also increases. At some point, the combination of
removed_api.cpp including almost every module header and almost every
header exposing source-incompatibilities when included in
removed_api.cpp will make maintenance a headache.
By making QT_REMOVED_SINCE and QT_BUILD_REMOVED_API per-module
(QT_CORE_REMOVED_SINCE, ...), easy now that we generate the export
macros using CMake, we limit the scope of this problem to the module
using the feature. Downstream modules (say, QtWidgets) will now see
the QtCore API like every other user, even in the
widgets/compat/removed_api.cpp TU.
Pick-to: 6.3
Change-Id: I177bc7bd5aa8791639f97946c98e4592d2c7f9d9
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Even disregarding the warning, we're instantiating
QList<int>::removeAll<uint>(), which is wasteful, so cast the fragment
to int, like in the indexOf() call a line above.
Detected by a rewrite of, essentially, QList::removeAll() as
removeIf() + lambda, which brought the comparison from an -isystem
header (std::remove()) into Qt code (the lambda), and apparently
un-suppressed the warning.
Qt 5.15 has the same code, but is unaffected, because removeAll() is
no template there.
Pick-to: 6.3 6.2
Change-Id: Id9fe33be647fc3dc958e316f0fbe03009b2a7adc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
We were passing the full option from the user as a single string in the
command-line to the compiler.
clang++ -c "-O3 -g1 -march=tigerlake -mprefer-vector-width=256 -maes" [...]
error: invalid integral value '3 -g1 -march=tigerlake -mprefer-vector-width=256 -maes' in '-O3 -g1 -march=tigerlake -mprefer-vector-width=256 -maes'
Pick-to: 6.2 6.3
Fixes: QTBUG-100315
Change-Id: I6fcda969a9e9427198bffffd16ce83150d4e4263
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>