| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Implement the methods that are equivalent to the methods
in Array objects.
Change-Id: I22d7eeaebd7630bae26507f7d763a11845a09e31
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: If0d33cc40e79d0609ad205cfe5a08d2266403867
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I76308d4699f212758274b75ea1328e7f6a6c6be8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Icad9c1bedef83be8c6124ca3456a57d528c18733
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ic0d46afe1ce6c57a839803dc8defccec6b3ddfc8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I312f8e086b733e184b353d77452f5d4a1262469a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: Ib9a32f9993c6768c6a55f3192a4f3a8ef05eda8f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I5d2eebd7bb0424462f844922b7168a30f5ca66cb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
| |
Change-Id: I6de8031a04c372a5309a878811da55b93b53da3d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As it stood, we would only emit changes to row and column if
index changed as well. But when removing rows and columns
from the model, it can happen that we reuse an item that
by accident has the same index as the one we change it
to, but belonging to a different row and column. So we need to
check for changes to the index the same way we do for
row and column.
Change-Id: I9d507a74aa5dcb0fe7630e7af1e949bd2db7fb47
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
As (soon to be) documented, drain the pool immediately when setting
reuseItems to false. This will give developers a way to clear
the pool if e.g running low on memory. Besides, there is no reason
to keep items in the pool if we're not reusing them.
Change-Id: I49f0283721a63c6a6b92631f00c7ad711a262978
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
A QQuickPointerTouchEvent's button and buttons properties are not
currently set (although we had some uncertainty in the past about
whether it would be appropriate for a touch press to simulate a left
button press). So it seems that f2ba3bd9792500b4d3fcfd23b03098a32641ef4f
broke the behavior of PointHandler on touchscreens.
Change-Id: I890cc9889e847636c8f385753e47a078ec582195
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
...and verify the centroid changes in the DragHandler autotest.
It was observable in manual tests that draw velocity vectors that
they weren't getting reset to zero after the release, after
ca7cdd71ee33f0d77eb6bf1367d2532e26155cb2.
Change-Id: I16186d36d51a567b0d653307421147264a5e6326
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
TableView is now ready for Qt-5.12. The only thing missing
is documentation, which is currently being written, and on the
way. So remove the temporary labs plugin that used to register
TableView, and register it together with the other QtQuick items.
Change-Id: I7f360eac3934d228904a4133363e336afe0c451a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checking if QJSValue isNull() will just check if it contains
the js value "null". But we want to check if the application
has assigned anything at all to the providers.
Any value other than a function will not be accepted (which
we check for at the time we try to call them (from
resolveColumnWidth() and resolveColumnHeight()).
Change-Id: I24717b67e99dd1ad6684a83125d2a4c7826dd501
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enums classes are registered unscoped which leads to clashes in the following
cases:
1. Two different enums contain the same values
2. The name of an enum class is the same as an enum value
In the 2nd case you can not even access the scoped enum at all because it
will be overwritten by the primitive type.
Users can now add a class info to the meta type to disable the unscoped
registration which solves all clashes. The default is kept as is.
class MyClass : public QObject
{
Q_OBJECT
Q_CLASSINFO("RegisterEnumClassesUnscoped", "false")
public:
...
};
[ChangeLog][QtQml] Added option to disable unscoped registration of enum classes.
Change-Id: Ifa4197a14a252575e8a25ae56fb6ee479addf80b
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
|
|
|
|
|
|
|
|
| |
Let all delegate items have a stackin order (z) equal to 1.
This is how ListView does it, so do the same in TableView
to make them behave as similar as possible.
Change-Id: I5d4629e8b116cd62c84e4fe9aefdb087e3c6e325
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
|
|
|
|
|
|
|
|
| |
Similar to script imports from .qml files, the .mjs extension is used to
distinguish between ES modules and plain script files.
Change-Id: Id5f9b59fb77e99e3c9d6a404e6d091d96b501ad6
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|
|
|
|
|
|
|
|
| |
Now that we have one JS engine per worker script, we can get rid of the
per-script QML context and let the script simply run in the global
object, which is now also mutable.
Change-Id: I36d8616b85b2c0ff3a356ee7be9d242c3da624cf
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
|\
| |
| |
| | |
Change-Id: Ib4dd56aa31ea0f2026b61dbae061d0b333426d0f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch adds a specific abstract QQmlComponent subclass,
QQmlAbstractDelegateComponent, and a default implementation,
DelegateChooser, that, together with the type DelegateChoice
allows determining the delegate type by role and/or index.
The patch also adds QQmlAbstractDelegateComponent support
to QQmlTableInstanceModel, that is a simplified version of
the delegate model, currently only used in the new table view.
DelegateChoosers are intended to behave just like Components
in the context of the view. This means that they can be declared
outside of the view, and also in separate files, and the same
delegate component can be used at the same time in multiple views.
[ChangeLog][QtQuick][Item Views] Added a DelegateChooser Component
to host DelegateChoice instances to choose different delegates in
an Item View (e.g. TableView) depending on model roles.
Done-with: Michael Brasser <michael.brasser@live.com>
Task-number: QTBUG-26681
Change-Id: Ibe24a31daf9142c8a9ff45ef6c65da0aec8a14dc
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Make sure to start the search for a potential focus item on an item that
will be visited again later, otherwise we'll loop for ever.
Fixes: QTBUG-68271
Change-Id: Icb330e4e726132511810027a33b9fb346c7fa131
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Improve the test so that you can click on
the cells to change their color.
Change-Id: Ia74620894f2885242f587c4c863bcf3544b13488
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a TableView initially loads as many rows and columns it can fit
inside the viewport, it will always be one less than the number it
will show while flicking. The reason is that, as soon as you flick
half a column out on the left, half a column will move in on the right.
And this will increase the number of visible columns by 1 (but without
reusing any items from the pool, since the first column is not out).
Since this is always the case, it makes sense to preload one extra
row and column at start-up, so that they're ready when the flicking
starts.
Note that this doesn't load more items in the background than
what we need (like the cache buffer would). The viewport will fit
_all_ the loaded items into the viewport once you start flicking.
But the extra items loaded at start-up will instead be moved direcly
to the pool for reuse, and the application will be informed about it
(using the onPooled signal).
Change-Id: Icea85c1d44f74ab54f1b96325489e8d6d1c0889e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current implementation would unload a column/row if the right edge
was greater than the right edge of the viewport. At the same time, it
would load a column if the left edge was less than the right edge
of the viewport. But we did nothing if the edge was exactly at the
edge of the viewport. This patch will fix that, so that an edge is
seen as either inside or ouside (and never on the edge).
By handle this (corner) case, it will be easier to test the layout
from the auto test, since a column will either be seen as inside or
outside the viewport (and not exactly an the edge in addition).
Change-Id: I95fccaa4a1bb583036027d2fc8c6eb4895eeefc8
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I30ddca4402254e1cde17712d07ea0bff2ea5f595
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For function expressions such as
var foo = function foo() {
return foo;
}
it is important to have a separate binding for "foo" within the scope of
the function. However for function declarations this does not apply:
function foo() {
foo = 2;
}
foo()
console.log(foo) // should print 2
Therefore we should enter the ThisFunctionName type of binding only for
function expressions or (generally) for the case where the name is not
intended to be entered into the surrounding environment at
defineFunction() time.
This is covered implicitly in
language/module-code/eval-gtbndng-indirect-update-dflt.js
Change-Id: I1e5114a93ac7db9e5fcea04b1b3e1de4ad7bff6d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is also pretty straight-forward by adding .mjs as supported
extension in the qmake and cmake support.
This also tweaks qv4engine.cpp to share the same module compilation
function across all code paths.
Change-Id: Ia0e23c78a794f2330ecf8f991ee6ea948f4ac89d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Two minor fixes needed for this otherwise straight-forward change:
(1) When compiling modules, use the full url for the source file of
the compilation unit, as that's what we use for the relocation check
when loading the cache file.
(2) Record the proper source time stamp for cache invalidation.
As a bonus, when importing scripts from .qml files, we now also attempt
to use the cached version that we created on the fly in an effort to
replace heap memory with mmap backed memory - just like we do for .qml
files.
Change-Id: I5b03a18e3c44d537c3242cb1d969636df32fe42a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a straight-forward hook into the module implementation in
QV4::ExecutionEngine. Modules are pre-compiled in the QML type loader
thread. That thread keeps track of all pending loading scripts through
the type loader's m_scriptCache. Once a module is compiled, it's
thread-safely registered with the execution engine.
Script instantiation and evaluation is done solely in the QQmlEngine's
thread.
ES Modules are identified in imports as well as qmldir files by the .mjs
extension.
Change-Id: Ie9c59785118afcb49f43a1e176a9f7db00f09428
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now that the standard defines the concept of a module, it makes sense to
offer a function in QJSEngine that can read files and load them.
[ChangeLog][QtQml][QJSEngine] Added function to import ECMASCript
modules from the file system or the Qt resource system.
Change-Id: I72f8d49de948872221ac1b54fcfb066404bed9b9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I171e571a336a15c27881999a10ffe3c52e92d816
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The spec says in 14.4.12 that an anonymous generator declaration can
only occur as part of the export declaration. The same applies to
anonymous function declarations in 14.1.20.
It is only in the default export declaration rule that we can detect
that we have an anonymous declaration/generator, so that is where we
implement the step of setting "default" as the function name.
It is safe to use an empty string in GeneratorDeclaration_Default and
FunctionDeclaration_Default because that rule is only referenced from
HoistableDeclaration_Default, which in turn is only referenced from
ExportDeclaration.
Change-Id: Ibd341b941f67cbcc727da4df23af04af313b6251
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When registering a default export, make sure that the local name
points either to an entry that we've entered into the environment or
the synthetic entry we create.
Change-Id: I37e160dc1e3231214bb68f72d6bb0746d7aee3b3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ib07d1a215492640e82f4f4791ba714688508f3db
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
They must be sorted, no duplicates and only one default entry at most.
Change-Id: Ia9c0e54a761ce7cbfebb837330bf3769d505eb3b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
This function should not only return the names but also keys (symbols).
Change-Id: I431e4aa8fa31ac6c16a415f00fb9f98405632562
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
One module test remains an expected failure but it comes with an
explanation now.
Change-Id: Id58bcbc840e2cde5f493ff88af972d29485f6c55
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We correctly produce a syntax error for a const declaration that is
without an initialize, such as
const x;
but we have to make an exception if it's part of a for declaration, such
as
for (const x of [1, 2, 3])
Change-Id: Iab86d73f2edc1f3deaf62f0f43f8b04789696b65
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ia5ed7afc67122f4d70bf2e0169537f936df036a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: If9f7c07ea657ba8503b9188a7b77e301f23423ef
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I5a2c9cb1e9dcca664526b3949671d72d2ffee427
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ie966628d020eb010eb5ecc3279fed2b002975728
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
The implementation is supposed to call arg[Symbol.match].
Change-Id: Ia8028d259e152b1e65eb6b0e817ef60bdc0d37e2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Id632a4f4648f68f3b46d31f84e4ee05c86391f3e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Move properties from RegExpObject to getters in RegExp.prototype
to be compliant with the JS spec.
Implement support for the sticky flags ('y') and correctly parse
the flags in the RegExp constructor.
Change-Id: I5cf05d14e8139cf30d46235b8d466fb96084fcb7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Id94c3cc25835b53bae08713cdd8f2e384d907690
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of using a re-export, it's also possible to write
import { foo } from "./bar.js"
and then export it again
export { foo }
Typically exported variables are referenced from the locals, but since
we don't add imports to the locals, we need another way of locating
them. This patch uses the index space after the locals in the internal
class for imports, so that after we've identifier the export in the
local export entry table, we can use the local name to search in the
internal class and find imports past the locals.
Change-Id: I58ab79ad3df1bbc1b972f0a2771d9ca1268de27b
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The evaluation of a module can have side-effects by modifying the global
object or objects in it. Therefore even a seemingly empty import such as
import "./foo.js"
needs to be listed in the module requests. It's also important that they
are evaluated in the order of declaration. Therefore we collect all
module requests separately - even those that don't have import variables
to process. This patch also ensures that the export and import
declarations are visited in the correct order, by unifying both AST
nodes to be hooked into the statement list.
The fact that we connect the module list items into a statement list is
solely an artifact of re-using defineFunction() which takes a
StatementList as body.
Change-Id: I75dc357b2aecfc324d9a9fe66952eff1ec1dfd8a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Select the correct head when finishing the linked list for ImportList
AST nodes.
Change-Id: I34ae2ccfd0e969dbd92ce2458de019bb02046aa5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
|