Commit Graph

43548 Commits (7241d2fb5a032bb9975dbc24bb6eca7e417b5bb9)

Author SHA1 Message Date
Mate Barany 7241d2fb5a Port QXmlStreamWriterPrivate::writeStartElement to QAnyStringView
This is a prerequisite step of porting the QXmlStreamWriter API to
QAnyStringView.

Task-number: QTBUG-103302
Change-Id: I73383c2b09a4a70bfc23bbc6c6b1d62cb878a6b1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-10 01:00:13 +01:00
Mate Barany a0bb64126c Port QXmlStreamWriterPrivate::findNameSpace to QAnyStringView
This is a prerequisite of porting the QXmlStreamWriter API to
QAnyStringView.

Task-number: QTBUG-103302
Change-Id: I1433de66c9aefe6f3e8f7cd8e831718d2db88eb6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-10 01:00:06 +01:00
Mate Barany 1a1fd1566c Port QXmlStreamPrivateTagStack::addToStringStorage to QAnyStringView
This is a prerequisite of porting the QXmlStreamWriter API to
QAnyStringView.

Task-number: QTBUG-103302
Change-Id: I48eca902a7b8f0e0a52202936947a2b60353f08c
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-10 01:00:02 +01:00
Mate Barany 7741665a9c Port QXmlStreamWriterPrivate::write to QAnyStringView
Replace the const QString &s overload with a QASV
overload.

Remove the const char (&s)[N] and const XmlStringRef&
overloads, with the QASV overload they are redundant.

Leave the const char *s, qsizetype len overload for
now but make it call the QASV overload.

Task-number: QTBUG-103302
Change-Id: I4f92d76248d5b7531472056a51ca06aa25dbac01
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-10 00:59:56 +01:00
Ievgenii Meshcheriakov 1523714bfa Android: Fix building with non-empty QT_NAMESPACE
Change-Id: I1f0c00fe444a5898ba16c4bcd6a65c388a32a664
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-09 18:14:23 +01:00
Axel Spoerl b4653636a7 Beautify QApplication::compressEvent
Replace if-statement to check compressable event types with a switch.
Replace if / else if sequence dispatching to type specific compression
code paths with a switch.
Replace iterated for loop with a ranged one.

Task-number: QTBUG-107808
Change-Id: I9054b625f1898fa793f78de1b477a2113a4e33f0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-09 18:14:23 +01:00
Giuseppe D'Angelo 9e75a4cca3 QDomDocument: ensure a defined order of attributes when saving
XML does not impose any semantics based on the order of the attributes;
they're an unordered set. Quoting [1]:

> Note that the order of attribute specifications in a start-tag or empty-element tag is not significant

and [2] 2.2.5:

> An unordered set of attribute information items

Still, using a QHash-based implementation to store attributes is
annoying, because one cannot serialize the document in a stable way.
The order of attributes is going to depend on the QString hash function
(which we can change at any time) and the QHash seed (which is random
and changes at every run). In other words, saving the same DOM will
yield non deterministic outputs. That's annoying for testing,
reproducible builds, and so on.

Switching to an _ordered_ associative container for storing attributes
won't, on its own, ensure any specific ordering. That's because:

* attributes are currently kept associated using their name as the key,
ignoring an eventual namespace prefix;

* there's some convoluted logic that sometimes emits attributes in the
xmlns namespace (to qualify a prefix).

Hence, just go for the straightforward implementation and sort the
attributes before streaming them. In the main loop I could have used a
range-based for loop over the associative container used for attributes;
since it's a Qt container, it would have yielded just the values in the
map, and we are not interested into the keys. However I'm preparing for
further changes down the road, so I'm opting for key/value iteration.

I'm deliberately not offering an opt-out because:

* I don't think this is so expensive to justify an opt-out;
* I'm going to remove QHash anyways in a follow up commit.

[1] https://www.w3.org/TR/xml11/#sec-starttags
[2] https://www.w3.org/TR/xml-infoset/#infoitem.element

Task-number: QTBUG-76800
Task-number: QTBUG-25071
Change-Id: I6282ae2ccbee9c0099f138de48b94bb7c40b3680
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-09 16:29:11 +01:00
Alexey Edelev 6294ee060e Add _qt_internal_apk_dependencies if qt_finalize_project is never called
With CMake versions < 3.19, we don't have a deferred call of
qt_finalize_project. In qt_add_executable we only have immediate
finalizaton call of qt_finalize_executable, but
qt_android_generate_deployment_settings still depends on the
_qt_internal_apk_dependencies target that is created by qt_finalize_project only.
Create an empty target for the cases when we need to generate
deployment setting but qt_finalize_project is never called.

Pick-to: 6.4
Fixes: QTBUG-106634
Change-Id: If0608cb527eea662e0f9dd41f2751fe49ce433db
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-12-09 16:16:49 +01:00
Joerg Bornemann 3cd19719e5 Fix moc warning for qwineventnotifier.h on non-Windows platforms
Disable AUTOMOC for qwineventnotifier.h on non-Windows platforms.
Add a comment to remove qwineventnotifier.h from non-Windows platforms
for Qt7.

Fixes: QTBUG-107109
Change-Id: I8f769aa764daeb634211aca7114f94b50cc0a85d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-09 16:16:49 +01:00
Piotr Mikolajczyk 4f0272befb Add possibility to retrieve displayId for Android
When handling multiple screens in Android system it is needed
to have the information about the display's Id. This patch
provides this possibility.

Task-number: QTBUG-105325
Change-Id: Id91aeaa59b17d5a098b672e220a5182b97320703
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-09 16:16:48 +01:00
Allan Sandfeld Jensen d4eb5d1110 Cleanup short-cut id deprecation
Wasn't marked deprecated in documentation, and was needed for user
construction of QShortcutEvents.

Fixes: QTBUG-109090
Change-Id: Ibf0ad83a57de724d9b88a7e610ba04c2c662983b
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-12-09 16:16:48 +01:00
Timur Pocheptsov 10b5b4cbba QCocoaFileDialogHelper: protect against dangling pointers
NSSave/Open panel is a shared object, that can outlive Qt's counterpart.
While its delegate is a weak property, somehow it can outlive Qt-object,
which _owns_ this delegate, as a result an attempt to emit a signal
on m_helper results in a crash. QPointer can help with such problem.

This is a speculative fix, since we don't have a realible reproducer.

Fixes: QTBUG-109287
Change-Id: Iccc4a063a24e33e0a5c0fd07b3c203d0c17317ad
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-09 16:16:48 +01:00
Mårten Nordheim 4af5f0b983 TLS[openssl]: Bump minimum warning level to Critical on Win/macOS
On these platforms there is a platform-native plugin that can be used
instead. If, as has happened, a developer uses the OpenSSL backend
without OpenSSL being available they may be confused by the output of
OpenSSL without it being of any concern.

Leave the warning level low on other platforms since they have nothing
to fall back to.

Pick-to: 6.4.2 6.4 6.2
Change-Id: Ic36a0429a9e8eed728aa59ec9e028626d6579de1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2022-12-09 16:16:48 +01:00
Edward Welbourne 5da038ab51 Port QDateTimeEdit internals to QTimeZone
In the process, centralize the creation of date-time values, where
doing so requires catching invalid results caused by spring-forward
gaps; this saves some repetition and extends the treatment to more
places that did need it. Also, de-inline two overrides of virtuals;
being inline does them no good.

Replace the Qt::TimeSpec member of QDTEPrivate with a QTimeZone so
that creation of values can be streamlined and to make it easier to
add support for (currently unsupported) OffsetFromUTC and TimeZone
timespecs in the public QDTE API.

This greatly simplifies a lot of the code, while preparing it for a
long-needed extension to its functionality.

Task-number: QTBUG-80417
Task-number: QTBUG-108199
Change-Id: I0ac2c78025013bf89899e3ef1a56e89392f67ce5
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-09 16:16:48 +01:00
Edward Welbourne 3f282e8896 Adapt corelib to use QTimeZone in place of Qt::TimeSpec
This saves (mostly in corelib/time/) some complications that used to
arise from needing different code-paths for different time-specs.

Task-number: QTBUG-108199
Change-Id: I5dbd09859fce7599f1ba761f8a0bfc4633d0bef9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:48 +01:00
Edward Welbourne e71099989e Add QDateTime::currentDateTime(const QTimeZone &)
This unifies currentDateTime(void) and currentDateTimeUtc(), adding
the missing equivalents for a time-zone or fixed offset from UTC.
In the process, make the documentation less wordy.

[ChangeLog][QtCore][QDateTime] currentDateTime() now accepts a
QTimeZone parameter to select the time representation to use for the
result.

Task-number: QTBUG-108199
Change-Id: I761c4bc050cc671c1c767d707f6d2dd85cc1ac0d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:48 +01:00
Timothée Keller 832a337831 Windeployqt: change platform plugin base filter
Add infix to "qwindows" for platform plugin search if it exists, to
account for libinfix builds

Task-number: QTBUG-105820
Pick-to: 6.4
Change-Id: I7a3c671fb6cdb4a216f6f4bffb445add4f8e0c83
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2022-12-09 16:16:47 +01:00
Edward Welbourne f46c18c627 Adapt QDateTime to route QTimeSpec uses via QTimeZone
Free most APIs using QTimeZone from feature timezone and route all
APIs taking a naked QTimeSpec via these, in preparation for their
eventual deprecation. Since qtimezone.h includes qdatetime.h (and MSVC
blocks our ability to remove the need for that), qdatetime.h's
declarations can't use a default value for QTimeZone parameters; so
add overloads taking no zone (or spec) to handle that.

[ChangeLog][QtCore][QDateTime] All QDateTime APIs involving a
Qt::TimeSpec can now be routed via QTimeZone's lightweight time
description support, saving the need to have different code paths for
different time specs. In the process, QDateTime gains a
timeRepresentation() method to return a QTimeZone reporting the
(possibly lightweight) time description it uses. (The older timeZone()
method always returns a non-lightweight QTimeZone, whose timeSpec() is
Qt::TimeZone.)

Task-number: QTBUG-108199
Change-Id: I23e43401eb2dbe9b7b534ca6401389920dd96b3c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:47 +01:00
Edward Welbourne ae6186c7e8 Adapt QTimeZone to handle Qt::TimeSpec machinery
[ChangeLog][QtCore][QTimeZone] QTimeZone is now always defined;
feature timezone now controls most of its prior API and some new API
is added, most of it always present, to enable QTimeZone to package a
Qt::TimeSpec and, for Qt::OffsetFromUTC, its offset. Prior to this
change, APIs using Qt::TimeSpec had to provide a separate function
taking a QTimeZone alongside a function taking a Qt::TimeSpec and
optional offset; it will now be possible to unify these into a single
function taking a QTimeZone. Adaptation of other Qt classes to do so
shall follow.

Task-number: QTBUG-108199
Change-Id: If5ec3cc63920af882ebb333bf69cde266b1f6ad7
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-12-09 16:16:47 +01:00
Edward Welbourne ab15c02991 Add a note on the meaning of offsets from UTC to QDateTime
Change-Id: Iad29c26fcac10e0db0cf3b092ef670e8ce80bf46
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:47 +01:00
Edward Welbourne 2c2010ddfe Fix some more details in QDateTime documentation
It also needs a mention of the ICU escape hatch from MS's borked zone
data. There were a couple more "UTC start of 1970" phrasings to update.
The difference between 01:59:59 and 03:00:00 is only a second, not a
minute, when a spring forward skips 02:*:*.
Clarify documentation of copy assignment.

Change-Id: Id177733d5702a1d104ab8cc49008c844170276d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:47 +01:00
Edward Welbourne 89777803c8 Fix ordering of includes in qdatetime.cpp
Last two entries were the wrong way around.
Inclusion of "qplatformdefs.h" was spurious.

Change-Id: Ida445471d76ff72154d8bcd95900b5df7d32e1ac
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-09 16:16:46 +01:00
Assam Boudjelthia 633ab16bc8 CMake:Android: copy templates, bindings and gradle files pre_build
At the moment when doing a non-prefix build and changing some of those
files, CMake will not update the changes to the build folder unless
done manually or a re-configure is done manually.

qt_copy_or_install() only does copy those files at configure time once,
and using CMAKE_CONFIGURE_DEPENDS would be an overkill here and even
a bit of an extra annoyance, so in this case having a custom command
seem to be suitable.

Done-with: Alexey Edelev <alexey.edelev@qt.io>
Change-Id: I55aa9e9d3eea32a4bb54c64abd4cbdcb891c44b6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-09 15:25:02 +02: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
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
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 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
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 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
Ø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