| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
A QQmlDelegateModelItem will have its incubation task removed
when the item has finished loading. So we need to check that
it exists before trying to access it. And we know that the
item is ready (and not in error state) if the item still
exists in the cache.
Change-Id: If25dca6b5902c491f5061b8d5d84046a72a8029b
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
|
|
|
|
|
|
|
| |
Convert most of the methods used QML objects to the new calling
convention. Converted IndexedBuiltinFunction to do the same.
Change-Id: I41b26042c2f56f24988485b06e8ccd214e2573c0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/qml/memory/qv4mm.cpp
src/qml/qml/qqmlbinding.cpp
Change-Id: I98e51ef5af12691196da5772a07d3d53d213efcc
|
| |\
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/memory/qv4mm.cpp
src/qml/memory/qv4mmdefs_p.h
src/quick/items/qquickwindow.cpp
src/quick/items/qquickwindow_p.h
tests/auto/qml/debugger/qqmlprofilerservice/qqmlprofilerservice.pro
tests/auto/qml/debugger/qqmlprofilerservice/tst_qqmlprofilerservice.cpp
Change-Id: I7021fa1edf076627a67048f41f7b201220262b09
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'requestedIndex'
We used to assign the currently incubating item to 'requestedIndex' based
on requested incubation mode alone. This is not sufficient, as the item
can also be loaded async when the mode is AsyncIfNested. To check if the
item is really loading async (and that we're not getting nullptr because
of some other failure), we need to ask the incubator.
Task-number: QTBUG-61537
Change-Id: Id1f458db4a7584a6b58d5bad0e7832ce4fc341dc
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
specify incubation mode
The current implementation would pass a boolean to signal if asynchronous
or synchronous incubation should be used to create an item. The problem with this approach
is that passing 'synchronous" would translate to QQmlIncubation::AsynchronousIfNested
later down the chain. This meant that even if the caller requested synchronous incubation, it
could end up with asynchronous incubation anyway, e.g if an async parent incubator was active at
the time of the call. And this can easily come as an unhandled supprise for the caller, and as
such, cause unforseen bugs.
This patch is a first of a set of patches that is done to fix the bug reported in the task below.
It will not change any behavior, it is written to preserve the logic exactly as it were, just
as a preparation for subsequent patches. It makes it explicit at the call location what
incubation mode will be used, and especially make it clear whenever the AsynchronousIfNested
flag is in play.
Task-number: QTBUG-61537
Change-Id: I8b3ba5438ebb2cd59983a098bd8ceeeb844da87b
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
tests/auto/quick/pointerhandlers/flickableinterop/data/FlashAnimation.qml
tests/auto/quick/pointerhandlers/flickableinterop/data/Slider.qml
tests/auto/quick/pointerhandlers/flickableinterop/data/TapHandlerButton.qml
tests/auto/quick/pointerhandlers/flickableinterop/data/flickableWithHandlers.qml
tests/auto/quick/pointerhandlers/multipointtoucharea_interop/data/pinchDragMPTA.qml
tests/auto/quick/pointerhandlers/qquickdraghandler/data/DragAnywhereSlider.qml
tests/auto/quick/pointerhandlers/qquickdraghandler/data/FlashAnimation.qml
tests/auto/quick/pointerhandlers/qquickdraghandler/data/Slider.qml
tests/auto/quick/pointerhandlers/qquickdraghandler/data/draggables.qml
tests/auto/quick/pointerhandlers/qquickdraghandler/data/multipleSliders.qml
tests/auto/quick/pointerhandlers/qquicktaphandler/data/Button.qml
tests/auto/quick/pointerhandlers/qquicktaphandler/data/FlashAnimation.qml
tests/auto/quick/pointerhandlers/qquicktaphandler/data/buttons.qml
tests/manual/pointer/content/FakeFlickable.qml
tests/manual/pointer/content/FlashAnimation.qml
tests/manual/pointer/content/MomentumAnimation.qml
tests/manual/pointer/content/MouseAreaButton.qml
tests/manual/pointer/content/MouseAreaSlider.qml
tests/manual/pointer/content/MptaButton.qml
tests/manual/pointer/content/MultiButton.qml
tests/manual/pointer/content/ScrollBar.qml
tests/manual/pointer/content/Slider.qml
tests/manual/pointer/content/TapHandlerButton.qml
tests/manual/pointer/fakeFlickable.qml
tests/manual/pointer/flickableWithHandlers.qml
tests/manual/pointer/flingAnimation.qml
tests/manual/pointer/joystick.qml
tests/manual/pointer/main.cpp
tests/manual/pointer/main.qml
tests/manual/pointer/map.qml
tests/manual/pointer/map2.qml
tests/manual/pointer/mixer.qml
tests/manual/pointer/multibuttons.qml
tests/manual/pointer/photosurface.qml
tests/manual/pointer/pinchDragFlingMPTA.qml
tests/manual/pointer/pinchHandler.qml
tests/manual/pointer/singlePointHandlerProperties.qml
tests/manual/pointer/tapHandler.qml
tests/manual/pointer/tapWithModifiers.qml
tests/manual/shapestest/main.cpp
Change-Id: I4f233a521305fab1ebfecbac801da192434ed524
|
| |\|
| | |
| | |
| | | |
Change-Id: Id2b11dccb04fc99d10608f690f5827bfa9b2114c
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a regression introduced by commit
e22b624d9ab1f36021adb9cdbfa9b37054282bb8, where the object that owns the
QML context would destroy the context upon destruction. Now the context
may live longer and thus the context->contextObject pointer would become
a dangling pointer.
Task-number: QTBUG-64166
Change-Id: I1df631fa11187abdeff735d8891ad7907e8d4a3d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I159b57acc7a2133ef1ad545aa84e792c63449a57
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qv4codegen.cpp
src/qml/compiler/qv4compileddata.cpp
src/qml/compiler/qv4compileddata_p.h
src/qml/compiler/qv4isel_moth_p.h
src/qml/compiler/qv4ssa.cpp
src/qml/jit/qv4assembler_p.h
src/qml/jit/qv4isel_masm_p.h
src/qml/jit/qv4regalloc.cpp
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4qmlcontext_p.h
src/qml/jsruntime/qv4regexp.cpp
src/qml/jsruntime/qv4regexp_p.h
src/qml/jsruntime/qv4regexpobject.cpp
src/qml/jsruntime/qv4runtime.cpp
src/qml/jsruntime/qv4vme_moth.cpp
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
tests/auto/qml/qml.pro
tests/auto/qml/qmlplugindump/tst_qmlplugindump.cpp
tools/qmlcachegen/qmlcachegen.cpp
Change-Id: I1577e195c736f3414089036b957a01cb91a3ca23
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qv4compileddata.cpp
src/qml/compiler/qv4compileddata_p.h
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4qmlcontext.cpp
src/qml/jsruntime/qv4qmlcontext_p.h
src/qml/jsruntime/qv4regexpobject.cpp
src/qml/jsruntime/qv4regexpobject_p.h
src/qml/types/qqmllistmodel.cpp
src/quick/items/qquickanimatedimage_p.h
src/quick/scenegraph/qsgrenderloop.cpp
tests/auto/qml/qmlcachegen/tst_qmlcachegen.cpp
Change-Id: If20ef62b2c98bdf656cb2f5d27b1897b754d3dc0
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Detaching delegate instances from model items is done after the
destruction of said model items. The problem is that after the model
item is destroyed, it will emit a change/destroyed signal. As the
delegate is still referencing the item, this will result in a
use-after-free. To provent that, the items are kept around until after
everyone (notably the delegate model) has been notified of the removal.
[ChangeLog][Qt][Qml] Fix possible use-after-free when removing items from a ListModel through JavaScript.
Task-number: QTBUG-59256
Change-Id: Iee182e2cf0b50d3dda2181fed95e38f1a60f22a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When closures created inside QML components are called after the
surrounding component (and consequently QML context) has been destroyed,
we are in a somewhat limited environment. Initially we would just crash
as the calling QML context is not valid anymore. We can alleviate that
by introducing reference counting on the context and letting the QML
context wrapper keep a strong reference. This avoids the crashes and
also ensures that at least imports continue to be accessible within
these contexts (as the singleton test case demonstrates).
Task-number: QTBUG-61781
Change-Id: I893f171842d01b0863d95a02ea738adc2620e236
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of mimicking a Value. This makes sure that argc now stays
correct even when anything on Value changes.
Most of the change is mechanical: replace callData->argc by
callData->argc().
Change-Id: I521831ae1ffb3966bad6589c18d7a373e13439d7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\| |
| | |
| | |
| | | |
Change-Id: Iff06429f948ac6cdec77a9e5bb8c5375c56fe705
|
| |\|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/compiler/qqmltypecompiler.cpp
src/qml/jsruntime/qv4qmlcontext.cpp
src/qml/jsruntime/qv4qobjectwrapper.cpp
src/qml/qml/qqmlcustomparser.cpp
src/qml/qml/qqmlimport.cpp
src/qml/qml/qqmlimport_p.h
src/qml/qml/qqmlmetatype.cpp
src/qml/qml/qqmlmetatype_p.h
src/qml/qml/qqmltypenamecache.cpp
src/qml/qml/qqmltypenamecache_p.h
src/qml/qml/qqmltypewrapper.cpp
src/qml/qml/qqmltypewrapper_p.h
src/qml/qml/qqmlvmemetaobject.cpp
src/qml/util/qqmladaptormodel.cpp
Change-Id: Ic959d03e6f9c328fb02710d9abbb0f27cddde131
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is where it belongs, and it makes the PropertyCache independent
of the engine used.
Task-number: QTBUG-61536
Change-Id: I21c2674ee3e2895abd2418764d140b154b47b868
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allow for faster calling of builtins, and completely avoid
scope creation in many cases.
Change-Id: I0f1681e19e9908db10def85a74e134a87fc2e44c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
Change those back again to return a value. This will be required
to avoid creation of Scope objects between JS function calls.
Change-Id: I05cb5cf8fd0c13dcefa60d213ccd5983fab57ea3
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
|
|/
|
|
|
|
|
|
|
| |
QQmlComponentPrivate
This feels like a slightly tidier encapsulation.
Change-Id: Iff6c05e1fe7fbc6bb1ec58a7ea42d32ee03187df
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ib3d81ad33a6ba28d891da91271a64d5fcc4874e6
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QObject's members declarativeData and currentChildBeingDeleted share
the same memory because they are inside a union.
This leads to a problem when destructing mixed Widgets and QML objects.
Then in QObjectPrivate::deleteChildren the member currentChildBeingDeleted
is set. But unfortunatley QObjectWrapper::destroyObject retrieves
the same pointer via declarativeData.
This patch should avoid this by disallowing retrieval of declarativeData
when isDeletingChildren is set (or at least adds a Q_ASSERT).
Task-number: QTBUG-57714
Change-Id: I9ee02f79be3e8226c30076c24859b49b8dcfaecf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Mimic the same process we do in QQmlDelegateModelPrivate::incubatorStatusChanged
i.e. there's no need to check for object before destroying contextData
Change-Id: I8cb1cda6da43bada350183ae11ee9b85b7fffee5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I053215261e1186aff25f29e0967219ef667f7678
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Just src/imports/ to go...
Change-Id: Ib4484676e24655cb950b3c4bb6495ff0e7f9700f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that qmlInfo actually reports info messages, we want to change
existing callers to use warning-level messages to preserve the original
message level.
This was done through:
perl -p -i -e "s/qmlInfo\(/qmlWarning\(/" **/*.{cpp,h,qdoc}
.. with a little care taken to only add the hunks that should be changed.
Change-Id: I511cee11ce0a26ec1048cd2b84c7536b812a0d89
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp
src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
src/qml/qml/qqmlimport.cpp
src/quick/items/context2d/qquickcontext2dtexture_p.h
tools/qmleasing/splineeditor.h
Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Wait for the update request to be posted and take effect before piling another
one up.
This speeds up qmlbench creation benchmarks a bit (as they make use of Repeater).
Results for benchmark/creation/delegates_item on a 5.6 base on a 2011 mbp:
Before: Average: 670.4 ops/frame; using 5/5 samples; MedianAll=674; StdDev=6.34, CoV=0.00946 - StdDev (all samples included)=6.34
After: Average: 702 ops/frame; using 5/5 samples; MedianAll=700; StdDev=8.97, CoV=0.0128 - StdDev (all samples included)=8.97
Change-Id: Ic0ef4c1e2d6cb309edeb512cad4280a15abc7a06
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/jsruntime/qv4variantobject.cpp
src/qml/types/qquickworkerscript.cpp
src/quick/scenegraph/util/qsgdefaultpainternode_p.h
tools/qmljs/qmljs.cpp
Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Check that the destroy() method of Heap::Base was called when a Managed
object needs destruction. This checks if a call to the parent's
destroy() method was accidentally omitted.
Change-Id: Id025ecd6d4744bf3eab23503fbe317ed2a461138
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
GCC6 might dead-store-eliminate out our secret write to Base::mmdata,
because it expects all memory content to be "undefined" before
constructor calls. Clang might take the same approach if the constructor
of Heap::Object is removed.
By making these structs trivial, it also makes them memcpy-able.
Change-Id: I055b2ad28311b997fbe059849ebda4d5894eaa9b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
This removes the destructors of subclasses of Base, making them nearly
trivial.
Change-Id: Ia6f7d467e87899b5ad37b8709a8f633a51689d59
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
... with known size and known value by corresponding ctor.
Don't use appending for this case.
Change-Id: Iee11d305a096e1f81371b31ce472dbea9fac93e2
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|/
|
|
|
|
|
| |
Not all, just instances with low risk.
Change-Id: I30612a1debd83dfa01aa087799658cff254bc9fc
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/qml/qqmltypeloader.cpp
Change-Id: I07647700fc86764c95a5ef95c568e700a70fe45f
|
| |\
| | |
| | |
| | | |
Change-Id: Ib45654e3e79087da4754377f0d78b70c44ed4695
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Removing an item from a model after its delegate has started incubation,
but before it has completed results is an orphaned item.
Task-number: QTBUG-55901
Change-Id: I3d3136dc05a950ca38d53687ae7d38a6d0c7ec35
Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
... or with QL1C in such cases:
- if there is overloaded function
- in QStringBuilder expressions
Saves ~1.5 KB in text size.
Build config: ubuntu 16.04 x64, gcc 5.3
Change-Id: Icc0789f1c244ce20a3182494b0c7f35c9d77e41d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The implementation of many (or all) runtime functions consist of first
creating a QV4::Scope, which saves and restores the JS stack pointer.
It also prevents tail-calls because of that restoring behavior. In many
cases it suffices to do that at the entry-point of the runtime.
The return value of a JS function call is now also stored in the scope.
Previously, all return values were stored in a ScopedValue, got loaded
on return, and immediately stored in another ScopedValue in the caller.
This resulted in a lot of stores, where now there is only one store
needed, and no extra ScopedValue for every function.
Change-Id: I13d80fc0ce72c5702ef1536d41d12f710c5914fa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
QQmlCompiledData used to contain the binary data for instantiating QML types in
the QML VME. Nowadays the QML type compiler as well as the JavaScript compiler
create a QV4::CompiledData::CompilationUnit.
Change-Id: I155f62a5ecfb55a3fe230520231b6d8fd5b28ac9
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This removes the last "user" of QQmlCompiledData apart from its circular usage.
Change-Id: I5383c9e7bba03617a1145cd43f52051848962013
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|\| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Conflicts:
src/qml/jsapi/qjsengine.cpp
src/qml/qml/qqmlengine_p.h
src/quick/items/qquickanchors.cpp
src/quick/items/qquickanimatedimage_p_p.h
src/quick/items/qquickitem_p.h
tests/auto/qml/qqmlecmascript/testtypes.h
tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
tests/benchmarks/qml/creation/tst_creation.cpp
Change-Id: I65861e32f16e8a04c7090a90231627e1ebf6ba6f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Replace substring functions that return QString with
corresponding functions that return QStringRef where
it's possible.
Create QString from QStringRef only where necessary.
While touching the code, also port loops to C++11 style.
Change-Id: I04c99b24ea6afd3715e3edf9ea00bfab838fd53c
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When the layout changes, we mark all rows as changed but do not track
where the individual rows get moved.
The only reason why one would want to track the moves is to persist
the current item selection across a layout change. But even the previous
code did not achieve that. I'll create a follow up patch to this one
that also implements this behavior as seen in Qt Widget item views.
Note that removing this code brings a tremendous performance win
on larger models. The repeated calls to _q_itemsMoved triggered O(n^2)
behavior in the number of top items in the model. Even with "only"
tens of thousands of items in the model, a layout change became very
costly and took seconds on a beefy modern desktop machine.
Calling _q_itemsMoved in a loop is bad because it:
- leads to O(N^2) behavior within QQmlChangeSet when merging the small
moves into the item view's current change set
- potentially triggers tons of binding/property updates when the cached
model indices are updated in _q_itemsMoved
Removing this slow path, I did not yet find a behavior change to the
previous code. Instead, it just does it all much faster.
Change-Id: I67fa99a1c5d8e05d17497d29391da9458bd9bdd0
Task-number: QTBUG-51638
Reviewed-by: Daniel Vrátil <daniel.vratil@kdab.com>
Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
|
|/ /
| |
| |
| |
| |
| |
| | |
Reduce code duplication by chaining constructors.
Change-Id: I8a0afd20ed13d4eb938536dcb05787ba2565a4cc
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
| |
From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new LGPL header instead of LGPL21 one
(in those files which will be under LGPL v3)
Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
|
|
|
|
|
|
|
| |
Also disable the old way of constructing objects.
Change-Id: Ib4e69087cd563ae1481da116d6caf97876239798
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I269c20abdc7f9eb0d71a2d2d485d622b65405762
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
|