Commit Graph

27885 Commits

Author SHA1 Message Date
Assam Boudjelthia 16f0d38d56 Android: unify the android tests dummy import files
This renames all qml files added before to allow qmlimportsanner to
include the necessary modules into Android packages, into
android_dummy_imports.qml, and also adds a comment in each one
describing why it's needed.

Pick-to: 6.2 6.3
Task-number: QTBUG-97056
Change-Id: I7fc0514dd9e5bc10849fdd0503547e1a75242414
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-03-02 15:21:09 +02:00
Assam Boudjelthia 6c3373109f Disable failing declarative tests on Android - Part 2
This allows us to enable testing on declarative for the module
as a whole and have some sort of test verification for the mean
time, and fix the fails over time.

This also disable tests like qdom and qjsscope which are host tests.

Pick-to: 6.2 6.3
Task-number: QTBUG-100991
Task-number: QTBUG-99194
Task-number: QTBUG-101005
Task-number: QTBUG-101006
Change-Id: Ie7ae5b8e0ccdf2f55ce3568091d513a073c48417
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-03-02 13:21:09 +00:00
Assam Boudjelthia 9bdfea7f1f Android: various test fixes
2nd round of test failures fixes for Android. Mostly resource bundling
related issues still.

Pick-to: 6.2 6.3
Task-number: QTBUG-97056
Change-Id: I2fac0710a7b5528fcef4480babd0cbf749e488b3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-03-02 15:21:09 +02:00
Oliver Eftevaag ae62122a8f QQuickText: fix fractional pointSize rounding error bug
Problem: The layout is initialized with a copy of the current font
before the laying out begins.
In cases when setupTextLayout() iterates through the main loop multiple
times, it will update the layout font, if it differs. (See code below)

if (!once) {
    if (pixelSize)
        scaledFont.setPixelSize(scaledFontSize);
    else
        scaledFont.setPointSizeF(scaledFontSize);
    if (layout.font() != scaledFont)
        layout.setFont(scaledFont);
}

The whole reason why we might update the font in the first place, is
because the QQuickText has a fontSizeMode property which can be set to
e.g. HorizontalFit, which will cause the layouting to downscale the font
in order to fit (assuming the text doesn't fit the space available),
instead of eliding.

The problem here is that QFont internally uses a float to store the point
size, and we would convert that value to an int when temporarily storing
it on the stack. This would modify the pointSize value in cases where
the pointSize is fractional, and cause a mismatch between the QQuickText
and QTextLayout.

The lineWidth is set only during the first loop iteration. During
successive iterations of the main loop, the layout's font would be updated
to one that has either a floored or ceiled pointSize.
If the pointSize is a fractional value, and is ceiled when being updated
during the second loop iteration, the layout would use a larger font
value, which would cause the QTextLayout::naturalTextWidth() to return a
larger value than that of the lineWidth, triggering eliding.

Solution: Keep the font precision, by storing the values as floats
instead of ints.

Fixes: QTBUG-92006
Pick-to: 6.2 6.3
Change-Id: Ibf64ac2dfbf262c6aae05b8eb8251d2f5a869b69
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2022-03-02 14:21:09 +01:00
Oliver Eftevaag f2791ba629 Ensure that min <= max in qBound call
It is not impossible for (1.0 - visualPos) to be negative.
Which can cause the max parameter to be smaller than the min
parameter in the qBound() call.

This is a followup to c77b9bae69
which partially fixes the issue, but forgot to apply the same
change to the statement before it.

I somehow managed to crash the dialogs manual test, when clicking
around randomly in the FolderDialog.
(thus reproducing it might end up being difficult)

Pick-to: 6.3 6.2
Task-number: QTBUG-101174
Change-Id: I92b2228f1cf92d3e3d79b05d281e05c765466101
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2022-03-02 14:21:08 +01:00
Fabian Kosmale 8a632d25f2 qquickstyleitem: Fix Q_ENUM/Q_FLAG confusion
Pick-to: 6.2 6.3
Change-Id: I0e5cf9ce1b905bef2db51dc605232e3bd9f7baf3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-03-02 14:21:08 +01:00
Mitch Curtis f1c2f25016 Doc: state that desktop support is being improved
As the module was developed for touch interfaces first and foremost, we
can state that bringing desktop support up to par is an ongoing process.

Change-Id: I769731efbd7131b8ffe47ac1db937808dbb3495b
Pick-to: 6.2 6.3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2022-03-02 21:21:08 +08:00
Alexey Edelev b32d5eadf4 Do not use PUBLIC linking with plugins
Change-Id: If1b689e042ba93a22943674c626a03b487e3659c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 14:21:08 +01:00
Pasi Petäjäjärvi ae989a87bc QML: Add indirect library dependencies for tests relying those
Pick-to: 6.2 6.3
Task-number: QTBUG-101341
Change-Id: I8c9413caf24f1d2afc6678d2432c08ac7da2f1c3
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-03-02 15:21:08 +02:00
Maximilian Goldstein 31abba8cdc qmlcompiler: Suggest fix for multiline strings
We can now suggest a template string to use instead that is properly
escaped. Once auto-fixing becomes available we can automatically replace
deprecated multiline strings with the new suggestion.

Task-number: QTBUG-92448
Change-Id: I4e77820b66ae960cde558a62689c5da328b8df5b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 14:21:08 +01:00
Maximilian Goldstein 7e7582fc70 qmllint: Remove extra space from unqualified access fix suggestion
This looks bad and doesn't follow our coding guidelines or what our
formatter would produce.

Change-Id: Iceccb4cd1d9cccd84d49ded426f7ce184839b095
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-03-02 14:21:08 +01:00
Volker Hilsheimer 78635463cd Disable warning from iterating over a QFlatMap
QFlatMap iterators always return copies, so clang warns about idomatic
ranged-for loops. Disable the warning.

Change-Id: Ia167988b71c80c84a2d91c6a82a6d318ca06a0a0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-02 14:21:08 +01:00
Andreas Buhr 85b086a97b Fix compilation of tst_qmlcppcodegen on Android
It seems MOC does not like methods named "isnan" on Android.
It generates a call to "__builtin_isnan".
This patch is a workaround. A real fix in MOC would be better.

Pick-to: 6.3
Change-Id: If73a4d7580ac51f6c60f4fb92c9699d077f4452f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-02 14:21:08 +01:00
Richard Moe Gustavsen 2ae2a905e3 QQuickTableView: implement getEffectiveRowY/ColumnX()
There two functions will be used in subsequent patches to be
able to determine the geometry of loaded rows and columns.

Task-number: QTBUG-100696
Change-Id: I8619957bcfeafe11b3965e9179a4b7e8c612bbd4
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-03-02 09:07:54 +01:00
Richard Moe Gustavsen 65745f2c77 QQuickTableView: be able to specify incubation mode to loadAndUnloadVisibleEdges()
Later patches that implements animation support for moving
the currentIndex around will need to load edges synchronously, even
if it can theoretically be inside an asynchronous loader. Add
an extra argument to loadAndUnloadVisibleEdges() to be able
to specify this from the caller.

Task-number: QTBUG-100696
Change-Id: I3dc8e2c137ba0223cd820b7b7286829942f79821
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-03-02 09:07:49 +01:00
Richard Moe Gustavsen e8d2f424a9 QQuickTableView: make some functions const
Change-Id: Ib552f25b5bdb252a5447cb49681a8fc9b72953cf
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-03-02 09:07:44 +01:00
Ulf Hermann dddd6a66dd QmlCompiler: Optimize some more type conversions
Some of those make the compiled code slower than the interpreted code.
That is bad enough of a bug to pick it back to 6.2.

Pick-to: 6.2 6.3
Fixes: QTBUG-100847
Change-Id: I823ff688d3aead364e21ae1e90e16a4bfaedb1f5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-02 09:03:32 +01:00
Fabian Kosmale e88318802d Refactor QQmlJSMetaPropertyBinding
- Store the "binding content", i.e. the literal, object, interceptor or
  value source in a std::variant. This saves space compared to the
  previous approach (where we had individual fields), and also helps
  with type-safety. We also get rid of m_bindingType, which can now be
  obtained via BindingType(m_bindingContent.index()), as long as we keep
  the types in the variant in the correct order.
- Remove a few methods that were not used anywhere. Those can be brought
  back once we actually need them.
- Removed the setLiteral method in lieu of type-safe setX methods where
  X is one of the literal types. QQmlJSImportVisitor has been refactored
  to make use of this, and its parseLiteralBinding method has been
  changed into a parseLiteralOrScriptBinding method. This simplifies the
  control flow, and ensures that we always add the parsed binding.
- Literals no longer store the literal type (as in, the actual
  QQmlJSScope pointer) themselves. Instead, literalType takes a pointer
  to a QQmlJSTypeResolver, and we use that one to resolve the type on
  demand.

Change-Id: I0612d49f2f46fec0fa90f0f5047d8c9f831214ef
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2022-03-02 09:02:08 +01:00
Ulf Hermann 9575b54a4e qml: Don't mangle the settings URL
If you do QUrl::fromLocalFile() on a file name starting with ":" you get
a rather curious URL.

Change-Id: I07d35e792b87a66fffc9c992462d92a4c0c8040d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-02 08:59:55 +01:00
Ulf Hermann 88e96debfd qmltyperegistrar: Tolerate and warn about invalid URIs
If you give qmltyperegistrar an invalid URI it should still not generate
invalid C++ code. In fact the module will still be somewhat usable. You
just cannot import it.

Pick-to: 6.3
Task-number: QTBUG-101072
Change-Id: I21232f99c1ef486a62dbe339f7d0ae1b9abc8871
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-02 08:59:50 +01:00
Ulf Hermann 1240a440f2 QML: Explicitly reject malformed file imports
You cannot just pass a resource path or absolute path. We expect a URL
after all. A relative path is a relative URL, so you can pass that.

Pick-to: 6.2 6.3
Fixes: QTBUG-98181
Change-Id: I010bc08b8cb0ff06712f7b0353955bee96ae36c1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-02 08:59:46 +01:00
Ulf Hermann 79e885537f QQuickLoader: Check for QQmlEngine before using it
The loader's context may have been removed from the context hierarchy or
it may not have a context in the first place. We should not crash then.

Pick-to: 5.15 6.2 6.3
Fixes: QTBUG-67950
Change-Id: I1058d5b1f978aa040f8b2f018c4357dd7a3ef333
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-01 08:55:32 +01:00
Ulf Hermann 074b66e007 QmlCompiler: On MoveReg, check if we need to move at all
As we don't store void, null and empty lists, moving those is a noop.
Don't generate invalid code for that.

Pick-to: 6.2 6.3
Change-Id: Ica6714acd0ce8a5ddca44d9a397e776eb3df4247
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-01 08:51:52 +01:00
Ulf Hermann b81e27e652 QQuickStateOperations: updateGeometry() when setting x/y/w/h
Failing to call updateGeometry() and setting the various dirty flags
leads to inconsistent state.

Pick-to: 6.2 6.3
Fixes: QTBUG-99436
Fixes: QTBUG-98857
Change-Id: I15240b1670947da29e2f05e7ea41c7586f0b987a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-03-01 08:22:40 +01:00
CI Insignificant Platforms Monitor Bot 126afed75f Blacklist: test cases blacklisted in qquicklayouts:
- tst_stacklayout::compile on qnx
 - tst_gridlayout::compile on qnx
 - tst_rowlayout::compile on qnx

Pick-to: 6.2
Pick-to: 6.3
Task-number: QTBUG-101327
Change-Id: I06593184389f11a4dec1fdfc71a2986db046b364
Reviewed-by: CI Insignificant Platforms Monitor Bot <ci_insignificant_platforms_monitor_bot@qt.io>
2022-02-28 13:48:31 +00:00
Ulf Hermann 6e8f6f446a QmlCompiler: Don't generate code for untyped JS calls
This is inefficient.

Pick-to: 6.3
Task-number: QTBUG-101285
Change-Id: Iec7f02b4b95cb788c710a3634c2344843b125030
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
2022-02-25 14:08:22 +01:00
Ulf Hermann 23ab2e0f55 QmlCompiler: Correctly label arguments and return types of JS functions
Returning void from any JS function doesn't quite cut it.

Pick-to: 6.3
Fixes: QTBUG-101285
Change-Id: I199813627614061ec25139277e8ea23cb844aac5
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
2022-02-25 14:08:22 +01:00
Ulf Hermann 15ff88f0f1 QmlCompiler: Make InstructionAnnotations a QFlatMap
We will need to iterate the annotations in program order. Therefore, we
need an order map. QFlatMap fits here.

Change-Id: I9a7fe68b0e5aa817257ceabb4853b1554d3ad709
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-25 14:08:19 +01:00
Tatiana Borisova b56a8c9880 Remove PUBLIC which leads to unnecessary Qt::Gui dependencies
- Some qtdeclarative tests don't need GUI library, but QT_GUI_LIB definition is generated for static build
  qt/qtdeclarative/tests/auto/qml/qjsprimitivevalue/CMakeLists.txt example.
  The thing is linking of PUBLIC_LIBRARIES Qt::Qml brought plugin linking and generation not full GUI dependencies.

Task-number: QTBUG-99123
Pick-to: 6.2 6.3
Change-Id: Iad923735ff4d487dabab927f8c49b0100bef2525
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2022-02-25 13:08:18 +00:00
Andrei Golubev c57ee418bf Copy QML builtins in prefix builds
We need to do it "manually" since qt_copy_or_install only copies files
in non-prefix builds

Task-number: QTBUG-98011
Task-number: QTBUG-101163
Pick-to: 6.3 6.2
Change-Id: Ie8e23fe15ad07054a15cc8f403079373382a5b83
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-25 10:49:32 +01:00
Maximilian Goldstein e1c8f26397 qmlcompiler: Store filename for QML scopes
Previously the filename was only available for C++ types that have been
exposed via qmltypes. Now every scope has a valid filename to reference.

This is important in order to give more useful hints to the user and
will also prove useful for debugging.

Change-Id: I6142b58278f388814514fffd86cbc241eb969bb2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-02-25 10:49:31 +01:00
Laszlo Agocs df0f7f664e Use the helper in gui to create the Vulkan instance
The defaultVulkanInstance stuff moves to a private helper in QtGui to
allow reusing the same code by QRhi users in other modules.

The cleanup is now performed by QGuiApplication and is not tied
to the render loop.

Change-Id: Ic2233d62529a4aca254239e47742c1bc7394ab4c
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
2022-02-25 07:07:37 +00:00
Qt Submodule Update Bot 6782570f7c Update dependencies on 'dev' in qt/qtdeclarative
Change-Id: I4fcbf4af429baf570fbf201506a64f42fe0da148
Reviewed-by: Qt Submodule Update Bot <qt_submodule_update_bot@qt-project.org>
2022-02-24 19:52:07 +00:00
Laszlo Agocs 698e1624b5 Make atlas texture size calculation more robust
Avoid calling qNextPowerOfTwo with negative values.

Fixes: QTBUG-101206
Change-Id: Icbe6d70719443a94a3547e51ec15f2923b9e45d8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-02-24 20:52:07 +01:00
Ulf Hermann e3f10384f2 QmlCompiler: Track read registers
In order to have a separate basic block analysis pass we need to track
which registers are read and converted into what types at each
instruction. In addition, we also track which of the instructions are
merely register renaming operations. Those do not introduce a new
tracked type and have to be handled specially. Finally, we also record
which operations have side effects beyond the movement of values through
registers. Those operations cannot be optimized out.

Change-Id: I32900cbe130149f36439132850a2d76078aab31d
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-24 15:46:46 +01:00
Maximilian Goldstein ee143fe27d qquickapplication: Add styleHints property
Implements a styleHints property to QQuickApplication for accessing QStyleHints
so it can be utilized in a way that's compatible with tooling and compilers.

[ChangeLog][QtQuick][New Feature] Qt.styleHints should now be accessed as
a property of QQuickApplication via Application.styleHints

Fixes: QTBUG-100993
Change-Id: I377c59072678a67d20f519cb5d329863111f295b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2022-02-24 12:16:41 +01:00
Ulf Hermann 282c4eaf93 QmlCompiler: Prepare QQmlJSTypeResolver for in-place type manipulation
We need quite a few more methods for this. The methods will be taken
into use in follow up changes.

Change-Id: I94e9f5b5fb3da277d90ea040b0219585ba6df397
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-24 12:16:41 +01:00
Ulf Hermann 78e3b774ad QmlCompiler: Don't assert for the "int" type if we don't need it
If there are no enums in a type, we don't need the int type to resolve
them. This is commonly the case for sequence types.

Change-Id: I18b2960ef845ef797b6ef6d755648e6add1854db
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-24 12:16:41 +01:00
Ulf Hermann a7925b9a7d QmlCompiler: Perform an actual conversion() in generate_MoveConst()
This allows us to convert to other types than the ones listed in the
guesswork we do so far. It also clarifies the meaning of that
inconspicuous '=' used to assign to the out accumulator.

Change-Id: I041145ab451f5e8b44ae529a66414251b81fe072
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-24 12:16:41 +01:00
Ulf Hermann 57614680f7 QQmlMetaType: Don't duplicate notify signals for extended types
We have to add the methods first, so that the properties can be
associated with their proper notification signals once we add them. If
we add the properties first, the "missing" notification signals are
synthesized.

Pick-to: 6.2 6.3
Fixes: QTBUG-101155
Change-Id: I1aacbf33a24f7a98d05dece77c804bd7cba8a041
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-24 08:33:14 +01:00
Ulf Hermann c8e756e560 QML: Take care of QVariant when converting function arguments
We cannot convert to QVariant using QMetaType::convert(). But we can
just construct a QVariant with the desired type and data. This will
become an issue once we automatically convert argument types to match
the desired type inside the function.

As a side effect, also allow declaring "var" arguments to functions.

Change-Id: Idc14021d8d85d3d09ee7b7f286de91b56ea02bfd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-23 12:09:42 +01:00
Fabian Kosmale 6b5aa14596 tst_qqmlmetaobject: Clean up even when test fails
Change-Id: I017d44a23be40466068ee08c90a5bb3f721ba14f
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
2022-02-22 23:34:46 +01:00
Maximilian Goldstein 1829d7c64c qmllint: Properly warn about calling properties
Previously whenever a property was called the warnings qmllint emitted
made it seem like the property was just not found instead of not being
callable.

Now we will warn if you try to call a property and warn about
properties shadowing methods, slots or signals. We also discourage
calling variant properties now that may or may not be a function.

This change also fixes an assert being hit in isMissingPropertyType
due to our previous, lackluster checks.

Fixes: QTBUG-101074
Pick-to: 6.3
Change-Id: I0790b4a4584f3430ee1d8ddf549611225a36cc5b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-02-22 16:52:54 +01:00
Laszlo Agocs 167b22c701 Fix tracking of sg initialized state in rendercontrol
The initialized = true statement either went missing or it never was
there. This has zero effect on the common usage where the client does
not bother with invalidate(), but rather destroys the
QQuickRenderControl. However, more complex usages, such as in
QQuickWidget do need to invalidate for various reasons, without
destroying the entire QQuickRenderControl.

Pick-to: 6.3 6.2
Change-Id: Iaabc6309cb42cfdd624321863a5504cdeb01275d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2022-02-22 16:52:54 +01:00
Tinja Paavoseppä c27e32def2 Add QML_PLUGIN_PATH environment variable to plugin path
Check for contents of environment variable QML_PLUGIN_PATH
and add them to Qml plugin path. In some cases it would be
preferable to add additional Qml plugin paths without having
to call QQmlEngine::addPluginPath() in the application code.
Qt Android apps have already been doing this with
QT_BUNDLED_LIBS_PATH, but the naming could be a bit misleading
outside bundled Android apps.
The option to provide these additional paths with environment
variables is already commonly used, e.g. for other Qt plugins
and Qml imports.

Change-Id: Id81bb4fc6caa3c9c3adfd73be6ea45be74c5d8c4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-22 10:37:33 +00:00
Richard Moe Gustavsen 0ba259b1e5 QQuickTreeView: refactor 'setRequiredProperty()' into QQuickTableView
Both TableView and TreeView needs to be able to set and update
required properties. So move this helper function from
QQuickTreeView into QQuickTableView, so that they both can
use it. This will also make it easier to update how we deal
with required properties in TableView/TreeView once
QMetaProperty::isRequired() works.

Task-number: QTBUG-100696
Change-Id: Iff0a86fe46cecdc4db8d307787fe148c7e71bbf6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2022-02-22 07:50:01 +01:00
Mitch Curtis 85c38d78d8 Doc: link to Qt Quick Controls' Dialog type from Qt Quick Dialogs'
Unfortunately when searching online for "dialog qml", the only
doc.qt.io links are for Qt Quick Dialogs and Qt Labs Platform,
which makes it difficult to find the Dialog from Qt Quick Controls.

Link to it from the detailed description to make it clearer.

Change-Id: I8874b9111be5938b4e77e4dbd397f5eace2e5242
Pick-to: 6.2 6.3
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-02-22 08:45:23 +08:00
Mitch Curtis 801fcbcfa3 Doc: disambiguate section titles
These were accidentally catching other links.

Pick-to: 6.2 6.3
Change-Id: Ifc2d9eeef8d4629e25c217fc39d9f01ef134538c
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2022-02-22 08:43:59 +08:00
Maximilian Goldstein e2864d6aa9 qmlmodels: Move QModelIndex from QtQml
Moves the QModelIndex value types from QtQml to QtQml.Models as they
cannot otherwise be properly resolved in tooling.

Pick-to: 6.3 6.2
Fixes: QTBUG-100338
Change-Id: I30fc18b388974238ba8353e87ef09f57f8ceabd1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-21 18:20:57 +01:00
Maximilian Goldstein 094663177d qmljstypepropagator: Rename checkRestricted method to isRestricted
Renamed the checkRestricted method in order to make it clear
what the boolean return value means.

Change-Id: I4f25b5a320779cabd53ea6091f42f60634ea3a97
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-02-21 18:20:57 +01:00