Commit Graph

60536 Commits

Author SHA1 Message Date
Kuntal Majumder
05a7cbef5b Allow building with llvm-clang in macOS
Supressing the linking warnings on macOS are relevant when we are
using AppleClang and not upstream Clang.

The provided arguments do not apply to llvm-ar and llvm-ranlib.

Change-Id: I8b664c01802b47077eb0ab80dab7681ee0bfcaa9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-06 21:54:43 +01:00
Alexandru Croitor
a804ac3d88 CMake: Relax example dependencies to be per-repo
When doing a top-level build with ExternalProject examples, it doesn't
make sense to make qtbase examples depend on e.g. qtdeclarative
plugins. Instead the qtbase example should only depend on plugins
built in qtbase.

Create per-repo custom targets that depend on all plugins built within
that particular repo.

Create an additional per-repo target which depends on all
plugins built in that repo, as well as plugins from dependent repos.
Use the latter as a dependency for examples built as part of the
current repo.

Repo dependencies are parsed from dependencies.yaml.

Pick-to: 6.5
Fixes: QTBUG-110913
Change-Id: I149860cc549caf53271c9ea296eb7bac2a663715
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-06 18:54:00 +01:00
Volker Hilsheimer
2e6de6f8b2 Doc: fix links to changed or renamed i18n pages and sections
Pick-to: 6.5 6.5.0
Change-Id: Ibe00b793ae0943cdbbcfa272e5cae4e91da5bf7d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-03-06 18:52:35 +01:00
Amir Masoud Abdol
93a378b295 Silence a few unused-but-set-parameter warnings in some of the tests
Change-Id: I8cf3e4764ae50011d691dec6f52a355ddfb0ce7b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-06 17:16:14 +01:00
Morten Sørvig
ba724a2ded wasm: set stack size to 5MB again
Recent Emscripten 3.1.27 reduces the stack size to 64KB,
which is way to small for Qt-based applications.

Restore the previous stack size (5 MB) by setting STACK_SIZE.

Change-Id: I6c25e31b32dc1d551fa423655fcef4891830bcd1
Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2023-03-06 14:06:07 +00:00
Christian Ehrlicher
28d5da386f SQL/Tests: remove some unused functions
remove toHex() as it's not used at all and qTableName() with two params.
Also remove some SQLite 2 specific stuff

Change-Id: If285febdfbee5833f7174d70f386bd54674bd539
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-06 15:06:07 +01:00
Ulf Hermann
5123645831 QMetaObject: Drop hand-optimization of strcmp
Comparing the first character ahead of a strcmp() call is unlikely to
result in faster code than just calling strcmp() right away these days.
Any compiler worth its salt should have a specialization of strcmp()
that uses platform-specific tricks to produce the best performance.

Change-Id: I80b74e698a6636d056b44cbef372edcb417534eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-03-06 08:41:19 +01:00
Marc Mutz
b955648224 QDBusError: don't refer to a QT_NAMESPACE'ed get() as ::get()
This code predates the public history. I don't know exactly how this
worked before, but I guess it's because the QT_USE_NAMESPACE in our
headers.

If there's _any_ get() function at the global scope, then name lookup
stops there and considers _only_ that function. And if that happens to
have a compatible signature, good night.

Use unqualified lookup instead. That will find the QT_NAMESPACE one,
ignoring other overloads at global scope. And when non-namespaced,
will emit an ambiguity error in the presence of another matching get()
function at global scope.

Task-number: QTBUG-111598
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Iea141ea543193394ba527b414caf31c1f3a2355b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-05 21:57:21 +01:00
Marc Mutz
28f56f29bb Short live q23::forward_like!
Following https://eel.is/c++draft/forward#lib:forward_like
step-by-step.

Temporarily add a q23utility.cpp to contain the static_assert()
tests. There's no point in establishing a tst_q23utility just to run
six static assertions. Should remove the .cpp again once an in-tree
user exercises the function with the same coverage.

Task-number: QTBUG-111598
Change-Id: Icb18eae089d65ca4e555921dbb71e74a7e255645
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-05 21:57:18 +01:00
Ahmad Samir
4bc0f4fbec QMutex: add missing include
Change-Id: I43dba6811e7a31990e767d7ca13fdd518109217e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-05 14:24:34 +02:00
Ahmad Samir
0f0b9bd2cf QCompilerDetection: fix compiler warning about undefined macro
build/include/QtCore/../../../src/corelib/global/qcompilerdetection.h:546:7:
warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef]
 #  if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__)
      ^

build/include/QtCore/../../../src/corelib/global/qcompilerdetection.h:648:7:
warning: '__cplusplus' is not defined, evaluates to 0 [-Wundef].
 #  if __cplusplus > 201103L
      ^

Change-Id: I8ed8e0c4b93977238986df0b3339ffae4d1d0fda
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-05 13:22:01 +02:00
Piotr Wierciński
073848f3c4 wasm: fix respecting minimum size of QWasmWindow
Minimum size of QWasmWindow was not properly enforced.
Make sure that minimumu size constraints are respected
when the QWasmWindow is created, resized manually or
changed by setGeometry().

Fixes: QTBUG-111162
Change-Id: I2984b0836b5b53f9163275153d734cb1d81ef3b6
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-03-05 09:31:06 +01:00
Volker Hilsheimer
9e31631557 Doc: fix link to QTest::failOnWarning
Also fix incorrect failOnWarning*s* elsewhere in comments.

Pick-to: 6.5 6.5.0
Change-Id: I0bbc5e71060348153876f3d9a7c77c67f3c2e00d
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-03-05 06:00:39 +01:00
Volker Hilsheimer
9ec61d4460 Port QPathClipper test away from home-grown QCOMPARE
Use a scope guard to print debug info in case of an early return.
Silences clang warning about sprintf being unsafe and deprecated.

Change-Id: Idcbfde1a6f2eb1143f51c1e5ecedbf3fe90d8ec8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-03-05 06:00:18 +01:00
Volker Hilsheimer
47df0eb513 Doc: fix QOpenGLWidget::defaultFramebufferObject documentation
Fix the link to QSurfaceFormat::StereoBuffers, and clean the text up
a bit. If everything is a \note, then we might just as well not have
notes, so move the statement about when this function is useful out
of a note, and combine the statements elaborating on ownership and
lifetime of framebuffer and contexts into a single note.

Pick-to: 6.5 6.5.0
Change-Id: I7cb1f9ff78ba760e99d639550130f5c833ad684a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-03-05 06:00:11 +01:00
Volker Hilsheimer
3ff66569ea Doc: Fix syntax error
Amends e0ecb0ded2

Pick-to: 6.5 6.5.0
Change-Id: If315d97e93047a8bece36c727c7646d30eb7458b
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
2023-03-05 06:00:02 +01:00
Thiago Macieira
8413824ca0 qsimd_p.h: remove LZCNT feature from the ARCH_HASWELL list
And for good measure, I'm also removing BMI2. The one we really care
about ensuring gets enabled instead of -mavx2 is FMA anyway.

Complements commit 29d3938aa5 (which in
turn complemented commit a98cf15ed1),
which removed BMI1 because AMD introduced it before AVX2. Looks like
they also introduced LZCNT in some earlier processor too (family 10h) or
GCC 12 began emitting __LZCNT__ for that family -- IIRC the AMD feature
list was bigger than just the lzcnt instruction.

Fixes: QTBUG-111698
Pick-to: 6.4 6.4.3 6.5 6.5.0
Change-Id: I7f354474adce419ca6c2fffd1748f5b24f69a692
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-03-04 10:59:56 -08:00
Thiago Macieira
2a19c7ed13 QNetworkInterface/Unix: replace one Q_ASSERT with static_asserts
This requires compilers with constexpr offsetof(), which Clang seems to
be since at least 3.0 and GCC since 4.7, both of which are way older
than anything we need to support.

Pick-to: 6.5
Change-Id: I7f354474adce419ca6c2fffd1748b3dcfc616f4a
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-03-04 10:59:44 -08:00
Tor Arne Vestbø
e2446afaa1 qmake: Resolve target suffix based on Qt build config for static plugins
The qtPlatformTargetSuffix() function is used in various places to
determine the suffix of targets based on the config, which for macOS
will result in a _debug suffix in debug mode.

This becomes tricky when one project built in debug mode tries to depend
on the libraries/plugins of another project (Qt) built in release, as
the qtPlatformTargetSuffix() function uses the current CONFIG as input,
which may be different than the QT_CONFIG (or CONFIG of whatever project
is being depended on).

For libraries this was fixed in 50e664835b
by iterating all known library paths, and trying the CONFIG suffix before
falling back to release version.

For plugins this was never solved, which becomes an issue when linking
to static plugins, either in a fully static build of Qt, or when some
of the plugins are static (permission plugins e.g.).

In this situation, the user project has to have the same configuration
as Qt was built with, to avoid errors like:

 error: no such file or directory: '~/6.x-static/qtbase/plugins/platforms/libqcocoa_debug.a'

To work around this, we assume that a plugin installed into the Qt
tree has the same build configuration as Qt itself, then then use
QT_CONFIG as the determining factor when linking to the plugin.

This still ties the build config of the plugin to the config of Qt,
but relaxes the relationship to the application, allowing it to be
built in either debug or release, which is an improvement to the
current state.

Pick-to: 6.5 6.5.0
Task-number: QTBUG-110356
Change-Id: Icee67fc01313a6c6f34178a6345ccae1b57429d7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-03-04 16:54:56 +01:00
Tasuku Suzuki
0bbf817589 Fix build with -no-feature-animation
Pick-to: 6.5
Change-Id: Ibd786bc140051ed09d65c6a784ad52c6a1ef7987
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-04 09:45:41 +00:00
Tasuku Suzuki
45df0ed246 Fix build with -no-feature-lineedit
Introduce a new feature for password dialog in cups that needs several widgets

Pick-to: 6.5 6.5.0
Change-Id: I93799b814ac06e661c19cffcd7d3c9bfa56ff814
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-04 09:45:21 +00:00
Edward Welbourne
58f5ec35f1 Doc fix in QIntValidator::validate() and comment on a test
The doc said positive values for a negative range were intermediate
but the code actually rejects them if the value has an overt plus
sign, so make clear that intermediate is only for the case without a
sign. Incidentally comment on a test where it might not have been
obvious to the reader that a space is the locale's digit-grouping
chracter.

Pick-to: 6.5 6.5.0
Change-Id: I3edab74fe8c2cbe8448c0e523676f1fd0d0d8a9f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-03 23:19:23 +00:00
Ahmad Samir
6f9ace5685 QSignalSpy: add wait(std::chrono::milliseconds) overload
Make the wait(int) overload call the new one.

Task-number: QTBUG-110059
Fixes: QTBUG-100041
Change-Id: Ia085453c05e09e219ba56010b2504113bbc1dd34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-03 21:36:55 +02:00
Ahmad Samir
2a495c2596 QTestEventLoop: add enterLoop(std::chrono::milliseconds) overload
Task-number: QTBUG-110059
Change-Id: Ibf1d76afd313e390103be4a22e44af7fb41ace1b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-03 21:36:48 +02:00
Ahmad Samir
855a6cb676 Use utimensat instead of utimes
From the manual page:
Note: modern applications may prefer to use the interfaces
described in utimensat(2).

Change-Id: Ib20d8b9b50626233852ca351452ce90841a39603
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-03 21:36:01 +02:00
Volker Hilsheimer
d48dbafeb2 Doc: fix qdoc warning, explicitly qualify enum type
Pick-to: 6.5 6.5.0
Change-Id: Ie289f2468a3a71d35696907691586a31f70d5b1e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-03-03 20:05:27 +01:00
Volker Hilsheimer
c1cbb12e57 Doc: fix links to qFuzzyIsNull
The function is in the QtNumeric documentation context.

Pick-to: 6.5 6.5.0
Change-Id: Ibc6a8961bc04efd4ab1eb50bb371e6a169d513dc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-03-03 20:05:27 +01:00
Marc Mutz
fd17eaca83 tst_QVariant: check fromValue() with a non-default-constructible type
... by just using fromValue() instead of the QVariant(QMetaType,
void*) ctor.

Code coverage isn't reduced, because fromValue() will, of course, call
that exact ctor itself.

Amends df0085d3a2.

Pick-to: 6.5 6.4 6.2
Task-number: QTBUG-105140
Task-number: QTBUG-111598
Change-Id: I02464803090fa7078947625616e6fc20e623ef31
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-03 20:05:27 +01:00
Marc Mutz
cbb484b713 qstrncpy(): document that we don't implement strncpy() fill-all-[dst,len)
The Windows version didn't, ever since we started using strncpy_s(),
and we might change the non-Windows version, too.

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: Iee1c09674d296be806d4be42b1891940120b4a01
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-03 18:16:22 +00:00
Ievgenii Meshcheriakov
eea83bac26 dbus examples: Remove listnames example
Task-number: QTBUG-111366
Pick-to: 6.5
Change-Id: I5c483cbfec4072dae610c6d98b97d10057ba9ddc
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-03-03 12:46:29 +01:00
Liang Qi
2b94453cbd xcb: ignore the xscreens which don't belong to current connection
This amends 9a4c98e556.

When a X server has multiple xscreens, for example, ":0.0" and ":0.1",
a Qt application, which uses ":0.1" as display, can't use the randr
monitor from other connection(":0.0") to show contents there. Then
we don't need to generate QXcbScreen for them.

Pick-to: 6.4 6.5
Fixes: QTBUG-110898
Change-Id: I04c1512664b763ffabb55b75db4411d100536255
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: JiDe Zhang <zhangjide@uniontech.com>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2023-03-03 07:42:21 +00:00
Marc Mutz
a53429c1ec [docs] Fix typo in QMessageAuthenticationCode::reset() documentation
Pefer → Prefer

Pick-to: 6.5
Change-Id: Ie9fd09452f5d99d799a045ee59fc11a2b9c5a599
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-02 21:37:10 +01:00
Marc Mutz
50389d4973 Mark QMessageAuthenticationCodePrivate::initMessageHash() as noexcept
It only calls other noexcept functions:
- QCryptographicHash::addData(QByteArrayView)
- xored()

Pick-to: 6.5
Task-number: QTBUG-111688
Change-Id: Idd8c485a48b8243b359638086c373288c1c6f96d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-02 21:37:03 +01:00
Marc Mutz
590172ccc5 QMessageAuthenticationCode: port Private::setKey() to QByteArrayView
The only change is the signature of the function.

Also mark it as noexcept. It calls all functions in-contract and
doesn't allocate memory.

Task-number: QTBUG-111676
Pick-to: 6.5
Change-Id: I505c1f51da704fd46e538a68d6d8703f7cdefbc8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-02 21:36:50 +01:00
Volker Hilsheimer
76c63936d3 macOS: Send a filename QFileOpenEvent if invalid URL, deprecate openFile
When the string we receive from the system doesn't parse into a valid
QUrl (because QUrl requires a valid IDN), then we shouldn't send the
QFileOpenEvent based on that invalid QUrl, but instead pass the string
through as the file name.

The file name is anyway not guaranteed to be path to a file that can be
opened, as per the existence of QFileOpenEvent::open and the repective
documentation stating:
"some files cannot be opened by name, but require specific information
stored in this event."

However, that API is not useful at all, the implementation just opens
the passed-in QFile, using the stored file name. There's no way
to override this, and QFileOpenEvent is a locked class with all data
stored inline. So we can't even redirect to a platform-implementation.
Deprecate that function. Applications should interpret the string
returned by file(), which might not be a path to a local file.

Fixes: QTBUG-98384
Change-Id: Iff75489de9d7c5fc034f44c0bda4963b2efb1925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-02 18:58:03 +00:00
Edward Welbourne
ac6c7aa12f Simplify and relax UTF-8 locale override machinery for Darwin
There's no need to try the various permutations of the language
and region specific locales, as they all point back to the same
CTYPE in /usr/share/locale/UTF-8/LC_CTYPE

In addition, processes started from launchd come with an empty
locale environment (LC_ALL/LC_*/LANG), and hence will default
to the "C"/POSIX locale, even after picking up the environment.
This primarily applies to applications launched from Finder,
but also affects processes launched as background services.
And since a child process will inherit its parent's environment
the empty locale environment is propagated when running apps
from IDEs such as Qt Creator or Xcode, or commands in an SSH
login session (as sshd is a background service), unless the
environment has been explicitly set up by the shell (Zsh).

Since neither of these situations is the result of user
misconfiguration, it makes little sense to spit our a
warning.

We however still warn if we detect that the character
encoding has changed from the default "C" encoding, or
if the encoding is "C", but we detect that the user has
modified any of the relevant locale environment variables,
as this indicates either a change in the system default
behavior, or that the user has explicitly requested a
"C" locale, which is wrong.

Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Fixes: QTBUG-111443
Pick-to: 6.5.0 6.5 6.4 6.2
Change-Id: I6fd14d1f8adddc2914d6ff4d3b5ad34a3871ef82
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-02 18:39:10 +01:00
Edward Welbourne
fff9395c28 QCoreApplication::initLocale(): Improve warning on failure
If we fail to set a UTF-8 locale, the warning claims Qt shall use a
UTF-8 locale, for which it reports an empty string, when in fact it
isn't using a UTF-8 locale, although it'll interact with the system as
if it were.

Also, the user is liable to understand "system locale encoding" as
referring to the underlying system rather than whatever they may have
configured in a local shell; and a non-native speaker assures me the
use of "shall" is also apt to confuse; so reword the messages.

As the old locale is only needed for the code path prints the
warning we can defer resolving it until we know we're going to
use it, by querying the locale at that point.

Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Pick-to: 6.5.0 6.5 6.4 6.2
Change-Id: Ie6a6e7a707200e58335fcb64cb1584f0c307895a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-02 18:39:10 +01:00
Edward Welbourne
91bea4470e Tidy up QCoreApplicationPrivate::initLocale()'s #if-ery
Explain each exception cleanly and as itself, thereby avoiding the
need for long and tangled #if-ery conditions.

Make sure to setlocale(LC_ALL, "") everywhere we think we have
initialized the locale, including Integrity - it plainly has
setlocale(), since we call it for LC_CTYPE - since we should at least
give it the chance to set its implementation-defined default locale,
instead of the standard-defined POSIX locale in use on entry to
main().

Done-with: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Pick-to: 6.5.0 6.5 6.4 6.2
Change-Id: Iab00984ba45dfc9a324b6a3c12e3d330b655a5a9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-02 18:39:10 +01:00
Laszlo Agocs
7cf6c57648 Avoid incomplete textures in GL paint engine
...which can happen if the OpenGL implementation reuses IDs
so that a glGenTextures results in the same ID that was used
by a texture destroyed by glDeleteTextures just before.

In this case the lastTextureUsed tracking needs to be aware
and invalidate, otherwise the newly created texture is
assumed to be already existing (the ID is the same as before
after all), and so operations such as setting the minification
filter is skipped (which is fatal with OpenGL given that we
do not use mipmaps).

This is exercised in practice by the drawPixmapFragments test
introduced in the previous patch. On Intel graphics it would
work, but it does not render correctly with NVIDIA due to how
the driver's internal ID handling works.

Pick-to: 6.5.0 6.5 6.4 6.2
Change-Id: Ic2771fe9a2dec7da4aa3804d8498dd89e3c18415
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-03-02 17:39:10 +00:00
Laszlo Agocs
d6c5a2f917 GL paint engine: Fix drawPixmapFragments when using buffer objects
Until recently the buffer object-based code path (so not client-side
pointers) was only hit with a core profile context. This changed at
some point in 6.4 and later to support WebGL (that has no client-side
pointers, unlike OpenGL ES 2.0 it is based on). Now buffer objects
are preferred over client-side pointers, always. Problem is,
drawPixmapFragment() was never functional on this code path, it seems.

Expecting that transferMode() does all the uploadData() needed is wrong.
transferMode() bails out if the mode is the same as before, and that's
exactly what happens when an application calls drawPixmapFragments()
on the painter twice, after each other.

How exactly this works with client-side pointers is not fully clear, but
presumably the data buffer address stays the same so all pointers passed
in to the glVertexAttribPointer calls are valid, and it sources the data
for each draw call (probably), thus the rendering is all correct even
though only the first, not the second, drawPixmapFragment() led to
calling uploadData() internally.

Amends e487b07e18 although this patch on
its own is just as applicable pre-6.4 as well (to fix drawPixmapFragments
when using a core profile context).

Pick-to: 6.5.0 6.5 6.4 6.2
Fixes: QTBUG-111416
Change-Id: I2ad358424e613192a51b99b937aef7660f5dbe08
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-03-02 17:39:09 +00:00
Laszlo Agocs
6f35d81bd0 rhi: Remove unused getters
Change-Id: Ifb1e42b75a7f9ae51929c56809454d9207fa0d1c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-03-02 18:39:09 +01:00
Mårten Nordheim
bdcb0a32fa HTTP example: update screenshot
Fixes: QTBUG-108874
Pick-to: 6.5
Change-Id: Ib87895c6512abb967734ce4c1ed0be76c698feb4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-03-02 18:39:09 +01:00
Volker Hilsheimer
c9dc3d7427 Doc: fix link to XML Streaming page
Pick-to: 6.5 6.5.0
Change-Id: Ibc8e869e140e25d7f90bd8ff922918afb3935e42
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-03-02 18:30:22 +01:00
Jan Arve Sæther
5773c3ac28 Move anchor layout example to manual tests
Pick-to: 6.5 6.5.0
Change-Id: I9c9a9dbcdaf705a31208b80b71e978938a492142
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-03-02 17:24:53 +00:00
Liang Qi
cd0301a78e tests: skip tst_QScreen::grabWindow() on XWayland
Pick-to: 6.5
Task-number: QTBUG-104595
Change-Id: Icb56a587dfbad84533616160817a3d43411146f1
Reviewed-by: Kalle Viironen <kalle.viironen@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
2023-03-02 15:58:37 +01:00
Christian Ehrlicher
2adb22fba5 tst_QSqlDatabase: avoid some runtime warnings
Make sure to properly close the cloned database connections and allow
one test for sqlite

Change-Id: Ia4eb4a684a3c432844e4b2a77bff69655b53f9b2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-03-02 15:02:02 +01:00
Marc Mutz
189444d8c4 De-pessimize QCryptographicHash::reset() in OpenSSL3 mode
Instead of going through the whole dance with provider loading,
context creation etc, just call EVP_MD_CTX_reset() to reuse the
already-setup context, if any.

This makes QCryptographicHash::reset() adhere to its noexcept
specification again (assuming EVP_MD_CTX_reset() doesn't allocate
state, and, despite its non-void return type, cannot fail on a valid
context), and should greatly improve the speed of reset(), addData(),
resultView() cycles.

Pick-to: 6.5
Change-Id: I7c35b61cbeab1ffd6dd258e8389ea614d49e2e1e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Jan Grulich <jgrulich@redhat.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-03-02 14:54:09 +01:00
Tor Arne Vestbø
3b08cbff69 Remove redundant information in QString::toLocal8Bit() docs
Pick-to: 6.5
Change-Id: I794621a599bfab85c6a19300225d0e1ad4948362
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-03-02 12:51:15 +01:00
Tor Arne Vestbø
349bd4db22 Document that to/FromLocal8Bit() does not consider CFStringGetSystemEncoding
The CFStringGetSystemEncoding() defaults to Mac Roman, unless overridden
via ~/.CFUserTextEncoding, which very few users do or even know about.

Make a note in the to/FromLocal8Bit() that we don't consult this function,
or its NSString wrapper, when determining what the local 8 bit encoding is.

Task-number: QTBUG-111443
Change-Id: I89b6040c62d42de0daea9df908d97d9a23e7b160
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-03-02 12:51:14 +01:00
Tor Arne Vestbø
e7d038c027 iOS: Respect QSurfaceFormat::colorSpace() when using Metal
Unlike on macOS, there's no colorSpace property on UIWindow or UIView,
but CAMetalLayer has one, which allows us to tell Core Animation that
the layer targets a specific color space, and Core Animation will then
do the rest of the color matching to the target display.

Now that we use Metal to flush raster content, this is even more useful.

Task-number: QTBUG-108094
Pick-to: 6.5
Change-Id: Ib04b42d9baa296b608983db38faf0398430db093
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-03-02 12:51:14 +01:00