Dom representation for pragma used to be created by leaving out pragma
directive value list. That caused qmlformat to remove the corresponding
list.
Fix it by including value list while creating dom for pragma.
Fixes: QTBUG-114364
Change-Id: I87f6e324452f196c147f5606f15c01e22caa39a5
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 38da583642)
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
- Elide radio station name and frequency text.
- Remove "MHz" text. It's not necessary for the end user and it saves horizontal space.
- Move "Sort by" label above options to save horizontal space.
- Fix "Compact" button not being checkable.
- Reduced excessive vertical spacing between some elements.
Fixes: QTBUG-114407
Change-Id: I0dc2401b6e9ef48fae3212df9c36dd8f5d04a4e9
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit fd477cf587)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
In _qt_internal_qml_type_registration we created a depfile that
contained the *_metatypes.json files of target's SOURCES.
This depfile was used in the custom command that produces
${target}_qmltyperegistration.cpp.
It doesn't seem necessary to create a depfile, and one could use the
DEPENDS option of add_custom_command instead. And indeed, commit
ce950d619a added the same dependencies
this way. Presumably, this was done to fix dependencies for older CMake
versions and generators that do not support depfiles.
This commit removes the creation of the depfile.
This double dependency declaration was found when investigating
QTBUG-106683, and it turns out that removing the depfile fixes the
problem of re-generating ${target}_qmltyperegistration.cpp for Visual
Studio generators.
Task-number: QTBUG-106683
Change-Id: I6cf909dfb4a9b31b76599b7ad35ad6f595ca0891
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 470fee3217)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Apparently it's always been incomplete, a relic from Nokia: there's no
means of entering the "menu" state, and nothing to detect a long-press
as the text says you can do.
On mobile platforms, the platform input method provides selection
handles; on embedded platforms, Qt Virtual Keyboard does it. So this is
generally unnecessary, but perhaps it could be revamped into a
demonstration of an alternative way to add text-selection handles.
Change-Id: I231db14e5fbb4e82e8d732153e3d3843a080b409
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit 810a329983)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Due to how Qt Quick Controls are implemented, new properties that are
added may clash with any user-defined properties of the same name.
Fixes: QTBUG-80788
Change-Id: Ic13dce06c880a0eac5b321f4ef4fae38d29994d5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 9cef433dbd)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Text that is longer than QQuickTextEditPrivate::largeTextSizeThreshold
is rendered without populating blocks outside of the viewport into SG.
When user scrolls backwards, there is a mechanism for loading and
rendering blocks that were previously outside of the viewport.
Make sure this mechanism does not trigger unnecessarily, for example
during text selection, to avoid double rendering of some nodes.
Amends cd083920b3
Fixes: QTBUG-113009
Change-Id: I45bc97f2aea4c5cb99b7dee097aa25ab711be653
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 5ce225d6d3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
m_obscuredRegion avoids overpainting of nodes that are not updated.
However, due to the integer precision of QRegion, this mechanism
does not work for nodes with a bounding rectangle with floats.
Currently we add boundingRectMin to m_obscuredRegion, however,
which is not sufficient. Nodes where the boundingRectMin is
different from the real boundingRect (and boundingRectMax) can not
be added correctly to m_obscuredRegion. Therefore these nodes are
now also set to dirty and updated.
Fixes: QTBUG-113745
Change-Id: I5cc5540ed45593b09b312a1704459e95bebab521
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 2dc17a45fb)
The position of touch points is modified in the function updateTouchData
when triggered from a filter. The position is never reset and thus wrong
in other parts of the code. This patch resets the position after the
required stuff in the offset coordinate system is done.
Fixes: QTBUG-105862
Change-Id: Idd12af0d509e46d0ac74fb920c70e9ec6411c255
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 99a48bef84)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Besides presumably being a reserved keyword in QML, this name is not
descriptive at all, and makes reading the code difficult.
Task-number: QTBUG-112605
Change-Id: I43b2e7458ce931725c67edabe15257d8e6da1dd3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 983bd3da24)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
QQmlConnections overrides classBegin and componentComplete from
QQmlParserStatus. the purely virtual functions are public, but the
overridden functions are private.
this causes compile errors with qmltc generated code.
Change-Id: Ic586265412cbbec945a04bd2313f499738a10675
Task-Id: QTBUG-114359
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit d59e43d0a3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This isn't documented or tested, and it's possible to
achieve using interactive controls like ItemDelegate
or e.g. TapHandler.
Fixes: QTBUG-114358
Change-Id: If9ac3d74f30439db774386eb5d598d8116997979
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
(cherry picked from commit 9831b38fc5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If a method is attached to an object it means that it was stored in a
property. The property can be re-assigned, with a different method from
a different thisObject. We cannot re-use it at all when invoking the
lookup again.
There are a few cases we care about:
1. The lookup immediately calls the property.
a, The lookup retrieves a method. The method will be detached from
the get go. There is no ambiguity (unless it's overridden).
b, The lookup retrieves a var property with a method inside. The
method will be attached to its original thisObject. The method may
have been replaced with something else in the mean time.
Therefore, we re-fetch the value on each call. Since we already
have a QV4::QObjectMethod in the property, we don't need to
rebuild it. So the lookup is still not expensive.
2. The lookup stores the property in a local.
a, The lookup retrieves a method. The method will be attached,
signaling any future callers that they need to be careful here.
b, The lookup retrieves a var property with a method inside. The
method is already attached to its original thisObject and stays
that way.
3. We call a local that contains a method. This can only be a method
that contains a thisObject. We may still decide to use the thisObject
as provided by the call, depending on the NativeMethodBehavior
pragma.
Fixes: QTBUG-114086
Change-Id: Ia9a9c06355fd7d5052cdf79ac3ffddfa32f56573
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 3c0b8076e7)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
If you pass an argument of a derived type to a ctor that's declared to
accept the base type, this will generally work, even if no QMetaType
conversion is explicitly declared.
Task-number: QTBUG-113752
Change-Id: I0364c2d6b2a1b0f6c067b5a4fd5c000e483afca6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 01427bd0d9)
Multiple \qmlproperty commands used a QML module identifier
different to what their parent \qmltype uses in \inqmlmodule.
With upcoming changes to QDoc these will result in documentation
warnings.
Change-Id: I07cde85801506b374a9781ae79d211813d5dad4f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 9aa13dd02b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since we allow any object to be used for property-by-property
construction when encoded as QJSValue, we should do the same when it's
encoded as QVariant.
This allows us to use typed modelData in delegates. The modelData's type
only has to be a structured value. Any matching data from the model will
then be inserted.
Fixes: QTBUG-113752
Change-Id: I200e9acac3c6c302c9dedf8e7e1ccd6c9fdf5eb6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 0628431244)
There are people who depend on QMetaType to convert their types. This is
not nice, but removing it breaks compatibility.
Fixes: QTBUG-114340
Change-Id: I0a7f54b8fd0f77b71e7e56f65ef7d6f91c876237
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 761b455d47)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
The documentation claims that the shortcut of a menuitem can be bound
to a QKeySequence (or at least the qml version of it) but menuitem
actually only supports int or strings (that are wrapped into a
QVariant).
Implement the missing codepath for passing QKeySequence in the QVariant
for C++ users, instead of constructing a garbage QKeySequence from the
string obtained by QKeySequence::toString().
Fixes: QTBUG-113743
Change-Id: I6f4c659a79a4c23de34be92770815d9e14a6a554
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
(cherry picked from commit a4de7389bf)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Using square brackets to disambiguate a link doesn't seem to work with
the \sa command. For now, re-write to use \l to make sure the link goes
to where it's supposed to.
Task-number: QTBUG-114073
Change-Id: Id23844df752c30a8d02a362e91632ad2339ad8e8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 91d870855d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Document the data types exposed by FolderListModel
* Fully-qualify the enum values of FolderListModel::sortField and mark
default value
* Mark read-only properties
Change-Id: Ib829a69cf762f4aaf1e50f2e526f64da429e128b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 69a25c5d40)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Previously, the text showed:
Pi/2 -> Pi -> 3Pi/2 -> 2Pi
But the curves showed:
3Pi/2 -> Pi -> Pi/2 -> 2Pi
The curves are now drawn in a clockwise sequence to match the text.
Change-Id: Ib8fe0c17c652a0f357d27372403440f4dd031516
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
(cherry picked from commit 0c615d61ba)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
We want the precise type there, not some approximation that happens to
be a QVariant. This exposes that we had a few conversions that were
possible with QVariant::convert() but not with our builtin type
coercion.
Change-Id: I44c57a22bad8268de3d4398721e1c63b18009dfc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 67d0c08212)
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Since JavaScript has no concept of time or date separate from the Date
object that contains both, and since we implicitly (via
QVariant::convert) or explicitly accept string arguments to all these
methods, we should really accept string coercions of Date objects.
We should also make all the string overloads explicit. Converting
strings to QDateTime is a really obscure feature of the metatype system.
We should not rely on it.
Furthermore, we need to accept QDateTime, as the native representation
of the JavaScript Date object, as argument to formatDate() and
formatTime(). Otherwise there are two ambiguous paths to calling
formatTime() or formatDate() using a Date object: Either coerce the Date
into a string and call the string overload or coerce it into a QTime or
QDate and call the QTime or QDate overload. The QML engine special cases
this and prefers the QTime/QDate way, but this just needlessly
complicates the overload resolution.
Interestingly, tst_qqmlqt already tests most of those variants. We just
have to add the JS string coercions.
Task-number: QTBUG-109380
Change-Id: I880e622256fe115dade32bde880605df2031ff2f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 5bc63de881)
We should always use the same conversion to string and we shouldn't
duplicate the code for the date conversion.
Task-number: QTBUG-109380
Change-Id: I1b1959c8e9b5957ddcf287d252b8143511237565
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
(cherry picked from commit 330c3e91ee)
The JavaScript date and time conversions are different from Qt's. Add
them to coerceValue.
Task-number: QTBUG-109380
Change-Id: Ic0d7dd8ff51fb8e29d80d9084d4415becaa76259
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit c108a817f4)
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Only anonymous object types are necessarily uncreatable. You don't need
a name in order to construct or populate a value type. Since we can now
construct QSize, QRect, and QPoint, the engine will try to construct
them from the 'F' variants where applicable. Allow this.
Change-Id: I568b93c58d3184d9ac37bf0a542c0e50dd37d8de
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 6d1317e11a)
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
If we coerce the argument for a constructor, we should not call another
constructor in the process. Such chaining leads to rather confusing
effects and easily ends in infinite recursion.
Change-Id: Ia6d5063641170d2cd3bee3fdcbb8b97837d5c700
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit b4ce8051af)
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
We now add NOMINMAX to PlatformCommonInternal target which will be
linked to everything else, so min/max will not be defined upon the
inclusion of `windows.h`, or other headers.
Change-Id: I3c71f2f719aad3fb83e189e33e5f176befcb4482
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 30ae5fa406)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Since structured value types can be created from any object (even if
none of the properties match), this test doesn't test anything anymore.
The explanation is still valuable, so let's keep the code commented.
Change-Id: I890204811a522f025fb114f51e57c1dd4a951a57
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 8679fa2478)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
So far we rely on QVariant::convert() and that only works in some
places and is expensive.
Change-Id: Ia6be7807c3d245148fcd4f4bed2ebc9e35ad52ff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 7bcac62265)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Otherwise we may later hit an assert when trying to re-create the
property caches for types with mismatched checksums.
Amends commit 2d7fe23b41.
Change-Id: I948f81381e32fff4c5769f6fd51cc59796e2094a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 068fa04c26)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
- Print the layout that caused (or detected) the loop to make finding
it easier. Until now it was only possible to find the item by
debugging Qt, which is tedious for users.
- Replace the module prefix ("Qt Quick Layouts") with a simpler
"Layout" prefix, as qmlWarning(this) already ensures that the type
name is printed at the beginning of the warning.
Change-Id: Ief801cad21958d7a8da406452f2918889f90658f
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
(cherry picked from commit d62302a306)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
It has only BFAILed once on openSUSE in the past two years on the 6.5
branch. Since it is a focus test, that one failure could easily be due
to some system flakiness (e.g. an OS dialog stealing focus).
Task-number: QTBUG-78261
Change-Id: If579b198ddfb85373445c24c9f649619ab709a55
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Fix \quotefile path as source files have been moved. Also, add .theme
as a valid extension for example files.
Change-Id: Icfcb85fdfb99e86eb97ef6e1b53e4fa5771095a3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
(cherry picked from commit 73a62921d0)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
These modules have no separate landing pages within Qt Quick. Add
\keyword commands to create linkable targets to their respective
QML module pages.
Link to Qt Quick Effects from the Qt Quick landing page.
Fixes: QTBUG-113454
Change-Id: I9376d9c946cc7a4d4728584a96ddf701deaeb4b5
Reviewed-by: Andreas Eliasson <andreas.eliasson@qt.io>
(cherry picked from commit 649f5f650b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>