Add bool QObjectPrivate::moveToThread() which returns the success state
of the attempt to move the object to the new thread. For Qt7 the public
signature of QObject::moveToThread() should be changed to directly
return this value.
[ChangeLog][QtCore][QObject] QObject::moveToThread() now returns a
boolean success state.
Change-Id: I8441c8155a76b804b473ab9c45c2be6840ef1677
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit e752c77b35185fa51cdc3684329a9733abe2be3b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The current implementation of the API accepts only two
arguments, {target} and {qdocconf}. It passes a few
environment variables to build targets, providing info.
about the Qt version being used. QT_INSTALL_DOCS is one
of these environment variables, and it is the install
path for all the Qt module/addon documentation sets.
QT_INSTALL_DOCS is also the path where the global QDoc
configuration files are available.
If a project uses the qt_internal_add_docs to create
the build targets for the documentation, and the Qt
version used to configure the project is a pkg installed
using the qt-online-installer, the QT_INSTALL_DOCS path
is always wrong. Such projects should either maintain a
CMake setup for documentation or configure and
build Qt from source with the correct QT_INSTALL_DOCS
path, which is then passed to qdoc.
This change enables passing additional indexdir
and other arguments to QDoc, which is useful. For example,
if QDoc cannot find all the cross-module link targets,
you could either pass extra indexdir argument to resolve
the links or turn off the link errors.
For example, if your qdocconf has the following depends
entry to enble linking to other modules:
depends += qtcore qtmultimedia
And the documentation for these modules are not part
of the Qt installation used to build the projects, you
could pass additional index dirs to enable cross-module
linking.
qt_internal_add_docs{target_name qdocconf
INDEX_DIRECTORIES /absolute/path/Qt6/Docs /one/more/Qt6/Docs /another/Qt6/Docs)
Change-Id: Ieac271ddf92990d722602487c41af7f18546d096
Done-with: Topi Reinio <topi.reinio@qt.io>
Task-number: QTBUG-121457
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit c024af0d12e35891e19752c1f7cd6fb3371d09b0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The QT_INSTALL_DOCS is configured with incorrect path sometimes,
especially while configuring qtbase with QT_HOST_PATH,
which also lets you build documentation for the essential modules
such as QtCore, QtGui, and so on. If the default QT_INSTALL_DOCS
path is wrong, a way to override the path would enable building
documentation for the essential modules without having to build
parts of qtbase.
Change-Id: I686e0bc103f9722aa98f3c02d2a5af9e645cc9d9
Done-with: Topi Reinio <topi.reinio@qt.io>
Task-number: QTBUG-121459
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 5f6f4903a63976fce6468098008318ebeca15cb3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Don't export both, the one is just calling the other, so make it inline.
Give parameters descriptive names that match the documentation.
Found in header review.
Change-Id: I48b221a4fcc476483fee2842ec0a5cadd628b803
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 703f922b18110ed90018bd05526661937c3067f6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 7c5cf8cae054954975a3e262f7fe3cd9897d67f4, which
removed the old function that didn't have any parent parameter
from the API, and added a new one with the parent parameter in
its stead.
However, to make sure that the new function is source compatible
with existing code, the parent parameter must be defaulted to
nullptr (which it already is in the new version of
saveFileContent).
Found during header review.
Change-Id: I3e734905be9788ae1b206c7a65328e604667f5e4
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit bed7788402fe0cab9eb36d37e9fff9e65b3fbfe6)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When using one of the non-Unix makefile generators ("NMake Makfiles JOM"
or "MinGW Makefiles") then it possible to trigger an error when running
qmltyperegistrar: ..._metatypes.json: illegal value
We create the metatypes JSON file initially empty and then "fill" it
with a custom command. This command is not triggered when using Makefile
generators. See CMake upstream issue #19005.
Our work-around for that issue was only triggered for the generator
"Unix Makefiles". Now, it's triggered for all makefile generators.
Pick-to: 6.5 6.6
Fixes: QTBUG-120317
Task-number: QTBUG-121472
Change-Id: I329cb0d3e9ba0997d618821e7bcbc20284561419
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit db9009721a11f482b601a228eb6d0e1658d997b0)
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Iterators are required to be default-constructible and
value-initialized iterators must compare equal.
In a const_iterator, the pointee should be const, not
the iterator itself.
Found during header review.
Task-number: QTBUG-119952
Change-Id: I036c0a62ade8c59dc5d62c0823b375223719af3f
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 100071af82963e712cb055e5d98795376d89e65c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... not in qmetaobject.h.
Don't include more than we need.
Found in API-Review.
Amends b856790d67ad25f5cd8e374cb299a129acbea2ff.
[ChangeLog][QtNetwork] The enums in namespace QSsl are now Q_ENUMs.
Change-Id: I67ec107ce5ab266cfad8a628e7ba3496d2484766
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 93a4478c5f71d7705c2da5957660219508aef769)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Wrongly used QStyle::PM_ExclusiveIndicatorHeight, which is height of a
radio button indicator instead of QStyle::PM_IndicatorHeight, which is
height of a checkbox indicator in pixelMetric() calls for checkbox
subcontrol of groupbox.
Pick-to: 6.6
Change-Id: Ifbf7783fd4494d1e00ee28c27fa5f62b319b8787
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
(cherry picked from commit b820aa7a04be0308b00c32b0e884421fbbb89269)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This ioctl was introduced in kernel version 4.18 and before that it was
used for btrfs alone. It is currently (kernel v6.7) supported by:
* btrfs
* ext2/ext4
* f2fs
* gfs2
* xfs
See man ioctl_fslabel(2)
This means we won't need to list the /dev/disks/by-label directory if
you only have mounted filesystems like the above or tmpfs (which doesn't
support labels).
On my system, there are still two cases that cause the listing:
* a mount point not readable by my user, such as /.snapshots and /root
* a FAT32 filesystem mounted on /boot/efi
Change-Id: I76ffba14ece04f24b43efffd17ab3dced74ffd2c
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 14115da183d2271dbc25446e4f9eda478722eff8)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
... and not just for Qt 7.
Found in API-Review.
Amends dd50d58af267bd3b79d1ca31b920d72b925d5a37.
[ChangeLog][QtNetwork][QHostInfo] The lookupHost() static function now
takes const QObject* receivers (was: (non-const) QObject*).
Change-Id: I22b11e06cfba4e96975239cabed8b379cf3f4fa4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 4b3d6be5f5a175a4c66b527eb2df49d62dc30056)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
qtgraphs defines a target in one directory, and then calls
qt_internal_extend_target with NO_UNITY_BUILD_SOURCES in another
subdirectory scope. That in turn calls set_source_files_properties
but only for the latter subdirectory, and not the main target
directory.
Because CMake has per-directory-scope source file properties, the
'no unity sources' option was effectively ignored.
When using CMake 3.18, make sure to specify the TARGET_DIRECTORY
option so that the source file properties are added to the scope of
the defining target.
Pick-to: 6.6 6.5
Change-Id: I4190d4073a2955aa7053b5faaaa57f683bc768a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 081e50d768114aeeb8f0d284989986d4debc6ec3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
For better consistency and git changes tracking add trailing comma at
the end of the last value of an enum.
See also code-review at:
https://codereview.qt-project.org
/c/qt/qtbase/+/528392/comment/663ba25a_51ed514b/
Change-Id: Ibcfcfb1ba1a8ba4b59297bf17103181a0ee6eafc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit afa6cbed649add8abcef7f07e97e83b16983ff16)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When the user:
- has a non-developer-build -debug-and-release Qt
- and tries to configure the sqldrivers project with
-DCMAKE_BUILD_TYPE=Debug
our build system discarded the user request, and defaulted to
'Release'.
That happens because CMake sets CMAKE_BUILD_TYPE_INIT to 'Debug' by
default on Windows-MSVC, and we have no marker to differentiate
that the 'Debug' value was user-specified.
We have such a marker
- via the
__qt_auto_detect_cmake_build_type_before_project_call variable
when configuring qtbase / top-level qt
- via the
__qt_toolchain_cmake_build_type_before_project_call variable when
configuring via the qt toolchain file (although that doesn't apply
when configuring a multi-config build for obscure reasons, which
should be addressed).
A conservative fix is to add a new variable / marker called
__qt_internal_standalone_project_cmake_build_type_before_project_call
which the 'sqldrivers' project will set with the build type that is
detected before the first project() call, and use that to decide
whether to override the build type, similar how we do with toolchain
file variable.
We could reuse one of the previous variables, but I figured it's better
to be explicit with a new one. And hopefully we can clean up the whole
logic in a follow-up commit.
Amends 48841c34d2e86a741ec9992b9704c0fa5973503c
Amends 8c912cddebe544010e7da3f87af5b21f3328d7ec
Pick-to: 6.6 6.5
Fixes: QTBUG-120436
Task-number: QTBUG-114958
Change-Id: I37e3d8041088fe6084a9976ecc80ddd62d73ef81
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 5b5fa7b75a2465e085c7df61c64755bb65b51f1c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
IMPORTED targets obviously have nothing to sync. So we should ignore
them when collecting dependencies for header sync.
Pick-to: 6.6 6.5
Change-Id: Ief68ff5eb2eb13a3fe1608445e8f5e6abb5971b4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 868e91474c085bd3bf8c5635fc069731afc2e44a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Remove the redundant template parameter. As a drive-by, swap
pointer members using qt_ptr_swap instead of std::swap.
Found during header review.
Task-number: QTBUG-119952
Change-Id: Ibed9c7e7866672401b9dd87ff6e33db8f61e7282
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 3fd49e95a9db3f4c6805c7fcf85fbebe1d6463d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We were assuming that QWidget was in full control of QWidgetWindow
destruction, via deleteTLSysExtra(), and that we could limit any
cleanups to that function.
But in some situations QWidgetWindow is destructed from other code paths,
in which case we were left with dangling pointers to the QWidgetWindow
in both QTLWExtra, as well as the backingstore.
This can happen if there's a child widget hierarchy where there is not
a 1:1 mapping between QWidgets and QWindows, for example if the window
attribute WA_DontCreateNativeAncestors has been set. In this situation
our normal recursion into children in QWidget::destroy() stops at the
first widget without a window handle. When we then delete the top level
QWindow, the QWindow destructor will delete any child QWindows, which
includes our leaf QWidgetWindow.
We should probably fix up QWidget::destroy to continue looking for
children, even if we don't destroy the current child. But independently
of that we should make sure the QWidgetWindow cleans up when it's being
deleted, regardless of how it ended up there.
There's further room to clean up the deleteTLSysExtra() function and
friends, but that's been left for a later time.
Fixes: QTBUG-120509
Pick-to: 6.6 6.6.2 6.5
Change-Id: Ib691df164d7c9c83cb464c0a6bf3bc2116e8ca43
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 12203e94f5a34b59b6a7389402c854e823135a35)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Fix build of the test by removing the reference from the
container type before accessing the nested typedef.
Change-Id: Ic35f312bac70b8f8f80149a3432329070c8c8c7d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit 2c9525a501a33b880e49b57a7c5fa5f11d70bc0c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We've already done a lot in 59600a514ba99ed62b46237d8f160dea84474190,
but we can do more:
Thanks to std::exception_ptr, we can drag the handling of unexpected
exceptions completely to out-of-line code, leaving only the catch(...)
as inline.
As a nice side-effect, we no longer need the nested try blocks in
QVERIFY_THROWS_EXCEPTION to work around GCC -Wexceptions or MSVC C2312
complaining about two handlers for the same exception type (which can
happen when exceptiontype is std::exception itself).
This may not handle __cxxabi::__forced_unwind correctly, but it
doesn't need to: Tests should not need to call THROWS_EXECPTION on
code that could emit a pthread cancellation; tests are controlled
environments.
Keep the old qCaught() function for BC. We don't promise BC in
QtTestLib, but it doesn't cost much.
Change-Id: I1e1627c6341b09197a8a79669fde061c47e6ba47
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit f0dcbb66e8c54d497d5d118a13a7a0b4fc1b3d94)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There are a couple of possible runtime errors that could happen before
the state was changed to QProcess::Starting. This aligns the Unix code
with Windows, which has the state transition at the top, and with the
documentation which says we will enter QProcess::Starting state.
Complements commit 956b2495285251e4840ec32885ffa2cfbb7bd79c, repeating
what it did for Unix (removing the overwriting of the error message that
openChannel() sets) on Windows. We also need to ensure cleanup() is
always called.
Pick-to: 6.6
Change-Id: I76ffba14ece04f24b43efffd17aafdd47f908bf1
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 79e1389fb9ea4e43e61ab35e41ed275cb76eedbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
There's a lot of variation in the benchmark graphs for QHash
presumably caused by variation in seed.
Optimally we would set deterministic seed for all
benchmarks, but we don't know whether or not it is
one until the macro is reached.
Pick-to: 6.6 6.5
Change-Id: I4e412e4d4e2cc65eada94ed123243ed0047dd9cf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit aec39bd136defe9e6646b9edfcdd2f02d62471f0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The doStat() function was too simple. Plus, we can now avoid having to
come up with an non-zero-but-unused device ID for some corner cases.
Change-Id: I76ffba14ece04f24b43efffd17ab3a79e54e636d
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 96e5d0d5c19c09a2b0db5bd067deac06232a48ed)
With MySQL 8.3 mysql_fetch_field() was removed which was used in
QMYSQLDriver::record(). There is no real replacement function so we
use 'SELECT * from table LIMIT 0' to retrieve the schema information.
Additionally mysql_stmt_bind_param() was deprecated and needs to be
replaced by mysql_stmt_bind_named_param().
[ChangeLog][SQL][MySQL] Fixed compilation with MySQL 8.3.
Pick-to: 6.6 6.5 6.2 5.15
Fixes: QTBUG-121183
Change-Id: I149836bd5674d0784255baf416d437c424992f20
Reviewed-by: silverqx <silver.zachara@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 41c842d3f7eecdf736d26026427033791586c83a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
initRootPath() may fail, so let's make sure we do extract some
information from the FS even if that does. Issue introduced by
3e330a79ec8d273630660eefae42995018421c0c ("QStorageInfo/Linux: rewrite
the label retriever to use device IDs")
Task-number: QTBUG-121140
Change-Id: I76ffba14ece04f24b43efffd17ab2df71af8c4e0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 264b7a67330fb1a3fd0f896603e75ada46326875)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Export QHttpNetworkConnection and QHttpNetworkReply classes, this is
required to use the freshly introduced QHttp2Stream.
Change-Id: I4920d342af943b393afa78a187b562549fa919e0
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
(cherry picked from commit 0047affafb3d1b6086c0fc59c50ea9f3b46effe7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When a window's parent is set to null, remove the corresponding native
view from its previous parent layout before adding it to the layout
for top level windows. If the removal from the previous layout is
done after adding the window to the screen, an exception will be
thrown due to the view already having a parent.
Fixes: QTBUG-121232
Change-Id: I1c065b5158d32150042d25fb64f10cf48f83f9f4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 1062373b8e2f8ecf63b7a60a34ca9d0b83466de3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Changed section titles to sentence case.
Added or removed commas as required.
Simplified language were appropriate.
Varied terms to improve engagement.
Corrected resultant text to within the 80 character
width, so there will be whitespace change warnings.
Fixes: QTBUG-119553
Pick-to: 6.6
Change-Id: I5f40605fde4639a6dfcdb3816f32ad7599572fae
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
(cherry picked from commit ef01f32388ad2eb69aa58879b56a7891a492619b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The apple test logger did not include the failure location in the log
output, because the assumption was that the structured logging would
report the file and line separately.
Unfortunately we can't do that using the os_log machinery just yet,
so we bring in the manual location printing as in the plain text
logger.
Change-Id: Ief0a6a6e04d628c98ed09c09334b694504cbff2c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit 08ddf846aed3a14c485aa1d68bc3157e2420f316)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
and an older CMake 3.22, which is shipped by default on Ubuntu 22.04.
If for some reason there's a static openssl library lying around in
the default sysroot (or any ssl search path), like in
/usr/lib/libssl.a,
then CMake's _OpenSSL_test_and_find_dependencies
will try to find_package(Threads) because it assumes it has a
dependency on the Threads package.
Because we do qt_find_package(WrapOpenSSLHeaders) in
qtbase/configure.cmake
and we do qt_find_package(Threads) in
src/corelib/CMakeLists.txt,
we would create the Threads target in the root directory scope, and
then try to promote it to global in the corelib subdirectory,
which fails with
CMake Error at qtbase/cmake/QtPublicTargetHelpers.cmake:260
(set_property):
Attempt to promote imported target "Threads::Threads" to global scope
(by setting IMPORTED_GLOBAL) which is not built in this directory.
Call Stack (most recent call first):
qtbase/cmake/QtFindPackageHelpers.cmake:211
(__qt_internal_promote_target_to_global)
qtbase/src/corelib/CMakeLists.txt:4 (qt_find_package)
Newer versions of CMake's FindOpenSSL actually try to determine if
the Threads package is really needed.
To avoid the issue entirely, just look up Threads before we look up
the OpenSSL package.
Pick-to: 6.6 6.5
Change-Id: Ia3cde93e26ba004f64105a5b457098e1b9870885
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit 85c462855be95afd2afebd345cb4655c00f9824e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The private QLocale::FirstTwoDigitYear constant, which is used as a
default value for the parameters in some methods, causes troubles for
Qt for Python Team, because they need to use the default values in the
binding code. It also potentially create some inconveniences for the
users who want to write functions wrapping these methods.
The name is also confusing, because, when read out of context, it
implies that there might be SecondTwoDigitYear, etc...
Rename QLocale::FirstTwoDigitYear to QLocale::DefaultTwoDigitBaseYear
and make it public.
Now when the constant is public, we can use it in QDate, instead of
introducing another constant, so do that.
The qdatetime.h header already includes qlocale.h via qcalendar.h,
but, rather than relying on this transitive include, add it
explicitly.
As pointed out by Thiago [1], the static constexpr members of exported
classes need out-of-line definitions, so add such definition to
qlocale.cpp.
Amends 41f84f3ddb780ec751e3fc706dd242fc4a99de7a
Found in 6.7 API review.
[1]: https://lists.qt-project.org/pipermail/development/2024-January/044888.html
Change-Id: Ib3c6f1d5b181968bf311fd0435173e025a369865
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
(cherry picked from commit cde7d5d3ff56fdf219771c65bf93f3f08757f154)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Use a more precise view center for views with odd width/height
* Use the QPointF version of mapToScene to avoid rounding
* Round instead of truncate when setting scroll bar values
These changes increase the precision of AnchorUnderMouse, which is
important when for example wheel scrolling is used to change the scale
of the view. Without these changes, the view shifts slightly with each
change in the transform.
[ChangeLog][QtWidgets][QGraphicsView] Increase precision for QGraphicsView::AnchorUnderMouse and QGraphicsView::centerOn
Pick-to: 6.6
Task-number: QTBUG-96879
Change-Id: I8199196c671e4aa96732f382e8057468f676b8d7
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit d99b0cfed21e05f6e84b97fe8edb68271a34deb2)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We need a way for users to consume the complete contents of
QHttpHeaders.
Until now, the only way was
for (const auto &name : h.names())
use(h.value/combinedValue(name));
which is quadratic.
Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.
So we added nameAt() and valueAt() functions in previous commits to
enable efficient indexed iteration without the need to expose a
value_type. Having added those, we can now remove names(), which had
the wrong value_type (QByteArrays are by definition UTF-8 in Qt, while
header names are L1), and is no longer needed to facilitate iteration.
In QNetworkRequestFactory, temporarily use toMultiMap() because we
need the combinedValue() of all headers here. The fix will be to make
QNetworkRequest QHttpHeaders-aware, but that's a Qt 6.8 thing, even
though we should still de-pessimize this code for Qt 6.7 with private
API.
Resulted from API-review.
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit fd6dc2e9e7ce12d73e095a70b3259ea649f4a62d)
Change-Id: I7b52e7df4444487f865ebfb7c9d94227f470829d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
We need a way for users to consume the complete contents of
QHttpHeaders.
For now, the only way is
for (const auto &name : h.names())
use(h.value/combinedValue(name));
which is quadratic.
Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.
So add nameAt() and (in a previous commit) valueAt() functions to
enable efficient indexed iteration without the need to expose a
value_type.
Return by QLatin1StringView, not QAnyStringView, because that
statically encodes the actual encoding used (and required by HTTP
specs and promised by the class documentation, so it won't need to
change). For the setters, we want to be accomodating QString,
QByteArray, etc, which is why those take QAnyStringView.
Resulted from API-review.
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
(cherry picked from commit 196594003742f0bf1c075ed5b2ec93e06f237206)
Change-Id: I0af34c6da06dad1d14b2d25e9230a1c04b4e7c23
We need a way for users to consume the complete contents of
QHttpHeaders.
For now, the only way is
for (const auto &name : h.names())
use(h.value/combinedValue(name));
which is quadratic.
Adding the usual iterators and operator[] would require us to
expose the underlying value_type, which we're not ready to do, yet.
So add valueAt() and (in a follow-up) nameAt() functions to enable
efficient indexed iteration without the need to expose a value_type.
Resulted from API-review
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 4bb12dab6a13c6deee713a77efa9ce996adc97a9)
Change-Id: I2ee509d89e6f9080c17a4cef947f80f312d75180
gcc warns about using uninitialized variables in
QFontEngine::getTrueTypeGlyphIndex. The warning is bogus, because all
variables subject to the warning are initialized by passing their
pointer to qSafeFromBigEndian().
Initialize them anyway to silence the warnings.
Pick-to: 6.6 6.5
Change-Id: I25e062f25e2b06701af5edca27a9e56b939daa79
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit e957ed97e0a7f6974db7d9f7ea52d94785464880)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Regression fix, introduced in:
7199498fb9cbfb5afc043ddb0e630c8ffad5240b
QPushButton with a menu will have a sunken state, QStyle::State_Sunken,
when the menu has been closed. Expected behavior is that the sunken
style is to be removed when the menu is closed.
A boolean called "menuOpen" is never set to false after being set to
true in the popupPressed() method. When this boolean is true, a sunken
state is painted.
Fixes: QTBUG-120976
Pick-to: 6.6
Change-Id: I3e721da5dfbb6db200aa2de7366ac5dc73c873e0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
(cherry picked from commit 343551ffae66048599e5360085d1b77f64b9336e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 329722a322a80d5ea8d6f9aa993c2fc4995b08a4 ("QMimeBinaryProvider:
manage m_cacheFile with a std::unique_ptr"), which added the
std::unique_ptr<CacheFile>.
This is required because in C++23 std::unique_ptr's destructor became
constexpr and is therefore instantiated more eagerly. The type must be
fully defined (not forward-declared) when the std::unique_ptr member is
initialised in the QMimeBinaryProvider constructors.
Fixes: QTBUG-121204
Pick-to: 6.6
Change-Id: I76ffba14ece04f24b43efffd17ab9a861aff89b8
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit c8db469fd584cfd2bee34b572601b19bfb2cd921)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Amends 1cd6c6c69e9813c791f8bebb6c0c9214ce765060.
Btrfs can have subvolumes and each one of them is assigned a device ID
when the filesystem is loaded into the kernel. But subvolumes don't all
have to be a mountpoint of their own: if we insist on matching device
IDs, as initRootPath() was doing, we'd fail at finding the mount point.
Fixes: QTBUG-121140
Change-Id: I76ffba14ece04f24b43efffd17ab39f503000dd7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
(cherry picked from commit 987abb92538f8657d861611b1ced4e7eaa660adf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This is notable when dynamic linking fails, because that happens before
the first line of main() (or equivalent) of the child process, so even
banners printed by that function may be missing.
Change-Id: I5201966b308e48989c06fffd17aa9837156e23f4
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
(cherry picked from commit 458a9d288a14abed6ee0573e6574a9e99f4f7f58)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
On Windows, process creation is synchronous so we will always emit
either started() or errorOccurred() before QProcess::start() returns.
This condition doesn't currently happen on Unix systems, but we could do
that because we're now using vfork() on most platforms, so the child
process has either successfully execve()d or _exit()ed before
QProcessPrivate::startProcess continued.
Drive-by reorganization of the code to remove the one-line \note in the
middle of the docs.
Pick-to: 6.6 6.5
Fixes: QTBUG-120968
Task-number: QTCREATORBUG-30066
Change-Id: I4d0668e0fae5299551ff91480828a68e62fdacec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
(cherry picked from commit 8e1f9169cac78b0df4dab17ed05765fdab842d07)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
When we are embedding a QML view to a non-Qt Android app, there are a lot
of functionalities that are shared with the refular Qt Android app, but
some are not. We should not, for example, try to control the hosting
Activity.
Create a base class that both the QtActivityDelegate, used for the
standard Qt for Android app, and the delegate for the embedding case
can extend.
In this commit, the QtEmbeddedDelegate is very simple, the
biggest difference to QtActivityDelegate being it does not create
a QtLayout or instantiate a QtAccessibilityDelegate.
It does start the Qt app, without waiting for a layout, and register
to listen for changes in the state of the Qt app.
Taking the embedded delegate into use, loading the embedded QML
views and their handling is added in a follow up commit.
Task-number: QTBUG-118872
Change-Id: Id390a2b35c70b35880523886bf6fcf59d420cb42
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 06d2aa91eb4faafc0e52faafeb184d6d3da671ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Simply stripping away the first six characters does not work on Windows.
Amends 2d87c4d881b74619fef966ffb0d7a00cb4ccea50
Pick-to: 6.6 6.5 6.2
Fixes: QTBUG-120577
Change-Id: If48ba026785cab784f46109e34ac80e39a990b79
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
(cherry picked from commit 52a41bac775bea9057acbc4344a29bb7e63297e3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>