Commit Graph

60016 Commits

Author SHA1 Message Date
Morten Sørvig
bf5dbc61b3 wasm: convert a11y coordinates to window coordinates
The html accessibility elements are positioned relative
to the window a11y container. Convert the global (screen)
coordinates we get from QAccessibleIntreface::rect() to
window coordinates.

Pick-to: 6.5
Change-Id: Ifd4eb671def296b1eb418789b7ca85afa365e546
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-02-03 18:42:21 +01:00
Morten Sørvig
34c3682157 wasm: fix accessibility crash on null parent
The code was a assuming that an a11y interface always
has a parent, which is not the case for the root interface.
Also factor out to a getWindow() function, to prepare
for re-use later on.

Pick-to: 6.5
Change-Id: I52a841bf94c712deb9603e8b9c2c878820c5f117
Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
2023-02-03 18:42:21 +01:00
Morten Sørvig
2443f2be07 wasm: set contenteditable on canvas
We don't want to make the top-level screen contenteditable,
since that interferes with accessibility. Instead, make
the canvas contenteditable and install clipboard event
handlers there.

Also move follow-up settings which counters some of the
effects contenteditable (outline: none and inputmode: none),
and move aria-hidden.

Pick-to: 6.5
Change-Id: Ibe73d8d097acd948ba8920c781a2003db0a14f3d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-03 18:42:21 +01:00
Mikolaj Boc
43a77d4b64 Remove unused code in qwasmcssstyle
Since 32666691c2, icons have been set
manually on img elements. The css code assigning the icons to elements
is now unused - remove it.

Change-Id: I394f08371c80f0e374a5cc7e39d17bb6091d18dc
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-03 18:42:21 +01:00
Edward Welbourne
b62ac40987 Move qtLocalTime() to qtenvironmentvariables.cpp as qLocalTime()
The new name better matches the names of existing functions there.
A comment on the old code noted that such a move should really be
done, so as to correctly share the environment-mutex locking.

In the process, move the (now three) time-related internal functions
from qglobal_p.h to a new qtenvironmentvariables_p.h since that's the
natural place for them given where they're defined (and the fact that
they're for internal use only).

Change-Id: Ib028baebaf31a806a2c0c97caaaba0a466c11cea
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-03 14:45:31 +01:00
Edward Welbourne
9d1a3582f3 Call _tzset() before localtime_s() in qtLocalTime()
Experiment reveals that we needs to, despite hints in localtime_s()'s
docs that seem to indicate it shouldn't be needed.

In the process document that POSIX mandates that plain localtime()
behaves as if it did call tzset(), since its branch of the #if-ery is
now the odd one out.

Pick-to: 6.5
Fixes: QTBUG-109974
Change-Id: Ic57753f246f14e183d2a56f131e8bed7347d2e20
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2023-02-03 14:45:13 +01:00
Mårten Nordheim
78c5ca4c85 Update the public suffix list
Pick-to: 6.5
Task-number: QTBUG-110333
Change-Id: I741feee3a19d0a104496f543d35a1f311a7228d6
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2023-02-03 12:56:59 +01:00
Mikolaj Boc
7c33f4be02 Support window masks on WASM
QWasmWindow is now implementing the setMask method, which translates
the received QRegion to a css clip path

Fixes: QTBUG-73260
Change-Id: Ie934c1e6ab650426bfc32154bf9e49a4a2aeb45b
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2023-02-03 09:46:05 +01:00
Tasuku Suzuki
f54fab6125 Fix android build with -no-feature-settings
Add QT_FEATURE_SETTINGS to the android deployment conditions.

Pick-to: 6.5 6.4
Change-Id: I7721a06733becba65b6d1e8112fa8afb0b64e120
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-02-02 22:45:34 +00:00
Marc Mutz
67ed712235 q20::construct_at(): fix various issues
Fix several issues in 72c2cdbc57,
which I was too slow to review before it went in:

- use the correct feature macro, not __cplusplus
- use the correct signature (return T*, not void)
- don't make the function static
- add a comment mentioning the material difference to std::construct_at
- drop unneeded <qxptype_traits.h> include

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I39d1908f565b1c1a31d5741924ac173447ec9057
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 22:45:30 +00:00
Marc Mutz
c53fdcb5ee Q_APPLICATION_STATIC: add missing std::launder()
Unlike Q_GLOBAL_STATIC, a Q_APPLICATION_STATIC can be destroyed and
re-created multiple times (if QCoreApplication is, too). This means
we're basically in the std::optional case and require std::launder()
to avoid UB when the payload type has either of the following:

- a const member
- a reference member
- a vtable and different derived classes might be occupying the same
  space at different times

While we can probably exclude the latter, because we always construct
the same type, PlainType, in the storage, the first two can easily
happen.

Fix by adding the missing std::launder().

As a drive-by, remove the uneeded casting (and now launder()ing) of
&storage when passing to innerFunction(), which anyway takes its
argument as void*.

Amends 81a31beeb2, which changed
Q_APPLICATION_STATIC to use inline aligned_union storage instead of
the original implementation's unique_ptr.

Pick-to: 6.5 6.4
Change-Id: I065bd33812a40195109bf11d5bc79975f2f87cd5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 23:45:30 +01:00
Friedemann Kleint
d3f8d7fd41 QtCore: Disambiguate static variables
They cause clashes in CMake Unity (Jumbo) builds.

Pick-to: 6.5
Task-number: QTBUG-109394
Change-Id: I5f1fbee07872a742a78adc9864fe00c710ca24d0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 21:57:49 +01:00
Thiago Macieira
9d2f3e63b8 QMimeDatabase: add a test to ensure we can detect Unix specials
Pick-to: 6.4 6.5
Change-Id: I570832c9ac8b4e03bde8fffd173f7e743f42f22b
Reviewed-by: David Faure <david.faure@kdab.com>
2023-02-02 12:17:25 -08:00
Thiago Macieira
40dd38813c QMimeDatabase: don't stat() something that isn't a local file
We must check that the path is an actual file on the filesystem before
using native APIs. This regression was introduced by commit
047d8f36de.

[ChangeLog][QtCore][QMimeDatabase] Fixed a regression from 6.4.0 that
made certain QMimeDatabase functions that inspected file contents to fail
on Unix systems, if the file was not a native file (e.g., a Qt resource).

Fixes: QTBUG-110707
Pick-to: 6.4 6.5
Change-Id: I570832c9ac8b4e03bde8fffd173f7b4c6b164192
Reviewed-by: Igor Kushnir <igorkuo@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2023-02-02 12:17:24 -08:00
Thiago Macieira
bfe42ebdeb tst_QMimeDatabase: rename test to indicate what it really is
This test is calling mimeTypeForFileNameAndData(), so it doesn't
actually use the files.

Change-Id: I570832c9ac8b4e03bde8fffd173f77f138ef3434
Reviewed-by: Igor Kushnir <igorkuo@gmail.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2023-02-02 12:17:24 -08:00
David Faure
c609b8dba0 QSortFilterProxyModel: port to PMF connects for performance reasons
BEFORE:
   0.21 msecs per iteration (total: 56, iterations: 256)
   801,946 CPU cycles per iteration (total: 801,946, iterations: 1)

AFTER:
   0.084 msecs per iteration (total: 87, iterations: 1024)
   300,259 CPU cycles per iteration (total: 300,259, iterations: 1)

Change-Id: I5b2703c217bb25e18f1d9f6a1eda19c60e1edcb0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-02-02 20:43:59 +01:00
Tor Arne Vestbø
ad42833d33 Apple: Detect missing bundle identifier when using location permissions
The location permissions database in /var/db/locationd/clients.plist
ties the location permission to the bundle identifier (among other
things), so a missing bundle identifier will result in the app asking
repeatedly for the location permission, as the permission is never
saved.

Pick-to: 6.5
Change-Id: I64ab5b8f8762804869c0f97debd97da817787808
Reviewed-by: Juha Vuolle <juha.vuolle@qt.io>
2023-02-02 19:12:50 +01:00
Mårten Nordheim
7df8ef0a10 HTTP example: Reflow QMessageBox usage in if-statement
It gets hard to read like that.
And update mentions of 'SSL' to 'TLS' in the message while we're there.

Task-number: QTBUG-108874
Pick-to: 6.5
Change-Id: Ia7b27bfb3d99391b14ed396ca9a6400621022bf6
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-02-02 18:03:36 +00:00
Alexey Edelev
871f7a05db Revert "Revert "Add support for MultiABI with custom install dir of the android-build""
This reverts commit d7e8d5bb1b.

Reason for revert: Found a working solution for the issue.

Change-Id: Ia720cc63ece9dfb1a24067cdd9c3d79d4edbe3be
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-02-02 19:03:36 +01:00
Jan Arve Sæther
fd65f70974 Fix analog clock example to adhere to guidelines
Guidelines: https://wiki.qt.io/Qt6/Example-Guideline

Pick-to: 6.5
Change-Id: I12c65ae11e7906fd2e9dfb449072199560488aed
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2023-02-02 17:51:34 +01:00
Edward Welbourne
57a1c2b0d9 Correct an inaccurate comment in inDateTimeRange()
Change-Id: I43bf3bf448792bfac05dccb8b57047b264dfb269
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 17:22:29 +01:00
Ulf Hermann
41248f2590 moc: Allow calling ctors on pre-allocated data
When calling a ctor this way, an object is created in the memory pointed
to by _a[0] using the other arguments for the ctor.

This allows separate allocation and initialization of an object through
the metaobject system.

Fixes: QTBUG-108879
Change-Id: Ifb154373ee42faab281cfb62aa14334980ec6b7d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-02-02 15:57:09 +01:00
Ahmad Samir
b291217457 QString: remove some redundant unittests
The QChar::toLatin1() args in:
str.replace(index, len, QChar(after[0]).toLatin1())
s2.replace(ch.toLatin1(), after, cs)

will be converted to QChar, so it's always calling the same QString
overload, I argue that we're not testing QChar implicit conversions
here.

Change-Id: I3962cab2b34684f970638575e6bd15dd1067a8c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 15:57:18 +02:00
Santhosh Kumar
9a1b7c7fa5 Reset dark palettes for widgets to light in windows style
Windows theme in dark mode set dark palettes for checkbox,
radiobutton, menu, menubar explicitly. The fix added as part of
a2518b4140 (to use light palette for
windows style) overrides only system palette and widget specific
palettes are still with dark palettes.

In this patch, the windows style overwrite dark with light palette
for widgets that are explicitly set with dark palette in windows
theme.

Fixes: QTBUG-110432
Pick-to: 6.5
Change-Id: I2af0e517d62981f062244eeab8f1b5e5442cc451
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-02-02 14:57:18 +01:00
Laszlo Agocs
0b20f243f7 Modernize the VK_EXT_debug_utils callback
...as suggested by review comments.

Switching to std::function implies that we cannot easily
do the install-remove pattern anymore as there is no way to
compare an std::function to something other than null. Instead
of making it more complicated by returning a key or something
like that, change the remove function to a clear (that now clears
both the legacy VK_EXT_debug_report and the new VK_EXT_debug_utils
callback lists).

Also add a missing call that registers the new-style callbacks that
are installed before create().

Pick-to: 6.5
Change-Id: I66c1dd8e8dcc8eee0f5eb9671f94c2c80319dcaf
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2023-02-02 14:57:18 +01:00
Ahmad Samir
a14bcdfcc9 QtMiscUtils: replace uint args with char32_t
Also change isAsciiDigit() to take a char32_t, so that something like
this works:
QChar ch; isAsciiDigit(ch.unicode())

casting char16_t to uchar is narrowing, and gives weird results. C.f.
QSettingsPrivate::iniEscapedKey() and the QSettings unittests which
uses some unicode characters.

Task-number: QTBUG-110403
Change-Id: Id978a6b2874bc6869ae3ffb28d1887d932c37782
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-02-02 15:57:18 +02:00
Sze Howe Koh
4bfdf6a3d1 QAnyStringView: fix MSVC warning C4702
The previous fix attempt at 8ba8d1346a
does not work when C++20 mode is enabled.

MSVC optimizes away the "else" block but triggers warning C4702 on
"return true". Moving the return line into the "else" block ensures that
it is optimized away too.

Change-Id: I9ef02cd3631ff78091530b6fb2b91c2eddcbab5d
Pick-to: 6.5 6.4
Fixes: QTBUG-104836
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Yuhang Zhao <yuhangzhao@deepin.org>
2023-02-02 21:53:25 +08:00
Marc Mutz
c307cbea90 Q*Permission: un-Q_GADGET classes w/o Q_ENUMs
We can always add it back later, but for now, it's pointless overhead
(no Q_PROPERTYs, no Q_INVOCABLEs).

Found in API review.

Pick-to: 6.5
Change-Id: I1e30fbda997e6576a3e94cbae0387a3188c27728
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-02 14:34:02 +01:00
Marc Mutz
2d254afead Q<Typed>Permission: add alignment checks for future BC changes
Ensure that the classes using ShortData have the same size (already
done) and alignment (this patch) as classes that just have a
d-pointer.

Pick-to: 6.5
Change-Id: If30352a0bc4beb4b505d6e0eab5077c9c16456ba
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2023-02-02 14:34:02 +01:00
Marc Mutz
3f33ed249b Q{Contacts,Calendar}Permission: bool readWrite → enum AccessMode
The fact that read-access is always included makes a bool readWrite
property a little awkward to document and explain. An AccessMode enum
with values ReadOnly and ReadWrite is much easier, and will also lend
itself more easily as a constructor argument than a boolean.

Found in API review.

Pick-to: 6.5
Change-Id: I4f20dbe9f19c7bdb52248a6e544e36d731d5a2ee
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2023-02-02 14:34:02 +01:00
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