Commit ed48391c59 removed the check for
ERROR_ACCESS_DENIED reported by the Windows CreateDirectory(...)
function in case an existing windows drive name was passed as argument.
This restores the behavior of the function which broke after 5.15.
Pick-to: 6.2
Fixes: QTBUG-85997
Change-Id: Ie86188100766f7364acee57b15a250f4a2720b9f
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
- GHS's __PRETTY_FUNCTION__ (used by QT as Q_FUNC_INFO) doesn't have spaces
round the = operator when indicating the type of the template parameter.
The compilation error:
qt5/qtbase/src/corelib/kernel/qmetatype.h", line 2104: note #3316-D:
cannot access position 53 in array of 49 elements
constexpr const char *begin = func + prefix;
^
detected during:
instantiation of
"auto QtPrivate::typenameHelper<T>() [with T=void]" at
line 2186
Task-number: QTBUG-97087
Pick-to: 6.2
Change-Id: I33e61f5d54a61944a5aecf07d149a8dee0ef1e5d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Private Qt module dependencies of a Qt module are recorded
in the IMPORTED_LINK_DEPENDENT_LIBRARIES property of a Qt module.
This property is used to compute the runtime dependency dir path
to be passed to the linker via the -rpath-link option.
If the referenced target does not exist in the scope where it's
used, no -rpath-link will be generated (or at least that specific
dir path won't be passed).
The linking operation will either fail saying the library is not found,
or a different version of the library might be silently picked up in
the sysroot or other implicit lib dir.
Make sure that QtFooModuleDependencies.cmake calls find_package() for
all Qt module private dependencies (or other Qt provided 3rd party
libs in the Qt6:: namespace) so that the targets are in scope and
IMPORTED_LINK_DEPENDENT_LIBRARIES does its job.
qmake also records the INTERFACE_LINK_LIBRARIES of a private Qt module
as the runtime dependencies of the module.
It's not clear why it does that. A private Qt module is an
INTERFACE_LIBRARY so it shouldn't add any new runtime dependencies.
Nevertheless, the find_package part of that has been recently addressed
in 2b6500cd15 for a different reason.
This change is basically the CMake equivalent of
326b91ea78
Pick-to: 6.2
Fixes: QTBUG-86533
Change-Id: Iaf514a14acaded4e8752149cca0c159a271be188
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Caught by clang 13 detecting we set a variable but never used it.
Change-Id: I8c6a0ff3ec184205a544fffd16af3d52b6f172a2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It was broken by fe4a5a27e0.
Pick-to: 6.2
Change-Id: I77da7ec9cdedc80a72b7f11980950a8bebfdaf3b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Found by clang 13:
qfontsubset.cpp:1211:10: warning: variable 'sumAdvances' set but not used [-Wunused-but-set-variable]
Change-Id: Iea05060bc2c046928536fffd16adf500fb9bc8e5
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
No point otherwise. But do it before trying to select the database, in
case the database name has non-US-ASCII characters.
Task-number: QTBUG-97054
Pick-to: 6.2 6.2.1
Change-Id: Iea05060bc2c046928536fffd16adf036367b07bb
Reviewed-by: Liang Qi <liang.qi@qt.io>
It returns zero on success and non-zero on failure.
Fixes: QTBUG-97054
Pick-to: 6.2 6.2.1
Change-Id: Iea05060bc2c046928536fffd16adf0177aadb082
Reviewed-by: Liang Qi <liang.qi@qt.io>
The backed expect the pipeline to be valid, so document it and
assert if the set pipeline is a null pointer.
Pick-to: 6.2
Change-Id: I72b3d0d11b8dc98240d17e13adf2b6ccbd71891d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
It's not intended to be copied or moved and static analysis complains.
Change-Id: I2ac2eccadb66ea572cf297f16af693b15553a1b9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If widget parent has graphics effect, it can't render directly to the
backing store, because the backing store needs to be updated from the
parents effect drawing instead of the widget drawing.
Pick-to: 6.2 5.15
Fixes: QTBUG-96240
Change-Id: Ib9b55547f9e5538f32837ec9df45d29fa68d7c1b
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
With clang 13:
vk_mem_alloc.h:4360:22: warning: definition of implicit copy constructor for 'VmaStlAllocator<VmaDefragmentationAlgorithm::AllocationInfo>' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
vk_mem_alloc.h:4391:9: note: in implicit copy constructor for 'VmaStlAllocator<VmaDefragmentationAlgorithm::AllocationInfo>' first required here
Repeats ad nauseam
Change-Id: Iea05060bc2c046928536fffd16adf5181ede7abe
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
For MSVC it's clear that the plugin and Qt must match, since they would
be linking to different runtime assemblies otherwise. For all other
systems, including MinGW on Windows, there's no such thing.
But we insist on MinGW debug-and-release builds matching.
Change-Id: I3eb1bd30e0124f89a052fffd16a6aa52c7f8b9c0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This is necessary to optimize QObjectCompatProperty::notify in a second
step.
Change-Id: I89aaf51d39e04f17285f7db27f9b40d145fd846d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The designer animation driver needs the ability to drive the animation
both forwards and backwards.
Pick-to: 6.2 6.2.1
Task-number: QDS-4910
Change-Id: Ie2b1855d062bb254b28b216328cb618d90ee8454
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
QWidget will call close() in its destructor, which we might end up
in if a user deletes the widget in the closeEvent.
Pick-to: 6.2
Change-Id: I39684aec0ca130033dad60f2bbf823364a5edcec
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This corresponds to Unicode version 14.0.0.
Added the following scripts:
* CyproMinoan
* OldUyghur
* Tangsa
* Toto
* Vithkuqi
Full support of these scripts requires harfbuzz version 3.0.0,
this version adds support for Unicode 14.0:
https://github.com/harfbuzz/harfbuzz/releases/tag/3.0.0
With this release 10 test cases in tst_qurluts46 were fixed, one
additional test case is failing in tst_qtextboundaryfinder and
is commented out. In total 62 line break test cases and 44 word
break test cases are failing.
A comment in src/corelib/text/qt_attribution.json was updated to
include the URL of the page containing UCD version number.
Fixes: QTBUG-94359
Change-Id: Iefc9ff13f3df279f91cbdb1246d56f75b20ecb35
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
A single configuration provides qdoc and qtattributionsscanner via
provisioning. The environment variables instruct QDoc to run in
testing mode; it ignores linking warnings (since we don't have .index
files for external documentation modules) and terminates with non-zero
exit code if documentation warnings exceed the limit set in the
documentation config.
The provisioned binaries are portable, packaged together with their
dependencies. As they are installed under /opt, the instructions
create symlinks to the binaries in the install directory before
building the 'generate_docs' target.
Pick-to: 6.2
Task-number: QTBUG-78069
Fixes: QTBUG-95554
Change-Id: I4a4765250247e2fc6eddd153c36cf8126ddd10ae
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
If we don't have a binding, we don't need to remove it. We can figure
this out without TLS lookup.
Pick-to: 6.2
Change-Id: I0cb20f2a68a119df7742631e307002e3813eac03
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
If there is no binding data, we don't need it. inBindingWrapper()
involves a TLS lookup.
Pick-to: 6.2
Change-Id: I829f314d708b80821e907124eef4aec758bbbc6a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
When a dialog was accepted or rejected via done(), we used to only hide
it, but as of 0246bfd40a we now close it.
Closing a widget results in hiding it as part of handleClose, so we
do not need to explicitly hide it before calling close(). In fact
doing so prevents the lastWindowClosed logic from checking whether
the window was visible before handling the close event, which is
documented to be a requirement for a window triggering lastWindowClosed.
We still need to hide the widget in case we don't end up closing it
ourselves, to ensure QDialog::closeEvent accepts the close. The reason
for the code in closeEvent seems a bit dubious, but that's left for
future adventures.
Change-Id: Ic32b965d495c08996c3a199bbee798df0206216c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
In a512e210ac5b032c5fc2edf1ddf72e5a414485fda512e21 quitOnLastWindowClosed
was changed to be implemented in terms of quitLockEnabled, but without
any documentation to that end.
Although the two features are similar (automatic quit under certain
conditions), and interact, it doesn't make sense to overlap them until
we actually expose them as a single property (automaticQuit e.g.)
The logic for determining whether we can can quit automatically has
been refactored to take both properties into account, on both a Core
and Gui level. The call sites still need to check the individual
properties to determine whether to activate automatic quit for
that particular code path.
Change-Id: I38c3e8cb30db373ea73dd45f150e5048c0db2f4d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Because of the constraints on comparison, debug and data stream
operators, the return types for them look weird in docs. Conditionally
use the actual return types, in case if Q_CLANG_QDOC is defined.
Also add the docs of debug stream operators for types for which they
were misssing.
Task-number: QTBUG-97247
Pick-to: 6.2
Change-Id: I57f2c52bd3af805c7eeebb602c47de1e95ee09bd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
According to the documentation, Qt::Popup should have a proper frame
with a title bar. To honor this, two functions had to be
slightly altered.
Change-Id: I4bbc18e6b7fbec5702fad6e22ef2226c09dea15a
Fixes: QTBUG-94768
Pick-to: 5.15 6.2
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
When the cursor is positioned between to script items that have different
writing directions, prioritise the script item that has the same direction
as the paragraph (i.e. the QTextEngine) when deciding where and how to
display the cursor. If visual cursor movement is enabled, the behavior is
unchanged.
As a drive-by, clean up coding style and avoid shadowing of function-
local variables.
Task-number: QTBUG-88529
Pick-to: 6.2
Change-Id: I15227b10b1469d9caf1235b00e4d6f9f64a8b510
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
In a text line that has a change of direction at either end of the text,
the cursor needs to be positioned where the next character is inserted,
or where backspace deletes the previous character. In bidi text, this is
ambiguous as illustrated by this example:
abcشزذ
Depending on whether this string was typed in a left-to-right document
or in a right-to-left document, it could be first latin, then arabic; or
it could be first arabic, then latin.
If a general left-to-right context, cursor position 0 should be in front
of the 'a', and cursor position 6 should be at the end of the arabic
text, in the visual middle of the line. Cursor position 3 can be either
after the 'c' if the next character typed would be latin, or at the
visual end of the line if the next character will be arabic.
Qt calculated the cursor position past the right end of the text as 3
(which is not wrong, but 3 has two visual positions), and placed the
cursor at the visual end of the line (favoring the right-to-left
alternative). Backspace would then delete the 'c', writing a new
latin character would insert a 'd' next to the 'c', writing a new arabic
character would insert it also in the middle - none of these operations
happen at the visual end of the line, where the cursor was blinking.
To fix this, we take into account the general layout of the text, which
is typically based on the document, or the user's locale setting and UI
translation, and calculate the cursor position accordingly: if we are
past the visual end of the document on either side, then the cursor
position is either 0 or the last character of the text, depending on the
direction of the QTextEngine used. This way, the cursor ends up in the
middle of the document when we click beyond the end of the line, which
is where characters are removed and inserted. Typing a 'd' at this point
will make the cursor jump to the end, where the d is added.
There are still corner cases: clicking on the right-most arabic character
calculates the cursor position as 3, which is then ambiguous, as it can
be either at the visual end of the string, or next to the 'c'. َQt makes
the inconsistent choice to place the cursor at the visual end, showing
the left-to-right indicator, but pressing a 'd' adds the 'd' after the
'c' in the middle of the text.
Fixes: QTBUG-88529
Pick-to: 6.2
Change-Id: Idccd4c4deead2bce0e858189f9aef414857eb8af
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
We use a simple statement to try and mark the holder as noexcept and that
works for most cases (but not all). It triggers a warning when the
expression is complex, though, like this in qlocale.cpp:
Q_GLOBAL_STATIC_WITH_ARGS(QSharedDataPointer<QLocalePrivate>, defaultLocalePrivate,
(new QLocalePrivate(defaultData(), defaultIndex())))
Pick-to: 6.2
Change-Id: Iea05060bc2c046928536fffd16adf4be6126d039
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
A few systems, like OpenWRT, may strip the section table off the
resulting binaries (see [1]), making it impossible for us to pinpoint
the exact location of the Qt plugin metadata. This commit moves the meta
data to a location that is identifiable even in fully stripped binaries:
an ELF note.
By naming our section ".note.qt.metadata", we instruct the linker to
place it along the other notes and to mark it in the program header
section. Another advantage is that the notes are usually in the very
beginning of the file, as they are used by the dynamic linker itself, so
we'll need to read much less of the full contents.
The unit test is modified not to attempt to strip the plugin of
debugging data. In fact, we add something to the end that would,
otherwise, be matched as (invalid) metadata.
The following was produced with GCC 11 and GNU binutils ld 2.36.1.
Section Headers:
[Nr] Name Type Addr Off Size ES Flags Lk Inf Al
[ 0] NULL 0000000000000000 00000000 00000000 0 0 0 0
[ 1] .note.gnu.property NOTE 00000000000002a8 000002a8 00000030 0 A 0 0 8
[ 2] .note.gnu.build-id NOTE 00000000000002d8 000002d8 00000024 0 A 0 0 4
[ 3] .note.qt.metadata NOTE 00000000000002fc 000002fc 000001ac 0 A 0 0 4
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
...
NOTE 0x0002a8 0x00000000000002a8 0x00000000000002a8 0x000030 0x000030 R 0x8
NOTE 0x0002d8 0x00000000000002d8 0x00000000000002d8 0x0001d0 0x0001d0 R 0x4
The Qt metadata note is 4-byte aligned and can thus be found in the
second note section, which spans from 0x02d8 to 0x02d8+0xac=0x0384.
GNU readelf -n can even show it:
Displaying notes found in: .note.qt.metadata
Owner Data size Description
qt-project! 0x0000018f Unknown note type: (0x74510001)
description data: 01 06 03 81 bf ...... ff
I chose 0x7451 as the prefix for our notes, even though they're already
namespaced by the owner in the first place, because eu-readelf
mistakenly tries to interpret note 1 as a GNU ABI tag regardless of
owner. The owner name was chosen to be 12 bytes long, so the ELF note
header is 24 bytes in total. There's no space wasted because the payload
needs to be aligned to 32-bit anyway and I didn't want to use only 4
characters (header total size 16 bytes) so we'd skip the "GNU" note on
size, without string comparison. And I couldn't think of a 4-character
representative string ("QtP" ?).
[1] https://github.com/openwrt/video/issues/1
Fixes: QTBUG-96327
Change-Id: I2de1b4dfacd443148279fffd16a3987729346567
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Found by clang 13:
qstringconverter.cpp:1039:15: warning: variable 'length' set but not used [-Wunused-but-set-variable]
Pick-to: 6.2
Change-Id: Iea05060bc2c046928536fffd16adf46d4934c37c
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Without this comment, the button == 0 code is very cryptic.
This comment helps in deciphering what exactly is being checked.
Change-Id: Ied96118362d097d7036bafcc491b8574e1225de1
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
The emulation paint engine is required not only for non-LogicalMode
gradient brushes, but also for texture (pixmap/image) brushes with
DPR != 1. fillRect(), strokePath() etc. would check for the former
case, but not the latter.
Fix by factoring out a common checking function.
Pick-to: 6.2 5.15
Fixes: QTBUG-89101
Change-Id: I3cddf8a86a321de97b12c85a187069e77d2acea6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Found by clang 13:
qlayoutengine.cpp:80:9: warning: variable 'cMax' set but not used [-Wunused-but-set-variable]
Change-Id: Iea05060bc2c046928536fffd16adf54d1527e657
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
If an entity occurs directly in markdown, we parse and insert it
directly; but if it occurs in an HTML block, it has to be added to the
HTML accumulator string for deferred parsing when the HTML block ends.
Pick-to: 6.2
Fixes: QTBUG-91222
Fixes: QTBUG-94245
Change-Id: I0cf586d68d6751892ca035a98f77cd67950d3bc4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
There are situations where the input context might want the event,
even if there's no marked text, for example when long-pressing A
with a US keyboard layout and getting the accent popup. In that
case we want a press somewhere else in the input item to move the
cursor, and commit the current preedit.
This is the same approach as NSTextView has, always calling
handleEvent, and in line with the recommendation from Apple:
https://lists.apple.com/archives/cocoa-dev/2012/May/msg00539.html
Pick-to: 6.2
Change-Id: Iff0861a4e604ab594d1ad4ccbb9367d8e0ffe4ef
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
We follow the approach of [NSTextView mouseDown:] by bailing out if the
input context handled the event, and otherwise passing it along to the
input item.
This allows moving the cursor with a single click in the input item,
which will also commit the current preedit string as is, depending on
the input context.
For some reason 2-Set Korean input results in plain insertText calls
for each step of the composition with an NSTextView, while we get
marked text. The result is that when composing with 2-Set Korean,
a native NSTextView will only require a single click to move the
cursor, while for us it requires two, since the input context says
it handled the event.
We opt to follow the behavior of NSTextView to bail out if the
input context handled the event, instead of trying to emulate
the observed behavior for 2-Set Korean by always passing the
mouse event on, as the former seems like a safer approach.
This is also in line with the recommendations from Apple:
https://lists.apple.com/archives/cocoa-dev/2012/May/msg00539.html
Pick-to: 6.2
Change-Id: I372ac62ee3b8b20531cd7cfa2d412a5efea3eb68
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Without this we end up treating input method commits from the
input items as cancellations, as the base class implementation
doesn't do anything.
Pick-to: 6.2
Change-Id: Ieeed71404ee32ab51287b2f4f2d70ffcf9d8e7ef
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Our QNSView can represent many controls, not just the current input item,
so we need to ensure the click happens inside the input item before we
ask the input context to handle the event.
This allows clicking controls such as buttons and check boxes while
composing complex text, without cancelling or otherwise affecting
the composition.
Fixes: QTBUG-57347
Pick-to: 6.2
Change-Id: I8449c8d74fd21b1ee1d5bd75f960751b64d7e078
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Whenever a window was closed, we had logic to check if it was the last
window, and if so emitted lastWindowClosed and then tried to quit the
application. But the automatic quit process also checked if there were
any remaining windows, as this process could be triggered as a result
of a QEventLoopLocker going out of scope. The two paths now share the
same logic for determining if there are any remaining windows.
The docs have been updated to reflect the original intent of the logic,
dealing only with primary windows (top levels without a transient parent).
This was how both the original code paths implemented their logic.
For historical reasons the Qt::WA_QuitOnClose attribute is closely
tied to the lastWindowClosed signal, and isn't merely limited to
controlling whether we try an automatic quit when the last window
closes. For now this behavior has been kept, but the docs have been
updated to clarify how the attribute is handled in practice.
Change-Id: If3d06b065236aad2e59e9091cac3146bc4cf79f6
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It was a leftover from when the quitOnClose logic was duplicated in the
handleClose function.
Change-Id: I38903b7e30ef1cf1d0dce87f61097a83259aea8e
Reviewed-by: Doris Verria <doris.verria@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
None of the bootstrapped tools use zlib anymore.
Change-Id: I2cd7cb855ed671916a21c23449d9b6c4506f8546
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Follow-up of the previous commit: in case the implicit conversions
between iterator and pointers are disabled, then reintroduce
the non-template arithmetic operators for the iterator classes.
Change-Id: I8cee60fe77ee3a47e189b4b53a08e39408f9db18
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The constructor from a raw pointer should be
1) constexpr,
2) explicit, and
3) *private*.
We can do 1) without too much trouble.
2) is a (easy to fix) SIC in case of implicit conversions accidentally
relied upon from somewhere.
3) cannot be "easily" fixed by user code (they have to refactor), and
also, it's a BIC on Windows which encodes class members' access in
symbols. Someone may have been exporting some QList subclass, in turn
exporting the iterator classes, and therefore that someone now has the
constructors' symbols with a given access.
So, don't do 2+3 _just yet_ for user code, but set a deadline: Qt 6.5 is
the last that will support this. On Qt 6.6, we switch. All of this on
non-Windows, againt to avoid an ABI break. One can opt-in at any time
via a suitable define.
Given we have this define, use it to guard the other way around as well:
conversions from an iterator to a raw pointer should never be explicit
(there's std::to_address for this).
[ChangeLog][QtCore][QList] Converting a QList's iterator from and to a
raw pointer is deprecated, and will get removed in Qt 6.6. User code can
prepare for the change by defining QT_STRICT_QLIST_ITERATORS.
Change-Id: I0f34bfa3ac055c02af5a3ca159180304660dfc11
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QList<T>::(const_)iterator both feature an implicit operator T*.
This operator exists in order to keep compatibility with Qt 5 code,
where QVector<T>::iterator _was_ indeed a T*. However, iterators are
not proxy objects and should not convert to T* (at least, not
implictly). In fact we've already seen compilers complain about
ambiguous calls when e.g. moving an iterator through an arithmetic
operation (say, operator+).
For instance, if one does
it + number
and the numeric argument of that call is not precisely qsizetype
(but, say, int), then the call is ambiguous between
operator+(iterator, int promoted to qsizetype)
operator+(pointer (converted from iterator), int)
One can imagine similar failures in generic code. In short: let's
deprecate (not remove) the implicit conversion, and let people use
iterators for what they are.
Task-number: QTBUG-96128
Change-Id: I008348beefe00e4449b2d95c21c842d676390a26
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
I neglected to record the change in the Qt 6 changes documents that
help folk migrate from Qt 5. This is a follow-up to
commit 2a653fde48
Fixes: QTBUG-97493
Pick-to: 6.2 6.2.1
Change-Id: Ie496fdd05759eeeac4c7610db40ab6745b5e0640
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
- Use member initialization
- Remove C-style casts
- Add space around operators
- Use qsizetype for list indexes
- Remove commented out debugging code
Task-number: QTBUG-97095
Pick-to: 6.2
Change-Id: I11a17fa6e7f17968367a57291d83ee6fba731a34
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>