Commit Graph

18078 Commits

Author SHA1 Message Date
Richard Moe Gustavsen 6bc4d55fe1 QQuickTableView: support assigning a DelegateModel
Normally you either assign a model to TableView that
already has a delegate (or don't need one), like
DelegateModel or ObjectModel. Or instead you assign
a QAIM model and a delegate directly. But if you
assign both a delegate and an ObjectModel, TableView
would be confused, and ignore the assigned model
and instead create an internal wrapper model that
ends up empty.

This patch will ensure that we don't create a wrapper
model in such cases, but instead forward the
delegate to whichever model is assigned, even
if it ends up as a no-op for models that don't
use one.

Task-number: QTBUG-80534
Change-Id: Idd220df08617c379dc7808ee1f41c862b78cc201
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-12-09 14:16:07 +01:00
Richard Moe Gustavsen 3770696ce5 tst_qquicktableview: ensure test checks for correct error message
Change 631ef67458 fixed a bug that wrote a wrong error message
to the console. But there is a test that checks for that message
that was also wrong (but for some reason the test passed in the CI,
but it has started to fail locally).

This patch will ensure that the test don't fail because we check
for a wrong error message.

Change-Id: I27e16b0f4aa6a0ffeb8c42f846c344436a41ad3c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-12-09 14:16:07 +01:00
Shawn Rutledge 51e02fdc02 Stabilize tst_qquickmousearea::nestedStopAtBounds()
Fixes: QTBUG-78153
Change-Id: Ib8ab2ace4e43f5020059b964951ed11c0f7fc4bd
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-12-08 12:56:06 +01:00
Shawn Rutledge 090f404cf8 Don't let PointerHandler steal touch grab from preventStealing MouseArea
The scenario:
- mouse press: MouseArea grabs; DragHandler gets a passive grab
- drag a little: DragHandler's drag threshold is exceeded
- drag some more: DragHandler tries to take the exclusive grab
This grab takeover succeeded before, because although MA has
keepMouseGrab(), the event being delivered is a touch event,
and MA does not have keepTouchGrab().

If this happens while QQuickWindowPrivate::touchMouseId is the
same touchpoint that the DragHandler is trying to grab, it should
not succeed, because we honor the keepMouseGrab() flag.  I.e.
keepMouseGrab() implies keepTouchGrab() whenever the touchpoint
under consideration is currently the touch-mouse.

On the other hand, if a DragHandler is used on some item inside
a Flickable: on press, the Flickable grabs right away (it has a
bad case of FOMO), but the DragHandler just gets a passive grab.
When the drag threshold is exceeded, DragHandler must be able to
steal the grab from Flickable, because Flickable was just being too
aggressive.  So now we have the rule that if the Item it wants to steal
the grab from is a parent of the type that filters all events,
it's OK to ignore the keepMouseGrab() flag and steal anyway
(as it did before this patch).

Fixes: QTBUG-79163
Change-Id: I2b3f175bea867cb737357857657653b0a7b83995
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-12-06 16:57:40 +01:00
Shawn Rutledge 7cdc3727a2 TapHandler: don't reject stationary touchpoints
Multiple TapHandlers must be able to react to multiple touchpoints.
Often when multiple touchpoints are in contact, some of them will be
stationary.  In that case TapHandler should not give up its active
state, which is the result of returning false from wantsEventPoint().

This partially reverts commit dcc7367997.

Fixes: QTBUG-76954
Change-Id: I836baf771f09d48be8d032472b0c3143e8f7f723
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-12-06 13:46:10 +01:00
Yulong Bai f8df9dc8b4 Particle system: fix infinite loop after running for many hours
The infinite loop was triggered by several issues coincide together.

In short, the direct cause is the particle's born time and lifespan were
represented in 32 bit floats and not precise enough to pass aliveness check as
time grows large.

While the time grows large, the resolution of floating point decreases to the
extent that resolution is even bigger than 2 milliseconds.
Then it will fail to pass the aliveness check. Then, the
dead particles will be treated alive and they are kept inserting into and
popping out of the particles heap, which is similar to a live-lock.

The fix is to separate freeing dead and inserting back alive ones in two
different loops, ensure that the emitter can update time for next frame.

There are still other issues:
1) as the times runs very long, the particle needs several frames's updates
to actually make the states change noticeable, which means animation may
become not so smooth after running for too long (like several days).
May change particle's born/lifespan time to 64 bits in another patch.

2) the particle system's and animation's timers are 32 bit integers,
after 2^31 milliseconds(24.8551348 days), they will overflow. May promote
them to 64 bits in another patch.

3) as the time grows even larger such that the resolution is bigger than 16ms
at 60 hz frame rate, the live-lock may occur again. Because the timer advances/delta
will be not large enough to make dead ones reused.
The next live-lock estimated time is 2^24*16 milliseconds = 3.10689185 days.
The final fixes are 1) and 2)

4) may change the particle system's internal timer be set to arbitrary value
(fast forward to large value) for easier writing autotest for above cases.

Change-Id: I1190c0814c8197876b26dd4182dc4b065dd1ece6
Task-number: QTBUG-64138
Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
2019-12-06 12:15:25 +00:00
Fabian Kosmale db321e7441 QQuickItemView: Emit correct change signal on model reset
As the variable was manually set to -1 beforehand, we would never emit
the change signal, leaving bindings stale. However, simply removing the
assignment would lead to not triggering the signal when currentIndex was
0. So now we set it to -2, which cannot happen in any other place.

Note that QTBUG-64998 was already mostly fixed due to earlier changes
fixing the currentItem part, only currentIndex was still broken

Fixes: QTBUG-68232
Fixes: QTBUG-64998
Fixes: QTBUG-63422
Change-Id: I885e06f1e258e67c3368d017bf79bff760440863
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-12-05 14:09:39 +01:00
Ulf Hermann cc66dd33cc Compiler: Support >32k stack slots
Previously, the code generator would truncate the stack slots when
writing the compiled function, as that one only had a 16bit field for
them.

Also, add a debug-mode check for stack overflows to the interpreter.

Unfortunately, as it triggers a stack overflow, the test will not
reliably fail without this change.

Fixes: QTBUG-80511
Change-Id: I3019bb2de657ae4c3e1040db798a83533f854bff
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-12-05 10:02:11 +01:00
Mitch Curtis e2af7c3b37 Fix ObjectModel item not being rendered when moved between models
When moving an item from ObjectModel A to ObjectModel B, polishes are
scheduled for the respective ListViews in order: the ListView for A
first, and then the ListView for B. However, when it comes time to
do the actual polishing via updatePolish(), the list of items is
traversed backwards. This means that the following calls

    var item = objectModelA.get(0)
    objectModelA.remove(0, 1)
    objectModelB.insert(0, item)

will result in updatePolish() being called for ListView B first, and
then ListView A. As a result of this, setCulled(false) will be called
by ListView B (since the item is now visible within it), followed by
ListView A calling setCulled(true) (since the item is now no longer in
it).

As there is no way for these models to know about each other (and it's
not feasible to store refcounts in QQuickItemPrivate::extraData, since
ObjectModel is in QtQml.Models, which can't know about QtQuick), this
patch makes ListView check if the item is parented to its contentItem
before culling it. This prevents it from hiding items which are no
longer shown in its view.

Change-Id: If50614ebc269fae875195bbc63c0c04dab237775
Fixes: QTBUG-67986
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-12-04 15:00:25 +01:00
Shin-ichi Okada e394979d24 Fix incorrect behavior of PathView with ungrabMouse()
When the grabbed Item is released and then grabbed again,
if ungrabMouse () is called, the animation stops. In order to
avoid this, when ungrabMouse () is called, if offset is different,
it is modified to animate.

Task-number: QTBUG-79592
Change-Id: I61cbd4dad90643722f12480f0dab3859ce116af8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-12-04 14:53:03 +01:00
Ulf Hermann 41dd68344c QQuickTableView: Clear items before deleting the model
Fixes: QTBUG-71374
Change-Id: I534b7612268bb9407844961267865f490d7ff7b2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-12-04 14:08:47 +01:00
Richard Moe Gustavsen c28ec259b7 tst_qquicktableview: fix warning about missing JS function
Change 35fdf3a7b7 added a binding to a function in one of
the QML files used for testing (plaintableview.qml). The
problem is that this file is also used from other places
where we wrap a QSharedPointer that points to the model
inside a QVariant. And when assigning that variant to
a TableView, the QML binding will see the QSharedPointer, and
not the model it points to. And hence complain that the
model doesn't have the API that is exported from the
model.

The easy fix is to just create a new QML file for the
new test added, that has the binding, but assigns
a QVariant that wraps the model directly without
usign a QSharedPointer.

Change-Id: Ic2b77426c2d700479a9b5f4007384661e2ca0801
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-12-04 13:55:31 +01:00
Richard Moe Gustavsen 631ef67458 QQuickTableView: fix warning message
Fix up small copy/paste bug.

Change-Id: I0f6c648679c025af9dcebf9459116c6cd6452a14
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-12-04 13:54:26 +01:00
Fabian Kosmale 705e80b702 QQuickItemView: Set moveReason to other on model change
This implements Michael Brasser's suggestion in the bug report.
As there do not seem to be other bug reports related to the
fixupPosition change, this might already be enough.

Fixes: QTBUG-66163
Change-Id: Iee45621ff7081b280626f4a81dab9bd36a7ea6b7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-12-03 15:42:22 +01:00
Ulf Hermann fb58b94c1c Remove src/3rdparty/llvm
We added it for the tracing JIT, then removed the tracing JIT again.

Fixes: QTBUG-80490
Change-Id: I53fc198ecbee7a238624fd14eefae02ee57b3b0a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-12-03 12:27:56 +01:00
Jan Arve Sæther bd7ce75f26 Do not emit inputMaskChanged when setting the same input mask
If you did not specify a blank character (e.g. "; " as suffix) it would
internally add that suffix to the property, resulting in that the
property itself actually got a "; " suffix even when not specified.

So when setting the same input mask again, it wouldn't match the
existing inputMask property, and it would emit inputMaskChanged again.

Change-Id: Ia47d63d56c640b4be9d6d0a704ddfaff01befbdb
Fixes: QTBUG-80190
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-12-02 15:43:01 +01:00
Shawn Rutledge 23df1603f5 MouseArea: react to touch ungrab
If an event handler (such as DragHandler) takes the exclusive grab
of a touchpoint that MouseArea had already grabbed as a synth-mouse,
it should react in the same way as if its grab of the actual mouse was
stolen: release the pressed state, etc.

Fixes: QTBUG-77624
Change-Id: I51f4fb253f7d0377be421c23e617942507616e72
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-12-02 16:34:34 +02:00
Fabian Kosmale 991035ea1f QQuickBehavior: Check that animation is not semi-deleted
QQuickPopup::~QQuickPopup hides its overlay in its destructor. If a
Behavior is installed on its opacity property, it will get triggered by
this. If the animation associated with the Behavior is a property of the
Popup, which is bound to a QML element, it will however be already partially
destructed, as QQmlElement<QQuickPopup>::~QQmlElement and in turn
QQmlPrivate::qdeclarativeelement_destructor will have deleted its
associated memory, before QQuickPopup::~QQuickPopup has been called.

As this does not set any pointers to null, it would seem as if the
Animation were still valid. To remedy this, we now check if the
animation is in fact marked for deletetion, and, if so, bypass the
interception.

Fixes: QTBUG-80070
Change-Id: I0e33262c6b3963c46e300ae76c05063c00ff258b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-11-29 14:37:16 +01:00
Eirik Aavitsland 510770c464 Facilitate testing RHI rendering in the lancelot test
Synthesize a "GraphicsStack" client attribute from the various
environment variables that determine the rendering backend. This
allows the baseline server to differentiate the baselines from the
different rendering stacks.
Manual comparison between them can then be done using the -compareto
command line option.

Change-Id: Iea13e130baa97462461ccf8b769d57ea74567c51
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-11-29 10:05:24 +00:00
Johan Klokkhammer Helsing fcf7b513d9 Warn about using QSGTexture::bind outside direct OpenGL path
Task-number: QTBUG-80364
Change-Id: I9281fb992bcb01d56714b491f313dd44a757d68a
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-11-28 16:02:39 +01:00
Rolf Eike Beer 79d86b2692 masm: drop some excessive newlines in debug messages
The current output would look like this (including the blank lines):

	[20191115 12:32:37.378 UTC 0xc47cb8 default: Generated BaselineJIT code for
	[20191115 12:32:37.379 UTC 0xc47cb8 default: function expression for source
	[20191115 12:32:37.379 UTC 0xc47cb8 default: :

	[20191115 12:32:37.379 UTC 0xc47cb8 default:     Code at [0x671068d1, 0x671069bd):

	[20191115 12:32:37.379 UTC 0xc47cb8 qt.v4.asm:     disassembly not available for range 0x671068d1...0x67106997
	[20191115 12:32:37.379 UTC 0xc47cb8 qt.v4.asm:

Drop 3 of the newlines to make it not beautiful, but at least not
totally verbose.

Change-Id: I850b7acede33ddbb5f6ab74fd760962ca18988c8
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-11-28 15:57:19 +01:00
Eirik Aavitsland af1cec2cda Fix console logging from lancelot test
The stderr output of the qmlscenegrabber subprocess was not forwarded.

Change-Id: I38d304ad2570187de0552ad325149f66aacf3ac3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-11-28 15:37:55 +01:00
Yulong Bai 878814ebd4 TableView: add doc for syncView and syncDirection properties
Change-Id: I4a50087b07e6dfe37c9b48d1e3bb73ea50ea64a7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-11-27 16:53:12 +01:00
Nick Shaforostov 3027d13699 QQmlData::wasDeleted now returns true also in case of isDeletingChildren
without this check, ddata below can be NULL in this case, and
(ddata && ddata->isQueuedForDeletion) will return false,
while isDeletingChildren being true would imply wasDeleted should return true

Change-Id: I6113c2cf972f7d418a3dbc2fd77ee6550c91aa93
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-11-27 11:20:16 +00:00
Shawn Rutledge 0012f8bd15 MultiPointTouchArea: stop ignoring Qt-synthesized mouse events
We ignored them because we assume that if a touch event is sent first,
the MultiPointTouchArea will handle it; and then if a synth-mouse event
is sent afterwards for some reason, it's irrelevant to MPTA.  However:
1) A synth-mouse event should not actually be sent, because MPTA accepts
the touch event. 2) If Flickable is used with pressDelay set, Flickable
will send the delayed press in the form of a mouse event (it does not
know how to replay a touch event at all). So if MPTA is used in a
ListView delegate for example, it's necessary for MPTA to react to a
synth-mouse event during replay. In both the press delay replay
and QTabletEvent scenarios, the mouse event has source() set to
MouseEventSynthesizedByQt, so MPTA needs to handle those events.

After a synth-mouse event during replay, MPTA can still receive an
actual touch release, which thoroughly confuses its pre-existing logic.
In that case it helps to check whether the touchpoint ID is the same as
QQuickWindowPrivate::touchMouseId, handle the release of that point, and
also release the internal synthetic _mouseQpaTouchPoint which was
remembered from the mouse press.

Fixes: QTBUG-75750
Fixes: QTBUG-78818
Change-Id: I8149f8b05f00677eb07a2f09b725b1db5f95b122
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-11-26 11:24:22 +01:00
Laszlo Agocs 9248166095 rhi: Follow non-integer scaling fixes for native text
Add the dpr-related modifications to the shaders used on the QRhi-based
rendering path.

Change-Id: Ice980a80cbf9910d06a95a957817ff3d689c5e0f
Fixes: QTBUG-80297
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-11-25 14:10:17 +01:00
Ulf Hermann 220c1031fc QQmlTypeLoader: Don't parse qmldir content multiple times
The content of a qmldir file at a specific URL should really never
change. If it does, we have bigger problems. In order to forget the
qmldir contents we can already do QQmlTypeLoader::clearCache().

Fixes: QTBUG-30467
Change-Id: Ic1b3662695254d8be5beaa65ca9cd76eab56e2e2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-23 17:20:01 +01:00
Ulf Hermann 1668379968 QQmlDirParser: Fix lifecycle management
Remove pointless ctor and dtor, provide a clear() method that actually
clears everything, call that explicitly where needed.

Task-number: QTBUG-30467
Change-Id: I67c632af3a7a76d1d1a706a5ab6d1c446240405c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-23 17:20:00 +01:00
Ulf Hermann b7030c2efb QQmlDelegateModel: Use cache item's index for resolving delegates
The raw index doesn't take the filter group into account.

Fixes: QTBUG-78297
Change-Id: Ie6514c8acdc380fe3f8f267d02335afc357abd17
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Joshua GPBeta <studiocghibli@gmail.com>
2019-11-23 17:19:59 +01:00
Mitch Curtis fad8ef3e41 mouseDrag(): ensure that intermediate moves are done for all drags
The code checking if the intermediate move distance was less than
the drag threshold, but without accounting for negative distances.
Since the negative distances were naturally less than the drag
threshold, the intermediate distances were set to zero and the
intermediate moves were never done.

In practice, this means that mouseDrag() never did intermediate
moves (i.e. what happens during a drag in real life) for drags
that go from right to left or upwards.

Task-number: QTBUG-80152
Change-Id: Ic27021f5ce5ba2937e95fb2dfb532bd2136f4205
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-11-23 15:41:18 +01:00
Kari Hormi acb6ed0815 TableView: use fetchMore() when scrolling to the end of the table
QQmlTableInstanceModel implements canFetchMore and fetchMore functions,
but these are not called at any point in QQuickTableView. This change
checks if additional data can be fetched when atYEndChanged signal is
emitted.

Fixes: QTBUG-78273
Change-Id: I49b41b09d9a218826b34f32cd9fe4724a6097b52
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-11-20 12:45:34 +02:00
Eirik Aavitsland af090d8073 Fix: NativeRendering text for non-integer screen scaling
Commit 6e883c53 introduced snapping to pixel grid for non-integer
device pixel ratios. But the snapping also modified the w element of
the coord vector, which resulted in mangled and offset rendering.

As a driveby, add the dpr snapping also to the outlinetext shader, as
it improves rendering quality.

Fixes: QTBUG-70481
Fixes: QTBUG-78160
Change-Id: I4c4b1788005514adc0255878ba24cdf1acc6755f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-11-18 09:48:44 +00:00
Ulf Hermann 9b2af0c5f5 Retrieve the attached properties base type without recursion
This is probably faster and avoids the deprecation warnings stemming
from deprecated functions calling themselves recursively.

Task-number: QTBUG-80040
Change-Id: I2f65aad3bc7f85b7a7de66d3e76dac1233a58db8
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-11-18 10:37:59 +01:00
Ulf Hermann c5675c9c8f Disable deprecation warnings in function that are themselves deprecated
Deprecated functions calling each other is not worthy of warning, as
they will all be removed at the same time.

Task-number: QTBUG-80040
Change-Id: I4c2b31474e3ee8168fd48796cf99ead266dffb37
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-11-18 10:37:48 +01:00
Ulf Hermann 02b8c8ed16 Fix deprecation warning about QString from character literal
Task-number: QTBUG-80040
Change-Id: I6dddf65582c15b8cb8e42de5dbcc38ebe8d5867a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-11-18 10:37:28 +01:00
Mitch Curtis 02ffe50af4 mouseDrag(): never drag along an axis that wasn't requested
mouseDrag() should not drag along an axis if the distance passed in for
that axis was 0. Doing so can interfere with tests for an item that e.g.
handles horizontal flicks which is within e.g. a Flickable that handles
vertical flicks. This was seen with SwipeDelegate auto tests, where the
delegates handles horizontal swipes within a vertical ListView.

Change-Id: I8fee567d59c53bdc4cbfe1d42ae0592e324bd2f6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-11-14 13:57:01 +01:00
Richard Moe Gustavsen 35fdf3a7b7 QQmlTableInstanceModel: always emit index changed when an item is reused
When reusing a delegate item, it can sometimes happen that the item
ends up being reused at the same location in the table as it had
before it was pooled. And in that case, we don't emit changes to
index, row and column since they technically didn't change.

The problem is that the model might have changed in-between, e.g if
a row has been removed. And in that case, row and column will, even
when unchanged, point to other parts of the model. So all bindings
needs to be reevaluated to ensure that the values they use are
refreshed.

This patch will therefore ensure that we always emit changes to
the mentioned properties when an item is reused, regardless if
they change or not.

Fixes: QTBUG-79209
Change-Id: Icec201a43a30b9f677303fbf652baf6487621deb
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-11-14 11:19:26 +01:00
Qt Forward Merge Bot 1619b7d207 Merge remote-tracking branch 'origin/5.13' into 5.14
Change-Id: I06578422b4558feabf7a77426b01e77953ab60e2
2019-11-14 09:50:24 +01:00
Jan Arve Sæther 554309a1c1 Qt Quick Layouts: Do not assert when specifying an invalid row/column
We now print a warning and try to gracefully handle it

Change-Id: I66e79fe918808f5fede78a23df50e9e95b7b832d
Fixes: QTBUG-67204
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-11-13 15:11:13 +01:00
Robert Loehning 34d1b17925 Fuzzing: Don't copy input data to QByteArray
Change-Id: I1c83b2da19f9d73e4069ecb1f85af71e2ac2b96b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-11-13 11:38:33 +01:00
Simon Hausmann f15c2c22cb Fix warning about non-relative paths in qmldir files
Permit the use of resource urls in qmldir files to allow for the
use-case of a plugin including its .qml files in resources and
optionally compiling them ahead of time. When the resources are bundled
in the plugin, qmlplugindump might or might not work.

Task-number: QTBUG-48809
Change-Id: Icb331c7575f26316b5c2bcc604b9c6d793977a9f
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-11-13 11:07:05 +01:00
Richard Moe Gustavsen 91eb02eca2 autotest, tableview: silence compiler warning
Change-Id: I311f0c21baa73521717ad98b2398d5469b9ac208
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-11-12 14:46:54 +01:00
Richard Moe Gustavsen 8952800c68 QQuickTableView::forceLayout(): rebuild table if the size of the model has changed
An assert will trigger if forceLayout() is called while the model is
being reset. The reason is that the forceLayout() schedules a relayout
which assumes that the size of the model hasn't changed. But while
layouting, it will try to fetch data from the model according to the
old size, which will trigger an assert.

This patch will add an extra path to forceLayout() that checks if the
size of the model has changed, and if so, schedule a complete
rebuild instead of just a relayout.

Fixes: QTBUG-79395
Change-Id: If61658912d9e90c1a5aef9bc28083da20fa6ec76
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-11-12 14:46:41 +01:00
Jan Arve Sæther c89f7a221b Fix a layout bug caused by a delegate item that was moved by the user
The position of the first item in the list of visualItems was used to
know how to layout the rest of the visual items.
However, this did not work if the first item was actually moved (e.g.
due to a DnD operation). We therefore store the position of the first
visual item after each time we arrange it, and use that as a basis on
where to start layouting from.

Task-number: QTBUG-78076
Change-Id: I837f5b7d61a13d98d23287685c6fd66817360906
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-11-12 15:25:42 +02:00
Lorn Potter 06267f90a2 fix rendernode example build
When not building developer mode, the install does not copy the files
on other platforms

Fixes: QTBUG-79781
Change-Id: Ibc8352c59d16b69618d53750511d5b5650ed5290
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-11-12 09:23:24 +10:00
Mitch Curtis 63042da9c9 Doc: add section on imperative vs declarative to best practices page
Change-Id: I6ea16474e5e59f76f7b2c5806e381a1a4b05db20
Fixes: QTBUG-79903
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2019-11-11 14:01:08 +01:00
Topi Reinio 13d7517c0e Doc: Fix documentation warnings
There were a lot of documentation warnings introduced by the
separation of QtQml.Models and QtQml.WorkerScript modules
from the QtQml documentation project into their own
sub-projects.

Fix the above, and also ensure that the experimental
Qt.labs.qmlmodels QML types are listed in the documentation,
and add them also on the QML module page for QtQml.Models.

A few warnings remain, they may be indicative of issues
not in the scope of this commit.

Fixes: QTBUG-79812
Change-Id: Idc25c976e4c96feab4aae893519d6c9245f57a64
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-11-11 09:53:52 +00:00
Ulf Hermann 06fa6ef1b9 RuntimeHelpers: Short-circuit stringToNumber on huge strings
We don't need to iterate such a monster, or even convert it to latin1.
It won't be a valid number anyway.

Fixes: QTBUG-78955
Change-Id: Iaa35d924511885f804abe2d5c74235adcad55b27
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-07 13:33:26 +01:00
Eirik Aavitsland f05c9c292b lancelot graphics test: Use application bundle on Mac
Font handling has been observed to differ depending on the presence of
the Info.plist file in the app bundle. We want to test the typical use
case, so make the qmlscenegrabber executable be a bundled app.

Change-Id: I2e8b96328b16d5bedfeb5f6dd23f20c06d4c60c1
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-11-07 11:57:34 +01:00
Ulf Hermann b7c2d5dfa6 Blacklist tst_qquicktextedit::mouseSelectionMode on OpenSuse 15
Task-number: QTBUG-78846
Change-Id: I74d0f35b5ee1d22b10564c28edeb833689bbc6d9
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-11-07 12:21:24 +02:00