Commit Graph

29270 Commits

Author SHA1 Message Date
Ulf Hermann d3b3fef5a8 Qml: Allow const and non-const QObjectWrappers to coexist
We can access the same QObject in const and non-const contexts. Both
should be possible. Store the const objectwrapper in
m_multiplyWrappedObjects. That's somewhat slow, but const QObjects are
rather rare.

Pick-to: 6.4
Fixes: QTBUG-98479
Change-Id: I047afc121f5c29b955cd833e0a2c8299fc52b021
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-07 16:57:16 +02:00
Ulf Hermann 5cda89ce03 QuickTestUtils: Make 'data' subdir configurable
tst_ecmascripttests wants to call it "test262".

Task-number: QTBUG-100242
Change-Id: I978171a85fe6ade1cc40129db42ef9a5177fe90f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-09-07 16:57:00 +02:00
Ulf Hermann 7778028f99 V4: Adjust some more index calculations
No, we cannot collapse -inf to 0 before checking for negative nubers.

Task-number: QTBUG-100242
Change-Id: I764c1168add2b321f3af6a7f5194647d0806c159
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-07 16:56:55 +02:00
Ulf Hermann ac26bab290 Fix our unicode stub for the Yarr interpreter
The interpreter expects the semantics of ICU's u_tolower and u_toupper
for the functions called u_tolower and u_toupper. This means they should
only perform simple case conversions. QChar tries all possible case
conversions.

Task-number: QTBUG-100242
Change-Id: If5f27b12e55459b64460adc2c56e6de026754803
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
2022-09-07 16:56:51 +02:00
Ulf Hermann 826b77c8cf V4: Account for the guard pages when allocating stack space
Previously we've assumed the whole allocation can be used, even though
the first and the last page are actually not usable. This makes a
difference when the size of the guard pages grows, such as on macOS,
which these days has 16k pages.

Add the extra guard page size to the amount of memory to be allocated in
order to fix the calculation.

Pick-to: 6.4 6.3 6.2 5.15
Fixes: QTBUG-93188
Change-Id: I0ebece94449da3127e9a78a19d8a22722ad8d698
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-07 16:56:42 +02:00
Ulf Hermann d96aefcb51 masm: Add copy ctors for LinkRecord
Having an implicit copy ctor and an explicit assignment operator is
deprecated.

Fixes: QTBUG-104077
Pick-to: 6.4
Change-Id: I03a08c71ac49d50728b1675f6f4533f4421f8126
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-09-07 16:56:28 +02:00
Ulf Hermann 9716c0187b qmltyperegistrar: Add .hh to the list of recognized header extensions
Fixes: QTBUG-106347
Pick-to: 6.2 6.3 6.4
Change-Id: Idf70fbfee2006d9e5b3a89f9126277683a24c236
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
2022-09-07 14:56:21 +00:00
Ulf Hermann 88873a332b Doc: Fix introduction version of AUTO_RESOURCE_PREFIX
It didn't make it into 6.4 after all.

Task-number: QTBUG-95145
Task-number: QTBUG-103452
Change-Id: I1bc8f4caeb25e0a386975f7ca0e8ec854512c428
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-07 16:56:12 +02:00
Sami Shalayel e0a00a6919 QQmlVMEMetaObjectEndpoint: ensure property cache before accessing it
Otherwise the property cache might be null and lead to segmentation
faults, e.g. when declaring aliases in qml.

Fixes: QTBUG-106256
Change-Id: I568c973e1ba00531fbe22a41e2c6c3c09dfc2f02
Pick-to: 6.2 6.3 6.4 5.15
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-09-07 09:58:00 +00:00
Duan Ting 5e8b762756 QQuickLabsPlatformFolderDialog: Modify the logic of setting the folder
In QQuickPlatformFolderDialog, when triggering acceptance, the folder is
set by the value of currentFolder, and the value is set back to
currentFolder inside the setFolder function. This action causes
currentFolder to be abnormal after the folder is modified.

Fixes: QTBUG-104629
Pick-to: 6.2 6.3 6.4
Change-Id: I99978de5bbd019024c499c50f61d6e7b6e7dc140
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2022-09-07 10:51:51 +08:00
Volker Hilsheimer 14e8001e2f Fix cmake warnings from using deprecated PUBLIC_LIBRARIES
Pick-to: 6.4
Change-Id: I95ceed80b00db545d8f335e3c2ae35c077880717
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-09-06 22:18:52 +02:00
Fabian Kosmale 2ca9d70c17 QQmlEngineExtensionPlugin: Mention that CMake API is generally fine
With qt_add_qml_module, the generated plugin will be sufficiant most of
the time. Mention that this is the case, and also mention
NO_GENERATE_PVUGIN_SOURCE for the case where customization is required
(most likely to occur with image providers).

Fixes: QTBUG-106270
Pick-to: 6.2 6.3 6.4
Change-Id: I7e9399f9617e7d531b84b68afc9e8f9aa85f0704
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-09-06 22:12:44 +02:00
Fabian Kosmale a5df564d31 QQmlIncubatorPrivate: Undo old MSVC workaround
and use the chance to pack the class a bit more compactly: We don't need
to have Incubator as a direct subclass of QSharedData; instead, only
make QQmlIncubatorPrivate a subclass of it, and move the subComponentToCreate
into the alignment gap that exists on 64 bit systems. Moreover, reduce
the size of the Progress enum, and put it next to the boolean member.

Change-Id: I9ecfd9a779070c40bd8c375444e1faf307ba6fc4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-09-06 22:12:41 +02:00
Kai Köhne 0f5e7ec1f8 Make context help for id attribute available in Qt Creator
Explicitly mark page with QML.id keyword makes sure people can use
F1 in Qt Creator on an id property.

This will not link to the section, but the overall page though.

Pick-to: 6.2 6.3 6.4
Task-number: QTCREATORBUG-3708
Change-Id: I4404e41ce9fb5eaebe3d70419bcacf5d353e3cda
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-09-06 16:31:03 +02:00
Shawn Rutledge e0884e6998 QQDAPriv::onGrabChanged: call queryPointById() only when used
It saves time to avoid this lookup when handling cancel, ungrab and
grab-override transitions.

Pick-to: 6.4
Task-number: QTBUG-106223
Change-Id: Ie8ad650a61c9f31d7735f547f149dd0acabd0964
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-09-06 12:48:59 +02:00
Shawn Rutledge 7673a4d117 Add BoundaryRule.returnedToBounds signal
If QML code needs to do something (like re-render an image at a
different resolution) when the returnToBounds() animation is completed,
it's more convenient, performant and reliable to write

BoundaryRule {
    ...
    onReturnedToBounds: { ... }
}

rather than

BoundaryRule {
    onCurrentOvershootChanged:
        if (currentOvershoot === 0) { ... }
}

[ChangeLog][Qt Labs Animation] BoundaryRule now has a returnedToBounds
signal.

Fixes: QTBUG-105107
Change-Id: Ieb8b990d6d01b652b43bc673c35e8f86cb2d582a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-06 07:25:55 +02:00
Sami Shalayel 70e6d671bc tst_qqmljsscope: remove Q_SKIP in qualifiedName test
The test has been fixed for some time now but the Q_SKIP() was not
removed yet (I guess the merge algorithm decided to keep both the Q_SKIP
and the improved test).

Amends d26675105b.

Change-Id: I6edd6fa1c3dca703f26adb8854155681f3872e5b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-05 14:52:25 +02:00
Laszlo Agocs 8961469341 doc: Add missing since 6.4 tag to QQRT::fromPaintDevice
Amends 43f705c3c0

Pick-to: 6.4
Change-Id: I9439ac9c3b45e5bd501c40ff4b7efcd18fdec01d
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-09-03 12:28:18 +00:00
Oliver Eftevaag 261f527b5a QQuickColorDialog: Implement ColorInputs in C++
The previous version of the ColorInputs.qml contained a good number of
signal handlers that executed js code.
We prefer to write business logic in C++ since it's faster, and we have
more control. Which is the main focus of this patch.

Additionally, it works around an issue where the binding on the
visibility property for the alpha text fields would cause them to be
omitted from the RowLayout's implicitWidth calculation, that would then be
used by the StackLayout to calculate its own implicitWidth in a
bottom-up direction. This made the size of the dialog become larger when
a different selection was chosen in the combobox, and had a negative
impact on the user experience. (The initial selection is the hexcode
text field, which isn't inside a RowLayout, like the other children of
the StackLayout).

The only workaround that I managed to find, was to call setVisibility
form C++, which is why this patch serves a dual purpose.

Some other minor QoL changes are also included. (Like the footer having
a separator for eating left over space).

The most significalt part, user experience wise, is that the ColorInputs
component will now have a "minimum" width, which will impact the size of
the rest of the dialog.
The reason I did it like that, was because I wanted all of the text
fields to be able to fit 4 characters inside of them, without causing
any scrolling/eliding/clipping. The text fields would simply be too
small to fix 4 characters for some of the styles. This means that this
patch affects the size of the dialog for some styles.

Fixes: QTBUG-103900
Pick-to: 6.4
Change-Id: Ic88156c0ab1e692ee38eda29d103c9d2adea7b47
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-09-02 23:55:14 +02:00
Fabian Kosmale b89fb83fdb QQuickItem: Remove misplaced inline keyword
In the best case, it is misplaced, in the worst case it causes linker
errors.

Change-Id: I4e07d21c5c0a1749d7f26f8acdbef7027bde98ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-02 20:43:20 +02:00
Fabian Kosmale 84483bff4f Engine: Fix handling of attached objects in function calls
When we use an attached object as an argument to a function call, we
need to properly extract it from the QmlTypeWrapper. Before this change,
we simpley left the argument pointer as null, which lead to subsequent
crashes when it got dereferenced.

Moreover, treat passing namespaces to functions expecting a QObject as a
TypeError, by returning false from CallArgument::fromValue (used to
crash for the same reason as with the attached object case).

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-106119
Change-Id: Ifa6a32e20a29935aff1f265eb0edd3e35ea1c11b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-09-02 20:43:08 +02:00
Richard Moe Gustavsen 9b4179a98a iOS style: draw TreeViewDelegate as highlighted
When TreeView has a selection, or a cell that is otherwise
highlighted, the delegate items that are affected should
draw themselves as highlighted..

Pick-to: 6.4
Change-Id: Iefa226bb774c94f22582fae481a0649a3fcf069e
Reviewed-by: Doris Verria <doris.verria@qt.io>
2022-09-02 15:43:06 +02:00
Richard Moe Gustavsen 55fab9a73e Material: add TreeViewDelegate.qml
Add a version of TreeViewDelegate.qml to the Material
style, that looks more at home for that style (rather
than using the one in the Basic style).

This version is using the arrow-indicator from the
Material style as expand/collapse indicator, and
makes the height of each row match the height of a
normal Material button.

Pick-to: 6.4
Change-Id: I084532ca6e527593e5711d66aa53f240f0356d99
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-09-02 15:42:36 +02:00
Ulf Hermann b297e8fccf QML: Make modules imported with registerModule() available in QML
So far, you could only use them from pure JavaScript programs. Also, fix
re-exporting parts of native modules.

Fixes: QTBUG-105901
Change-Id: I170017083284e6457b1aa0c6e606fd26227edae3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-02 15:33:31 +02:00
Shawn Rutledge 7c56dc7e98 Remove stray qDebug
Amends 42848bda5c

Pick-to: 6.4
Change-Id: If76f626ab5d441c57e0d8cf17e3bfb547a334818
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-09-02 07:46:02 +02:00
Oliver Eftevaag e11df48384 Imagine: fix ComboBox's implicit size bindings
The parentheses were misplaced, causing e.g. contentItem.implicitWidth
to be ignored. Without any parentheses, the same issue is present due
to evaluation order, so we do still need them, just in the correct
place.

While we're at it, we replace contentItem.implicitWidth with
implicitContentWidth so that Imagine respects
implicitContentWidthPolicy (which was added in
49ffc6e6af).

Fixes: QTBUG-106098
Pick-to: 6.2 6.3 6.4
Change-Id: I6ff08f5cb9309ae0494d95917ce8b7a22d2ba663
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
2022-09-02 10:09:07 +08:00
Qt Submodule Update Bot 7739e9cfd0 Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: Ic6a048049737466b7248ba8240c4235cfcb44a54
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2022-09-01 20:12:33 +00:00
Volker Hilsheimer 761beaa354 Fix build-breaking warnings
Qt's asKeyValueRange of associative containers cannot return references
to key/value pairs, so Apple's clang warns when using ranged-for with
references to elements.

Use a structured binding instead as the loop variable, and delay some
conversions of QSet<QString> to QStringList until the list is needed.

Change-Id: I37aa101e6d9cd008cde0c2db790132dc051a249b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-09-01 22:12:33 +02:00
Richard Moe Gustavsen bca463b61c QQuickTableView: avoid printing out incorrect warning
A warning would be printed out from TableView if you called
positionViewAtCell with a mode that affected either horizontal
or vertical alignment, but not both. The reason is that the
overridden version would just forward the call to
positionViewAtRow() and positionViewAtColumn(), without
checking if the given mode allowed for it first.

This patch will instead check the mode first, before
deciding which functions to call. This will stop
the warning from being incorrectly printed.

Pick-to: 6.4
Change-Id: I58145873def7543fcffd51ade7d15c70fb755aae
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-01 20:12:33 +00:00
Shawn Rutledge 5cb3ba93da PinchHandler: Enforce min/max scale limits with native gestures
So far the qBound() using m_minimumScale and m_maximumScale was only
applied for normal pointer events: there were no limits when using a
touchpad that sends native gestures.

Pick-to: 6.2 6.3 6.4
Fixes: QTBUG-106110
Change-Id: Ibf8d955e5f1dac517e0a3e9588fb117d83f443a6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-01 22:12:33 +02:00
Shawn Rutledge 5b81451d44 Optimize QQuickMultiPointHandler::grabPoints slightly
Clazy reminded me about the usual const-ref optimization in a range for.

Pick-to: 6.4 6.3 6.2
Change-Id: I2eafb49d341758829ce8fc43a8e5432a2d6dd4f6
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-09-01 22:12:32 +02:00
Sami Shalayel d9add5c2d4 qmltc: test support for generalized group properties
Test support for generalized group properties in qmltc.

Also, force group property bindings to be deferred when they belong to a
generalized grouped property, while "not-generalized" grouped properties
never are deferred.

Fixes: QTBUG-105378
Change-Id: Iadc64d7033f9446ccf53e305d8831c7d348f257c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-09-01 22:12:32 +02:00
Fabian Kosmale 2879c7c341 Integrate property binding evaluation fix from qtbase
This is basically the same as QTBUG-105204, only with the QML engine
being involved.

Fixes: QTBUG-104982
Pick-to: 6.4 6.3 6.2
Change-Id: I5afaadedcd7af41198702a8f2331703b4f6ef2e7
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-09-01 22:12:32 +02:00
Sami Shalayel 3ebbc684ee Print assert messages in tst_ecmascripttests
Up to now, just the test result (pass or fail) was saved during testing.
Add an errorMessage in the test result that is retrieved from the
engine and print it out when a test is failling.

Fixes: QTBUG-106096
Change-Id: I73f9f7daaa92a942d89391043682d8d9ebbcdfa3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-09-01 14:27:00 +02:00
Eirik Aavitsland d14b5fbad3 Re-enable auto testing of remote image downloading on linux
It seems those tests were disabled for linux because of QTBUG-45655,
but that task was closed as resolved years ago. Also, recently another
remote data item was added to the autotest, without being disabled for
linux, and still this test has not caused CI problems. So there does
not seem to be any reason to keep skipping those tests on linux.

Task-number: QTBUG-45655
Change-Id: I928fc666dac768b5ffa22944191665ef62c053c2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-09-01 12:23:48 +00:00
Fawzi Mohamed 6d36ff2cf5 qmldom: line by line indentation/reformatting
Introduces support for line by line indentation and reformatting
This is done with a simplified restartable lexer and parser.

* qqmldomscanner: a tokenizer for a single line, built on the top of
the normal lexer. One of the key property is that the state can be
stored and restarted.
Thus after an edit, re-indenting or split of a line one can restart
the lexer with the state at the end of the previous line, and
re-evaluate from there on.
* qqmlcodeformatter: contains a stack based parser that is used for
syntax highlighting and indentation. The state is a stack of integers,
and along with it also the indent level is stored
and the accepted syntax is a superset of the grammar (typically
repetitions are allowed and order is more permissive).
This builds on the top of the scanner, and also allows restarts.
The public interface focuses on having the stored state of the parser
and lexer, and being able to update it after a line of text, or give
the correct indentation for a line.
* qqmldomindentinglinewriter: has a LineWriter that uses the
CodeFormatter internally to re-indent every line.

Change-Id: Ifce9ed14ecd157bec65fb740b2c7ee8a5fc0729a
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-09-01 02:00:59 +02:00
Ulf Hermann 7d013de058 Doc: Do not refer to files in ComponentBehavior documentation
There may be multiple QML contexts created from one file. If you define
a component in one of them, you cannot instantiate it in a different
one.

Pick-to: 6.4
Change-Id: I8a130f60bc03979bae7b22495737c3d971c09618
Reviewed-by: Kari Hautamäki <kari.hautamaki@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-31 21:01:45 +02:00
Richard Moe Gustavsen 13a8df4a87 Fusion: add TreeViewDelegate
Add a version of TreeViewDelegate.qml to the Fusion
style, that looks more at home for that style (rather
than using the one in the Basic style).

This version is using the arrow-indicator from the
Fusion style as expand/collapse indicator, and
makes the height of each row match the height of a
normal Fusion button.

Pick-to: 6.4
Change-Id: I153bb5776e23476cf8c383fb6f76e63981e28639
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-31 21:01:45 +02:00
Sami Shalayel e26bf40513 qmltc: add some internal documentation
add some documentation to qmltc's internal behavior that is not
self-documenting enough.

Change-Id: I131ee875944e294e0472519573ace4058f4f1821
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-08-31 21:01:45 +02:00
Kai Köhne b7f448f864 Examples: Do not use import version numbers anymore
Pick-to: 6.4
Change-Id: I1f4d4920bb9d132a846ac2dbcfdb8b660759d540
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-08-31 16:37:35 +02:00
Richard Moe Gustavsen ec582ef0b9 examples, texteditor: remove the config file, and use default settings instead
The qtquickcontrols2.conf file was hard coding the style to be
Material. In addition, it was overriding both the Primary and the
Foreground color, and sat Theme=System. The latter meant that the
application would run in either Light or Dark mode, depending on
the OS. And for Dark mode, the assigned colors caused the text to
end up with the same color as the background color, and therefore
be invisible.

The same with the toolbar buttons; since the icon color of a toolbar
button map to the primary color, and the primary color was hard-coded
to be the same as the background color in the configuration file, the
buttons would appear hidden.

Since we now have native styles for both macOS and Windows (and
Fusion on Linux), overriding the style (and especially the colors)
in a config file seems unnecessary.

This patch will therefore remove the whole config file, and use
the default style settings instead.

Fixes: QTBUG-105860
Pick-to: 6.4 6.3 6.2
Change-Id: I330fe30746096cf26d8dca343f2c122d7c32c7fe
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-08-31 13:09:32 +02:00
Fabian Kosmale 58e751de88 Disable qmllint's deferred property check
This mirrors 9d22088d93, which removed the
warning from the engine.

Pick-to: 6.4
Task-number: QTBUG-106069
Change-Id: Ib714bfbd251dcf30becd920c85ac65aceab43707
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-08-31 13:09:32 +02:00
Sona Kurazyan af6c5acc90 Prepare for moving QMacAutoReleasePool to qcore_mac_p.h
Declaration of QMacAutoReleasePool will be moved from qglobal.h to
qcore_mac_p.h, so include qcore_mac_p.h where it's used.

Task-number: QTBUG-99313
Change-Id: If0de3895ce5b948dc6fd5baf5c98c3dbce5fe68a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-08-31 09:33:02 +02:00
Doris Verria c0f50622c7 iOS Style: Make the theme property read-only
We had marked the iOS Style's theme property as a writable property.
However, setting the theme through it was not supported. It also
doesn't make sense to set the theme through this attached property
since in the QPA layer we set the appearance(theme) and subscribe to
theme changes based on the traitCollection property of the UIWindow,
which changes based on system-wide configurations.

Pick-to: 6.4
Change-Id: I36191a47d8892dff3069901e16abad82b9f9f82e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-08-31 09:33:02 +02:00
Sami Shalayel 8120ec1d3d qmltc: test alias on properties with attributes
Add tests to qmltc to see if it behaves well for aliases to different
kinds of properties, and compares if the engine shares the same
behavior. Same for the attributes in the QMetaProperties.

Changes:
* add some more MOC information to aliases
** always add NOTIFY to aliases (like the engine does)
** always set DESIGNABLE to false for aliases (like the engine does)
** always set CONSTANT to false for aliases (like the engine does)
** always set STORED to false for aliases (like the engine does)

Test if:
* default aliases works when compiled via qmltc
* attributes of aliases are set correctly in QMetaProperty and compare
  it to the attributes of the QMetaProperty obtained from the engine.
* aliases can read/written/reset/notified

Fixes: QTBUG-105708
Change-Id: I66b9c43c8c8de3dbd2b33d5ce15cd42ffb377ce7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-08-31 09:33:02 +02:00
Ulf Hermann b6463590fa V4: Fix index calculations in String prototype
We generally have to do those calculations in double as we must not
collapse inf into 0.

Task-number: QTBUG-100242
Change-Id: Iaf8082160a1ab25060c131ee1a5fa259bbd31214
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-31 09:33:02 +02:00
Ulf Hermann 9d89d0a090 V4: Fix IntryinsicTypeArrayPrototype::method_copyWithin
We cannot cast infinities of type double to integers because the
behavior of that operation varies between platforms. Rather, keep all
operations in double until we clamp the values to the dimensions of the
array.

Task-number: QTBUG-100242
Change-Id: Id95e8382cb6a4370586c2b331906273f65b5c82e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-08-31 09:33:02 +02:00
Samuli Piippo b21290a731 examples: deploy qmldir for plugin example
We need to deploy qmldir to make the example work also for remote targets.

Pick-to: 6.4 6.3 6.2
Change-Id: Id0b7bf4a48bd163ddf5e44a5a68ca3edbbcc008e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2022-08-31 07:56:45 +03:00
Eirik Aavitsland 7ea0aa1a57 Support compressed texture files also when non-local, i.e. downloaded
QQuickPixmapCache has three code paths where external data is loaded
into images/textures: For local files, for local files in async mode,
and for downloaded files. Handling of compressed trexture files was
added to the two former, but not the latter. This commit fixes that.

Fixes: QTBUG-105941
Change-Id: I6d093f9dfcd78951b81a790776509efc336e30ba
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-08-30 16:53:01 +00:00
Sona Kurazyan cd9939d50b Prepare for moving qVersion() from qglobal.h to qlibraryinfo.h
Include qlibraryinfo.h where it's used.

Change-Id: Ie2ea09458380e012f594e765b50a311a20b423d8
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
2022-08-30 18:53:01 +02:00