Commit Graph

59431 Commits

Author SHA1 Message Date
Amir Masoud Abdol
fd6b136337 Do not make versioned hard-links when -developer-build
Amends ca24ee14df

Fixes: QTBUG-109271
Change-Id: I19065078fb23581bf552e44d8fef57d4a5d36eaa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-09 12:21:54 +01:00
Morten Sørvig
0b6db3b8be wasm: Fix qmake build
Add missing '\' on multiline variable assignment.

Sync EXPORTED_METHODS with cmake build.

Change-Id: I8c790c5f8a7bdae75d6b3e3d6e4482f6c69ecbe8
Reviewed-by: David Skoland <david.skoland@qt.io>
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2022-12-09 12:21:54 +01:00
Kai Köhne
486c8aae62 Doc: Change links from froglogic to qt domain
Pick-to: 5.15 6.2 6.4
Change-Id: Ic249f8dfa168948eddc83f35314708ffb40e75b1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-12-09 11:40:49 +01:00
Alexandru Croitor
3cb3218797 coin: Build qmake examples in non-qtbase repos
COIN_CONFIGURE_ARGS would only contain -make examples in qtbase
builds. In other repos it would use values like
NON_QTBASE_CONFIGURE_ARGS, which would not contain -make examples.

Check CONFIGURE_ARGS and TARGET_CONFIGURE_ARGS which are guaranteed to
contain -make examples when building any repo.

Amends 440438092b

Change-Id: I9bf086f8104da85ed8ece335a45c6628ea591f2a
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-09 10:51:54 +01:00
Alexey Edelev
85b941f425 Remove CMake version check when adding _lib_pri to ALL
It looks like adding dependencies to interface libraries is either not
fixed or broken in CMake versions newer than 3.20. Remove the CMake
version check to ensure that 'lib_pri' targets are executed. This will
restore the initial behavior.

Amends cfcc4ef8ed

Pick-to: 6.2 6.4
Fixes: QTBUG-109240
Fixes: QTBUG-109239
Change-Id: I8c5b317fcdd0a715a1a668b4e955df1acfe4be8b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-09 10:51:54 +01:00
Yuhang Zhao
0c173cc8bc Windows QPA: fix indentation
Amends commit a94dcc3125

Change-Id: I1a84ee520ce698e0581a77a15f5f3f381dfa3ede
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-09 14:22:38 +08:00
Marc Mutz
50a0c4f3ce QString: fix append/prepend/insert/op+= with QT_RESTRICTED_CAST_FROM_ASCII
Since adding the QUtf8StringView overloads, calling these overload
sets with const char string literals became ambiguous in
QT_RESTRICTED_CAST_FROM_ASCII builds (both QString and QUtf8StringView
are a match).

Fix by providing the same templated overloads that
QT_RESTRICTED_CAST_FROM_ASCII enables for QString construction and
assignment for append/prepend/insert/op+=, too.

Incidentally, this makes these operations much faster than when they
constructed a temporary QString.

Change-Id: Ie9b38fc80cc00e142e094dab716938c6fda41ba1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-09 07:22:13 +01:00
Marc Mutz
1ecbab76b6 QOffsetStringArray: add contains() method
... use it in QNetworkReplyWasmImpl.

Change-Id: I648f02fcafda43af7ed9771cc1c7e2e2a6d38504
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 06:22:06 +00:00
Marc Mutz
4d43b995bf QLibraryInfo: undo the !__cplusplus protection again
Now that C code need not include the header for qVersion() anymore,
it's no longer needed.

Partially reverts 50b05e3e2a.

Change-Id: I917fbc883c315a0878e08da6aca9aed29c29917f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 07:21:28 +01:00
Marc Mutz
885aba7ffd Use qtversion.h instead of qlibraryinfo.h
... where 50b05e3e2a originally added
them.

While qtversion.h is included in qglobal.h, using qtversion.h directly
is a tiny step towards removing qglobal.h includes from our code-base,
so don't let this opportunity go to waste.

Change-Id: I28eaca1f4e250fc9e12e2ce6a6f94670a1d08dbe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-09 07:21:22 +01:00
Thiago Macieira
abaa3e6112 tst_qdbusmetatype: fix build with Clang (and probably MSVC)
This test makes use of a GCC extension-slash-defect in matching of
template template parameters. Either Clang has recently changed its
behavior not to accept them any more, or we've never compiled this test
with Clang.

Tested with Clang 15.0.6.

Pick-to: 6.4
Change-Id: I69ecc04064514f939896fffd172e98d826989ca3
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-09 05:07:25 +00:00
Ahmad Samir
f222053c0b Update FindXCB.cmake from extra-cmake-modules upstream
Upstream commits:
db46fc981fd8c1a46d923aeaf2187dfcc8b50099
1e9e1c508e177b6466282dfad273cf6cfcdf5c76

One useful change is removing the "XINPUT from XCB is experimental"
warning, it's been around and the default for ages.

Task-number: QTBUG-109183
Change-Id: Ie66aa76c5e3ce83d5d654cfa8279a946c7486602
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-09 05:24:27 +02:00
Ahmad Samir
fbca4eb673 CMake: make QT_SKIP_DOCKER_COMPOSE more discoverable
By adding a CMake option() that is OFF by default.

Change-Id: Ic66cae5bb9739ae1db3e534f671cc1e9e4b09647
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-09 05:24:27 +02:00
Timothée Keller
7a4b89fb00 Update list of windeployqt modules
Added Quick-controls,dialogs,layouts,shapes,test,timeline,3d- modules
to the windeployqt module list

Task-number: QTBUG-105135
Pick-to: 6.4
Change-Id: Id5bbaa4b86f1ec9861ee308cec6deff50704c77f
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-12-09 02:40:12 +00:00
Marc Mutz
dfe03926b6 QHttp1Configuration: make fit for release
- inline move special member functions and swap()
- add qHash() overload (EqualityComparable types should be QtHashable)
- unexport this non-polymoprphic class, export only individual members
- don't use a heap-allocated Private just to hold a single number
  - use inline storage until we actually need to use external state
  - limit the max. connections to 255 to fit into an 8-bit value
- document min/max of the numberOfConnectionsPerHost() property
- use qsizetype instead of un-Qt-ish unsigned int

Task-number: QTBUG-108215
Task-number: QTBUG-25280
Change-Id: Ia9841f2dbabd13219ffd813aff3947aa0c8bdc0c
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-09 02:40:12 +00:00
Markus Goetz
be05bb749e QNetworkAccessManager: Configurable number of HTTP1 TCP connections
Introduces new class QHttp1Configuration.

[ChangeLog][QtNetwork][QHttp1Configuration] New class.

Fixes: QTBUG-25280
Fixes: QTBUG-108215
Change-Id: Ide6cee23946e5001befb8fab34edf10b8a66e02b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-09 02:40:12 +00:00
Allan Sandfeld Jensen
a09c33e1f7 Fix wrong to linear conversion
Causing bad rendering of gamma corrected text on non-standard image
format paint devices.

Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-109169
Change-Id: I6d95e9a42b9ccac609071123dd4535d25e225a29
Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2022-12-09 01:22:15 +01:00
Alexey Edelev
2e514f8511 Add CONDITION_INDEPENDENT_SOURCES argument to qt_internal_extend_target
The argument allows to ignore the condition for source files if they
are used in the Qt code without corresponding guards. The header files
of this kind usually have internal guards, that suppress the error
at the location where they are used, so AUTOGEN is skipped for these
header files to suppress the warnings from CMake. If file belongs to
a module, it will display AUTHOR_WARNING which should urge Qt
maintainers to guard the use of the source file properly.

Task-number: QTBUG-103196
Change-Id: I7b4c12031a5d19ff15868d4782c0d396ef7aed8c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-08 23:24:22 +01:00
Alexey Edelev
050b849c96 Document QT_ANDROID_MULTI_ABI_FORWARD_VARS CMake variable
Add documentation for the QT_ANDROID_MULTI_ABI_FORWARD_VARS CMake
variable.

Pick-to: 6.4
Task-number: QTBUG-107893
Change-Id: Ia8dfd14a89d043c4f967464646388f57c96f911a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-08 23:24:22 +01:00
Alexey Edelev
19ddc0b225 Add forwarding of CMake variables to ABI-specific external projects
The 'QT_ANDROID_MULTI_ABI_FORWARD_VARS' variable allows to forward
variable values to ABI-specific external projects. The variable accepts
names of variables that needs to be forwarded.

Pick-to: 6.4
Task-number: QTBUG-107893
Change-Id: Iaa4fa7e98ad0df956d90f91e157edb561183c795
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-08 23:24:22 +01:00
Christian Ehrlicher
84613e0e4c SQL/MySQL: add connect option MYSQL_OPT_LOCAL_INFILE
Add the connect option MYSQL_OPT_LOCAL_INFILE to be able to specify the
client-side LOCAL capability for LOAD DATA operations

Fixes: QTBUG-104916
Change-Id: I9914250059e7dc1a705941d3b409fa624e105ecd
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2022-12-08 21:17:41 +00:00
Christian Ehrlicher
4091d73af8 SQL/MySQL: don't use deprecated defines, cleanup
Replace plain int with enum 'enum_field_types' and don't use deprecated
MySQL type names.

Pick-to: 6.4
Change-Id: I8a629ac1b4ad7d6d78604ff641b5b35397cd769c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-12-08 23:17:41 +02:00
Ziming Song
6b1044cc3f QTextEngine: also round x-offset for non-subpixel text render
If horizontal subpixel is not supported, both glyph advance and
x-offset should be rounded. Or the position of rendered glyph might
be fraction number.

Fixes: QTBUG-104895
Change-Id: Ia572764bb87db9712847ceea532d8d424ec7704b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2022-12-09 04:33:57 +08:00
Marc Mutz
0326ea08b1 QNetworkRequest: don't assume QByteArray::constData() is NUL-terminated
It isn't guaranteed to be, for QByteArrays originating from
QByteArray::fromRawData().

Use the four-arg qstrnicmp() overload (with defaulted fourth
argument), wrapped in a lambda to DRY, instead of qstricmp(), which
may produce incorrect results or even read past user-supplied buffers.

There were also uses of QByteArray::compare(c-literal,
Qt::CaseInsensitive). They're not affected by the problem, but
QByteArray is scheduled to lose its string-y API parts and become a
container of octets in the future. Besides, the lambda solution is
much nicer on the eye.

Pick-to: 6.4 6.2 5.15
Change-Id: I1e0f9003082f4158edecc6fe8cf3c0518e5403f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-08 18:00:17 +00:00
Marc Mutz
536e173728 QNetworkRequest: Make header parsing locale-independent
The existing header parsing used C's tolower() function for
case-insensitive switching over the first character of the
header. However, that function's result depends on the current locale.

Since the parser is supposed to match the likes of "If-Match" and
"If-None-Match", matching may fail in locales, such as Turkish, where
tolower(I) is ı (LATIN SMALL LETTER DOTLESS I) (or I, if the former
isn't representable in the current charset), causing a False Negative.

To fix, use the US-ASCII-only QtMiscUtils::toAsciiLower() function,
which has the added advantage that it's inline.

Replace at(0) with front() as a drive-by.

The WASM copy of the function is hopelessly outdated (recognizes less
headers than the QNetworkRequest original).

[ChangeLog][QtNetwork] Fixed a bug where certain
QNetworkRequest::KnownHeaders wouldn't be recognized as such in
certain locales.

Pick-to: 6.4 6.2 5.15
Task-number: QTBUG-109235
Change-Id: Ib147ab64803bb868647dd07ad657d785071242ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-08 18:00:17 +00:00
Marc Mutz
41a994db06 QAnyStringView: add substringing operations
Add the full set of substringing operations:
- mid/left/right (old-style)
- sliced/first/last (new style)
- chop/chopped/truncate

The implementation is copied from QUtf8StringView, adjusted to use
sliced() instead of the (ptr, n) ctor, so we need to deal with the tag
twiddling only once, in sliced().

The documentation is also copied from QUtf8StringView.

[ChangeLog][QtCore][QAnyStringView] Added substring functions
sliced(), first(), last(), chop()/chopped(), truncate().

Change-Id: Ief454e9694519e97d9146fa84bc05dda1dded046
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Mate Barany <mate.barany@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-08 18:00:16 +00:00
Amir Masoud Abdol
270a2f7ee2 Use native path for host_qt_bindir
Task-number: QTBUG-109271
Change-Id: I85fe825ee49f21caea9c973b3a3ee9bf1449fab6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-08 19:00:16 +01:00
Alexandru Croitor
a0d3cae7ca CMake: Remove incorrect TP doc-comment on qt_add_executable
It was promoted from TP a while ago.

Change-Id: I0f3cbe8e4aad180214d32e1e7dcad02f895080d4
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-08 17:56:48 +01:00
Alexandru Croitor
a873979eb9 CMake: Un-TP most of the deployment API
They are deemed good enough.

qt_deploy_translations is left in TP because with the current
signature, it's not clear yet how it's supposed to work for iOS
and other non-desktop targets.

[ChangeLog][CMake] The Core CMake deployment API
is out of Technical Preview status.

Task-number: QTBUG-108507
Change-Id: I384233c697b33644de3c9e1fb17d04f44ca16ea2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-08 17:56:48 +01:00
Alexandru Croitor
146e22fff6 qt-testrunner: Save test output into file
Aside from the generation of the xml and junit xml files
for each test, also save the test output into a
tst_{name}-{timestamp}.txt file.

This will allow developers to inspect the output of passed tests,
by downloading the test results archive, even if we use ctest's
--output-on-failure.

Change-Id: I0a6c0ee04b4525d3ad9b207b28117d2182d29c28
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-08 17:56:48 +01:00
Alexandru Croitor
46d1897267 CMake: Un-TP QT_RESOURCE_ALIAS
It is deemed good enough.

[ChangeLog][CMake] The Core CMake QT_RESOURCE_ALIAS
property is out of Technical Preview status.

Change-Id: I50128a8ea4e82b3d15ff272eb713bc0f6a8b167d
Fixes: QTBUG-109077
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-08 17:56:48 +01:00
Volker Hilsheimer
13784450d1 Remove QWindowsStylePrivate:isDarkMode
The only usage of that function is to decide whether we should etch
disabled text. That should depend on the actual palette we are using,
not on a system setting (that might be ignored by an application or
style overwriting the palette).

Since styleHint might be called without option and widget, fall back to
the application default palette if needed.

Change-Id: Icf90eb4198890c613dccea6188733e74995962c5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-08 17:56:48 +01:00
Volker Hilsheimer
a2518b4140 Overwrite dark system palette in Vista style
The Vista style uses system assets for controls, and those are never
dark. Because of that we cannot support dark appearance with that style,
and applications using the Vista style should always use the light
system palette. Override QStyle::polish(QPalette &) in the vista style
to do that.

To make that palette available, move the code reading the light palette
into QWindowsApplication, and call that method from both the platform
theme (if the system is running in light mode) and from the Vista style
(only if the system is running in dark mode).

If the system is dark mode and another style is used (e.g. Fusion, which
works well with a dark palette), then the palette returned by the
platform theme gets used without any modifications.

This requires duplicating some small inline helper functions in
QWindowsTheme and QWindowsApplication. We can clean this up once the
implementation is complete for both Qt Widgets and Qt Quick.

Change-Id: Ia13f59a2d8414642603f9708926718daf9e8954d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2022-12-08 17:56:48 +01:00
Volker Hilsheimer
c62c2aac75 Revert "Let styles indicate that they support dark mode"
This reverts commit 3ee7a9f85c.

Styles that don't support dark mode can overwrite the palette in
a QStyle::polish(QPalette &) override instead.

Change-Id: I8b84d822d91be5b3f67f76f791a1330bba7ea546
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
2022-12-08 17:56:48 +01:00
Cristian Adam
501018ea33 Win32: Add "longPathAware" manifest / rc for internal tools
This will enable all qt internal tools to be able to access files
on paths longer than 255 characters.

Two examples that were not working before: moc and windeployqt.

Fixes: QTBUG-109207
Change-Id: I93f9770f1d3c4f3f2cca4655e4bed89c95b9786b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-08 17:56:47 +01:00
Sami Shalayel
b341480922 tests: add timeout for the dbus test message
The test message sent to the dbus might never see a reply, e.g. in case
of a misconfigured dbus. Instead of waiting for a reply and stopping the
static top-level build, timeout after the CI had enough time to receive
the dbus message (5 seconds).

Change-Id: Ic6d60e7d1ddb2d864dc4a78d4edbd0ef7b6604c2
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-08 17:56:47 +01:00
Øystein Heskestad
3fedcd4e4a Add Boyer-Moore Latin-1 string searcher with optional case sensitivity
[ChangeLog][QtCore][QString] Added Boyer-Moore Latin-1 string searcher with optional case sensitivity

Task-number: QTBUG-100236
Change-Id: I200a0dac7c8012add1ee02511dba791d233115e0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-08 17:56:47 +01:00
Timothée Keller
bb5d4094e0 Update list of windeployqt modules
Added Positioningquick, Sensorsquick, Webenginequick, and Webviewquick
modules to windeployqt list

Task-number: QTBUG-105135
Pick-to: 6.4
Change-Id: I26c0b5006453c8533ff94967b2e8f03ede88bf7e
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-12-08 17:56:47 +01:00
Alexander Rezepkin
a63d709195 QSysInfo::prettyProductName(): Add macOS Ventura product name
Pick-to: 6.2 6.3 6.4 5.15
Change-Id: I5f54866e30f08465943922e3dee5150f37054225
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-08 19:56:47 +03:00
David Edmundson
687a206b2e QWidget: use window device pixel ratio for metrics
Most code uses the window/backing store DPR, except for this path that
uses the screen.
On wayland it's possible to get a different ratio for the screen and
window which causes some subtle rendering issues. For other platforms
behavior shouldn't change.

Change-Id: Ie390ba3bdfc183815df9e7e79e508d3e15d61f25
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-08 14:35:18 +00:00
Kai Köhne
cbd5bc0b58 Doc: Fix paths for Files property in qt_attribution.json files
qtattributionsscanner expects file paths to be separated by a space.

Pick-to: 6.2 6.4
Change-Id: I4c9dfea0f086fc9631cb06f40e2d3cab0a32ca4e
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-08 15:14:17 +01:00
Volker Hilsheimer
c95de359b4 QComboBox: Don't dereference potential nullptr, simplify
Amends a874087504, which tested whether
d->container is nullptr to decide whether to hide the popup, and then
dereferences d->container later without checking again. This raised a
correct static analyzer warning.

Simplify that logic. hidePopup() does nothing if there is no visible
container, and we don't want to accept() the cancel key if there isn't.
So the closeOnCancel logic isn't actually needed, we only need to accept
the ShortcutOverride to make sure that QComboBox sees the Cancel key
even if there is a shortcut registered, and then we can handle and
accept the cancel key to call hidePopup() only if the popup is visible.

Add test to verify that this interaction works as expected.

Pick-to: 6.4
Task-number: QTBUG-108908
Change-Id: I60d92b068f0f5139d629cf4a58e225512170df77
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-08 15:14:17 +01:00
Jaishree Vyas
57a4c0d73c Doc: Document Qt Serialization with use cases
Added some background about Serialization with the classes and used cases.

Fixes: QTBUG-103951
Pick-to: 6.4 6.3 6.2
Change-Id: I3ff179b814fc5d424f2ac2ffaf3237b90ddd7e2b
Reviewed-by: Vladimir Minenko <vladimir.minenko@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Kai Köhne <kai.koehne@qt.io>
2022-12-08 13:28:43 +01:00
Volker Hilsheimer
9bc36308c7 Windows: regenerate systray icon when screen resolution changes
When the screen resolution or scale factor changes, then we have to
recreate the system tray icon so that it doesn't get blurry. Such
changes generate a WM_TASKBARCREATED message, which we already handle
through a self-registered message ID to re-add the icon when the task
bar/explorer crashed. So call updateIcon there to recreate the HICON
before adding it again.

For this to work, we have to actually store the QIcon in the already
present (but so far unused) m_icon member, and reset that member before
calling updateIcon, which would otherwise be a no-op.

Fixes: QTBUG-108641
Pick-to: 6.4 6.2
Change-Id: If3dd042416b7f61bbb3b43f7d563e52b406136a2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-08 13:28:43 +01:00
Marc Mutz
be36b6356a qglobal.h: remove __ASSEMBLER__ check
__ASSEMBLER__ and __cplusplus cannot both be defined at the same time,
so it suffices to check just one of them. Thanks to Thiago for
noticing.

Change-Id: I92e43d1a1c551ee48c51490b2878bb0c84bfb36f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-08 05:08:24 +01:00
Marc Mutz
e4851fedd4 Move qVersion() into it's own header
Partially reverts 50b05e3e2a.

The move of qVersion() from qglobal.h into qlibraryinfo.h, a header
not included by qglobal.h, was a conscious, documented, QUIP-0006-
allowed, but stetching the SiC Type A definition, and therefore
unwarranted, SiC.

Fix by moving qVersion() into its own header file, qtversion.h,
included from qglobal.h.

[ChangeLog][Editorial] Remove the entry for qVersion() being moved to
qlibraryinfo.h.

Fixes: QTBUG-108818
Change-Id: I3524802348635512a63fbbb55ddc28ad28f331e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-08 04:08:22 +00:00
Mikolaj Boc
4673f00277 Resolve the ownership problems in qClipboardPasteTo
A deleted mMimeData instance might be referenced if more that one file
item is present in the clipboadData. This fix uses a continuation
mechanism to only run the actual qWasmClipboardPaste when all the
data has been collected. The ownership of QMimeData is then transferred
to the global QClipboardData q_clipboardData.

Fixes: QTBUG-108841
Change-Id: I16def48d70ebbffc68462ed74ccd9ee8ee8053de
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-08 03:37:03 +01:00
Mårten Nordheim
effd3b4d83 macdeployqt: Add networkinformation as plugins to be deployed
This was missed during original patch

Pick-to: 6.4
Fixes: QTBUG-108677
Change-Id: Icd8960f2f41468dc12c3269b12df777acd962753
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-12-07 18:31:49 +00:00
Thiago Macieira
3465b9fe74 QString: merge and optimize the two overloads of SSE2's ustrncmp()
The algorithm is the same, differing only on how we load data onto
vector registers, so they can be merged, simplifying the code base.

For all strings over 16 characters in length, we loop and then we
perform a final overlapped comparison, if necessary. I've kept the 32-
byte-per-loop solution even for pre-AVX2, because that should pipeline
better. For any strings between 4 and 16 characters, we perform a pair
of maybe-overlapped comparisons, of either 4 characters or of 8, so we
consume the full string. That leaves a tail of at most 3 characters in
scalar code.

Change-Id: Ib42b3adc93bf4d43bd55fffd16c8c15d6d761af2
Reviewed-by: Lars Knoll <lars@knoll.priv.no>
2022-12-07 09:57:59 -08:00
Alexey Edelev
cff4cde412 Allow 'We mean it.' disclaimer to have follow text
Replace the regex that looks for 'We mean it.' disclaimer with simple
string lookup to allow the disclaimer to have a follow text or be in
the middle of the sentence.

Amends b89d63515b

Task-number: QTBUG-87480
Change-Id: I2a9d7306beb51de62d00b79980a12da6f170df93
Reviewed-by: Robert Griebl <robert.griebl@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-07 14:58:41 +01:00