Commit Graph

49235 Commits (c193030c7c494a03abd2a6e42df22aefdb1f0d49)

Author SHA1 Message Date
Juha Vuolle c193030c7c QDefaultAnimationDriver: change to use QObject::connect PMF syntax
Task-number: QTBUG-122619
Change-Id: Ide82014e3b9803ae091be3432ba61b37a2607403
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-18 06:01:01 +03:00
Tor Arne Vestbø d5bf42f75b Add preliminary support for Qt for visionOS
Qt already runs on Vision Pro as "Designed for iPad", using Qt
for iOS. This change enables building Qt for visionOS directly,
which opens the door to visionOS specific APIs and use-cases
such as volumes and immersive spaces.

The platform removes some APIs we depend on, notably UIScreen,
so some code paths have been disabled or mocked to get something
up and running.

As our current window management approach on UIKit platforms
depends on UIWindow and UIScreen there is currently no way to
bring up QWindows. This will improve once we refactor our
window management to use window scenes.

To configure for visionOS, pass -platform macx-visionos-clang,
and optionally add -sdk xrsimulator to build for the simulator.

Change-Id: I4eda55fc3fd06e12d30a188928487cf68940ee07
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-18 05:00:57 +02:00
Joerg Bornemann 2cd79cc1c3 CMake: Add _qt_internal_get_i18n_catalogs_for_modules
This function finds the translations that belong to the Qt modules that
are used by the project. "Used by the project" means just all modules
that are pulled in via find_package for now.

This code was in Qt6CoreDeploySupport.cmake before. Now, we can call it
in other places too like Qt6LinguistToolsMacros.cmake.

Task-number: QTBUG-110444
Change-Id: I338d54d93cf285190b1430608b32334692ae4c07
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-17 21:17:30 +02:00
Thiago Macieira a7b9ec7f6f CBOR: Remove dead code: len[12] are not used with UTF-16
The lengths are only needed to check if one of the two strings is empty
and in the direct 8-bit comparisons with memcmp(). So we don't need this
division by 2, which was here since the initial commit.

Amends d4c7da9a07.

Pick-to: 6.7
Change-Id: Ie28eadac333c4bcd8c08fffd17c5ecbce564ccd1
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 11:41:36 -07:00
Thiago Macieira 85d74a417e CBOR: implement UTF16-to-UTF8 comparison without memory alloc
This is similar to the UTF16-to-UTF16 comparison code added in commit
d4c7da9a07, but instead of converting to
UTF-32, we convert to UTF-8 so we only need to convert one string.

This change allows us to mark the entire recursive comparison sequence
as noexcept.

Change-Id: I5f663c2f9f4149af84fefffd17c07971d8b368cc
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 11:41:36 -07:00
Thiago Macieira af9f3c5da2 CBOR: fix the UTF8-and-UTF16 detection
This isn't a bug, it just removes dead code. The code to compare
US-ASCII to UTF-16 was never engaged because this conditional was wrong
and effectively catching everything. Fortunately, because that
comparison code is now wrong with the unit tests added to tst_QCborValue
in the past few commits.

Pick-to: 6.7
Change-Id: If1bf59ecbe014b569ba1fffd17c4ce184948e646
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 11:41:36 -07:00
Tor Arne Vestbø 0533d1d544 QWidget: Remove un-needed nullptr check for oldtlw
Added in 1bd755465e

We already access oldtlw and oldtlw->d_func() in other places,
and the source of oldtlw is a call to QWidget::window(),
which returns the widget itself if it doesn't have a parent.

This should also fix a CodeChecker issue where it thinks
that the other unchecked accesses to oldtlw are suspicious.

Add assert just in case, so we catch it explicitly if for
some reason this assumption doesn't hold in the future.

Pick-to: 6.7 6.5
Change-Id: Iefa9b2df6b25a993afe87e4ee90fe9d2075ebbd0
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2024-04-17 20:41:36 +02:00
Anton Kudryavtsev a868c6947a qicc: avoid double lookup
Change-Id: I9da3b37927650ab9dee928156f907ea5c58fc500
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-17 21:41:35 +03:00
Allan Sandfeld Jensen 7febd6df65 Make possible code-paths asserted
Makes it more obvious to code-checker what is possible.

Change-Id: I8b2bbc55a600e8b570644135867a3244c6d57be7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:41:35 +02:00
Edward Welbourne 880d1aef99 Revise CLDR-generated data header files to use Unicode-3.0 for SPDX
This is the correct license for the data they contain. The types that
are used to package them can be made available under the same.

Pick-to: 6.7 6.5
Task-number: QTBUG-121653
Change-Id: I7fb5f332f9e7f4f6db0f1f0c3964a36ce03bccb2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-17 18:30:37 +00:00
Tatiana Borisova 3059f14524 QNativeIpcKey: use new comparison helper macros
Replace public friend operators operator==(), operator!=() of
QNativeIpcKey to friend methods comparesEqual() and
Q_DECLARE_EQUALITY_COMPARABLE macro.

Task-number: QTBUG-120304
Change-Id: If18d86fb18e44f8d2210cba7ca93e4ac478a2a48
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 20:30:37 +02:00
Tatiana Borisova 7f3e43b32c QKeyCombination: use new comparison helper macros
Replace public friend operators operator==(), operator!=() of
QKeyCombination to friend method comparesEqual() and
Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE macro.

Task-number: QTBUG-120304
Change-Id: I679f3fa5fcc4c675a763cc5a5fe0e0880439a64f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 20:30:37 +02:00
Mårten Nordheim d5d9317c31 QHttpNetworkConnectionPrivate: mark NO_COPY_MOVE
To get clang-tidy to stop complaining about missing
copy/move-ctor/assign

Task-number: QTBUG-102855
Change-Id: Iefc19da324090db3a38d017859ad0a32ae7d6ff5
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:37 +02:00
Mårten Nordheim 60ff037364 QHttpNetworkConnectionPrivate: reflow ctor
Task-number: QTBUG-102855
Change-Id: Idcb67b434f9f627a408d730d9cec8d749094728e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim c9e6cdc19e QHttpNetworkConnectionPrivate: NSDMI
Initialize the hardcoded things inside the class.

Task-number: QTBUG-102855
Change-Id: I06da0a615ec066e63d9cd0359313e8e8f588718e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim 28bff27b85 QHttpNetworkConnectionPrivate: move some init logic into a function
Now we can nicely initialize it as a member-initializer.
Do channels at the same time, NSDMI follows.

Task-number: QTBUG-102855
Change-Id: I59c1fe044687500ed3a9d5878c6e4fc137114542
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim e88a2ed83b QHttpNetworkConnectionPrivate: fix clang-tidy mismatching argument
It complains about the declaration arg. name differing from the definition name

Task-number: QTBUG-102855
Change-Id: I005ab69b0f41db0bda3ef64f2c779c3cb3f6fd38
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim 791455c039 QHttpNetworkConnection: Remove redundant/unused ctor
Task-number: QTBUG-102855
Change-Id: Ifcd25c241f2e331b0c271d3462b5a2896797d101
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2024-04-17 20:30:36 +02:00
Mårten Nordheim b85acc8356 tst_QHttpNetworkConnection: Move to use only one ctor
We want to get rid of the other one, it's all internal
API anyway.

Task-number: QTBUG-102855
Change-Id: I2b621c20f4dd7c8bf5f07db8db908c2b7b86976f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2024-04-17 20:30:36 +02:00
Ahmad Samir 785a4a7149 QCompilerDetection: move qsystemdetection.h to inside the include guard
Pick-to: 6.7 6.6
Task-number: QTBUG-124120
Change-Id: Ia3ca4392945a793289fb9c75f50fba1bca1c691c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:48 +02:00
Mårten Nordheim d807a9ebb1 QSaveFile[win]: remove fallback to old renameOverwrite
Our new way of doing it is atomic, so while conflicts can
still happen that leads to e.g. access denied, those will be
because the _target file_ is already accessed for some reason.
The fallback might be lucky enough that it happens after this
other access is done, but probably not. So remove the fallback
and just do the atomic rename.

Change-Id: I13f6b4b70974500b8dd9309138b9052b6a5acc62
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:48 +02:00
Mårten Nordheim 5cf94bcc2f QSaveFile[win]: store error in nativeRenameOverwrite
We want to drop the fallback path, so we need to set an appropriate
error when the native rename fails.

Change-Id: I2746d79b9e5666f54c35ff7ac29a74191cf22740
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:48 +02:00
Mårten Nordheim b26ec1f5dd QSaveFile[win]: only use SetFileInformationByHandle when opened with DELETE
SetFileInformationByHandle only works when we have opened the file with
DELETE access. Since the code is shared with QTemporaryFile it is not
necessarily always a given. Since it was anyway falling back to the old
way of doing it it was not a problem, but it is cleaner to only use it
when we know it will work.

Pick-to: 6.7
Change-Id: I3c744734d45272c41e49bb6971adf4f82213d97d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:47 +02:00
Mårten Nordheim 171ac8aa4e QSaveFile[win]: remove const from nativeRenameOverwrite
I accidentally copied const from another signature.
It's not changing any members so it's technically fine,
but it leaves a bad feeling and we will change members soon.

Pick-to: 6.7
Change-Id: Ib0236d7e7dda84834ba35907d75c52cf77fb3843
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:47 +02:00
Alexey Edelev 36a1fb7256 Expose the qversiontagging.h header file unconditionally
The header file is not guarded properly in qglobal.h. This installs
it unconditionally in systems where version tagging is not supported.

Task-number: QTBUG-124346
Change-Id: I130b7d016e28a7a03d8929bc17fad50c80648f49
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-17 20:07:47 +02:00
Mårten Nordheim fad8d71262 QSslConfiguration: add documentation for HTTP/2 alpn variable
It was missing for a long time

Pick-to: 6.7 6.5
Change-Id: I209838a3c7b45c8c2e8da21efea306fafddea891
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
2024-04-17 20:07:47 +02:00
Marc Mutz 7cf57cffbc QByteArrayView: make starts/endsWith(char) constexpr
Their implementations call only constexpr functions, so they should be
constexpr, too.

[ChangeLog][QtCore][QByteArrayView] The startsWith(char) and
endsWith(char) functions are now constexpr.

Change-Id: I41f57ce3428a8de441e3c230aafc7bf426651c9f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2024-04-17 20:07:47 +02:00
Giuseppe D'Angelo 7466831509 Long live [[nodiscard]] QFile::open
Having already caught some bugs in real code because of unchecked calls
to QFile::open, this commit marks QFile::open (and open() in other
file-I/O classes) as [[nodiscard]].

Since it's going to raise warnings, the plan is to keep the existing
behavior up to and including the next LTS. Then the warnings will switch
on by default. All of this is protected by system of macros to opt-in or
opt-out the behavioral change at any time.

A possible counter-argument for doing this is that QFile::open is also
used for opening files in the the resource system, and that opening
"cannot fail". It clearly can, if the resource is moved away or renamed;
code should at a minimum use a Q_ASSERT in debug builds. Another
counter-argument is the opening of file handles or descriptors; but
again, that opening may fail in case the handle has been closed or if
the flags are incompatible.

---

Why not marking *every* open() override? Because some are not meant to
be called directly -- for instance sockets are supposed to be open via
calls to `connectToHost` or similar.

One notable exception is QIODevice::open() itself. Although rarely
called directly by user code (which just calls open() on a specific
subclass, which likely has an override), it may be called:

1) By code that just takes a `QIODevice *` and does something with it.
   That code is arguably more rare than code using QFile directly.
   Still, being "generic" code, they have an extra responsibility when
   making sure to handle a possible opening failure.

2) By QIODevice subclasses, which are even more rare. However, they
   usually ignore the return from QIODevice::open() as it's
   unconditionally true. (QIODevice::open() doesn't use the protected
   virtual pattern.)

I'll try and tackle QIODevice in a future commit.

[ChangeLog][QtCore][QFileDevice] The open() functions of file-related
I/O classes (such as QFile, QSaveFile, QTemporaryFile) can now be marked
with the "nodiscard" attribute, in order to prevent a category of bugs
where the return value of open() is not checked and the file is then
used. In order to avoid warnings in existing code, the marking can be
opted in or out, by defining QT_USE_NODISCARD_FILE_OPEN or the
QT_NO_USE_NODISCARD_FILE_OPEN macros. By default, Qt will automatically
enable nodiscard on these functions starting from Qt 6.10.

Change-Id: Ied940e1c0a37344f5200b2c51b05cd1afcb2557d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2024-04-17 20:07:47 +02:00
Morten Sørvig 7ba4486e7e wasm: log using emscripten_log() by default
Log using emscripten_log by default, unless
QT_FORCE_STDERR_LOGGING has been set.

It is now possible to log at different levels:

   qDebug() -> Info
   qWarning() -> Warning
   qCritical() -> Error

#ifdef out functions which are now no longer in use
on Q_OS_WASM

Change-Id: I0485e5c070069998a8dfc6759c02bc3b7d6a8a4b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-04-17 10:06:19 +00:00
Morten Sørvig d570293bb8 Warn on setHighDpiScaleFactorRoundingPolicy misuse
The rounding policy is used to calculate QScreen geometry
during startup. Changing it afterwards is not supported
since we don't have an update mechanism.

This restriction is already documented but printing
a warning makes sense since this is easy to miss.

Fixes: QTBUG-123102
Change-Id: Ib88511e61abbf97436a13dc5d38d3d1fbd5aab2c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-04-17 10:06:10 +00:00
Andrei Golubev 0f5f1bfeff Extract metatype information as part of library finalization
Make qt_finalize_target call qt6_extract_metatypes() on any library
targets if the finalization is deferred and the target uses automoc.

This makes sure the metatype information is always available when
necessary (e.g. in QML's foreign types setting).

[ChangeLog][CMake][Important Behavior Changes] With CMake 3.19 or later
qt_extract_metatypes() is automatically called during target
finalization for libraries that use automoc now. This has no
effect if you've already manually called qt_extract_metatypes() before,
but it does make sure that the metatypes are also generated if you
haven't.

Task-number: QTBUG-121199
Fixes: QTBUG-101143
Fixes: QTBUG-99051
Change-Id: If72ce5887a9cd71a4c15e9509b2eaab5af271adf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-17 11:53:13 +02:00
Ulf Hermann 674dfdf226 Network: Add Q_GADGET to types exposed in signals and slots
In order to build a complete graph of metaobjects via properties and
methods we need to know about all argument and return types as
metaobjecs. Such a graph is desirable for reasoning about the
consistency of the type system.

Task-number: QTBUG-101143
Change-Id: Ic4e2f58a4275df06178437c6d45270f3f2aa5ce6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2024-04-17 09:53:04 +00:00
Christian Ehrlicher d77ba8cb59 QStyle: deprecate PM_DialogButtons* enums
The threee enumerations
 - PM_DialogButtonsSeparator
 - PM_DialogButtonsButtonWidth
 - PM_DialogButtonsButtonHeight
Are not documented since Qt3 times and also not used anywhere. Therefore
deprecated them and remove the logic to handle them.

Change-Id: Ia59fe15482e744123e7fbf04b8d44661afb58b5c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2024-04-17 04:38:40 +02:00
Volker Hilsheimer 960867566a QTableView: fix infinite loop when resizing rows/columns on model reset
When a slot is connected to the modelReset signal before the model is
set on the view, then such a slot might try to resize the columns or
rows to fit the contents before the view had a chance to perform layout
work.

In that case, the while-loop that calculated the size hint of a rows
(or column) by checking the size hint of each cell might not exit, as
cached information about visual indexes would be invalid.

To prevent this, don't loop over the cells if the actual last row/column
of the model (after the reset) is less than the first (cached) visible
row/column. Also, make sure we increase the counter for number of
rows/columns processed with each iteration.

Add a test (that loops infinitely without the fix, resulting in the
test being killed by the framework), and make the 'actual' variables
constant for clarity.

Fixes: QTBUG-124301
Pick-to: 6.7
Change-Id: I0adb2f1e8a1e78760ef7c19e9686c9572eca8be6
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-17 04:38:33 +02:00
Fabian Kosmale 62d02c1d50 moc: Treat number + characters as Identifier, not Number
While <DIGIT>+<Character> is not a valid identifier by itself in the C++
language, it might become one when using it with the token pasting
operator.

This risks confusing some number literals with suffix as Identifiers,
but those are currently not supported anyway, so this shouldn't break
anything that is currently working.

Fixes: QTBUG-87219
Fixes: QTBUG-124288
Pick-to: 6.7
Change-Id: If73255cc0e6649bc90c52b1d177aac8ff975ae69
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2024-04-17 04:38:22 +02:00
Christian Ehrlicher 001d88ae38 Doc: don't use deprecated function in QMenu snippets
QMouseEvent::globalPos() is deprecated - replace it with
QMouseEvent::globalPosition().toPoint()

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-124343
Change-Id: I6f862a9a640da11d756dae58ffae8c6d7fc24e02
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Safiyyah Moosa <safiyyah.moosa@qt.io>
2024-04-17 04:38:14 +02:00
Christian Ehrlicher b6624877c6 SQLite: Update SQLite to v3.45.3
[ChangeLog][Third-Party Code] Updated SQLite to v3.45.3

Pick-to: 5.15 6.2 6.5 6.7
Change-Id: I8a58699f10cada8b33d47c3032861fa6ef1b6cc9
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2024-04-17 04:38:06 +02:00
Samuli Piippo a030795bc9 Revert "Always destroy OpenGL context when the window is destroyed"
This reverts commit 220afb358f.

The change caused segfault after menus or dialogs were closed.
The global raster compositing context is still being used by root
window and cannot be deleted from child window.

Pick-to: 6.7
Fixes: QTBUG-123962
Change-Id: Ie88925052f0f424617382388c587ae47570d13a7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2024-04-17 00:38:08 +03:00
Anton Kudryavtsev bd4d2786af qicc: avoid implict detach
Change-Id: I3bca1460257ddb44004e85d153351fba52b0c8c3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2024-04-17 00:03:52 +03:00
Ulf Hermann 551acf40ae Gui: Add Q_GADGET to QPlatformScreen
It's exposed in the QPlatformSystemTrayIcon::contextMenuRequested()
signal. In order to make sense of it on meta object level, it needs a
Q_GADGET.

Task-number: QTBUG-101143
Change-Id: I327d31f36e2cf3460398e328b26e9e5e5edec45e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-16 21:57:06 +02:00
Tor Arne Vestbø f6777af17d Revert "CMake: Improve Xcode projects for single SDK builds on Apple platforms"
This reverts commit 5898e0e4f1.

Likely broke a CMake deployment test in qtdeclarative.

Change-Id: I90c8343f0657845dd514e573b7333f441b70cc9e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-04-16 19:57:06 +00:00
Giuseppe D'Angelo e52883d77d QImageReader: use QFile::open return value
The code was already OK because it used QFile::isOpen to check
if open() succeeded or not. In preparation for making open()
[[nodiscard]], refactor the code to just use its return value.

Change-Id: Ibab86ca894103f01ff3b6084caedb3117ffb6c7e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2024-04-16 21:57:06 +02:00
Vladimir Belyavsky d914c58c7e QTextLayout: keep strong reference on font engine in a layout loop
This is speculative fix for the crashes in QTextLine::layout_helper()
we're observing on users side.

The possible reason is in that fontEngine and previousGlyphFontEngine,
which are stored in LBH, became invalid during the layout cycle
(destroyed by trimming font cache?).

To prevent this we need to handle font engine's ref-counter
gracefully, so just wrap them into QExplicitlySharedDataPointer.

As a drive-by change, use in-class initialization for LBH members.

Task-number: QTBUG-117500
Pick-to: 5.15 6.2 6.5 6.7
Change-Id: I6987a2b5618bb4ba8762f2ef01b4ce0dd60cb232
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2024-04-16 19:28:45 +00:00
Joerg Bornemann aeaaff1d5c Revert "CMake: Fix *-metatypes.json creation, take III"
This reverts commit 654f3c5634.

That commit enabled a work-around for CMake upstream issue #19005 for
Visual Studio project generators. It turns out that this is not actually
needed, and that the work-around causes unnecessary rebuilds.

Fixes: QTBUG-121046
Pick-to: 6.5 6.6 6.7
Change-Id: Ie502e2df999a204ab09d28322017be3c7ed8ebc5
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
2024-04-16 21:28:45 +02:00
Laszlo Agocs 7aaa6a6044 Correct the internal signatures in the GL 4.5 func wrappers
There are 9 functions in the 4.5 API that were initially specified
to use GLsizei, but later "magically" became GLsizeiptr (i.e.
64-bit or 32-bit depending on the arch).

The current gl.xml, unlike old ones, uses GLsizeiptr, as do the
extension headers and most of the online docs, except some that of the
reference pages are stuck with GLsizei.

Assuming that today's OpenGL implementations expect GLsizeiptr, fix
the the internal signatures, so that calling into the GL implementation
is done using the correct argument sizes.

In addition, add GLsizeiptr signatures in the public API guarded with
>= QT_VERSION(7, 0, 0).

Pick-to: 6.7 6.6 6.5
Fixes: QTBUG-67807
Change-Id: Ifc7e97b0479a186000a56709c37ba7f77b6f1ff2
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2024-04-16 13:31:07 +02:00
Piotr Wierciński 655b98482e wasm: Abort network request on destruction of QNetworkReply
Deleting QNetworkReply is a common way to cancel pending request.
Wasm implementation was not treating it properly.

Task-number: QTBUG-124111
Pick-to: 6.7
Change-Id: I46d8624e323fca0932411c575922415d9f9d7986
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
2024-04-16 11:16:17 +00:00
Marc Mutz 7bff20c9f5 QSignalSpy: prepare for de-inlining
Rename qsignalspy.qdoc to .cpp, include qsignalspy.h and add the
namespace macros.

Task-number: QTBUG-123544
Change-Id: Ibd89844018afc277e6a69e7200cdbd08befd4da2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2024-04-16 11:01:31 +02:00
Volker Hilsheimer 359df32300 Android: don't call JNI_OnLoad for libraries opened with QLibrary
JNI_OnLoad gets called automatically by the JVM when it loads a shared
library. A native library that is loaded by native code shouldn't have
it's JNI_OnLoad entry point function called, as that would indicate
that the plugin is loaded by the JVM, which it is not.

If framework or application code requires that function to be called
(and wants to perform error handling, such as closing the library again
if the function returns JNI_ERR), then that can and should be done
explicitly.

[ChangeLog][Android][QLibrary] Loading a shared library with QLibrary
no longer implicily calls a JNI_OnLoad implementation.

Fixes: QTBUG-92007
Pick-to: 6.7
Change-Id: I9aa71ec73b950029e0ae1be7d54e1c8576f356ab
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2024-04-16 04:23:05 +02:00
Giuseppe D'Angelo 4183fa4c0b Tools: handle file opening failure
Most of the cases, a file handle (stdin/out) is opened without checking
for error. That operation may still fail, so check for it.

Change-Id: I30c3e7b40858acd8b1662622129bd6557722dccd
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2024-04-14 00:04:26 +02:00
Christian Ehrlicher 56ec0f94b3 QTableView: fix cornerWidget connection
A click on the corner widget should select all items, not reset the
selection. This was accidentally added with
3e144bdc74.

Pick-to: 6.7
Fixes: QTBUG-124267
Change-Id: Ie20b7cf0ff730214dca80116ad888f42c2b7a670
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-04-13 18:53:53 +02:00