Commit Graph

63156 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
797edbc58c QHostInfoResult: use the same semantics as the contextless connect()
The 3-arg QObject::connect() overload (the "contextless" one) simply
forwards to the 4-arg overload, using the sender object as both
the sender and the receiver/context.

QHostInfo does not use connect() directly in order to emit notifications
that a lookup is finished. Instead, it uses some of QObject private
plumbing. When handling a lookup request that specifies a function
to call when done, but no context object, QHostInfo passes nullptr
as context/receiver.

Change QHostInfoResult's behavior to always have a "receiver": in case
the caller didn't specify one, use `this` (= the sender).
As a drive-by, this allows to streamline some code.

Change-Id: Ic2e63ac18ba36269036950b6f6b7fecea51d0c99
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-09-06 13:23:15 +02:00
Kai Köhne
8550d60aca Mark linux_perf_event with GPL-2.0-only
"GPL-2.0" as a SPDX identifier is deprecated in SPDX 3. Use
the more explicit GPL-2.0-only instead.

Pick-to: 6.2 6.5 6.6
Change-Id: Ie543135ad1d73205f7a94db140189f5132098ea2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-09-06 07:56:33 +02:00
Kai Köhne
0b3b1ab26c Mark freetype as GPL-2.0-only
GPL-2.0 SPDX identifier is deprecated. Use the more explicit
GPL-2.0-only instead. Also, in SPDX expressions AND and OR
need to be all uppercase.

Pick-to: 6.2 6.5 6.6
Change-Id: I0875cf3b9b2020f69e3318d5ff314988a3992409
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-09-06 07:56:28 +02:00
Giuseppe D'Angelo
dd50d58af2 QHostInfo: add a Qt 7 note
Change-Id: I45ee4eba1f7ded358acaccf678e4e12a006b91b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-06 01:50:16 +02:00
Laszlo Agocs
d5eed2c5f5 d3d12: Avoid full-size staging for partial texture updates
Running the BenchmarkDemoQt6 application features a massive
startup time, followed by running out of memory (GPU-side,
assuming a discreet adapter), which is then remedied by the
system with heavy swapping. This is due to creating 8+ GB
of staging data.

While there are doubts about the application itself (seems there
is an upload for each Quick 3D Texture per material per model,
even though the texture itself is the same?), there is no reason
for the D3D12 backend to use so much more memory compared with
other backends.

That is now ensured by only creating a staging area for the data
(taking the 256-aligned row pitch requirement into account), not
simply using the subresource (i.e. the whole image) size. This is
equivalent to what e.g. the Vulkan backend does.

Pick-to: 6.6
Fixes: QTBUG-116729
Change-Id: I1b5083c6b859ec0736cd9fd792cba8236aeba6e3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2023-09-06 01:17:47 +02:00
Liang Qi
29b076d614 widget: set WA_X11NetWmWindowType* after xcb window was created
This amends 17d68c4fc3.

Fixes: QTBUG-116696
Task-number: QTBUG-39887
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Idf385bcbeb630ddfc51b39b2af35da3ab94b07c0
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-06 00:28:55 +02:00
Andreas Eliasson
1e6367e65c Doc: Add notes that QVulkanFunctions supports Vulkan 1.3
QVulkanFunctions and QVulkanDeviceFunctions now also support Vulkan 1.3.

Fixes: QTBUG-116465
Change-Id: I74f6188330dec1b776b4c6db423b9152ea71d1c3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-05 23:14:59 +02:00
Andreas Eliasson
ebd87ce2e5 Doc: Fix qdoc full stop warning in briefs
Add a full stop to the briefs to clear the following qdoc warnings:

* multistreamclient.qdoc: '\brief' statement does not end with
  a full stop.
* multistreamserver.qdoc: '\brief' statement does not end with
  a full stop.

Change-Id: If0e58bc100a595f3ee00c79c31ac19f8d9ee3ad9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-05 21:14:59 +00:00
Edward Welbourne
40b07ee887 Minor tidies in example's XML converter
Make a local variable more local, set a variable only once its new
value is known to be valid.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ib6aa16e8c834f89c6ccc0715f20b0e5f0a7f3b6d
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
2023-09-05 22:41:35 +02:00
Edward Welbourne
d631f88804 Exploit C++17 init-statements in if to simplify a loop
The serialization converter example's text converter's loadFile() can
be made tidier by making the conditions within its loop into a chain.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Ic82355eab7380a0c671b3805ca140958bb1c5af5
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Øystein Heskestad <oystein.heskestad@qt.io>
2023-09-05 22:41:35 +02:00
Edward Welbourne
54c2383e81 Add _tzset() call before mktime() on MS
Add a change-of-zone manual test, based on a bug-report by Felix
Kälberer. This failed: debugging revealed that MS's mktime() doesn't
pick up a change to system zone.

Fixes: QTBUG-83881
Change-Id: I9b86398ef870627a059e269f85a0f5d9d9de284b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-05 22:41:35 +02:00
Edward Welbourne
648f648258 Revise new-in-CLDR v43 enum entries to say new in 6.6, not 6.7
After the v43 update landed, a bug surfaced that was fixed by it, so
it has been picked back to 6.6, in which it has landed before 6.6.0
branched. Consequently the new enum members are in fact [since 6.6],
not [since 6.7], so update the documentation to reflect reality.

(They may also be in 6.5.3, subject to ongoing debate, but they were
not in 6.5.0 so are not [since 6.5], even if 6.5's branch does end up
describing them as [since 6.5.3].)

Pick-to: 6.6
Change-Id: Ida938fc3e3575d6e45d61449123464ebb5b6638c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-05 22:41:35 +02:00
Volker Hilsheimer
e73f35d9c6 QPrintDialog on macOS: Don't crash when parent is not a window
The test case is an incomplete version of the test that will be added to
verify the fix for the referenced bug report. The test crashes already
when showing the dialog without this fix.

Task-number: QTBUG-116277
Pick-to: 6.6 6.5 6.2
Change-Id: I969a723157f6453b78bafae5cb24a6b37b1eea50
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-09-05 22:41:35 +02:00
Anton Kudryavtsev
5fa4ce03f0 qDecodeDataUrl: use QL1S more
Avoid tmp QBA creation, just wrap QBAV to QL1S for QSB expression

Change-Id: I8395bd2db2aab29a6b4965071b022c0487bddcb6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-05 18:58:47 +00:00
Anton Kudryavtsev
4bd3567484 QDecompressHelper: uncache acceptedEncoding
The only user already has its own cache of transformed copy of acceptedEncoding list since 43d15dd572

Change-Id: I485b41555f327c6ff39dd48347240a725f00e09b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-05 18:58:47 +00:00
Dennis Oberst
b134718c11 QString: use new assign() in operator=({QByteArray, QChar, char *})
operator=(~) and assign() share similar names but, until now, have not
shared the same functionality. This patch introduces the usage of
QString::assign() within the non-sharing assignment operators to
effectively boost efficiency by reusing the available capacity.

Since we're re-using the capacity we update the test case in places
where they don't hold true anymore.

Since these assignment operators are frequently used in many places,
both within Qt and non-Qt code, this patch comes with benchmarks.

The preview of the benchmark results are compared with this patch and
before this patch. The results show a boost in performance for the
QByteArray and 'const char*' overload. The QLatin1StringView overload
already preserved the capacity and has a better performance than the
assign() alternative, so don't us it there.

(x86_64-little_endian-lp64 shared (dynamic) release build (O3); by
gcc 13.2.1, endeavouros ; 13th Gen Intel(R) Core(TM) i9-13900K

benchmarks executed with -perf -iterations 1000000

  * The last value at the EOL represent the string size.

QString &operator=(const QByteArray &a) (current)
  64.3  cycles/iter; 300  instructions/iter; 17   nsec/iter (5)
  65.8  cycles/iter; 366  instructions/iter; 12   nsec/iter (10)
  62.9  cycles/iter; 301  instructions/iter; 11.5 nsec/iter (20)
  61.3  cycles/iter; 315  instructions/iter; 11.1 nsec/iter (50)
  71.4  cycles/iter; 386  instructions/iter; 13   nsec/iter (100)
  136.9 cycles/iter; 811  instructions/iter; 24.5 nsec/iter (500)
  245.8 cycles/iter; 1394 instructions/iter; 42.5 nsec/iter (1'000)

QString &operator=(const QByteArray &a) (before)
  78   cycles/iter; 399  instructions/iter; 15.3 nsec/iter (5)
  82.3 cycles/iter; 465  instructions/iter; 15   nsec/iter (10)
  76.7 cycles/iter; 400  instructions/iter; 14   nsec/iter (20)
  79.5 cycles/iter; 414  instructions/iter; 14.5 nsec/iter (50)
  91.4 cycles/iter; 485  instructions/iter; 16.7 nsec/iter (100)
  189  cycles/iter; 910  instructions/iter; 34.4 nsec/iter (500)
  320  cycles/iter; 1666 instructions/iter; 56   nsec/iter (1'000)

QString &operator=(const char *ch) (current)
  70  cycles/iter; 317  instructions/iter; 12   nsec/iter (5)
  71  cycles/iter; 383  instructions/iter; 12.3 nsec/iter (10)
  64  cycles/iter; 318  instructions/iter; 11.1 nsec/iter (20)
  69  cycles/iter; 340  instructions/iter; 12   nsec/iter (50)
  77  cycles/iter; 419  instructions/iter; 13.5 nsec/iter (100)
  141 cycles/iter; 899  instructions/iter; 24.4 nsec/iter (500)
  280 cycles/iter; 1518 instructions/iter; 48.4 nsec/iter (1'000)

QString &operator=(const char *ch) (before)
  86.7  cycles/iter; 416  instructions/iter; 15   nsec/iter (5)
  87.8  cycles/iter; 482  instructions/iter; 15.7 nsec/iter (10)
  82.4  cycles/iter; 417  instructions/iter; 14.3 nsec/iter (20)
  90.2  cycles/iter; 443  instructions/iter; 15.6 nsec/iter (50)
  101.4 cycles/iter; 518  instructions/iter; 17.7 nsec/iter (100)
  204.4 cycles/iter; 994  instructions/iter; 36.5 nsec/iter (500)
  337.9 cycles/iter; 1789 instructions/iter; 58.9 nsec/iter (1'000)

 * current implemented as: assign(other)
QString &operator=(QLatin1StringView other) (current)
  47.4 cycles/iter; 237 instructions/iter; 8.2  nsec/iter (5)
  46.2 cycles/iter; 237 instructions/iter; 7.9  nsec/iter (10)
  46.8 cycles/iter; 255 instructions/iter; 8    nsec/iter (20)
  59   cycles/iter; 273 instructions/iter; 10.2 nsec/iter (50)
  55   cycles/iter; 300 instructions/iter; 9.5  nsec/iter (100)
  94.3 cycles/iter; 525 instructions/iter; 16.3 nsec/iter (500)
  166  cycles/iter; 804 instructions/iter; 28.7 nsec/iter (1'000)

QString &operator=(QLatin1StringView other) (before)
  14  cycles/iter; 79  instructions/iter; 2.5  nsec/iter (5)
  14  cycles/iter; 79  instructions/iter; 2.6  nsec/iter (10)
  16  cycles/iter; 97  instructions/iter; 3    nsec/iter (20)
  19  cycles/iter; 115 instructions/iter; 3.5  nsec/iter (50)
  23  cycles/iter; 142 instructions/iter; 4.2  nsec/iter (100)
  91  cycles/iter; 367 instructions/iter; 16.6 nsec/iter (500)
  131 cycles/iter; 646 instructions/iter; 23.4 nsec/iter (1'000)

Task-number: QTBUG-106201
Change-Id: Ie852f6abd1cf16164802acddb048eae5df59758f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-05 20:58:47 +02:00
Anton Kudryavtsev
76e56eb164 QNetworkAccessCacheBackend: reduce allocations
Use CaseInsensitive compare more.

Change-Id: I2f6d19fd63ac2e06c5b0dcb285a578f9ed61c6ab
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-05 21:58:47 +03:00
Edward Welbourne
833ed75b65 Update datastream converter to use Qt_6_0 instead of Qt_5_0
It was added in 5.12 and we've had a few upates since then.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: Iacb5368d4baa7d25f981bb0b8bd8d68b5461e17d
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-05 16:50:53 +02:00
Edward Welbourne
670f66eed3 Core serialization examples: spacing-only clang-format changes
Marc disagreed with clang-format on some, which are thus excluded.

Pick-to: 6.6 6.5
Task-number: QTBUG-111228
Change-Id: I1402274635dba866a8160a68211874cb11dcfa61
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-05 16:40:47 +02:00
Giuseppe D'Angelo
30be644053 QCoreApplication::requestPermissions: honor QT_NO_CONTEXTLESS_CONNECT
Hide the overload that doesn't take a context object.

Change-Id: Ibf8a46ad514b00be855be6fd7c72d6464881bb25
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-05 16:34:28 +02:00
Giuseppe D'Angelo
552dc1ecfe QHostInfo::lookupHostImpl: code tidies
Since a non-null `member` implies a non-null `receiver`, streamline
the redundant check(s). While at it, introduce a simple boolean that
conveys the meaning of what we're checking for.

Change-Id: Ib9be162075771de74b1a6bc4426008b7c194df3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-05 16:34:20 +02:00
Giuseppe D'Angelo
c63de2cda3 QHostInfo::lookupHostImpl: add another precondition check
If `member` is set it means that the caller wants us to connect
to a slot using string-based connections. That means `receiver`
must be non-null as well. Check for it.

Change-Id: I6b3542855147e95fecbf4c645b556c2047a1ed69
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-05 16:34:13 +02:00
Alexandru Croitor
afe158b936 CMake: Don't add no-prefix define to qconfig_p.h
It's unlikely that C++ code needs to query that feature. It also
causes full rebuilds of Qt if the feature's value is toggled.

Remove the no-prefix define from qconfig_p.h.

Pick-to: 6.5 6.6
Task-number: QTBUG-116689
Change-Id: I7d968b1c3d6bff3653e1233cea09a36579776347
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2023-09-05 16:33:40 +02:00
Marc Mutz
5a96d13bb5 QCheckBox: add new checkStateChanged(Qt::CheckState) signal
... to replace the old stateChanged(int) one, which a) had the wrong
name and b) the wrong argument type.

Mark the old one as \obsolete, so new users don't see it
anymore. Prepare for deprecation in the test, but don't actually
deprecate, yet (this author does not know how to deprecate signals).

Found in API-review.

Amends 37b47ebf94.

As a drive-by, replace explicit qWait() calls with QTRY_COMPARE().

[ChangeLog][QtWidgets][QCheckBox] Added new
checkStateChanged(Qt::CheckState) signal, obsoleting
stateChanged(int).

Fixes: QTBUG-104688
Change-Id: I01791fd003b752c47d99bea65151202be9175c21
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-05 13:43:44 +00:00
Giuseppe D'Angelo
4367abb75a QHostInfo::lookupHost: enable QT_NO_CONTEXTLESS_CONNECT
QHostInfo::lookupHost uses some QObject private APIs in order to have a
invoke a slot/function when the lookup is finished. The overload that
simply takes a function (and not a context object) was still available
even under QT_NO_CONTEXTLESS_CONNECT, because indeed the implementation
bypasses the public QObject::connect API. Hence, explicitly the overload
that doesn't take a context object.

Change-Id: Ibf5b0efc49b7f9c8d045862ae061f4e05ee1b769
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-05 15:00:38 +02:00
Dennis Oberst
c8be7c6a6c tst_QString: assign(it,it) add test-cases for empty range
Pick-to: 6.6
Change-Id: Iaf2ddb247aa279166110ad8793b1e37e66e8b11b
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-09-05 15:00:38 +02:00
Marc Mutz
1c1d7ab486 Clean up inline keyword use in qstring.h
If an inline member function is defined outside of its class' body,
its declaration must have the inline keyword. Otherwise, in certain
situations, MinGW complains like this:

   qstring.h:1118:13: error: 'void QString::clear()' redeclared without dllimport attribute after being referenced with dll linkage [-Werror]

Fix all instances in qstring.h by

- adding the inline keyword where it was missing on the definition
  (except constexpr functions, which are implicitly inline)

- removing the inline keyword from all out-of-class-body definitions

While the latter isn't necessary for fixing the MinGW
warning-turned-error, the churn is warranted: It's enlisting all
platforms' help in checking for inline consistency (by causing
"multiple-definition errors" at link time or "inline function never
defined" at compile time when we get it wrong). If we kept the inline
keyword on the definitions, only MinGW would continue to warn, and only
in some, as of yet not fully understood, situations, so we'd have no
control over when these warnings pop up in user code.

Pick-to: 6.6 6.5 6.2
Change-Id: I0ae78f1d8f1fa4eaec0b162ea16013669370eead
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2023-09-05 13:00:38 +00:00
Dennis Oberst
3652cdf6c7 Update bundled zlib to version 1.3
zlib 1.3 has been available since August 18, 2023.

Version 1.3 now defines the following:

 #  define crc32_combine_gen     z_crc32_combine_gen
 #  define crc32_combine_gen64   z_crc32_combine_gen64
 #  define crc32_combine_op      z_crc32_combine_op

We patched those in manually with qtpatches.diff, so we update it to
reflect these changes.

Updated the diff with 'git diff --relative > qtpatches.diff' from within
the 3rdparty/zlib directory.

Since updating zlib always requires some manual intervention add a
minimal guide that will be printed on using import_from_zlib_tarball.sh.

As a drive-by fix an error in import_from_zlib_tarball.sh where passing
in a path already containing a backslash as:

 import_from_zlib_tarball.sh zlib-1.x/ ./

would append another backshlash to that path (zlib-1.x//). Furthermore
add the '-v' flag to the copy command to make it more verbose.

[ChangeLog][Third-Party Code] zlib was updated to version 1.3.

Task-number: QTBUG-116236
Pick-to: 6.6 6.5 6.2 5.15
Change-Id: Ib7c8698035e1e049b455308c5774fcaf88b7622a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2023-09-05 13:42:50 +02:00
Christian Strømme
9c3c87f6d0 Add enablers to expose semi-public APIs for QtQuick3D
Follow the same patterns as for qpa and rhi. Semi-public APIs will be
put under the "namespace" ssg which is short for Spatial Scene Graph.

Taks-number: QTBUG-116570
Change-Id: I38887f129ec90e67f6a929a0d8ea5ea8b8c49ee8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2023-09-05 13:42:50 +02:00
Ilya Doroshenko
1eb15adee3 Add stereo support for DirectX12 and Vulkan backends
Change-Id: Id12723d6c392e25935ccb265c58af91aff968984
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2023-09-05 10:28:42 +00:00
Giuseppe D'Angelo
91dcc76fc1 QProcess: zero-fill a struct sigaction
Otherwise valgrind (rightfully) complains:

==75693== Syscall param rt_sigaction(act->sa_flags) points to uninitialised byte(s)
==75693==    at 0x597E5F3: __libc_sigaction (libc_sigaction.c:58)
==75693==    by 0x5105CE4: QtVforkSafe::change_sigpipe(void (*)(int)) (qprocess_unix.cpp:145)
==75693==    by 0x51083AA: (anonymous namespace)::QChildProcess::startProcess() const (qprocess_unix.cpp:911)
==75693==    by 0x5106442: (anonymous namespace)::QChildProcess::startProcess(void*) (qprocess_unix.cpp:330)
==75693==    by 0x5A61BB3: clone (clone.S:100)
==75693==    by 0x1FFEFFE3DF: ???
==75693==    by 0x857E86F: ???
==75693==    by 0x1FFEFFE3EF: ???
==75693==    by 0x5102C09: std::tuple_element<0ul, std::tuple<QProcessPrivate::UnixExtras*, std::default_delete<QProcessPrivate::UnixExtras> > >::type const& std::get<0ul, QProcessPrivate::UnixExtras*, std::default_delete<QProcessPrivate::UnixExtras> >(std::tuple<QProcessPrivate::UnixExtras*, std::default_delete<QProcessPrivate::UnixExtras> > const&) (tuple:1796)
==75693==  Address 0x1ffeffe148 is on thread 1's stack
==75693==  in frame #0, created by __libc_sigaction (libc_sigaction.c:43)
==75693==

Change-Id: Ib5a18fb76f2b7c2c1604e73ff64a251a0418c63c
Pick-to: 6.6 6.5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-05 12:28:42 +02:00
Jaishree Vyas
ce47799de6 Doc: Add example categories for qtopengl
Task-number: QTBUG-116069
Pick-to: 6.5 6.6
Change-Id: If675124e538c197d3b446f09da0620718b7b7118
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-09-05 12:28:42 +02:00
Santhosh Kumar
4cf92d83c3 Reset palette resolve mask in windows vista style
The palette set by windows vista style during polish doesn't allow style-
sheet style to override it.

This patch reset resolve mask for the palette set by windows vista style
and thus it can be overridden.

Fixes: QTBUG-115511
Pick-to: 6.6 6.5
Change-Id: Ifcaf441f806cfa0273599b3dce83fdfaec3f5a66
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-09-05 10:59:00 +02:00
Mats Honkamaa
7ef93cbf68 Doc: Add example categories to Qt Widget examples
Added example categories and fixed some minor typos as well.

Task-number: QTBUG-116359
Pick-to: 6.5 6.6
Change-Id: I2e270a1919003f4cea233666b64437e4c2b77121
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-05 07:47:49 +03:00
Ahmad Samir
0ce51dee0e tst_QDnsLookup: fix typo in CMakeListst.txt
There was an extra `q` before dnslookup.

Found while trying to build tst_qdnslookup, the target wasn't seen by
CMake/Ninja.

Pick-to: 6.6
Change-Id: Id594aab30dc9081fc269541561e0f2db5e615657
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-09-04 14:17:12 -07:00
Ilya Fedin
d524f0a756 QGenericUnixServices: ensure xdg activation token callback is called
The callback doesn't get called if the signal is emitted immediately
or if hitting the early returns

Fixes: QTBUG-113995
Pick-to: 6.6 6.5
Change-Id: Ib3e1d324a2becd8148cd76b4441fce5c4cc725e8
Reviewed-by: David Redondo <qt@david-redondo.de>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
2023-09-05 00:57:47 +04:00
Ahmad Samir
9b40272562 tst_QDnsLookup: skip a unittest on Windows
See code review 496440 on Gerrit for the details.

Change-Id: Ibd32a44cf7e2e07f36687cc2f0eeaf3008f64e73
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-04 22:40:35 +03:00
Ahmad Samir
909893344c tst_qeventdispatcher: port to QDeadlineTimer
Easier logic for these use-cases.

Change-Id: I97a18c45d9bd8cfcfee5d379d271366276d5a435
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-04 22:40:35 +03:00
Anton Kudryavtsev
6d4385b697 qplatformpixmap: use rvalue overload more
to reuse internal buffers

Change-Id: I7cfd6b599912cc38f796356197748f97da3eb47d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-09-04 18:16:47 +03:00
Anton Kudryavtsev
470fab51fb Tidy up QAuthenticatorPrivate::calculateResponse
call toBase64() with temp value

Change-Id: Idedfd91f60900ec51923803a6bb9ed6631e64d94
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-09-04 18:16:28 +03:00
Anton Kudryavtsev
b4f6399a51 qauthenticator: use QBAV more
Change-Id: Iaa208785f6e1dc8eb5f32ab5e099c8df277bb2f1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-04 18:16:11 +03:00
Anton Kudryavtsev
50fa7996d0 qhttpnetworkconnection: extract method makeAcceptLanguage
and micro optimize it:
- avoid allocation in case of C locale
- don't call replace in case of C locale

Change-Id: I9afefd53b673e5f1236afdb3130d77779614acc7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-04 18:16:08 +03:00
Anton Kudryavtsev
43d15dd572 qhttpnetworkconnection: cache acceptedEncoding header
Encodings are configured at compile time, so no need to re-create acceptedEncoding header for every request, just cache it.

Change-Id: Ibfaf7cdec0504cf90c4b6a59848e7c945d060ebe
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-04 18:16:06 +03:00
Anton Kudryavtsev
5f032cdeff QDecompressHelper: port some methods to QBAV
Change-Id: I907019f19cbf4f6086fd6480ea9e01f5ab63b004
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-04 18:16:03 +03:00
Anton Kudryavtsev
d9620f0660 qnetworkcookie: reduce allocations
Use CaseInsensitive compare more.
While touching code, replcace QBA literal with QBAV

Change-Id: Iecd2740c995f1e24b4285440b9440e4745f93208
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-04 18:16:00 +03:00
Anton Kudryavtsev
4ee081c2f7 qauthenticator: reduce allocations in parseHttpResponse
by QBAV usage. While touching code, port index based loop to range based

Change-Id: I06a784b94678b901d1074cca224c926e8534bd8e
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-09-04 18:15:48 +03:00
Ievgenii Meshcheriakov
a296f091c5 QDBusConnectionPrivate: Remove duplicated public sections
Seeing a public keyword may make the reader mistakenly
believe that the section above is not public.

Change-Id: I074d54ed5f6a5b5911d4c6038d33e14d2c58abe0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-04 12:03:07 +02:00
Mårten Nordheim
6577242adf tst_QString: deduplicate datatags
By saying what's special about some of them

Pick-to: 6.6 6.5
Change-Id: I17bf2e12a27bf55f621020ddf3819ee9e606847d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-09-04 12:00:48 +02:00
Laszlo Agocs
7fbccd1900 QOpenGLWidget: Call glClear in the default paintGL implementation
Amends 8cc8bbb466.

With the referenced patch framebuffer invalidation is preferred
over clearing with a wider range of OpenGL implementations.
This is good and is in line with the documentation. If an existing
application does not do glClear() in their reimplemented paintGL(),
that we cannot fix, and the docs never actually promised that a
glClear() is done automatically.

However, there is a special case: when one does not reimplement
paintGL(). A QOpenGLWidget is expected to be usable without
reimplementing any of its virtuals (i.e., QOpenGLWidget is
constructible as-is without subclassing). It is then ideal
if this does not lead to showing rendering artifacts due to
having potentially random content in the (invalidated,
not cleared) color buffer. This problem was never encountered
before due to hitting the invalidate-instead-of-clear code path
on a limited set of platforms (like with OpenGL ES) only.

Do a glClear() in paintGL(). This won't effect the vast majority
of applications, that reimplement this function, but plays nice
for when it is not.

It is in fact also in line with Qt 4's QGLWidget: that also used to
do a glClear() in the default paintGL() implementation.

Change-Id: I117ce1d3340f6d4d82cde1f52769a3b13ce367fb
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-09-04 11:46:29 +02:00
Laszlo Agocs
9505305c40 Use linear filtering again when QT_WIDGETS_HIGHDPI_DOWNSCALE
In ec27b99c2a the filtering mode is
changed from Linear to Nearest since users encountered obscure cases,
in particular when multisampling with large sample counts got enabled,
where the different filtering mode becomes noticeable. (Qt 5 and Qt 6
up until 6.4 uses Nearest, whereas the OpenGL -> QRhi migration
introduced using Linear in 6.4)

Meanwhile, the as of now undocumented high DPI downscaling feature
got introduced, and that prefers linear filtering. (since that's
definitely not a 1:1 mapping when it comes to texture size and the
on-screen quad) To reconcile the differences, add support for both
kind of samplers, and choose based on the sizes.

This should have no effect when not running with the env.var.
QT_WIDGETS_RHI=1 QT_WIDGETS_HIGHDPI_DOWNSCALE=1 set, but should
restore the pre-6.5.2 look when they are set.

Pick-to: 6.6 6.5
Fixes: QTBUG-115461
Change-Id: I42eb8526cb7f74236b5550e26c4570771d2fbfb4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-09-04 11:46:13 +02:00