Commit Graph

59125 Commits

Author SHA1 Message Date
Mate Barany
2ffdb3bcdd QString: overload the += operator to handle QUtf8StringView
The += operator is already overloaded to handle QStringView and
QLatin1String - add the missing QUtf8StringView overload.

[ChangeLog][QtCore][QString] Added operator+=(QUtf8StringView)
overload.

Task-number: QTBUG-103302
Change-Id: Iec6940bad7866310c826a130b98accebc3c82aa8
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-02 16:04:06 +01:00
Mate Barany
d2e1d73bf1 QString: overload append to accept QUtf8StringView
Add the missing overload, among other things it is needed to
implement QTBUG-103302.

[ChangeLog][QtCore][QString] Added append(QUtf8StringView)
overload.

Task-number: QTBUG-103302
Change-Id: I576f73c1919e3a1f1a315d0f82c708e835686eb1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-02 16:04:01 +01:00
Axel Spoerl
4ca8a68408 Re-implement palette, standardPixmap, file icons, fonts in QGtk3Theme
Read theme colors from GTK3 style context and build platform theme
palettes in Qt.
React to runtime theme changes.
Re-implement methods to retrieve GTK3 styled standardPixmaps, fonts
and file icons.

Task-number: QTBUG-62510
Change-Id: Ib58d1614850764f2e88cca33883fd6c426b35aee
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2022-12-02 15:57:11 +01:00
Timur Pocheptsov
96628b1254 Stop using deprecated constants and use suggested replacement
Pick-to: 6.4 6.2
Change-Id: I3686d896267d219501f8eeec74729c17d9c2b42d
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-02 15:55:30 +01:00
Timur Pocheptsov
190e5af111 Try fixing auto-tests that need resolving openssl symbols
For the case of static builds. Also, remove somewhat funny comment
from the shared tlshelpers.h file.

Fixes: QTBUG-105046
Pick-to: 6.4 6.2
Change-Id: I2fd677a11b64df89c0ad0237e1014f5e80144c24
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2022-12-02 15:55:11 +01:00
Laszlo Agocs
62d76743b3 rhi: vulkan: Flush before unmap
To prevent validation errors with VUID-VkMappedMemoryRange-memory-00684
although I cannot actually trigger this on Windows. Based on the spec
however the right thing seems to be to flush before unmap.

Pick-to: 6.4 6.2
Fixes: QTBUG-109123
Change-Id: I34fedea22a6e6e2a14f9b95fea49af05985ec4cb
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-12-02 15:53:38 +01:00
Tor Arne Vestbø
45e33954ef QErrorMessage: Forward log messages to original handler
The convenience of having a QErrorMessage pop up a dialog when a log
message is emitted should not prevent the existing message handler
(typically the default handler, logging to console e.g.) from getting
a stab at the messages.

Change-Id: I45ba9128f509e85cd60f4e678cf8ec50bb0f93f1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-12-02 15:53:38 +01:00
Tor Arne Vestbø
21127b587b QErrorMessage: Filter out categorized logging for QErrorMessage::qtHandler()
The class was not written to handle categorized logging, which was
added after its inception. Processing categorized logging can quickly
lead to issues, as showing the QErrorMessage may trigger categorized
logging in itself.

Change-Id: Id1d3a75acc1e6d1a69493fa722a733ae2f1f5f63
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-12-02 15:53:37 +01:00
Tor Arne Vestbø
7e4c7d50a7 Add QGuiApplication API to set a number-badge in the Dock/task bar
The API is supported on macOS, iOS, and Windows. On Android no official
API exists for badging the application icon, and we don't want to take
on dependencies like ShortcutBadger [1].

The macOS and iOS implementations are trivial. The same goes for
the WinRT based implementation on Windows, but this API is only
available for applications that have a so called "package identity",
and does not seem to be stable for Windows 10.

To cover the cases where this API is not available we fall back to
drawing the badge manually, and set it as an overlay icon on the task
bar using ITaskbarList3. The look of this badge has been tweaked to
match the Windows 11/10 styles, and will pick up the user's choice of
dark/light mode and accent color if available.

[1] https://github.com/leolin310148/ShortcutBadger/

[ChangeLog][QtGui] Added QGuiApplication::setBadgeNumber() to inform
the user about e.g. the number of unread e-mail or queued tasks.
The badge will be overlaid on the application's icon in the Dock
on macOS, the home screen icon on iOS, or the task bar on Windows.

Task-number: QTBUG-94009
Change-Id: I6447d55177f9987b0dfcd93caf63c6167f7224c7
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-02 15:53:37 +01:00
Tor Arne Vestbø
846cda7eb0 Remove Android High-DPI workarounds in examples
These should no longer be needed for Qt 6.

Change-Id: Ica7214cbf4fc3ddae960309fe89681ec690d28d0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-02 15:53:37 +01:00
Tor Arne Vestbø
465bde54a0 Remove showMaximized() workaround for Android in examples
Android implements QPlatformIntegration::ShowIsMaximized nowadays.

Change-Id: I451a9a8edc8ec407946d44f3e6921c78ac1d11aa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-12-02 15:53:37 +01:00
Axel Spoerl
2ec7a6322f Stabilize tst_QWidget::optimizedResizeMove and optimizedResize_topLevel
The test functions tst_QWidget::optimizedResizeMove and
tst_QWidget::optimizedResize_topLevel use a custom widget to record
paint events in a boolean.
Using QTRY_* or qWait() to wait for the boolean to become true stops
event processing upon consumption of the first paint event.
In case of multiple paint events, the next paint event will be recorded
in the next check and may lead to a wrong result.
This leads to flakiness on platforms generating multiple paint events,
openSuSE Leap 15.4 / XCB being one of them.

This patch replaces the boolean with a counter. It adds a
waitForPaintEvents method to the custom class, which processes events,
until the counter stops increasing. It returns true when paint events
have been recorded and false otherwise. It resets the counter after
each call.

It also removes the QSKIP on wayland, as the failure results from the
same reason.

Fixes: QTBUG-109093
Pick-to: 6.4
Change-Id: I59ee8bb4efeaf5417d5749d21e384bee89301ae0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-02 11:45:36 +01:00
Doris Verria
dbe433f6d0 iOS plugin: Support picking folders for native file dialog
Fixes: QTBUG-104375
Change-Id: Idbc9eb44abed5e3cd0dd768a08bf8132aba58f43
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-02 11:42:58 +01:00
Doris Verria
443af8cd45 iOS plugin: Add native font dialog
[ChangeLog][iOS] Added native font dialog support for iOS.

Task-number: QTBUG-109059
Change-Id: If38e990e1c5e9fc1a303fce3e79c09c2d45daaa0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-02 11:42:37 +01:00
Yuhang Zhao
67715b0095 Win: redirect console output to the parent process if needed
We need to redirect the console output to the parent process
for GUI applications on Windows, otherwise we won't get any
output if we start the application from the console, because
the SUBSYSTEM of GUI applications is not CONSOLE by default.

But we don't want to change the default behavior of Qt, so
we control this feature through an environment variable
"QT_WIN_DEBUG_CONSOLE". It accepts two string values:
(1) "new": the application will try to create a separate
    console window and redirect everything (cin/cout/clog/cerr)
    to it. If you are running the application in an IDE, you
    won't be able to get anything from the IDE's console anymore.
(2) "attach": the application will try to attach to the parent
    process's console, if there is one. When we attached to it
    successfully, we'll redirect everything to it.

Change-Id: I3ef98f6c0603f64fcc4e8e974411c5ed83c5d36f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-02 18:35:52 +08:00
Øystein Heskestad
b977ae371a Add In-place utf-8 case-insensitive comparisons
Also add optimizations for more string comparisons and add tests and
benchmarks.

[ChangeLog][QtCore][QString] Added utf-8 case-insensitive comparisons

Fixes: QTBUG-100235
Change-Id: I7c0809c6d80c00e9a5d0e8ac3ebb045cf7004a30
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-02 11:35:49 +01:00
Alessandro Portale
724329b79e androiddeployqt: Avoid extra modifying of gradle's *.properties files
On each run of androiddeployqt involving gradle, the "merging" of
gradle's *.properties files inserted empty lines.

Change-Id: I7a8314cd0adf4d85663f17ac22967a08cab42b91
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-02 10:34:52 +00:00
Mate Barany
8c0ed7422c Refactor\Extend tst_QString::prepend_data with additional test cases
During the implementation of QString::append(QUtf8StringView) it has
become apparent that the testing is insufficient as it did not warn
about an extra growth. The following tests have been added that append:
- y-umlaut and greek letter small theta (2 UTF-8 code units => 1 UTF-16)
- devanagri letter ssa (3 UTF-8 code units => 1 UTF-16)
- chakma digit zero (4 UTF-8 code units => 2 UTF-16 code units)
- some combinations of the above

Pick-to: 6.4 6.2
Task-number: QTBUG-103302
Change-Id: I981213c296bafc81663b08c0f1f339bbd8a96485
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-02 10:34:52 +00:00
Mate Barany
bc9e1c5c27 Refactor\Extend tst_QString::insert_data with additional test cases
During the implementation of QString::append(QUtf8StringView) it has
become apparent that the testing is insufficient as it did not warn
about an extra growth. The following tests have been added that append:
- y-umlaut and greek letter small theta (2 UTF-8 code units => 1 UTF-16)
- devanagri letter ssa (3 UTF-8 code units => 1 UTF-16)
- chakma digit zero (4 UTF-8 code units => 2 UTF-16 code units)
- some combinations of the above

Pick-to: 6.4 6.2
Task-number: QTBUG-103302
Change-Id: I3d81cf10b7eb74433ce5bea9b92ce6bce1230dcd
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-02 10:34:49 +00:00
Mate Barany
4e5f874063 Refactor\Extend tst_QString::append_data with additional test cases
During the implementation of QString::append(QUtf8StringView) it has
become apparent that the testing is insufficient as it did not warn
about an extra growth. The following tests have been added that append:
- y-umlaut and greek letter small theta (2 UTF-8 code units => 1 UTF-16)
- devanagri letter ssa (3 UTF-8 code units => 1 UTF-16)
- chakma digit zero (4 UTF-8 code units => 2 UTF-16 code units)
- some combinations of the above

Note that this also affects operator_pluseq_data, which is basically
a wrapper around append_data.

Pick-to: 6.4 6.2
Task-number: QTBUG-103302
Change-Id: I09ed950e3f0e71ae9ae85a455f42e130887f1109
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-12-02 11:34:47 +01:00
Marc Mutz
22ad2c3320 [doc] QAnyStringView: document visit()
For some reason, it wasn't documented.

Pick-to: 6.4 6.2
Change-Id: I480623398dc33be91e82b24ac2616bcdd20da34b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2022-12-02 10:34:39 +00:00
Assam Boudjelthia
80fbabad8a CMake:Android: add Android templates, bindings and gradle files to tree
Add Android templates, bindings and gradle wrapper files to custom
targets so they can be easily tracked by the project tree when using
Qt Creator for example.

Change-Id: I4144b9ee461139a9f768c57b14139e0fc21d4c28
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-02 10:29:24 +00:00
Alexey Edelev
487c823a2d Suppress QtCompressMimeDatabase output
Add the flag to enable the verbose output of QtCompressMimeDatabase
script. Disable the verbose output by default.

Change-Id: I781037b126bef5e3aff69c0738aaea99b932b7e7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-12-02 11:28:59 +01:00
Nicolas Fella
4bb0086b3f [QGuiApplication] Tweak description of X11 and Wayland platform plugins
Given the growing adoption of Wayland calling X11 regular is becoming less and less true

Make the description more neutral in that regard

Change-Id: Iac2b5dd7f80f019df5d046c90ab3466c9fa02bff
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-12-01 13:47:59 +01:00
Kristoffer Skau
c450f6d21c Support stereoscopic rendering with QGraphicsView
This patch adds a manual test and the required work in graphicsview and
qwidget private apis to support stereoscopic rendeing. Basically it
works by doing the drawing in QGraphicsView::paintEvent twice, once for
each buffer. This way the scene items are rendered to both buffers.
There's also an update to resolvement in QOpenGLWidgetPrivate
so that multisampling works correctly.

[ChangeLog][Widgets][QGraphicsView] Added support for
stereoscopic rendering.

Task-number: QTBUG-64587
Change-Id: I20650682daa805b64fe7f0d2ba086917d3f12229
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-12-01 13:42:07 +01:00
Mikolaj Boc
9bc74d14f3 Avoid a null pointer deref when openGL windows are present
m_context2d in QWasmWindow might be null if the window uses OpenGL
for rendering. It is dereferenced nevertheless in ::paint(), which
should be avoided.

Change-Id: Id817f3663bb475d55dfc916b4b7eb255a88cea9d
Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-12-01 09:25:44 +01:00
Marc Mutz
5d41ec46e9 QString/QByteArray: de-pessimize op+ [1/2]: non-const return types
const return types prevent move semantics, so drop the const.

This is BC, because the operators are all inline free functions. In
particular, they're not exported (MSVC mangles the return type).

[ChangeLog][QtCore][QString/QByteArray] operator+ no longer returns
a const object, enabling move-semantics on the return value, but also
hidden detaches.

Change-Id: Ifc18f6b1df1e3840f57b2521949dbade8e11fd76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-01 08:10:11 +00:00
Joerg Bornemann
9204ac23a0 CMake: Don't setup deployment when building Qt without examples
Introduce the variable QT_SKIP_SETUP_DEPLOYMENT to turn off the
generation of deployment support files. Set this variable when building
Qt - but only if we're not building examples.

This avoids a warning about missing patchelf when building Qt with CMake
< 3.21.

Change-Id: I8ff5491eb314ff870c210884fbf90dd4c9ad0219
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-01 08:53:32 +01:00
Joerg Bornemann
34d7dd908e CMake: Fix configuring Qt with CMake < 3.21 and missing patchelf
Turn the FATAL_ERROR into a WARNING and explain what patchelf would be
used for.

Also, store the patchelf executable just as "patchelf" if it could not
be found. Now it's possible to install patchelf after configuring a
project.

Fixes: QTBUG-109004
Change-Id: I1e89b4c5851f341e000e563d1437398b454c68f7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-01 08:53:28 +01:00
Joerg Bornemann
84c76d6205 CMake: Make it possible to specify a debug MySQL client library
An MSVC debug-and-release build of Qt with the MySQL plugin requires
separate builds of the MySQL client library: a debug and a release
build. There was no way to specify the debug version of the library.

Now, it's possible to configure Qt like this:
cmake ... \
    -DMySQL_ROOT=D:\mysql-connector-c-6.1.11-winx64 \
    -DMySQL_LIBRARY_DIR=D:\mysql-connector-c-6.1.11-winx64\lib\vs14

This will automatically detect the include dir and the debug and release
library files. We expect that the debug build of the MySQL client
library resides in a "debug" subdirectory below MySQL_LIBRARY_DIR.

If the automatic detection doesn't work to due a different layout on the
build machine, one can set the variable MySQL_LIBRARY_DEBUG to specify
the debug variant of the MySQL client library.

[ChangeLog][CMake] If pkg-config is not used, a debug build of the MySQL
client library can be specified with
-DMySQL_LIBRARY_DEBUG=<path-to-library>. The debug and release variants
of the library are automatically detected. Setting MySQL_ROOT and
MySQL_LIBRARY_DIR is sufficient in most cases.

Pick-to: 6.2 6.4
Task-number: QTQAINFRA-4999
Change-Id: I663fb8ac1dbd07bc73484791be9cc21bff2f4a9b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Amir Masoud Abdol <amir.abdol@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-12-01 08:53:19 +01:00
Mikolaj Boc
65b7aacb40 Add a dummy target for tests that get batched
This is done to avoid cmake syntax errors when adding new tests.

Change-Id: I8106b13a865b990c52e09573488881bd18e64c7f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-01 08:52:44 +01:00
Alexey Edelev
a395d08c3b Remove _pri_dep_timestamp targets
It looks like these targets used to manage some custom commands that
belong to HEADER_MODULES. We don't currently have a need to use them,
so we clean up the code.

Change-Id: I8095f4de2c91a6c310cccb9b89514c2ce77e32f0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-01 02:23:52 +01:00
Alexey Edelev
190e58e1f4 Link ${target}_lib_pri directly to INTERFACE_LIBRARY targets
There is no reason for adding dependency to the custom
'_pri_dep_timestamp' target instead of the INTERFACE_LIBRARY target
itself. This will close the chains of dependency between repo targets
and the HEADER_MODULE dependencies.

Pick-to: 6.4 6.2
Fixes: QTBUG-108815
Change-Id: I0e170d3e0e42d342881beb8aca1cc5a764425826
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-01 02:23:52 +01:00
Alexey Edelev
ada76ac8b6 Add INTERFACE_LIBRARIES to dependencies of repo targets
Building repo targets may be incomplete as we skip adding
INTERFACE_LIBRARIES as dependencies. This leads to the missing
artifacts belonging to HEADER_MODULES. It seems reasonable and safe to
include INTERFACE_LIBRARIES in the list of dependencies of the repo targets.

Pick-to: 6.4 6.2
Task-number: QTBUG-108815
Change-Id: I83f44018f42dcf2fb1e3299461e17ef53e79c2e5
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-12-01 02:23:52 +01:00
Alexey Edelev
49f62e8c5a Remove QMAKE_RANLIB and QMAKE_LINK_SHLIB from android/default_pre.prf
The values should come from android-clang mkspecs. The hardcoded
values don't work correctly with recent Android NDKs.

Pick-to: 6.4 6.2 5.15
Fixes: QTBUG-108662
Change-Id: Ie153a50ee0c49bd4f0704b588a4e2c87a05c1063
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-12-01 02:23:52 +01:00
Alexey Edelev
81931f8c54 Add an option to select the preferred compression type for mime type db
Add the '-mimetype-database-compression' command line argument that
allows to select the preferred compression type for the mime type
database, including 'none' compression type, which avoids mime type
database compression even if respective compression APIs are present
in the system. The argument has the CMake alias called
'INPUT_mimetype_database_compression'.

Change-Id: I66daddae7014d109fa175a5f397e984928f4ee47
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-12-01 02:23:51 +01:00
Alexey Edelev
8e9818e629 Replace the scripting-based mime types compression mechanism with CMake
Use tools that compress mimetypes database directly from CMake as
a fallback mechanism instead of using perl and batch scripts.
Move the generating of the mimetype database resources to build-time.

This removes the perl-based compression from the possible compression
options. But assume that CMake-based compression should fill this gap.

CMake versions less than 3.26 don't support the value of the zstd
compression level higher than 9, so we prefer to use the External API.

Task-number: QTBUG-108438
Change-Id: I5686a53b766a243052cfee320f570e2c3b385726
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-01 02:23:51 +01:00
Alexey Edelev
6aab2a58e6 Allow lists in the BUILD_OPTIONS argument of _qt_internal_test_expect_pass
Adding the list definition to BUILD_OPTIONS requires unpleasant
escapting. This avoids an extra expanding of the BUILD_OPTIONS
argument and allows using the bracket-based escaping for semicolons.

Pick-to: 6.4
Change-Id: Ic5ff97c011fb67f61c66ad4e1a2ba43f44462932
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-01 02:23:51 +01:00
Laszlo Agocs
9dc3ed288a Fix up rhiwidget manual test after the QWidgetPrivate change
Change-Id: Id3e8d8ce7e175be9b5e9e83e23910546d69a90fa
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-12-01 02:23:51 +01:00
Amir Masoud Abdol
60968090ad Update -redo option such that it removes CMakeCache.txt and CMakeFiles/
In the case of re-doing, `configure` and `configure.bat` pass an extra
parameter to the `QtProcessConfigureArgs.cmake`. As a result, CMake
removes CMakeCache.txt and CMakeFiles/ before the reconfiguration. If
the user is using CMake 3.24 or newer, this is achieved by passing
the `--fresh` option to CMake call. In older CMake(s), CMakeCache.txt
and CMakeFiles/ found in CMAKE_BINARY_DIR will be removed using a
file(REMOVE_RECURSIVE call.

[ChangeLog] The -redo option now additionally removes existing
CMakeCache.txt file, and CMakeFiles/ directory, and recreates them from
scratch.

Task-number: QTBUG-108287
Change-Id: I11a5c8f9df1247d11eb7097552e6764463583346
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-12-01 02:23:51 +01:00
Patrick Stewart
4fb96669e3 QBindable: Make ordinary Q_PROPERTYs bindable
Implements an adaptor from the notification signal of a Q_PROPERTY to
QBindable. The Q_PROPERTY does not need to be BINDABLE, but can still
be bound or used in a binding.

[ChangeLog][Core][Q_PROPERTY] Q_PROPERTYs without BINDABLE can be wrapped in QBindable to make them usable in bindings

Change-Id: Id0ca5444b93a371ba8720a38f3607925d393d98a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-11-30 21:21:03 +00:00
Axel Spoerl
84d4b21f69 Stabilize tst_QComboBox::setPalette() with simple palettes
The test function tst_QComboBox::setPalette() tests if the QComboBox
correctly inherits its palette to its QLineEdit child, by directly
comparing both palettes after a palette change on the QComboBox.

If the application palette for both widget types contains brushes which
are either pixmap based or the resolve mask prevents them from being
copied, the direct palette comparison between parent and child fails,
despite of a correct propagation.

This patch sets a simple gray application palette for QComboBox and
QLineEdit at the beginning of the test. The QSKIP for macOS is
removed, because using simple palettes solves both issues.


Change-Id: I61d509745377306d6f8331dfc1ac189fc58cdedb
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-30 22:11:12 +01:00
Doris Verria
715a6c3908 iOS plugin: Add native color dialog
[ChangeLog][iOS] Added native color dialog support for iOS.

Task-number: QTBUG-109042
Change-Id: I04187315d396d2f07b15eb4bd66b50253d873477
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-30 20:05:10 +01:00
Mikolaj Boc
1ebdd7130a Remove the OpenGL compile guards around QWasmBackingStore
This is no longer needed as OpenGL is no longer necessary for the
backing store on WASM.

Change-Id: I3eaa8094558947da2d1cc5526533f9f3fc8afeab
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-11-30 20:05:10 +01:00
Mikolaj Boc
a812d1eb66 Don't tie compositor's enabled state to last added window
Currently, the compositor gets enabled/disabled based on the last
constructed window's surface type. This causes non-OpenGL windows not to
be displayed if any OpenGL window is created last.

The compositor should scan for any non-openGL windows on any change
to the window set to decide if it needs to be disabled or not.

Change-Id: I037470e39a3fbae50fd3a4e29cb6615130d7b114
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2022-11-30 20:05:10 +01:00
Tor Arne Vestbø
a9005a70d5 Blacklist tst_QWidget::showMinimizedKeepsFocus on macOS 13 in CI
It started being recorded as flakey after making macOS 13 a significant
config in the CI, but it's unclear why the test was not failing during
the nightly testing leading up to that.

  http://testresults.qt.io/grafana/goto/-AzSwMKVz

It has also been blacklisted on macOS many times in the past.

Change-Id: I7be5fefb3669e9643a98d2ac82059bf0576c6d5c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-11-30 18:01:47 +01:00
Fabian Kosmale
fbf55619da Temporarily skip tst_qtcuncurrentrun::pollForIsFinished in emulator
This test causes instability in the CI, but so far nobody could
reproduce it outside of that specific CI environment. Skip it for now,
and investigate the root cause later.

Pick-to: 6.2 6.4
Task-number: QTBUG-106906
Change-Id: Idbbc560236ac475fcb4fdd5980397393f7a95474
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-30 18:01:47 +01:00
Fabian Kosmale
ae7985b498 Generally disable leak sanitizer in tests
Our tests have the unfortunate tendency to not clean up their resources;
as a consequence the leaksan check creates ton of (non-actionable)
warnings.
Our main focus for now are catching non-leak related issues via ASAN
(e.g. use-after-free).

The special casing for the cmake API tests stays in place in case we
want to re-enable leaksan checks for most tests again.

Task-number: QTQAINFRA-5315
Change-Id: I3e50ebf06ebd373f0ce0a4bb790ec8d38c344515
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2022-11-30 18:01:46 +01:00
Volker Hilsheimer
41c5178c64 Fix typo in documentation, silence qdoc warning
qdoc was telling us that it can't link to "Adding OpeSSL Support for
Android", because there is no such thing. Fix spelling of OpenSSL to fix
the link and silence qdoc.

Pick-to: 6.4 6.2
Change-Id: Idb583b6b7360c4e37c7e79c3d70327e99d7189bc
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-11-30 18:01:46 +01:00
Marc Mutz
29e0cca0ed Short live the Qt implementation of the Detection Idiom
These never made it into the IS, but are still available in the
Library Fundamentals TSs.

Use them to simplify detection code in qcontainertools_impl.h.

Change-Id: Iee83bc93c2abca34446d31912a2e04f6e3fe71de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-11-30 18:01:46 +01:00