Qt Creator expects a specific output format from "Qt like" tools. We
cannot give it line numbers, yet, because moc does not supply them. It
could, though. Therefore, we reserve the space between the double
colons to add line numbers later.
Fixes: QTBUG-118792
Change-Id: Iad8e3b1cbd54fc6b315179da9968913da4d4f8e0
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This way we don't have to register QtObject and Component twice.
The QML_NAMED_ELEMENT etc. will return when we make the builtins a
proper module. The imperative registration is a stop gap measure.
Task-number: QTBUG-101143
Change-Id: I726aa77156b31aa624ac44d30e180ace6cb9d790
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
- Press-and-hold needs a release after the press.
- Doing press-and-hold at 1,1 selects the top-left cell; at that time if
we click at 1,1 again in an effort to get rid of the selection, we're
actually clicking on a selection handle. Let's click outside instead.
Amends c52710c10c
Pick-to: 6.5 6.6
Change-Id: If5d459c063d2e2e1aa27a3bf0e13e8515607e701
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
It should be easy to re-generate the jsroot metatypes. So that we can
test them using qmllint.
Change-Id: I96c8f01f608d3714a90969978a5edbe368afd3e9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
The corner of a line ending with a square cap may extend further out
than half the pen width. The worst case is a 45 degree angle end cap at
the edge of the shape.
Change-Id: I9fbb3e517d2d6300596eff5326a933ee2d047c65
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Remove stray reference to implicitWidth/Height now that they are not 0
anymore.
Change-Id: I9de062481a857f5781381aa4523272623ef780d3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
The interactive property of the Menu's contentItem depends on its Menu
(control) when Window.window is valid. In the case of a fixed-height
menu, even if the contentItem's height is smaller than
Window.window.height, the interactive property of the contentItem would
be false if the menu's height is smaller than the window's height and
also smaller than its contentItem's height.
Fixes: QTBUG-93856
Pick-to: 6.6 6.5 6.2
Change-Id: If95080250c3953d4293a9e1dbcc6225d21ee034f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The overlay adjusts its size based on the rotation, so it might have
different dimensions than the window. The dimmer should always cover the
entire overlay.
Task-number: QTBUG-115536
Pick-to: 6.6 6.5
Change-Id: Ic9c73dcb3c9bb3e4e2ece281c8437a00961fc9b1
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
QTestPrivate::checkBlackLists function now returns true if the
test case is blacklisted, so we can move the remaining blacklist
setting from checkBlackLists into callig functions.
Change-Id: I27e26e56aecbf6b05289a57d9fcff86897a173da
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
Its seems that d0fcb75aab introduced a bug
where the resourceFilesFromBuildFolders was called twice during Dom
creation: the resources files were not found in the second call and the
Dom was not able to find the qmldir, qmltypes, etc.
The problem was that the current test only tests if there are linting
errors, but currently, the Dom created by the linting module is not the
Dom used by all other modules. Therefore, extend the tests to test this
second Dom by asking for completions of the type of the build/source
folder. Also change the test to be a data test.
Making the linting module of qmlls reuse the Dom that the other modules
also uses is tracked in QTBUG-119126.
Task-number: QTBUG-119126
Change-Id: I3a8db0f854512323b61b4763e8a2d84d407f46d8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Typing `someProperty.x` would propose methods and properties that
do not exist in someProperty in qmlls.
Add the operator sourcelocation inside the BinaryExpression so that qmlls
can distinguish if currently working on the left or right hand side of
the binary expression.
Also fix the resolveExpressionType call to not use the last bit of the
qualified identifier: in `console.l`, only resolve up to `console` and
ignore the `l` bit that might not have been spelled out completely.
Previously, the resolution step would fail because of the `l` and no
completion would get generated.
Task-number: QTBUG-117445
Change-Id: I5929d7153d5b9f5104efd1b88d24d76e0d7a514a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Rename the test for the do-while loop to doWhileConsequence, instead of
whileConsequence which is the name of another row testing the 'normal'
while loop.
Amends 202c7017e8bda28bd9f39768563800fcbd2ad36b.
Task-number: QTBUG-117445
Change-Id: I751c00de23d66a816f54ab36fd53126486629d2b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This is what we routinely do in the builtins. In particular:
- Add the jsroot metatypes to qmltyperegistrar so that it can validate
the JavaScript types
- Add a special class info "ExtensionIsJavaScript"
- Pass this through metatypes and qmltyperegistrar.
- Treat it like an extension type in QQmlJSScope but give it its own
name.
- Ignore it in qmltc. We cannot express JavaScript extensions in C++.
Now qmltyperegistrar has to deal with name conflicts between JavaScript
and C++ types. It does so by always preferring the C++ type if
available. The new class info is private and we don't want to
surprisingly inject JavaScript types into people's QML modules. For our
own types we shall make sure to avoid name conflicts. There is one
prominent name conflict, 'Qt', which we really want to be resolved
towards the C++ side.
Change-Id: Iac224f4b0df2d6398fba0124f0b52d8ddfccace1
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Fix warnings "tst_dial.qml: Setting initial properties failed:
Dial does not have a property called orientation" by removing
use of non-existent property.
Pick-to: 6.5 6.6
Change-Id: I586cbfde0b7d1aef718ec696f3b47f2c75bd64a8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Do not start EnterTransition for a popup in QQuickPopup::setVisible()
when the popup is not yet associated with any window. Otherwise, the
annoying warning "cannot find any window to open popup in" will be
generated and the popup won't be displayed at all, even after getting
a window.
At the same time, there is a code in QQuickPopupPrivate::setWindow()
which will start the transition for us in appropriate time.
Amends 618f34889b and
db286068f3
Fixes: QTBUG-75483
Pick-to: 6.6 6.5
Change-Id: I827f6df1a1bd7685cb293cd6b599d0a547be777e
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
If explicitly context is given to function when connecting, it is used
as the receiver. Then when the context is destroyed, the connection
will also be cleared.
Pick-to: 6.6
Fixes: QTBUG-29676
Change-Id: Iec9318132245094603f71e3e6279d65c8021cb7e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
We don't want to leak memory there and it had a typo.
Amends commit ad01abe1a6.
Pick-to: 6.6 6.5
Change-Id: Id2ca7d1c11df54221aef95015d023cbcab0454b9
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
QCBorMap is itself a pointer-like type. The double indirection only
causes confusion.
Task-number: QTBUG-101143
Change-Id: I4763259e1e6d70fbf30c9d642c78cf9936ef22fc
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
[ChangeLog][QtQml] You can now have multiple QML_NAMED_ELEMENT macros in
the same C++ class to make one C++ type available with more than one QML
name.
Task-number: QTBUG-101143
Change-Id: I5aeab00a3cd8b3bb11a5a7d5b87ff2e82f57bd7f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
QQmlListProperty<QObject> is just the list type of QObject. We don't
need it twice.
Task-number: QTBUG-101143
Change-Id: I5a64bb176662e200cd4ce3666d5806cfbe1858b3
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
We need to be more careful here since the builtins will become proper
value types with metaobjects, but we don't want to encode them into
QQmlValueTypeWrapper, but rather their specialized representations.
Besides, avoiding the code path via QVariant and engine->fromVariant()
is also a performance boost.
Task-number: QTBUG-101143
Change-Id: I1c570ebcb6c4e129e9bdeef069b8a49e2a1e29d6
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Found when running valgrind on tests/auto/quick/examples:
In QQuickShapeGenericRenderer::setFillColor() and
QQuickShapeGenericRenderer::setStrokeColor() we read the
current color's alpha value for a dirty flag. When no
color had yet been set, this value was uninitialized.
Change-Id: I3826030619b048058e866ca7b04aac64828293b7
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
With fractional scales, 1 pixel thin underlines and other
text decoration get a lot of aliasing effects. Sometimes
it will disappear completely and other times it will
fill two pixels. The rendering depends on the fractional
position of the line, so any change that moves the text
may cause the line to render at a different width, causing
instability when resizing layouts for instance.
We were using rectangle nodes for this for convenience, but
even with antialiasing enabled, that does not look correct
for single-pixel lines. Instead, we use the new curve renderer
which can also draw nice antialiased straight lines.
Fixes: QTBUG-86977
Change-Id: I1367b1e2d25d167fac7d6284cb40a652ef4c3e9a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
The new curve backend for glyphs would leak materials, since
it did not set the OwnsMaterial flag.
Change-Id: Id42399da3db8ea0c730d3e730d67d9dfbfc63225
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
We already have a scope, and there is no guarantee that the
various calls we do won't cause an allocation, and conseqently
trigger the garbage collector
Pick-to: 6.6 6.5
Change-Id: I31db85e74b986c7d9f9d97b5d409e2030cd5f583
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
If a ToolBar component is part of some dynamic adaptive layout which,
for example, swaps location between header and footer, then it is going
to get stuck at the bottom, since assigning it back to header didn't
reset it properly.
Change-Id: I00435bf29cfebc56934ba63f5503482c15f20c01
Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
Also add test and update documentation
Task-number: QTBUG-114528
Change-Id: I7baa3a3268c4ccd2efe5bd8be7d790e909c430c6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
The quick table view can have both QAbstractItemModel and JS value
as its model. The table view release and load the items (or rebuild)
when its assigned with new model. The newmodel always be compared
with existing model before rebuild via
QQuickTableViewPrivate::syncModel. This comparison works with
QAbstractItemModel but the same fails with JS model.
This patch adds additional validation in
QQuickTableViewPrivate::syncModel and QQuickTableViewPrivate::setModel
for comparing JS model to avoid rebuild when existing model
overwritten with same model again.
Fixes: QTBUG-117917
Pick-to: 6.6 6.5 6.2
Change-Id: Ic15145c4b8998c68ae6471a2abf4aef727041eea
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
As it stood, TableView would rebuild the whole table if
we got a call to forceLayout before a pending
rowsInsertedCallback was delivered. This was far too
harsh, as we a RebuildOption::All will throw away all
existing delegates, and reset the contentItem back
to zero.
The correct thing to do, is to do the same that we
already do in rowsInsertedCallback; just schedule
RebuildOption::ViewportOnly. But since we don't
know what else might have changed, we now also need
to take the previous "else" case path in the function.
Pick-to: 6.6 6.5 6.2
Task-number: QTBUG-118897
Change-Id: I23fe30c7d9e6abf32a6565c18bd9249de459636c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Extend the shape's bounding rect by half the stroke width. This is an
approximation, but it will be very close to the correct value in most
cases. The precise value would be much more expensive to calculate.
Change-Id: If7eed4df67be2664cf19be4eec247ff1cd373581
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Save the source location of the parenthesis and the `in` or `of` token.
With these locations, provide support for for..in and for..of
statements.
Task-number: QTBUG-117445
Change-Id: I642e252caa5e8fc9152bcd233d14ce4680e41e32
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Save the source location of the do and while keywords, as well as the
parenthesis to be able to provide correct completion between the
parenthesis and between the do and while keyword.
Task-number: QTBUG-117445
Change-Id: I1474b5cb61589027451122228dc383fb2a4bb5aa
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
If an original type is merely wrapped into a more generic type by the
basic blocks pass, we know the original data is still there and can be
used for comparison.
Fixes: QTBUG-117795
Change-Id: Ia7582cd8ed48e47a3a1b3bd8e2595e9cb42828de
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This follows 5c7a3ea783b780bc5f924849091f1f3ffb4b892c in qtbase.
On some platforms, such as Wayland (and also eglfs), manual window
positioning is not supported. Since this has caused confusion in the
past, we add a note to the documentation.
Pick-to: 6.6 6.5 6.2
Task-number: QTBUG-86780
Fixes: QTBUG-119024
Change-Id: I4a81257dee1b80176bef9fa56b1bdaeee2069eee
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Fix QQuickLabsPlatformSystemTrayIcon::setMenu() logic to allow resetting
the tray icon menu. Now we correctly handle `nullptr` menu passed to the
function, and update underlying QPlatformSystemTrayIcon instance
accordingly.
Fixes: QTBUG-119065
Pick-to: 6.6 6.5
Change-Id: Ief6445f4854ff2f59809be315f373e0c1755652b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This allows placeholder text to follow the Alignment set to
the TextField or TextArea components when using Material style.
The placeholder text will float to the left, right, or center
depending on the alignment set, and the arc will be drawn properly
in case of Material.Outline container style.
Fixes: QTBUG-118856
Pick-to: 6.6 6.5
Change-Id: Ic9cede806dc2f6109e7e2c4b2b2fc960d9c6a1b6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This moves the internals of the curve renderer out from
Qt Quick Shapes and into a more centralized location
in Qt Quick, so that we can use the same code to create
a new text backend for rendering large scale text without
artifacts.
Change-Id: I3f7e6f7961c1bbe230fcb531c0ca028e038c1afd
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
fontawesome was replaced with fontello at some point
Change-Id: I435d06611ebf6f2b9b7647b0d769b75a3f6cd089
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
The texteditor is made to open text, and in this case it makes sense to
pass the Text flag to the QFile::open call in the example code.
Pick-to: 6.5 6.6
Task-number: QTBUG-118636
Change-Id: I936610945aa6e2f67b29ce6f5c559a2b942fc718
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
The SignalSpy is potentially destroyed before the target object, and
since only the sender (target) being destroyed destroys a connection in
QML, and not the receiver (SignalSpy), we need to manually disconnect.
When QTBUG-118166 is implemented, we can remove this.
Task-number: QTBUG-118163
Pick-to: 6.2 6.5 6.6
Change-Id: I76aaffba114a6db5b5aab6a2ff58541aa3b2e025
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>