This does the analog of 46f407126e for the
methods we care about (signals, slots, Q_INVOKABLEs). In addition to the
actual QMetaType, we store an array with offsets so that we later can do
a mapping from methodIndex to metatype.
The newly added QMetaMethod::{return,parameter}MetaType methods can then
be used to retrieve the metatypes.
This does however require that all involved types are complete. This is
unfortunately not a feasible requirement. Thus, we only populate the
metatype array on a best effort basis. For any incomplete type, we store
QMetaType::Unknown. Then, when accessing the metatype, we fall back to
the old string based code base if it's Unknown.
Squashes "moc: support incomplete types" and "Fix compile failures
after QMetaMethod change"
Fixes: QTBUG-82932
Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Setting the logo to position at the top seems
to fix the issue.
Fixes: QTWEBSITE-928
Change-Id: I29336b4a1967a4676695b4f7f8560d01f3cf4fdf
Pick-to: 5.15
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Remove '/' as an example directory. We do not want to retrieve the
directory tree of the entire system.
Change-Id: I911f8eea12b4960319a9a4cbea820b910a35aede
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
In QWindowsXPStylePrivate::drawBackgroundThruNativeBuffer(),
pass the correct rectangle (reflecting the correction factor)
to the function fixAlphaChannel().
Amends e56b8e1e59.
Pick-to: 5.15
Fixes: QTBUG-84613
Task-number: QTBUG-75927
Change-Id: I5357bb8c55ed26a50cc322ea7a05df4487212fb8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Given a test named "tst_qdrag", you can run "ninja tst_qdrag_check"
to build and run the test.
Change-Id: I47dccb39dd60fca9cb07ff9af9fb739b293c5aaf
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This is now possible because of the earlier commit that changed the
const arrays in qurltlds_p.h to constexpr arrays.
Change-Id: I37a6a64e250bbe33f7d34b5916595bf6a37aed4a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
calling emplace() on a std::vector with a reference
pointing into the same vector is undefined behavior.
Fix this by using a temporary inbetween.
Change-Id: I47c28700dffa2107fb0cba302168c86b659eafb3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
long and ulong where missing. Generalize the code so that it'll work
for all integral types.
Change-Id: I74591e9c8b375e0ecdcfdd856970ce355eb2d4ce
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Since QString::split() is not going away in Qt 6, we should aim
to provide API symmetry here, and ease porting existing code from
QString(Ref) to use QStringView.
This is easier than having to port everything to use tokenize() at
the same time. tokenize() will however lead to better performance
and thus should be preferred.
Change-Id: I1eb43300a90167c6e9389ab56f416f2bf7edf506
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
It was returning a lowercased suffix because it was extracting it from
the pattern (*.txt) rather than from the filename ("README.TXT").
This broke expectations on the application side, since this method is
documented to return a suffix from the given filename.
Ref: https://bugs.kde.org/show_bug.cgi?id=402388
Change-Id: I7dae13db31280249d3f592fa9592c4067804e22d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The idea is pretty simple -- add QRegularExpression matching over
QStringView. When matching over a QString, keep the string
alive (by taking a copy), and set the view onto that string.
Otherwise, just use the view provided by the user (who is then
responsible for ensuring the data stays valid while matching).
Do just minor refactorings to support this use case in a cleaner
fashion.
In QRegularExpressionMatch drop the QStringRef-returning methods, as
they cannot work any more -- in the general case there won't be a
QString to build a QStringRef from.
[ChangeLog][QtCore][QRegularExpression] All the APIs dealing
with QStringRef have been ported to QStringView, following
QStringRef deprecation in Qt 6.0.
Change-Id: Ic367991d9583cc108c045e4387c9b7288c8f1ffd
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
advances and glyphIndices can be nullptr's as long as numGlyphs
is zero.
Change-Id: I29c3764792c1a0ffaafd3393c82a26af65699ab3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This is doing the same as data(), but the method is widely being used in
Qt (e.g. in QString), so this will make it easier to change the type of a
variable from QString(Ref) to QStringView in a source compatible way.
Change-Id: Ic49bef688d3ce3c550336edf90130aa5cac8b497
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make the API more symmetric with regards to both QString and QStringRef.
Change-Id: Ia67c53ba708f6c33874d1a127de8e2857ad9b5b8
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Make the decoder fail early to avoid spending time and memory on
attempting to decode a corrupt image file.
Pick-to: 5.15 5.12 5.9
Change-Id: Ic556d4fbcb6b542fc110d10e48dac1a880e60697
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
From API 28 it is possible to clear the clipboard so we should ensure
that this is done if API 28 or later is being used. Otherwise it is not
removed, but that is due to limitations on the Android side.
Pick-to: 5.15
Change-Id: I1fe504d0e566c6923b39b2adf4540619c6b1daf7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
All the normal bit depths are supported, so no point in trying to go
through the decoding code path for others. Avoids wide bitshift
warning for claimed depths > 32.
Pick-to: 5.15 5.12
Change-Id: I61b72dbbf9558ca28db46f8168339f8174e56997
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
The gif standard allocates 3 bits for the disposal method, but values
4-7 are unused.
Pick-to: 5.15 5.12
Change-Id: I0f70b3f87b4cd8e98140c3da476702a22ebe93a9
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
If the assembler code cannot be used to retrieve the threadId, always
use pthread_self() for it. QObject uses QThread::currentThreadId() and
QThreadData::threadId to match threads, which makes address of the
currentThreadData unsuitable as the thread id.
Reading the threadId from currentThreadData is slower than calling
pthread_self(), as tested on Aarch64 linux and x86_64 QNX.
Change-Id: If9afc8ed2810ad1e04bd42ead8f40b43ef3bac30
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
The ANGLE removal's manual configure.cmake changes are now replaced
by updating the conversion script's special cases instead.
Change-Id: I06317fe0202b25bd9f9524da14e1bb0ccbb30cc1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Remove the manual modifications, and let the script do its work
and use the .pro file as the source of truth.
Change-Id: I510d5487a326d72a9c19e8148ec1daac9a23394b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
operator--() would iterate before begin() if the
list was empty. This is UB, and will crash in Qt 6,
where begin()/end() can return an iterator pointing
to a nullptr if the list is empty.
Change-Id: I39c3a8ebb09fcad75d42019b02426ac5ac05eed9
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
...and re-regenerate qmake/CMakeLists.txt.
This removes one special case and is necessary for a subsequent patch
that changes how pro2cmake converts Qt tools.
Change-Id: Ie87b7841f3c29de3f2c8907e82975b6272f096cc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
The registry.cpp file is in the library subdirectory.
This doesn't contribute to the qmake or CMake build, but it removes the
need for a special case in qmake/CMakeLists.txt.
Change-Id: I66a566f0d1e0b82791822ca55a7de037369536a7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Make the API more symmetric with regards to both QString and QStringRef.
Having this available helps making QStringView more of a drop-in
replacement for QStringRef. QStringRef is planned to get removed in Qt 6.
Change-Id: Ife036c0b55970078f42e1335442ff9ee5f4a2f0d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This avoids issues with some special characters and spaces.
Change-Id: I6b7cedbe2c9663f62fae104488454faebab52ce0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Allows them to not depend on QtOpenGL just to provide the default
backing store OpenGL support backend.
Change-Id: I90d6d9247ce76848d9d03e2d512fb736c81488d3
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
When writing the qt6_qml_type_registration call, make sure to write
the set(QT_QML_MODULE_INSTALL_QMLTYPES TRUE) statement only if an
explicit path was provided via
QMLTYPES_INSTALL_DIR / QT_QML_MODULE_INSTALL_DIR.
This will remove the QT_QML_MODULE_INSTALL_QMLTYPES property from
many examples and tests in qtdeclarative, thus not installing the
.qmltypes file into the Qt prefix, thus polluting it.
Task-number: QTBUG-84403
Change-Id: I5c64d42915896d14f2591cbb64d73d912dbf7c7d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Otherwise when configuring a standalone example without specifying a
CMAKE_BUILD_TYPE (so it's empty), building fails because
qt6_generate_meta_types_json_file thinks it's being called with
a multi-config generator.
Change-Id: I360c7dbb19522155d8e72f98836fb663916715a0
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Previously configuring a standalone example that had no explicit
INSTALL_DIR option for qt6_generate_meta_types_json_file would fail.
When no explicit location is specified to
qt6_generate_meta_types_json_file via INSTALL_DIR option, default
to installing into a lib/metatypes location relative to the install
prefix.
This is required for supporting calling
qt6_generate_meta_types_json_file when building standalone applications
or libraries (not part of the Qt build).
Make sure not to install the metatypes.json file for executables.
Install it only for libraries (aka modules).
Task-number: QTBUG-84403
Change-Id: Ie0dd75fca0cde71ccb4eb48030871e72d31d1725
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Split long signature into multiple lines, and indent some existing
misaligned signatures.
Change-Id: Icaed7b703c3f0b20472400b186ac2a28f1ff1dd1
Pick-to: 5.15
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Because setting QFutureInterface to paused state does not mean that
the computations that are already in progress will stop immediately,
it may be useful to get notified when pause actually takes effect.
Introduced the QFutureWatcher::suspended() signal, to be emitted when
there are no more computations in progress, and no more result ready
or progress reporting signals will be emitted, i.e. when pause took
effect. Added {QFuture, QFutureWatcher}::isSuspended() methods for
checking if pause took effect.
QtConcurrent will now to send QFutureCallOutEvent::Suspended event
when the state is paused and there are no more active threads.
[ChangeLog][QtCore][QFutureWatcher] Added a new QFutureWatcher::suspended()
signal, to be emitted when pause took effect, meaning that there are no
more computations in progress. Added {QFuture, QFutureWatcher}::isSuspended()
methods for checking if pause took effect.
Fixes: QTBUG-12152
Change-Id: I88f2ad24d800cd6293dec63977d45bd35f9a09f0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
CMake sets "lib" as default prefix for Windows-GNU platforms.
Change-Id: I49e3123c385610307c84c584a21f5f3827a6fafd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
That allows us to remove the copy of that function in QtSvgWidgets.
Change-Id: I99d54408781c99b877c4df8fc9fc5f4139dcebb2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Since ancient times, tst_QDateTime::fromString_LOCALE_ILDATE() has
claimed to be Windows-only, although there is nothing MS-specific
about it; its name also purports to implicate locale, which it
doesn't. Turn it into two data rows for the more general
fromStringDateFormat() test, with no extra #if-ery about it.
Change-Id: I239c0f80f8f7fa42d498a0f801cc8edfb1db3d8c
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
One initializes data "byte by byte" not "byte per byte", at least in
any dialect I'm familiar with.
A byte array can be "created from raw data" but if it was "from a"
thing it'd have to be a datum of some sort.
Change-Id: Id9706b191f08f03418b9ea6f481797d93a278dff
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
In case a certificate chain is missing an intermediate,
for a certificate having "Authority Information Access"
extension it's possible to fetch this intermediate and
build the chain up to the trusted root. Unfortunately,
it's not always possible to install the root certificate
in the system "ROOT" store and then an application
wants to set it in the socket's configuration,
using setCaCertificates(). But this call also
disables CA fetcher ('no on demand root loading').
It makes sense to relax this logic for such
certificates and try to fetch the intermediate CA
and then have the complete chain verified.
Pick-to: 5.15
Fixes: QTBUG-84173
Change-Id: I5b9b4271767eba6f5fd2b5cf05e942360c6aa245
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>