This patch updates the tika-mimetypes.xml MIME types definition file to
version 5101bc7fb090ed7deffe56837d7633c9485a1e5d, which is currently the
latest on upstream main.
The reason for the change is to include audio/flac as an alias for the
nonstandard audio/x-flac MIME type, which enables QtMultimedia to
automatically determine a suitable file-extension for FLAC audio files.
[ChangeLog][Third-Party Code] Updated TIKA MIME types definition file to
add the audio/flac MIME type as an alias for audio/x-flac MIME type.
Pick-to: 6.7 6.5
Change-Id: Id2596f5aea55041a1cbbdcbfbd7500b652444bad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 265187518d13571ff2b991a00ec0011df61f7ae5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For QRhi this has been done not so long ago, but it seems the individual
classes, for example, QRhiTexture suffer from the same: the genereated
docs list the forwarding header, that does not exist.
Fixes: QTBUG-128548
Change-Id: I6a58caf45fa9bbfdb5b91311d7484c0954ad63e1
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 35791751a21f709d00726fb495bebc707f90a166)
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
The code implements parts of the event handling as lambdas in
the constructor. This makes it hard to see what the constructor
code itself does.
Instead, move the initial handling of the emscripten::val
event to event handler functions, which then call the existing
process event functions.
Change-Id: I3abc5be47b080c772c699c21f2fe1cc555ff8192
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 3117d88cdf2324a7833cdf9ceecc4cba30e1e090)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The private implementation already uses QByteArrayView, so the fix is
trivial.
Amends c6438054b9.
Found in 6.8 API review.
Change-Id: I41a62557ca82d31a814ceb3f5079a60ca8c437c4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 525bbfb5dfd1a5f3a6e4a5bc0126714232e20f9d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We do have an implicit constructor which allows construction of a
QLocale from the QLocale::Language enum values. It will be used when
doing the comparison.
However, do not rely on the implicit conversions, and provide the
operators that explicitly do the right thing. This also allows us to
save an extra allocation of QLocalePrivate.
Found in Qt 6.8 API review.
Amends 71bbc35a37.
As a drive-by: fix the order of the test slots in the unit test.
Change-Id: I37f8f5881469b7734705e06e471746814dd2ddf0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 403b1abcad5f437c51dfabd7095b814e99e197a1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QLocaleData::c() simply returns a pointer to a static constexpr array,
so it can be noexcept. The Q_ASSERT there simply checks internal data
consistency.
QLocaleData::findLocaleIndex() uses a QVarLengthArray, but the size
is hardcoded at compile time, and the implementation does not add
more elements, so it will never allocate. The static
findLocaleIndexById() helper can be made noexcept, because we
already made most of the QLocaleId methods noexcept. This allows us to
make QLocaleData::findLocaleIndex() noexcept as well.
Resulted from 6.8 API review, so picking to 6.8.
Change-Id: Iaa9ccaa127f2ba13235b9c0f91a72048067266f5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 205c64bd112e074920557f34bef8a3807350f7e9)
All inline methods simply operate on ushort members, so they can be
noexcept.
The withLikelySubtagsAdded() method operates on static constexpr
array of locales. It does not allocate and cannot throw. The asserts
are there to check the internal consistency. So, it can also be made
noexcept.
Consequently, withLikelySubtagsRemoved() can be made noexcept, because
it only calls withLikelySubtagsAdded(), and does some trivial checks.
The only two methods that cannot be made noexept are:
* QLocaleId::name(), which obviously allocates a QByteArray
* QLocaleId::fromName(), because it end up calling a static
isScript() helper, which allocates a QString.
The isScript() helper possibly can be rewritten to avoid allocations,
but that's an exercise for another patch.
Resulted from 6.8 API review, so picking to 6.8.
Change-Id: I9e98df31f9c13171bc005250024aa4ffb0faedb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 2485aae3ff3fa56833009f4766e53068667a7435)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Qt's foreign windows do not take (full) ownership of the native handle,
so our platform window implementations take care to not fully destroy
the native handle in their destructors.
But if the foreign window had a QWindow parent at the time of
destruction, and we fail to decouple the native handle from its
native handle parent, the destruction of the QWindow parent may
bring down the foreign window native handle as well, as part of
deleting the parent QWindow's native handle.
We take care to selectively do this decoupling on macOS, iOS, and
Android, but were failing to do so on XCB and Windows. This has now
been corrected, which allows us to remove the workaround in QWindow,
which was also in the wrong place (before setVisible(false) on the
foreign window child).
Note that we do not unconditionally reparent the foreign window, as
it might be a foreign window used for containing other QWindows, in
which case we don't want to mess with the native view hierarchy.
Change-Id: Ic526ca63fbf72dae5013ae9e44cb5cddf61c944b
Reviewed-by: Liang Qi <liang.qi@qt.io>
(cherry picked from commit 8f8ce8d7a7e029e62a4f9b5b209dcc37f61410cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Strictly speaking, the problem has nothing to do with QRhi. What is
special with the eglfs' backingstore is that it creates a QRhiTexture
and then pulls out the OpenGL texture ID via nativeTexture() right
afterwards.
In this setup there is nothing that would ensure glTexParameteri is
called to override the silly default of OpenGL. Normally this cannot
happen because once the QRhiTexture is used for sampling purposes
together with a QRhiSampler, all necessary state gets updated.
Starting from Qt 6.4, with the QRhi-based backingstore composition
changes, the special case where we create QRhiTextures just to get the
underlying OpenGL texture got introduced.
Ideally the eglfs side should provide its in MIN/MAG filter state, but
in the meantime, to be more robust, always set a MIN filter already in
QRhiTexture::create(). For most textures this will get changed
afterwards.
Change-Id: I305cdbb5576b977887b85a15b72455bb3ae430c4
Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-123551
Reviewed-by: Karim Pinter <karim.pinter@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 88aa5250d58900653192c45e41f182ec88474e38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QListWidget/QTreeWidget::setItemWidget() take ownership of the widget.
This was documented for QTreeWidget but not for QListWidget. Unify the
wording with QAbstractItemView::setIndexWidget() (which gets called by
setItemWidget()).
Pick-to: 6.7 6.5
Change-Id: I272a20b7e7be13df1ddd9f2ba552dd9da68e2a3b
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 53c6c73c57d36796577a13fd4dd82a04ee9647ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Having the actual const_iterator::operator++() as an out-of-line
member function means that the implicit this pointer forces the object
onto the stack (registers don't have addresses that could be
passed). Since const_iterator is now merely a thinly-disguised
pointer, that would cause terrible codegen.
So, apply a technique originally developed for QStringView and make
the operator an inline function that re-sets the member dirEntry using
a call to a QDirListing static function that takes and returns by
value. Passing by value enables passing in registers, which means the
iterator object can now be a register value and doesn't require
spilling to the stack to call the function.
Found in API-review.
Change-Id: I9f4d5be5b72249b368ef3dea9d857178ca7e16aa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit aec8398d71d351e956683a695af51317fe65097e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The std::input_iterator concept does not require copyable, only
movable. This makes handling input_iterators safer, because copies of
input iterators since advanced zap into partially-formed state without
changing their bit pattern. If the iterator is, however, only movable,
no such zapping copies can exist.
Take advantage of this and make QDirListing::const_iterator
move-only. Its iterators are anyway no longer compatible with
classical STL algorithms, so we're not restricting their use further.
Found in API review.
Task-number: QTBUG-125512
Change-Id: Ic1dee22881893fdbf159bbfd335c10505eaffa9f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 29dfcc240b3e29d5d6149c2996cfdb9d71b776bb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
std::weakly_incrementable doesn't require a std::input_iterator's
post-increment operator to return anything¹, so don't.
¹ https://eel.is/c++draft/iterator.concepts#iterator.concept.winc-14
The return value of post-increment on objects that model
input_iterator is partially-formed (as a copy of an iterator since
advanced), so any attempts to use it, apart from assigning a new
iterator or destroying it, are undefined, anyway.
Found in API-review.
Change-Id: If0c07250cec4e48c6e5176cd23864651e8ec3d27
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit fd89fc8c27460e2c11d9e3decc38cf61c186f984)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's no need to carry the same QDirListingPrivate* around
twice. Remove const_iterator's direct QDirListingPrivate* member and
re-use the one from its DirEntry member.
Requires adding a private const_iterator::atEnd() helper function,
because while const_iterator and its member functions are implicit
friends of DirEntry, friend functions of const_iterator are
not. Improves readability, too.
Found in API-review.
Change-Id: I82b9273950e174d7598ee531fbd5dfb472911b71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 0ede7f541dfc6cba163e1452aee7239818a42c1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This simplifies the implementation, and is more secure, because you no
longer can compare const_iterator with const_iterator and get a
non-sensical result (unequal, even though copies of each other).
Requires the STL algorithm test to be ported to C++20 ranges, because
classical STL algorithms can't deal with decltype(first) !=
decltype(last).
Found in API-review.
As a drive-by, make the reversed and inverted operators conditional on
!__cpp_impl_three_way_comparison.
Change-Id: Icd0e4dac277bd3b053f7b648f8c3f9d9f3753299
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 2569ca0f34fe15a2e5c828b708f1406be8d53836)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Some vendored 3rd party sources or libraries may not have a CPE
because the upstream disappeared, we don't know where the files
originally originated from, or no CPE was ever issued.
Given that the 3rd party files are shipped with Qt, they can
be considered as part of the "Qt" CPE for vulnerability tracking
reasons.
In such cases, we should add the Qt-specific CPE to the SBOM to ensure
that the SBOM is as complete as possible when tooling analyzes the
third party packages.
Task-number: QTBUG-122899
Change-Id: I32a70e24742a860198f3a6b12bdb4a06057f1ab3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 3cadd4b1f62479cce88c99cd8c95729ac10a6126)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The range guaranteed by std¹ for nanosecond resolution is ±292 years,
not ±292 million.
¹ https://eel.is/c++draft/time.syn,
https://en.cppreference.com/w/cpp/chrono/duration#Helper_types,
std::cout << chrono::floor<years>(nanoseconds::max()) << '\n';
Since, in general, there is no integer type with ≥ 45 bits, but < 64
bits, the practical limit for milliseconds remains, indeed, ±292
million, so the QDateTime docs don't need fixing.
Change-Id: I5ae7f9706f147c6f490ba17b10cebe96426bbba2
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 051488c5faf5410e938978d4c1609c7a85074c57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Platform window may be destroyed during update request delivery.
For instance, in Qt Quick a user may close a window using some
animation with QML ScriptAction.
To handle such a situation and prevent a crash due to a dangling
pointer, we can simply protect the platformWindow pointer using
QPointer.
Fixes: QTBUG-128516
Pick-to: 6.7 6.5
Change-Id: I49ecec09d62e184f5df17794b303f147b705e2e3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 2ef1a338a91659871675514921f9a7dc8d1c8805)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
requestUpdateHold was not getting enabled properly in some
cases, in particular when using a custom html file to load
the application.
The assert on g_mainThreadEnvetDispatcher is also asserting,
with a following dereference of a null pointer.
Change-Id: Ibf77d90b84f8319a894e2df34a134d2e4265fe05
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
(cherry picked from commit 10afdc339e08ce1e6a8173df97a3f2edeb27cb57)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QUuid is a) trivially copyable, b) ≤ 16 bytes, so as per [1] should be
passed by value. Clazy, indeed, complains, so fix it.
Found in API-review.
Amends 2fbece8a73cb2d2692c78c38e1576c0c9c62fce7.
[1] https://www.macieira.org/blog/2012/02/the-value-of-passing-by-value/
Change-Id: I321ebd650dac8e58c173d957259c3700b1f59ace
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7550f0e2c1a4ca10a0e4604e2d429b98481d4e2d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On some platforms (Windows and macOS) it has been observed that the
platform layer removes all screens, without providing a dummy screen.
This results in QGuiApplication::screens() being empty. As updating
the cached DPR for a window is part of the window moving to a new
screen, we have to guard for the case where the window moves to
a nullptr screen (because QGuiApplication::primaryScreen() is now
null).
We use the QGuiApplication::devicePixelRatio() fallback path, which
returns 1.0 if there are no screens.
Fixes: QTBUG-128390
Pick-to: 6.7
Change-Id: I3ba20590047f1ef49c8d3ac5b7556b814a105ce4
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit fbf957de5feded9cbbd60feacaa08c9902815c38)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This reverts commit 521e091bca1764d53ac06bb60707475d1032f5d5.
Reason for revert: The fix doesn't work with MSVC2022 compiler and block windows-11_23H2-msvc2022-developer-build integration. Need time to find proper solution.
Task-number: QTBUG-128498
Change-Id: Id938fa2119c7e4c053398b2a3693f3128e53f734
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 1017a0eaf1f9fd9cc37189f73840d85bf4a5664c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It seemed to be common, yet undocumented knowledge how to pass CMake
variables to configure / qt-configure-module.
Task-number: QTBUG-128424
Change-Id: I10e896402aa0a9e1add8746765bfcea955417ee1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 13e096b49ecd7d77ba8b43ee8ff58f7db05d9f6e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Despite the name, it doesn't contain the definition of QMetaObject
(that's in qobjectdefs.h), only of QMetaMethod, QMetaEnum, etc.
Replace the include with qobjectdefs.h.
Found in API-review.
Amends fa456ad550.
Change-Id: Ic7fb83c07a866ca981b100e68cc0529bd13e929f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 248a1ce4bdb2b211a812db4783354f7fbc2ff662)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Make the behavior more bounded, by disallowing keeping large sets of
buffer data for reuse.
The idea being that once I uploaded say the Sponza model (e.g. 10 MB of
vertex data merged into one blob), it is not beneficial to keep that
huge allocation since the total size of the data from per-frame buffer
changes will be in a whole different (smaller) league typically, and the
chance of another (single) buffer update that utilizes the whole 10 MB
on its own is rather small.
Have a simple (and cheap to execute) rule that no batch keeps more than
1 MB of QRhiBufferData (in total, regardless how many buffer operations
it contained/contains). If the limit is exceeded, we clear().
The catch is that even without doing the 1 MB check, there is a high
chance that the Sponza model data will be gone in a few frames
eventually, due to implicit sharing and how the QRhi backends and Qt
Quick(3D) work and shuffle their resource update batch requests and
submissions. So for many applications this is expected to change nothing
when it comes to their memory consumption profile.
Expand the comments further.
Change-Id: I93061d073b43e747a0772a3119ebdb89bed02ae0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit bc2c09a182c2bc80c307e7e71e0f12c1c31edc3d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead of speculating about resource update batch pools, have a
toggleable debug message that shows exactly what one needs to know. Set
qt.rhi.rub to true to enable. Note that it is not a qCDebug since we do
not want isEnabled() checks no matter how cheap on hot code paths.
Rather, the state of the category is checked just once on
QRhi::create(). As we want some output from QRhiBufferData too, this is
static (setting the bool flag may not be entirely thread safe
technically but we can live with it).
In addition, harden size() and constData() in QRhiBufferData, although
these d != null checks are a waste of time with the current
implementation, but be safe.
Remove the unused QT_RHI_MINIMIZE_POOLS environment variable. This is
forgotten completely by now and serves no practical purpose. Those who
want a proper release of all pools should call releaseCachedResources()
(i.e. QQuickWindow::releaseResources()).
Expand the comments as well.
Change-Id: I4942cf7c3f2ecff47991e42e14c61b432f232170
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit cbab56fdcbff6965d2aafd0c00eebacb7809ceba)
Make sure this works as it should. The bug report/support request wants
to have a String[] parameter on the Java side, but then the C++ side can
not use jobjectArray (as that has "[Ljava/lang/Object;" as signature),
so use Object[] instead (which is one solution; the other is to use
QList<jstring> or (in 6.8) QStringList on the C++ side.
What's easy to miss is that the jobjectArray that we get is a local ref,
so we have to extend its lifetime by creating a QJniObject holding it as
a global reference. We can then create a QJniArray from that QJniObject
(without any type safety).
Task-number: QTBUG-128456
Change-Id: I1e03b811165f9bc5106324d39fb58114ee8cf398
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Petri Virkkunen <petri.virkkunen@qt.io>
(cherry picked from commit f9fd5870f7379103005839bc03543bb8f6da94c3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Should be just "timer" instead of QChronoTimer.
Change-Id: I76cb9ae712cfe9a9713a85888022e54300d308d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit a5f1cec8bf22f19bbf7ffe058c407d5045e4126a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Add some notes on the prerequisites when building a sql driver from
source and also add some more notes in the troubleshooting section.
Pick-to: 6.7 6.5
Change-Id: I8ffbcf4182c2ad2c7b9f86209e0ce332fd27d73c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 1f31c5f3cd722f06e4f41457ec1322365d78c018)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Mention QTimerEvent::id(), which returns Qt::TimerId, instead of
QTimerEvent::timerId() which returns int in the API docs.
Task-number: QTBUG-128144
Change-Id: Id19aebd044fbd734872e5580efcb3842eb42b2b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 7595c21be86f247dd419d08d7d26327fe2d7a736)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since QGenericUnixServices does not derive from QObject, the connection
to QDBusPendingCallWatcher made in the ctor might outlive the lifetime
of QGenericUnixServices.
Fix it by explicitly disconnecting it in the dtor.
Fixes: QTBUG-125239
Pick-to: 6.7 6.5
Change-Id: I5fac4fd5831b2dde16b3d7b479a8ee616bfb7e3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit de609d84b9cee4a481d1718c00b09105d8c2ae69)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... as is required by the standard.
We have already found that QAnyStringView::max_size() can also not be
static (because the size depends on the charset of the contained
data), so we have a second reason (besides STL compatibility) to
change the current static into non-static max_size() member functions:
Qt consistency.
Found in API-Review.
Amends 7ce6920aac.
Fixes: QTBUG-128450
Change-Id: Id5ee3fec82bc557bd83b6843838ccdd753442cd0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6d5e39f4756945b8ada74d745bd949856c1b17f9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This amends commit 880d1aef99 and
extends it to cover the testlocales program under util/.
Pick-to: 6.7 6.5
Task-number: QTBUG-121653
Change-Id: I3efadc69ce08810876f8e20aa4636c7624728153
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
(cherry picked from commit 00644f4b6d69d82a8d27f3b0619de88c0e4fdd6f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
max_size() will be made non-static to strictly follow the C++ Standard
Library concept, but it makes no sense for the Qt containers to have
allocations limited per instance, as they are not allocator-aware. This
commit adds a Qt-style camelCase() function to the STL-style
snake_case() with the semantics we want.
Task-number: QTBUG-128450
Change-Id: I2e4aa228c71c821c01bafc0f37956d29fe652ef1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6306ebe749e083126a39b9dd13d7060aa7bdacc2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Container::max_size() is a _non-static_ member function in the STL, so
we can't call it as C::max_size(). Instead, use the newly-added,
Qt-style camel-case maxSize(), which we will keep static constexpr.
Task-number: QTBUG-128450
Change-Id: I839df90a91cced85f000c7d2744ba547f629ed98
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 6c15f99853c4cecd9285e189a441392a397b0f82)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This fixes the documentation side of an issue with QTZ::displayName()
not doing what's documented. (The MS-eccentricities have been fixed by
earlier work.)
Fixes: QTBUG-84297
Change-Id: I3ec522aa81741fbf2d3dd247786310304e14f304
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit b3a00a38af1226ebd6617638872d540f1ecd76df)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
That requires including qcontainerfwd.h to the headers, so that
we could get access to QtPrivate::MaxAllocSize.
The max_size() methods are added for compatibility with stl.
The logic for most of the views is similar. The only exception is
QAnyStringView, because its character size may vary, depending on the
contained data.
The maxSize() methods are the static equivalents of max_size().
QASV does not have it for the reasons mentioned above.
[ChangeLog][QtCore] Added max_size() to all string-view types.
Amends 7ce6920aac.
Found in 6.8 API review.
Change-Id: I467c7d64ec3d92eb424eb5b94a39ec3d45d63d1f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 2382bfb5b03f6f03a31981dc416121cf556b962a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
[ChangeLog][QtCore][QTimerEvent] Added constructor taking a Qt::TimerId.
Also added a getter for Qt::TimerId.
[ChangeLog][Potentially Source-Incompatible Changes] The protected
(and undocumented) QTimerEvent::id member variable has been renamed to
m_id to allow for the addition of an id() getter that returns a
Qt::TimerId.
Task-number: QTBUG-128144
Change-Id: Ia156f11e9e9347b6bf61b36e40da3ad551d23407
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 29b98eabf07b9e9d223039ec58b989acbaba844c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If widget A starts at y=0 and widget B starts at y=19, when the mouse
moves from y=15 to y=18.6667, the code was doing childAt(p) with a
rounded QPoint y=19 and finding B, but then the relative coord for B
was set to -0.33333 so B wasn't under the mouse and didn't get an enter
event (and since it's now the "last receiver", it doesn't get one later
either when y is bigger).
Add QWidget::childAt(QPointF) to fix this.
Fixes: QTBUG-128391
Change-Id: I76d4b711a8297648780bdd079eb67405ab12be14
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 40bde8a572bd8ed039d3f5a5ab99b281de7410bd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Instead specifying Interbase_INCLUDE_DIR and Interbase_LIBRARY allow to
use Interbase_ROOT instead. Use this new option in the sql driver
documentation.
Additionally add 'fbclient_ms' as possible library name so we don't need
to distinguish between Interbase and Firebird anymore.
Change-Id: I472f95f82ebb93888002deccdf5028a1827a4745
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 89dd15e359228a57351bddc2429db4d57863bc8f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It is a small and trivially copyable type.
As a drive-by, make the operator a hidden friend.
Found by an Axivion scan.
[ChangeLog][Potentially Source-Incompatible Changes][QtNetwork] Made
the QSslError::SslError QDebug operator<< a hidden friend of QSslError.
This means the operator is no longer a match for arguments implicitly
converting to SslError, only for SslError itself. A backwards-compatible
fix is to make the conversion explicit: debug << QSslError::SslError(arg).
Task-number: QTBUG-125026
Change-Id: I9b6673397b6a26d508783304240c91fa058139bc
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit f02402044e552f2940d4677039f3d02c41eb27ee)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>