Commit Graph

60036 Commits

Author SHA1 Message Date
Marc Mutz
b904de43a5 QCryptographicHash: fix UB (data race on concurrent result()) [2nd try]
The previous attempt at fixing QTBUG-110058,
ccad719d2e, was incomplete:

- the if (result.isEmpty()) check at the beginning of finalize() was
  not protected, so it raced against the assignment at the end of
  finalize(), which was protected

- because the mutex was not locked during the finalization of the hash
  algorithm, two threads could perform this operation simultaneously,
  which isn't such a bad idea in principle, as it can reduce latency,
  but for that to work, the losing thread needs to throw away its own
  work and adopt the work of the other thread, but that wasn't done:
  both threads would write their result to 'result', just one after
  the other, but that's still a data race, since the eventual _reader_
  of the result cannot be protected (is outside the class). Besides,
  we don't even know whether the algorithm-specific finalization
  functions are ok with being called from separate threads on the same
  context object

- in addition, the mutex wasn't necessary when finalize() was called
  from the static hash() function, as no sharing could possibly take
  place there (the state is function-local)

Fix all of the above by largely reverting the first attempt, dragging
the result.isEmpty() check out of finalize() and into resultView() and
instead simply holding the mutex over these two calls in
resultView(). To see why this is sufficient, consider that
resultView() is now idempotent again: the result is written once, the
next thread waits and then finds the work done. All following accesses
to the result are then reads, which happen-after the write at the end
of finalize().

The accesses to 'result' from reset() need no protection, as reset()
is a mutable function, and calling a mutable function on a shared
QCryptographicHash object is already UB. Only two const functions may
be called that way.

Pick-to: 6.5 6.4 6.2 5.15
Fixes: QTBUG-110058
Change-Id: Ia8ac095b785519682090801c1012e9dded6d60b2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 14:34:02 +01:00
Marc Mutz
c2cdd7c371 Q<Typed>Permission: use move-and-swap, not pure-swap, for move-assignment
While PURE_SWAP is the correct one today, this is inline code, so when
we activate the d-pointer, we may have fields that hold non-memory
resources, but it would be too late change existing binary users to
MOVE_AND_SWAP, so do it already now.

Pick-to: 6.5
Change-Id: I18976cffe30eb4e37aa6d471cc6e75015e9b1ee7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-02-02 14:34:02 +01:00
Marc Mutz
5ba2590388 QPaintEngineRaster: port from QSharedPointer to std::shared_ptr
Compared to std::shared_ptr, QSharedPointer requires 2x the atomic
operations per copy, and does not support QSharedPointer<void>.

Port to std::shared_ptr, and drop the Pinnable kludge.

Add an optimistic std::move() when we insert into QMultiHash.

Pick-to: 6.5
Change-Id: I2ab004b7e8fa36d9e777cd787ffded4076d2880f
Reviewed-by: Ahmad Samir <a.samirh78@gmail.com>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2023-02-02 13:34:02 +00:00
Marc Mutz
7b9f4aa0fc QLocaleData: fix AlphaCode::op== for C++20
The old function,

   bool AlphaCode::operator==(AlphaCode code) const noexcept

is not symmetric: the LHS argument is passed by cref and the RHS one
by (non-const) value. I didn't test, but this asymmetry might actually
make the operator ambiguous with its reversed version in C++20.

Fix by making a hidden friend. Even if it doesn't fix anything, hidden
friend relational operators are still where we want our code base to
migrate to, eventually (QTBUG-87973).

Pick-to: 6.5
Change-Id: Icb74c24802a3fe6c2987c1db86880c0d72a7abdf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 14:34:01 +01:00
Friedemann Kleint
441c152d85 QtNetwork: Split out QNativeSocketEnginePrivate
The aim is to have fewer files including <windows.h>.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Id9cc08f54b5daf6d7e317fad27036dc2efaacbb8
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-02 13:19:06 +01:00
Samuel Mira
48ebd4e318 Android: fix height calculation
The application height calculation relied on the Display.getMetrics to
obtain the size of the current app window. It works properly on stock
android and Samsung devices, but not on some Huawei and it's unknown on
other vendors. This patch changes the way the height and weight are
calculated by using the provided values.

Task-number: QTBUG-107604
Task-number: QTBUG-109268
Task-number: QTBUG-97503
Task-number: QTBUG-107923
Task-number: QTBUG-109351
Task-number: QTBUG-110501
Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I0b0d1a0e4688f10530054afd26e34f55a92ea2da
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-02-02 08:24:55 +00:00
Marc Mutz
46af1fe49f SQL/ODBC: fix some users of toSQLTCHAR() to not assume identical UTF-8/16/32 string lengths
We already fixed the implementation of toSQLTCHAR() in
66767eea46 to not assume that a UTF-8 or
UTF-32-encoded string has the same number of code points as the
equivalent UTF-16 string, but it turns out that users of the function,
as well as other code, also failed to account for this.

This patch fixes callers of toSQLTCHAR() to use

    const auto encoded = toSQLTCHAR(s);
    ~~~ use encoded.data(), encoded.size() ~~~

(except we can't make `encoded` const, because the SQL API isn't
const-correct and takes void* instead of const void*) instead of the
anti-pattern

   ~~~ use toSQLTCHAR(s).data(), s.size() ~~~

As a drive-by:
- Extract Method qt_string_SQLSetConnectAttr()
  - skipping an unneeded .utf16() call (a NUL-terminated string is not
    required for calling toSQLTCHAR())
- de-duplicate some code in exec()
  - and make a comment there slightly more informative
- replace
  - NULL with nullptr
  - size() == 0 with isEmpty()
  - C-style with constructor-style casts

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: I3696381d0a93af8861ce2b7915f212d9e5e9a243
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 06:33:48 +01:00
Friedemann Kleint
e73389874d QtWidgets: Fix CMake Unity (Jumbo) builds
Remove clashing enumeration value ColumnCount and exclude
file in snippets.

Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: Ibd8a72d9d87e3dcbbb221c364d6b4c4f59b315df
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2023-02-01 22:56:17 +01:00
Friedemann Kleint
814d66d558 uic: Add option for absolute Python resource imports
Add option that generates an absolute Python import.

import resources.rc_resources

from a path like

../resources/resources.qrc

assuming the project root is .. .

Add an additional option to specify the import paths, from which
the project root can be determined.

Pick-to: 6.5
Task-number: PYSIDE-2191
Change-Id: Ib444eb666217b8c010dba0079b0ffe9ddbaa3414
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
2023-02-01 21:41:53 +01:00
Ahmad Samir
d4f72b4de6 QStandardPaths/unix: ignore relative paths in all $XDG_* env vars
This is a continuation of commit 5c9d671bfb.

[ChangeLog][QtCore][QStandardPaths] Improved conformance to the
Freedesktop basedir spec by ignoring any relative paths in XDG_*
environment variables.

Fixes: QTBUG-58043
Change-Id: I7c34143ced97d6d3de6ecbf13bccf9e935462d1e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-01 19:46:02 +00:00
Tor Arne Vestbø
1f1380b79c permissions: Finalize permission example at end of CMakeLists.txt
Otherwise the finalizers won't know which libraries we're linking to.

Pick-to: 6.5
Change-Id: I886c46443b7289d6e2c7d824767ed5e34a0a1fbf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-01 20:25:08 +01:00
Tor Arne Vestbø
ffd6a4264b Don't include qnetworkproxy_generic.cpp for iOS
We already have the necessary machinery in qnetworkproxy_darwin.cpp

Pick-to: 6.5
Change-Id: I01d99c825ed794f1ff5ba229e64f9963b819228c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-01 20:25:08 +01:00
Friedemann Kleint
bd5589de65 QtWidgets: Fix errors about fields from anonymous namespaces (-Werror=subobject-linkage)
Move types to QtPrivate, fixing errors like:

error: QCalendarWidgetPrivate’ has a field
QCalendarWidgetPrivate::m_model whose type uses the anonymous namespace [-Werror=subobject-linkage]

The error appears in CMake Unity (Jumbo) builds apparently
due to multiple anonymous namespaces per file.

Task-number: QTBUG-109394
Pick-to: 6.5
Change-Id: Id678af4db5633b1b2267425c7751f1312935d5d5
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2023-02-01 19:12:36 +01:00
Friedemann Kleint
93af309a70 Examples: Fix CMake Unity (Jumbo) builds
Disambiguate variables and add some exclusions.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ie72b3caab9fd571c3fb6f7d8606584885bc09e66
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
2023-02-01 19:12:36 +01:00
Friedemann Kleint
ddb94dd792 Examples: Add missing include guards
Pick-to: 6.5 6.4 6.2
Task-number: QTBUG-109394
Change-Id: I09a1b522d0faeb2346e1e075141f1e810c8155f7
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-01 18:12:36 +00:00
Tor Arne Vestbø
ae92c571a3 iOS: Fix build with -no-opengl
Pick-to: 6.5
Change-Id: I014fa1772f629ef4224ac98bfc30eb5a86f38fde
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-01 19:12:36 +01:00
Axel Spoerl
593ffd3859 Add right and middle mouse button to tst_QLabel::mouseEventPropagation
The test function used only the left button to test mouse event
propagation.

This patch adds the right and middle buttons to the test data.

Task-number: QTBUG-110055
Pick-to: 6.5 6.4
Change-Id: I02683168216843919e889987a8b0e8a0f1592d3a
Reviewed-by: Doris Verria <doris.verria@qt.io>
2023-02-01 17:41:58 +00:00
Friedemann Kleint
1fad7aa73e QtGui: Remove define Q_TEST_QPIXMAPCACHE
It causes clashes in CMake Unity (Jumbo) builds.
Change the function to be Q_AUTOTEST_EXPORT'ed helpers.

Pick-to: 6.5
Task-number: QTBUG-109394
Initial-patch-by: Amir Masoud Abdol <amir.abdol@qt.io>
Change-Id: I2e4032e07e1c39432cae1eb2dfff94be33846c09
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-01 18:09:05 +01:00
Ahmad Samir
28c974ba97 QMimeDatabase: use unique QTest data tag names
Change-Id: I5f0b270df344b0a8511d48f3cde34643f3115445
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-01 18:54:21 +02:00
Alexandru Croitor
d7e8d5bb1b Revert "Add support for MultiABI with custom install dir of the android-build"
This reverts commit 979a21dc4e.

Reason for revert: Caused QTBUG-110836

Task-number: QTBUG-110836
Change-Id: I4f31018954e6bb0f4e7b6db0df76d04c0a56d9b1
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2023-02-01 16:18:55 +00:00
Kai Köhne
296aaf52b2 Doc: Fix smaller issues in new Qt 6.5 QStyleHints API
Change-Id: Ifd15d5a41e0b80be7fba89d33d78e4a0f53b88ee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-01 17:17:15 +01:00
Konrad Kujawa
30344aaa49 Migration from int to qsizetype of QAnimationGroup
QAnimationGroup, QAnimationGroupPrivate uses now qsizetype instead of the int.

Task-number: QTBUG-103530
Pick-to: 6.5
Change-Id: I96053a609bc4fad32adce5616eef1af9a86f4e27
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-02-01 17:06:35 +01:00
Marc Mutz
4c445ef0ba ODBC SQL driver: fix conversion of QByteArray to QVLA<SQLTCHAR>
The QByteArray is assumed to contain an SQLTCHAR string (so, either
UTF-8, UTF-16 or UTF-32-encoded). Only in the UTF-8 case would the
size of the byte array be the same as the size of the SQLTCHAR string
in codepoints, yet the size in bytes is what the code passed to the
QVLA<SQLTCHAR> append() call, causing it to read past the QByteArray
buffer in the UTF-16 and UTF-32 cases.

Fix by properly calculating the string size from the size-in-bytes and
then memcpy()ing into the QVLA. We use memcpy() and not
QVLA::append(T*, n) because the QByteArray buffer need not be aligned
on an alignof(SQLTCHAR) boundary (certainly not since it gained the
prepend "optimization").

Pick-to: 6.5 6.4 6.2 5.15
Change-Id: If3838c3dee89e6aca65541242642315b8e1fa6b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-01 12:21:23 +00:00
Antti Määttä
a1d43b8334 Fix comparison sign missmatch warning
Pick-to: 6.5
Change-Id: Id266add0a2c203c31ae76bd3dc20e625e86e5a13
Reviewed-by: Janne Koskinen <janne.p.koskinen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-01 09:52:04 +02:00
Timur Pocheptsov
0ca8c50d95 DTLS cookie: use CRYPTO_memcmp instead of std::memcmp
memcmp and openssl callbacks are somewhat of a red flag, so use
CRYPTO_memcmp for the sake of looks.

Done-with: Maximilian Blochberger
Change-Id: I38d038ed96830cfd54c6f5cd684f80bee8d42899
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-01 06:00:13 +00:00
Thiago Macieira
5c9f044ac0 IPC/QSharedMemory: make the enums Q_ENUM
Helps in debugging (qDebug, QCOMPARE, etc.).

Change-Id: I12a088d1ae424825abd3fffd171d6f1fea7a9843
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-31 19:38:01 -08:00
Thiago Macieira
1b1ab5bac9 IPC/QSharedMemory: include the QSystemSemaphore error message in ours
It may be important.

Change-Id: I12a088d1ae424825abd3fffd171d6f284b69a09c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-31 19:38:01 -08:00
Thiago Macieira
70487ba447 IPC: don't close(-1)
Change-Id: I12a088d1ae424825abd3fffd171d6ec7ee49348a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-31 19:38:01 -08:00
Thiago Macieira
c9eac98369 IPC: rationalize use of O_CLOEXEC
This flag is properly supported everywhere it is defined. There's no need
to retry any more.

Change-Id: I12a088d1ae424825abd3fffd171d6ad10d18247e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-31 19:38:01 -08:00
Thiago Macieira
f7ae2c44a8 IPC: move the removal of the file and shm to cleanHandle()
It makes far more sense here, because we can also avoid the need to save
the old key file name.

Change-Id: I12a088d1ae424825abd3fffd171dfaa5dca8a36e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-31 19:38:01 -08:00
Thiago Macieira
b22ae069ac QRegularExpression: fix count() when the RE matches a surrogate
When the match finds a surrogate pair as the first true Unicode character,
then we need to skip both code units of the pair in order to restart the
search. PCRE2 does not allow us to search for individual UTF-16 code
units.

That actually means that counting "." gives us the count of Unicode
characters.

Fixes: QTBUG-110586
Pick-to: 5.15 6.2 6.4 6.5
Change-Id: I194d0a32c94148f398e6fffd173d5b5be8137e19
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-31 19:38:01 -08:00
Ahmad Samir
ee515dd842 QStandardPaths/Unix: fix logic in xdgDataDirs() function
This method correctly ignores relative paths (as per the XDG basedir
spec), but checking the list of dirs is empty should be moved to after
splitting the env var, because even if the env var is not empty, if the
paths in it are all relative the resulting list will be empty.

Drive-by change: Split some code to a static helper, which will be
used in xdgConfigDirs() too.

Change-Id: If894751ba68b24ccc214f9a4bb2099be3f0e4349
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-01 01:03:28 +02:00
Friedemann Kleint
72c2cdbc57 Short live q20::construct_at()!
Move the helper from qsystemsemaphore.cpp to q20memory.h
to prevent clashes in CMake Unity (Jumbo) builds.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Id0127af1f0d51c87a5887090cc90ab232eff8093
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-01 00:03:28 +01:00
Ahmad Samir
cebc6b83bf QDateTime: refactor readInt()
QStringView::toULongLong() only works with US-ASCII, so:
- Always convert the text to parse to Latin1
- Use qstrntoull and make ParsedInt a typedef of
  QSimpleParsedNumber<qulonglong>

The QStringView overload delegates to the QL1SV after converting the
string to latin1.

Change-Id: Iff7ac2c0afe6a180ca1b46a09ef0750e9b882c4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-31 23:56:13 +02:00
Ahmad Samir
5353afd7a8 QString: use QtPrivate::qustrchr
Change-Id: I3053da3381fbdd22243683f37dd9f55e58c621dc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-31 23:56:13 +02:00
Ahmad Samir
d4fccc95be QString: change replace_helper() to take a QStringView
Change-Id: Ib3fd5bda96f36bf42da1e5c7230b37fc048c02a4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-31 23:56:13 +02:00
Jan Arve Sæther
e08575a18a Remove wiggly example
It demonstrates timerEvent() and some QFontMetrics
There are other examples that demonstrates this

Pick-to: 6.5
Change-Id: I4ad6f30c8ef93c995f980545ed88ab13b9aa9c7d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-01-31 22:28:30 +01:00
Ulf Hermann
2db2eb600a MetaObject: Apply some cosmetics
Add missing white space to moc output and list all the values of
QMetaObject::Call in the internal documentation.

Change-Id: I57d0c5b88bfaee4ca3f2d4604564751b6d0cbe51
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-01-31 21:18:28 +01:00
Friedemann Kleint
0fc1f8174f QtNetwork/Windows: Add exclusions for CMake Unity (Jumbo) builds
The "interface" define in windows.h causes clashes with
variables named "interface". It cannot be undef'ed
since the winsock headers also uses it.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Id2daedfd6c57aae39a1fdfe92482f17884b68ef5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-01-31 20:32:33 +01:00
Andreas Hartmetz
25c1eaa9b1 Document the shortcut isFile() for "exists and is a file"
One can figure out that something needs to exist in order to be a
file, I guess, but the documentation carefully avoided mentioning
it. So mention it.

Change-Id: I5094d6cb88ce2e58f48d8978c9b858d19d209f92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-31 19:52:40 +01:00
Jani Korteniemi
4b4873359d Fix ContextInfo example crashing on Android
Disabled desktop OpenGL renderer on android

Task-number: QTBUG-91627
Pick-to: 6.2 6.4 6.5
Change-Id: I61ec7cc768d46c368dc0187714bd0bd085257a67
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-01-31 20:52:40 +02:00
Ahmad Samir
6ff4c3d787 Remove redundant qsharedpointer.h #includes
In some cases added #include <QtCore/qshareddata.h>.

Change-Id: Idc84c4ad6b0bd58e1a67af335dfcff67fdf80b2a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-31 20:15:58 +02:00
Ilya Fedin
fe90f8aa45 jpeg handler: log error message on fatal error
Original libjpeg's handler has output_message call.

As Qt doesn't have it, it logs non-fatal error, but skips the fatal ones
which are likely more important to be logged than the non-fatal ones.

Pick-to: 6.5
Change-Id: Iebb94db4d56705322e7569445d240ca4a7ed8f4a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2023-01-31 22:15:58 +04:00
Ahmad Samir
3575d2d028 QString: remove a try/catch from replace_helper()
I think it was there because of of the QChar array allocated on the
heap (to store a copy of the "after" string when it's part of 'this'
string) and the subsequent ::free() call; instead split some code to a
static helper, and store the copy in a QVarLengthArray; the latter has
SSO, so it'll only heap-allocate if needed, and will take care of
deleting the data.

Remove now unused textCopy() method.

Change-Id: Iaf29d19ebd40d24948f0859d80f45e4c16e5bbce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-31 20:02:54 +02:00
Ahmad Samir
9532339788 QString: use QVLA instead of built-in array
This simplifies the code as a QVLA's size isn't limited to 1024.
Also it allows the code to allocate a big enough buffer to hold the
result, i.e. no reallocations.

insert_helper() takes care of storing a copy of "after" if it points
into "this" string; and "before" pointing into "this" isn't an issue
since we collected the indices before starting the replacement.

Change-Id: I612948187226439349118e65e9525ded2b387da0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-01-31 20:02:54 +02:00
Ahmad Samir
6b89883f6a QString: name args in replace() overloads consistently
Change-Id: I169ecbc4ceaa6eded236fc7421a9eb2e782c6b9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-31 20:02:54 +02:00
Ahmad Samir
51aa1c9436 QString: use QtPrivate::q_points_into_range
And remove the static helper pointsIntoRange().

Change-Id: Ie34b232d5cafdd92d46fe6c63ab32da4c68631d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-31 20:02:54 +02:00
Andrey Butirsky
5e76a9569e xkbcommon: make shortcuts persistent across layouts
It can happen the same key has different Latin symbols on different
layouts: for example, "`" symbol on English layout, no symbol ("^" dead
key) on German and ";" symbol on Czech and Hebrew layouts. This creates
a problem as these keys will produce different shortcuts depending on
what layout is currently active.

This patch makes keys generate the same shortcuts corresponding to the
first Latin layout configured in the system, independently of layout
actually active.

For example, when having settings like:

  setxkbmap -model pc105 -layout "us,de" -option "grp:alt_shift_toggle"

After Alt+Shift, the layout changes to de from us. But Ctrl+"^" still
generates Ctrl+` shortcut which is from the first(or default) layout.

[ChangeLog][QtGui][QXkbCommon] make keys produce the same shortcuts
independently of current layout

Fixes: QTBUG-108761
Change-Id: Id204a1609ca731f9c56ed3d32847ca18b94be4a0
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Andrey Butirsky <butirsky@gmail.com>
2023-01-31 18:02:54 +00:00
Kai Köhne
d53607225a Doc: Do ignore \since 5.x
We only support Qt 5.15 since a while, so the detailed information in
which Qt 5 version a particular class, function, or enum was introduced
is becoming less and less relevant.

Pick-to: 6.5
Change-Id: I39bd579f23abc0ac84879e9bd22e6a97651ef7c3
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2023-01-31 18:42:15 +01:00
Friedemann Kleint
8b1bb45566 QtCore: Disambiguate QCalendar locale data
They cause clashes in CMake Unity (Jumbo) builds.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: Ib86442c2d1b9abe57d3536b7a73a5e0ce78ce18d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-01-31 18:42:15 +01:00