HTTP/2 is only used initially before it transitions to using HTTP/1.1,
and in this case the amount of connections established should also
reach 6.
Change-Id: I300e171e46c846df1730c07469ea85a51cecfb63
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
First and foremost the condition was wrong ...
In order to help running qml test cases on Android without any android
specific hack on
user's .pro files we copy the entire project folder to assets. I copy the
entire folder
and not only the tst_*.qml files because it might contain data which is
needed by the tests to run.
Change-Id: I06323d9d52904317410dd2f440de65a0766a48b5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
As this class is a subject of the library hook data, there must be a
solid understanding of the member's alignment and padding across
different architectures. By reordering the layout, this patch provides
a clearer way of adding new members to the class.
Bump the TypeInformationVersion field in qtHookData, to notify the
Qt Creator developers that the offset of QFilePrivate::fileName was
changed and dumpers should be adapted.
Change-Id: Ied8b69bdeb9da50ff05aba2107bc75509674b18e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QString("1234,56").toDouble(&ok); always operates
in the "C" locale and therefore ok is always false
* Explicitly state that the return value is zero
when ok is set to false
* Made snippet compileable by giving str a type
Pick-to: 5.15
Change-Id: I403eb39ca78a5f9ceb92ccd8ac3539581294796c
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
When you bind more values than the query has placeholders,
indexes will be empty which causes an out-of-bounds access in indexes.first.
We can't check the parameter count because of multiple placeholders with the same name,
so we check if the name is null.
Tested with SQLite and PostgreSQL
Pick-to: 5.15
Change-Id: Id5d4bd15d7ed16603f47b87d6e0bf811a20157d8
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
As it's the right thing to do to preserve const correctness.
Fixes: QTBUG-85833
Change-Id: I0d45442c5e2b997998bba8dc894fee75da3e8e8c
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
event()->device() was the most common use case anyway.
The idea that the "parent" of a QEventPoint is the QPointerEvent
interferes with the ability to copy and move event objects: the parent
pointers are dangling unless we use the QPointerEvent subclass
destructors to set the points' parents to null. Since there is no move
constructor, even returning a QEventPoint from a function by value
results in destroying the temporary instance and copying it to the
caller's space. So the parent pointer is often useless, unless we do
even more work to maintain it when the event moves.
If we optimize to avoid copying QEventPoints too much (and perhaps
enable exposing _mutable_ points to QML) by storing reusable instances in
QPointingDevice (which is the current plan), then the actual parent will
no longer be the event. Events are usually stack-allocated, thus
temporary and intended to be movable.
Change-Id: I24b648dcc046fc79d2401c781f1fda6cb00f47b0
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Follow the naming convention and remove workarounds in ctors.
Change-Id: Ic7f9de074edab7db369803612a2a2a4ea3deaf57
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Those are only used by the only friend of the class. As that one can
already poke into QSequentialIteralble's privates, there is no point
in exposing further methods in the public API.
Change-Id: I368e7bcfc43c31f38a42a41a339ff3135d79417c
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The QPF2 font engine has been kept around for compatibility
reasons in Qt 5.x, and it is time for it to retire for now. If
we want something like this in the future, we can revive it with
hardware acceleration / Qt Quick as one of the primary use cases,
but for now, it seems that Freetype and our existing caching is
sufficient also for low-end use cases.
[ChangeLog][QtGui][Text] Removed support for the legacy QPF2 font
format as well as the makeqpf tool used to generate those files.
Change-Id: Id43039c92fe5bd95b628cd769e045c029f39a350
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
This triggered a crash in QtQml, where an manually created
metattype interface set the PointerToQObject flag to true while
not providing a metaobject.
Change-Id: I206fb9655058a1e8a2d04e44186b05db33358338
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
The constructor wasn't constructing a QVariant holding a
QDataStream, bug loading the variant from the datastream.
This is opposed to how QDataStream works in all other places,
and also not in line with all other constructors for QVariant.
[ChangeLog][QtCore][QVariant] Removed the QVariant(QDataStream)
constructor. Use QVariant().load(datastream) instead.
Change-Id: I6ac54e12166b9383c09c3940eef2516f896fd359
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And don't use int based type mapping anymore.
Change-Id: I456e76d1933ef646a7bd39ce565886b89e938a44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Now that QMetaType is not refcounted anymore, we can and should
pass it by value.
Change-Id: I848db65070713762f548ca949097c27783aacad4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Better to provide the correct meta type to convert to.
Change-Id: I8e0d46e4ba482186201c157e302c03874bd38e7b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Object sizes in Qt 6 should use qsizetype.
Change-Id: I76ceb5faf361d7f6be88d88c772358ad6d701d54
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
And remove one of the type id to name mapping that still
existed in QMetaType. QMetaTypeInterface can provide that,
so there's no need to have a second copy of the data.
qMetaTypeTypeInternal() can still map all the names of all
builtin types to ids. That functionality is for now still
required by moc and can't be removed yet.
Change-Id: Ib4f8e9c71e1e7d99d52da9e44477c9a1f1805e57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
It's only used for dynamic types in DBUS and QML, where we control
things good enough to be able to handle the lifetime of those
interfaces there.
Change-Id: Ia7f8970d17a85b195db85fcdc2d8f1febd8753f4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove the arguments that are nowadays unused.
Change-Id: I97ed983b158aba57653f35e7e2f91f5c79dace8c
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Move the last functionality it had (casting between QObject
derived types) over to QMetaType. Now qvariant_cast<> is
nothing but a wrapper around QMetaType::convert().
Change-Id: Iab02b6b97c141d64052823646e18227d1eb403dd
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Those were not yet supported by QMetaType.
Change-Id: I9f85476049f200e35939ac58ef7e8b4e7cbe0b77
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use the fact that we return the conversion function as a lambda
to find out reliably whether a conversion between two types
can be done.
This requires some minor adjustments to our tests:
* Nothing can convert to an unknown type and vice versa
* Adjust results to the fact that we don't convert from char
to QString anymore (where the old method was incorrect)
* QStringList->QString requires some adjustments, as we only
convert if the string list has exactly one element. For now
we return true in canConvert(), but the conversion behavior
in this case is something we should rethink, as it is very
surprising.
Change-Id: I3f5f87ee9cb99d690f5a7d13b13d6a6313d8038e
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
All conversions do now happen through QMetaType::convert().
Change-Id: I70f7a883262087768acccf8361d34c0490ff2b43
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Take the opportunity to properly handle the underlying type
(size and signed vs unsigned).
Change-Id: I0cb8cf40acac6de03c24ed3fe570db68268952c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This will ensure full symmetry in what QVariant and
QMetaType support. With this done, QVariant will become
simply a container that can hold any QMetaType with fully
symmetric functionality between both.
Change-Id: I796d4368a2bc0f08cf4f70f4465ed6a0e07bdd76
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
This helps get better symmetry with the other modules,
and to unify the code paths for both conversion and
retrieving the interface for static types.
Change-Id: Icbd20de2563f36e3de20d826323acd057734abfb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Always ask QMetaType to convert first before trying the builtin
code in QVariant. That way we can migrate conversions piece by
piece to QMetaType.
Change-Id: I4fd1bad3ef045d37f84f68e748a6357e0ee0c16c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Avoid some atomic operations by using this instead
of type().id().
Change-Id: Ic664794908d3a9fc3686f954b582740b73c052c6
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Remove all the internal members of the union. Instead replace
it with raw storage (uchar[]) aligned to max_align_t.
Place all accesses to the internal members with get<> methods
for consistency.
Change-Id: Icebf46b90c9375aa6ea0b5913b2132608e8c223d
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Replace it with QVariant::Private::get<>().
Change-Id: I801742300d9b15f748bb91fcd6cfa176d2057271
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Adds convenient access to the data from the Private pointer.
data() determines the storage location at run time, get()
at compile time. internalStorage() can be used if we're accessing
one of multiple types, but know that the type is stored internally.
typeId() is an optimization as it allows retrieving the type id
of the metatype without atomic refcounting operations (which
type().id() would be doing).
Change-Id: I39a508c530a1588053248607c8932e501fd474dc
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Move the type conversions from QVariant::Helper to QMetaType. Only do
this for Qt Gui in a first step.
This makes it possible to completely remove the Handler struct in
QVariant, and now allows QMetaType to also convert Gui types.
Moving the conversion of Core types into QMetaType will require
further work.
Change-Id: I061f789deca1b595d92bb29227eb54b8e71a3ee3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Use std::function to register the converter functions
instead of our own handrolled interface.
Change-Id: Ifc1d1d383d21ee8d4239dbc3970c1f31bf0f4037
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
That parameter is duplicating the return value, get rid of it.
Change-Id: I8d6ecee8aca90aecaf08e6d0072d83e9a08ce3d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Streamline code using if constexpr and remove some unused code paths.
Change-Id: I602acffab4b3e53fab9e2433856f6b7e8210cc60
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This should speed up quite some of the QVariant operations
Change-Id: Ifae2df39e47e2e1ef1d9a947802bdd17fc66aa66
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove the additional indirection through ptr and replace
it with an offset calculation. Get rid of PrivateSharedEx
that was handling certain types differently.
This also fixes the support for overaligned types, by
using the alignment field from QMetaType to determine
the alignment requirements.
Change-Id: Icc6a78eb57f664c7747450578fe58dfee8f2863b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There's no point in storing small types with an external
refcount, even if they aren't movable. Simply copying
the type should be faster in pretty much all cases, while
this uses less memory.
Change-Id: I127474f8e3c5fa042f530684f9d5bfccbba134ca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>