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>
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>
For some reason, it wasn't documented.
Pick-to: 6.4 6.2
Change-Id: I480623398dc33be91e82b24ac2616bcdd20da34b
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This is done to avoid cmake syntax errors when adding new tests.
Change-Id: I8106b13a865b990c52e09573488881bd18e64c7f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
[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>
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>
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>
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>
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>
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>
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>
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>
When a widget's palette has different brushes in Active / Inactive
color groups, or it is pixmap based, multiple paint events are
triggered. This leads to unpredictable, double entries in
QWidgetRepaintManager::dirtyWidgetList().
This patch overrides event() of all test widgets and ignores
activation / deactivation events in order to make the entries of
QWidgetRepaintManager::dirtyWidgetList() predictable.
Pick-to: 6.4
Change-Id: I164d7ab4148551590ac3c50fcc3b9f98c5ac0535
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
QXcbBackingStore::toImage() returns a QImage that differs from what
is displayed on the screen: After multiple moves of children within
their parent widget, the last move is not always properly reflected
on openSuSE 15.4.
This patch blacklists the test functions fastMove, moveAccross and
moveInOutOverlapped on openSuSE Leap.
Task-number: QTBUG-109036
Pick-to: 6.4
Change-Id: Ideb505570df090b25d30762492d9c60beb6641ff
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
macOS Catalina (10.15) has reached its end-of-life, and is no longer
supported with bug fixes or security updates by Apple.
Change-Id: I65d0f572785bc77a563be925cf64823c20b9e015
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
QStringView is a borrowed range, so views into it are always valid,
even if the QStringView itself is destroyed. Clarify the comment.
Fix another typo (referring to the view as "string") as well.
Pick-to: 6.2 6.4
Change-Id: I8a4f45494d44d5a47e3c1f764f12c899ad7ee83d
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Do not assume that, given an iterator into an associative container,
you can write `*it`. Use `it.value()` instead. This is done
in preparation for the next commit.
Also, drop the const-prefix from functions (find, begin) where they
operate on a const container already.
Change-Id: I2cafc884666d98c240c2fdc661c9068c4c7319e1
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
We (almost) only build apps, for which PRIVATE linkage makes more sense.
Change-Id: I09a509c3fb33a00cdfdede687b3f95d638f42091
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Some CMakeLists.txt files did link to Qt6::PrintSupport twice. Also
unify formatting and order of the linker step.
Change-Id: I4af935c5dc3de6c243aad8511b0803ceaa872589
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Otherwise certain features may act as enabled even though they're
not supposed to be
Pick-to: 6.4
Fixes: QTBUG-108611
Change-Id: Id4b4bcb7a8f437e2d12b2a2f9b3ce2d4463b8be8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
We now only support 1.1.1+, so drop the version limitation.
Change-Id: Ife1e46c31bf6984159535b5739dd43609dcef714
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
If we assert on a different cast we may just get a different integer
value, if Tag is a sufficiently nefarious type.
Coverity-Id: 403056
Change-Id: I6e8e3883bce124b3350ad8276d88ac7ed030d982
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
If I'm right, it seems that the work has already been done, and nothing
uses the `_qt_internal_wrap_tool_command` anymore.
Change-Id: Ib8a5951e8351a26df123045bb5c6001470650b38
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
don't `#include <memory>` before including the header of the user's
class(es), because the user may want to configure certain aspects of
stl/crt before including any standard headers.
Change-Id: I58f13d3604358221e3375a309eb747efecf3f990
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
It hasn't been used since 91f6460aff, a
commit that added support for futexes on Windows. It defines
QT_ALWAYS_USE_FUTEX.
Pick-to: 6.4
Change-Id: Ieba79baf5ac34264a988fffd172612892bd670d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>