| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
It gives different error message based on the case sensitivity of
the file system on Mac.
Task-number: QTBUG-32652
Change-Id: I52415126e63978c9f80b7652e0116e0e07703fd8
Reviewed-by: Liang Qi <liang.qi@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QML code looks like this:
MyRevisionedClass {
prop1: prop2
}
and MyRevisionedClass is C++ based. We need to return an initialized value when
reading prop2.
Change-Id: I33792c04aa1ba0d8e38c1351b8fb4de7abbe4891
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
The QQmlContextData stores the JS objects of imported scripts in a
QList<PersistentValue>. Instead of indexing into that list, this patch changes
ctxt->importedScripts to be a JavaScript array, that in the IR we can index via
subscript.
Change-Id: Ie2c35fb5294a20a0b7084bb51d19671a27195fec
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I674da7f77dde380fb0772d5077da84de875b6ce8
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
objects at QML compile time
This avoids having to do a string lookup for ids and in the import cache at
run-time, before we can do a string hash lookup in the property cache. Instead
we resolve final properties in the context and scope object at compile time and
look them up at run-time using their index instead. The dependencies to these
properties are also tracked separately and recorded in the compiled data.
This is merely the initial patch. There's a lot left to do, such as having
specialized getter and setters for specific property types. Setters are missing
altogether right now and will fall back to name lookup.
Change-Id: If3cb4e7c9454ef4850a615f0935b311c9395b165
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Test was only passing the time to the format function, thinking it was
the only part under test, but the date is also relevant due to DST being
part of the formatted output.
Task-number: QTBUG-34406
Change-Id: I1f542b58907281632ee3c96b9b5b38426936953e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before all new objects were pushed into the end of QVector,
i.e. if item model changes object with low index newly created object
will be added like it has big index. So, removing objects from
instantiator was buggy.
Task-number: QTBUG-33847.
Change-Id: I49fba53a40fce72060b629f737c10b525c67cc86
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
When the initial value of a QML Settings var property is invalid
ie. it has no initial value set, it must be loaded from QSettings
as is without testing QVariant conversion (that would fail when
the conversion target type is "invalid").
Change-Id: If002d52251e3f2d6373dcc305b439de61c6b8c79
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
|
|
|
|
|
|
|
|
| |
We prioritize getting other fixes into QtQml right now, so skip these tests.
According bug is filed.
Change-Id: I9b824e41d2164906b22282e75aa80a69a4ce5652
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
| |
Replace all try/catch statements used when parsing
with checks for engine->hasException.
Change-Id: I4493cb600d5a3eb095c2003bb88bd031403e47c9
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
There was a bug in addPragma where url() was being used instead of
finalUrl(). This resulted in an error finding the type if selectors
were used. This patch includes the fix and adds a unit test to cover
the use case.
Change-Id: I18b6c73e96af2e1464931de76f1f8fd804746d82
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I47507a4d7d1b429b9c43ed3a7822079efe577327
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
Don't pass a QVariant pointer for the return value when we're
not interested in it and the return type might not even be a
QVariant (that would be only true for QML methods).
Task-number: QTBUG-32801
Change-Id: I8f14e40d8f94caef7e3d086b776735f0484dbf0e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
Partially revert 8ed38c70 to also test qqmlprofiler, qqmlinspector
on Mac. The tests were unreliable before, but that was fixed with 816e7f11f
in qtbase.
Change-Id: Icca7ff6617ea18d069d4cd95905d76fe59b92e31
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
|
|
|
|
|
|
|
|
| |
Use the correct identifier for the OS X operating system.
Change-Id: Iff433d312c7c808ddce13466be3db628cf3a9890
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
|
|
|
|
|
|
| |
Change-Id: I8d012e9a356676dd3dad246579c7339eaddc1e91
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
QSGRenderThread::syncAndRender first triggers the frameSwapped() signal,
and only then adds the SceneGraphRenderLoopFrame message. We're waiting
for the frameSwapped signal to stop profiling, and therefore can't be sure
whether we'll get the final SceneGraphRenderLoopFrame message or not.
Task-number: QTBUG-33024
Change-Id: I3216667e8e5cdc79f210290ce22cc6b08c579b6a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: Ib36583120ca42835534f0f8494637aeb9618f317
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
|
|
|
|
|
|
|
| |
Do not re-declare variable in local scope!
Change-Id: I4f66081603ce86d78965ac12368bda66d86ff0c4
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
|
|
|
|
|
|
|
|
|
| |
Keep conservative GC as a fallback for testing
Enable all tests again that were skipped due to
GC issues.
Change-Id: I8e0fa728207bdd39a96d0acf95e27841157d8402
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is done by re-using the JS code generator from the new compiler. A few bugs were
fixed on the way:
* The index into the compiledData->runtimeFunctions array is not the same as the function
index when they are collected (from the AST), as for example binding expressions may create
extra V4IR::Function objects that break the 1:1 mapping. Therefore the JS code gen will return
a mapping from incoming function index to V4IR::Module::Function (and thus runtimeFunction)
* Binding expressions in the old backend get usually unpacked from their ExpressionStatement node.
The reference to that node is lost, and instead of trying to preserve it, we simply synthesize it
again. This won't be necessary anymore with the new compiler in the future.
* Commit 1c29d63d6045cf9d58cbc0f850de8fa50bf75d09 ensured to always look up locals by name, and so
we have to do the same when initializing the closures of nested functions inside binding expressions
(in qv4codegen.cpp)
* Had to change the Qml debugger service auto-test, which does toString() on a function that is now compiled.
Even if we implemented FunctionPrototype::toString() to do what v8 does by extracting the string from the
file, it wouldn't help in this test, because it feeds the input from a string instead of a file.
* In tst_parserstress we now end up compiling all JS code, which previously was only parsed. This triggers
some bugs in the SSA handling. Those tests are skipped and tracked in QTBUG-34047
Change-Id: I44df51085510da0fd3d99eb5f1c7d4d17bcffdcf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
The code in the Exception class operates entirely on the engine's data,
so move it into ExecutionEngine instead. This eliminates the need for
a QV4::Exception class and catches and old code that tries to still do
catch (Exception &) instead of catch (...)
Change-Id: Ie608bec6af652038aca6c9423c225a4d7eb13b39
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes the exception handling API in the engine slightly, encapsulating
any use of direct throw statements and catch blocks with concrete types. In the future
we need to be able to change the way these are implemented, in order to ensure that
the correct stack unwinding code is triggered for throw and re-throw.
This patch separates the C++ exception object thrown from the V4 exception
(that includes value, throwing context pointer) and stores the latter inside
the engine.
In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to
move into the QV4 namespace directly.
In addition the syntax for catching exceptions changes from
try {
...
} catch (QV4::Exception &ex) {
ex.accept(context);
QV4::ScopedValue exceptionValue(scope, ex.value());
}
to
try {
...
} catch (...) {
QV4::ScopedValue exception(scope, context->catchException());
}
Context::catchException() checks if there's a "current" exception in the engine,
and if not assumes that we caught an unrelated exception and consequently re-throws.
partiallyUnwind() is also gone and replaced with rethrowException(), in order to
encapsulate the re-throw.
Lastly, in the future nesting try/catch blocks isn't going to be possible due to
limitations in the common C++ ABI with regards to foreign exceptions.
Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
Don't have an implicit cast operator to Returned<T>
anymore, and return a T* from the operator->()
Change-Id: If4165071b986bfc84a157560d94d39c2dcfbc9e1
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need this since it could happen that in QQmlComponentPrivate::loadUrl we did
QQmlTypeData *data = QQmlEnginePrivate::get(engine)->typeLoader.getType(url, loaderMode);
and got a sync QQmlTypeData even if we asked for async, and thus the async loader was never notified
when it finished and we were never loaded.
Situation in which this can happen is:
* ListView with an async Loader as delegate
* Loader loads two items A and B, while A is a B
* Item 0 of the ListView triggers an async loading of A that triggers the sync loading of B
* Item 1 of the ListView triggers an async loading of B
* Since B is already being loaded (though in sync), we just add ourselves to the people that want to be notified
* sync loading of B is done and QQmlDataBlob::tryDone does not call the callbacks because it's sync
* Item 1 is never finished loading
Change-Id: I52a0979a1d3cfcfe73a71196bf24f491d6cf8e9a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ia381d51561f1c183ec7f2e3fcfe49810bfbfcc61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
| |
When an alias declaration is missing a location, report the error with the
location of the alias declaration, not the object declaration. This matches
the code patch in the new compiler, which also reports it accurately.
Change-Id: I709dbddb3273f4e05cc4d63079da52d7224466bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This has the benefit of blocking the GUI thread less and speeding up type
creation in the GUI thread (for types that import js libraries).
This patch also brings one behavioral change: Due to the parsing at type
instantiation type, things like syntax errors for script imports would only
generate a run-time warning and the code in the QML file would just see
"undefined". Errors in the script now generate real errors at component
compilation time, meaning the errors come out earlier and as real errors.
This patch implements the separation for the VME only (to keep the size
of this patch small).
Change-Id: I82f7f3a2d3d4524ea12a7ab62abd8640aba6a47f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
| |
I suspect this got snuck in accidentally.
Change-Id: I4684bf333a19e6c760ea499b751d51be34f51c6f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I11b0b2b7626297e2c98dc77784574da4b59ba8cf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: Ifeb53d6a1334623106428410aa2756935d7ba6e1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I8c10463aa064a25c0170e6b7f294f48501b42319
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
|
|
|
| |
This will simplify finding the remaining direct usages of
QV4::Value that need fixing.
Change-Id: I223099727436d5748027c84c53d9dfc4028e38ed
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
The render thread animations rely heavily on uncontrolled
animations, meaning animations with duration=-1. We support
this by adding a m_currentLoopStartTime and incrementally
counting the finish time of each uncontrolled animation.
Change-Id: I1f2ccea09aff4c51b1a7f98a2ddb58636af50557
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
|
|
|
|
|
| |
Change-Id: I5619d533b6e48c88fda063bc7cdcc62d6838bcdf
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I372f1f3e3e78d45912a913f437e622e0acfc9646
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Don't use unprotected Values in the API anymore.
Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-33658
Change-Id: I5a9f24d49ab894e3cde745cc0c1d44ef0880510f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|
|
|
|
| |
Change-Id: I09198ce372fa545372db389fac26828d21ad5731
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: I99125908a9bc1d41a2642c409af9704def7a0832
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
| |
Change-Id: If2c41daeda2862cd1162c5da8163a9d62fe4111d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
| |
And change the return type to be GC safe
Change-Id: I6d7513962370fea4072a3d8c6b2c6f2d1705992e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
emptyValue is special and reserved for usage inside the
engine to mark missing values. The main to use cases
are when converting property descriptors, and to mark
holes in array data.
Change-Id: I0ed357e65102b1041bf9a878e6e9a4ae0657523b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces Singleton support for QML (Composite Singleton). For
now, the Singleton support is only availabe for QML types in modules
or (remote and local) directories with qmldir file. However, in the
future this support may be expanded to arbitrary QML file imports
without by leaving out the qmldir requirement.
You define a QML type as a Singleton with the following two steps:
1. By adding a pragma Singleton to a type's QML file:
pragma Singleton
The pragma and import statements can be mixed and their order does
not matter. Singleton is the only supported pragma for now. Others
will generate errors.
2. By specifying a qmldir file for the directory of your imported
type and prepending the type with "singleton" keyword as follows:
singleton TestTypeSingleton TestTypeSingleton.qml
Alternatively you may specify a qmldir file for a module and specify
your type as a singleton as follows:
singleton TestTypeSingleton 1.0 TestTypeSingleton.qml
Composite Singletons may be included in a module and may be used with
a local namespace qualifier when imported with:
"import xxx as NameSpace"
A singleton instance is created at first use and stored into the
QmlEngine (one instance per engine) and eventually released by the
engine's destructor.
CompositeSingletonType has a dual nature and will return true to both
isComposite() and isSingleton() calls. In most cases its enough to
check for just isComposite() or isSingleton(). However, there is a
isCompositeSingleton() available as well.
I used "qlalr --no-debug --no-lines --qt qqmljs.g" to generate the
qqmljsparser and qqmljsgrammar files from qqmljs.g.
Unit tests are included.
Change-Id: I91b303612c5e132143b325b9a8f982e9355bc90e
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
|
|
|
|
|
|
|
|
|
| |
It seems that tst_qjsengine also needs:
https://codereview.qt-project.org/#change,65811
Change-Id: I5f5586f004dec047c3a1edebbc98d7ecde195bfd
Reviewed-by: John Layt <jlayt@kde.org>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
|
|
|
|
|
|
|
|
|
| |
This reverts commit 17ae095602bf36ece892598e69f794ef982c603b.
The test can be re-enabled now.
Change-Id: I0134365edbfd4aed05665bf16b8e15221fe62d67
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
|
|
|
|
|
|
|
|
| |
Qt base is still broken on the mac, leading to random
crashes in UI tests.
Change-Id: If636c44169c2386ea2f49d7936ef8d6fe1488537
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
|
|
|
|
|
|
|
|
|
| |
A C++ analog to the protected qmldir syntax, this is also a potential
performance improvement because we can avoid some file system accesses.
Change-Id: I41781a6cc72aa65bd2d397800345ea16ef442e90
Reviewed-by: Antti Piira <apiira@blackberry.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
|
|
|
|
|
|
|
|
|
| |
You can also manually apply them to a QQmlEngine using
setUrlInterceptor(new QQmlFileSelector(parent)), or using
your own QQmlAbstractUrlInterceptor subclass.
Change-Id: I0c0ff8b080c138686b3c03e0bc3b9f25bcd11a85
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
|
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/qml/qml/v8/qqmlbuiltinfunctions.cpp
tests/auto/qml/qml.pro
Change-Id: Ib373aed6a8f8df9521740fb5b080daed38546cd2
|