Commit Graph

6667 Commits

Author SHA1 Message Date
Simon Hausmann 4fc0a4fa75 Fix enumerating QObject properties
Make sure to enumerate the properties as well as the invokable methods.

Fixes various tests in qmltest

Change-Id: If40dbc8f2203f99d75523e40f78849224e301481
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-21 16:11:33 +02:00
Simon Hausmann 68d25720f0 Mark a sub-test in qqmlecmascript::scope() as xfail
This test relies on the global object vs. context ordering and consequently
fails right now

Change-Id: I6b6cec38bf2d2074c2fcfacf9b499bc7a97cca44
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-21 16:10:08 +02:00
Simon Hausmann daa2c41906 Fix tst_qjsvalue::engineDeleted()
Move the engine pointer from QJSValuePrivate to PersistentValuePrivate
and set it back to null in the memory manager destructor.

Change-Id: I904b365221e1559701353cb359eac768928ad918
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-21 16:09:36 +02:00
Mitch Curtis 93a68a6ef1 Fix some Canvas/Context2D documentation issues.
Task-number: QTBUG-23597

Change-Id: I7b3c343a822c136cecec5ce9ce705f2d99466e77
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-06-21 15:42:09 +02:00
Lars Knoll 4041464b00 Fix expected error message
Change-Id: I41ebd1506b0d1675cac1205d5fd8f60fd751a4aa
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-21 14:56:40 +02:00
Lars Knoll 38cd35edcd Fix conversion of variantlists to ArrayObjects
Fixes a crash in the qquickmultipointtoucharea test

Change-Id: Ic1ca5220e5e7a569e3cc499ba120296fb885d6c0
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-21 14:56:30 +02:00
Lars Knoll 34b69c3ce4 Fix expected test output for one list model test
There's no reason to disallow calling model.set() with
an ArrayObject as argument.

Change-Id: I44baad677ca34e1fb4188b89f0a548af84580b4f
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-21 14:14:02 +02:00
Simon Hausmann 5a59ca0d22 Remove XFAILs that was due to strict mode
In non-strict mode we can use with() and eval() again, and so these tests pass.

Change-Id: I66b16653a28b1d7e420e53c012d7908c8fc6c29a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-21 14:11:48 +02:00
Simon Hausmann d6fef5e9a9 Mark test as xfail that assumes writability of the global object
As discussed, this needs to be fixed post merge

Change-Id: Iebdc06da4977158b5d6190b3f093f8962459e109
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-21 14:11:33 +02:00
Lars Knoll 6d652b8345 Disable the v8profiler, not the qml profiler
Change-Id: I6113ef5cefa5be8d53e45857ab76c23deb6fe805
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-21 13:59:20 +02:00
Lars Knoll dac2e56f09 Skip some tests that are failing because of our date time parser
The parser needs to be fixed to better parse localized dates, times
and timezone fields

Change-Id: I6542ee459e7135b6f845fb5fc89685cb8c2d67c5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-21 13:59:08 +02:00
Lars Knoll b2aa064a74 Disable some debugger tests until we have a reimplementation for v4
Change-Id: I273fba969c72299e84c091afd7d4a43f9dbd1bf8
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-21 13:01:48 +02:00
Lars Knoll 2fbea36bb4 Revert to non strict mode for qml expressions etc.
Forcing them to strict lead to too many incompatibilites
to 5.1, so let's rather leave them non strict

Change-Id: I7c3bafc9a840daa565add7abbad0d0042cdae332
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-21 13:01:36 +02:00
Lars Knoll eec8fbd98f Fix scope chain for eval in strict mode
Change-Id: Ie00046f98a126cd46cd79758a78be1d0e1d17c61
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-21 10:44:29 +02:00
Simon Hausmann 343978ce54 Fix qqmlvaluetypewrapper auto-tests
QQmlValueTypeWrapper stores its prototype in a global variable
(PersistentValue), which doesn't work when using multiple engines. Instead
this patch introduces the QML extensions structure to hold things like
prototypes for type extensions to JS that are specific to QML.

Change-Id: I41a71029edb6ce895eb80db7aa0809aab86b31db
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-20 21:57:28 +02:00
Gunnar Sletta e357f01539 Revert "Cut performance cost in QSGContext::prepareMaterial()".
This reverts commit 0e9cd8b409.

This optimization breaks ShaderEffects with changing fragment
and vertex shaders and needs some more thought.

Task-number: QTBUG-31837
Change-Id: I1abe249c65dd785825c249a7c22baee928bd76c8
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
2013-06-20 21:31:47 +02:00
Frederik Gladhorn 2402d3a303 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I5cc2cacd26004ba18f0c6214759f5e073b5c6cfb
2013-06-20 16:19:05 +02:00
Frederik Gladhorn a2457771ed Merge remote-tracking branch 'origin/release' into stable
Change-Id: I6bd61ebda17c34f51a4c4ece4852ab144bf542a6
2013-06-20 16:15:26 +02:00
Simon Hausmann 0117641a5b Fix instanceStateValues xhr test
Writing to a read-only property or trying to deleting will throw an exception
in strict mode and thus abort the execution. Make the test work in strict and
non-strict mode by surrounding the offending statements with individual
try/catch pairs.

Change-Id: I25f803b6ffd7ef721ac874f53a37b3208b5c05ab
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-20 08:50:21 +02:00
Shawn Rutledge 24947fb8cc QColorDialogHelper: Force QWindow before setting flags
This needs the same fix as the one in the QFileDialogHelper (change
I7a3b2321f4a1bf179dced8e98598559f396386db).  However to be even safer,
we can check for a null pointer before calling any methods on the
QWindow.

Task-number: QTBUG-31834
Change-Id: I319326f06fb2c92dc898fd12be86b6c7b7f87e5a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-06-19 15:39:12 +02:00
Erik Verbruggen 1e6dbe88cb Prevent generating jumps to blocks following the current block.
Copied the JIT logic for it.

Change-Id: I4a11f4c8ede1d093f367b714d92b393c810b4fb5
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-18 16:58:16 +02:00
Erik Verbruggen 591633fdce Remove the index magic from the temp.
Change-Id: If746ebdd6f29d7140781869af6d589cc4c5b8c9e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-18 16:57:41 +02:00
Simon Hausmann d79234ed18 Fix tst_qqmlecmascript::functionAssignmentfromJS_invalid
Remove the column number from the expected output, as we generate those
QQmlBinding objects from within a v4 callback and produce the line number
and column number from the stack trace of the engine, which currently
doesn't produce column numbers.

Change-Id: I9840f0ab571d4261570dd079436aaa9f81e27abf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-18 16:55:25 +02:00
Simon Hausmann b0cf10cf2d Fix tst_qqmlecmascript::functionAssignment_afterBinding
When calling Qt.binding(f), don't modify f and set the bindingKeyFlag
there, but instead we must return a _new_ function that acts as proxy
and has the bindingKeyFlag set to true, similar to how the V8 based
implementation created a clone.

Change-Id: I4998359869c02e32c89e929793bf74a4adafcb72
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-18 16:47:32 +02:00
Simon Hausmann 9185f1e207 Fix tst_qqmlecmascript::functionAssignment_fromJS
Make the test-case compile with strict mode, where function declarations
are not allowed within blocks. An alternative would be to use function
expressions here.

Change-Id: If7e1cc23ef4a0c6a83e4ba8ae03dc9c6b678730d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-18 16:45:41 +02:00
Simon Hausmann 82ca7d96e9 Fix tst_qqmlecmascript::functionAssignment_fromBinding
Function declarations in QML mode should be similar to function expressions and
therefore need to go to the return value of the function..

Change-Id: Ib1dd8a970a967f2456d0558be74edf5d74d288e5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-18 16:44:54 +02:00
Venu d6dc07f615 Doc: Changed the title to avoid name conflicts and linking errors
Task-number: QTBUG-30173

Change-Id: Ibf6626cdfc205c48ca634491661c87414bbddf24
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2013-06-18 14:26:28 +02:00
Lars Knoll 9262851159 Fix two more errors in the worker script auto test
Change-Id: Ib1359a985efae18cd4fc8344b81092af57f1a9d4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-18 13:49:44 +02:00
Lars Knoll 1075939a2b Fix parts of workerscript
The worker script creates a special QmlContextWrapper
that doesn't contain many things found in the main thread.
However we still need to be able to cast to it, so it
should be the same class as the regular context wrapper.

Fixes parts of the worker script auto tests.

Change-Id: I3697b2b0080dc4ac967eb447e2efd0f28fbab465
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-18 13:49:18 +02:00
Simon Hausmann eec01627c7 Fix inifite loop when running ecmascript tests
Revert the initialization part of 42825af048 in
the IR, apparently it is needed.

Change-Id: Ia415133ee2fb6cd060fa5a0e5da7b711ac98ddd1
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-06-18 13:00:00 +02:00
Tasuku Suzuki 5d4b006181 fix case insensitive issue with image provider id
Task-number: QTBUG-31614

Change-Id: I866df6e3ed6226b443640a51f66a3dbb92b31249
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-06-18 11:05:18 +02:00
Stephen Kelly ad92ce206d Remove use of 'register' from QtQml.
Change-Id: Id9848e3161346c7519d430c47718670cabe556de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-18 08:34:40 +02:00
Lars Knoll 2b2b8c8a29 Fix the first half of qqmllocale auto tests
Change-Id: I0f37208eaefcb668d3b61d294129134cfaa7c8f4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-18 07:59:31 +02:00
J-P Nurmi 1037a7f712 Add QQuickText::hoveredLink
Task-number: QTBUG-30804
Change-Id: I6c6993b152285f4bdf34d6e1aa04f25fa7ca41e0
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-06-18 07:50:11 +02:00
Tasuku Suzuki ef5e8d5b6e Fix dead lock when showDotAndDotDot is set to FolderListModel
Task-number: QTBUG-31687

Change-Id: Iaec798018f54f80c67fe5a06defee73ab7b79605
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-06-18 00:45:22 +02:00
Simon Hausmann bf9dcc6551 Fix url test in qqmllanguage
In V4 URLs were mapped to strings, with V8 they were mapped to opaque
variants, which is also what we do with v4 at the moment. In the future
we want to provide a real JS API for URLs, but that is a feature that
should be discussed in a wider scope and developed on the dev branch.

Change-Id: I17660066b2797239eddebad03f49ffa424f86f78
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-17 21:21:25 +02:00
Simon Hausmann 258c120d82 Make it possible to evaluate JS with the v4 tool the QML way
Change-Id: I2a40e82612c2da1b52a37cbff2507951e4ac0349
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-17 21:20:41 +02:00
Lars Knoll 530769c9ff Fix the console autotests
Change-Id: I8936c6baa274e673c23c65637fa199a6140e0a15
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-17 14:29:02 +02:00
Lars Knoll 39fe77d048 Fix qmlmin test
Exclude the test262 test suite, as qmlmin can't deal with
all of the test cases there.

Change-Id: Ie56c0d9adecc6b1ae0ddcbcd3edd5b0eaf30cd4d
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-17 13:56:23 +02:00
Lars Knoll b7731f69f1 Fix the remaining test failures in the jsonbinding autotest
Skip properties that are function objects when converting a V4 Object to a
QJsonObject. For arrays the function object gets replaced with null.
Fix the test case for arrays to have the correct expected output.

Change-Id: I3ee63935d038e0922e33ac6e64e9c31ecfbd4a7e
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-17 13:52:24 +02:00
Lars Knoll 3436b58928 Fix memory corruption in qjsvalueprivate
When converting to a memory managed string, we need to add
the PersistentValuePrivate to the chain of persistent objects.
Otherwise the string stored in the JSValue can get garbage
collected.

Change-Id: I159fd77a7ae6f29e4121969cac962bd12b0f9bc7
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-17 13:37:47 +02:00
Lars Knoll 227f7ed60c Fix and enable the qmldirparser autotest
Change-Id: I2e9b64e5df63dbd9fffc204b7058d3c77255b09c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-17 11:44:07 +02:00
Lars Knoll 21705ae91e Fix most qjsonbinding auto tests
Change-Id: I67476bc7e931e2f4790e859d4a3c00c050752271
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2013-06-17 11:43:48 +02:00
Gunnar Sletta 70cf8ffcf9 Prefix internal classes properly and private export them.
Without the private export on these classes, the private
export on the QSGDefaultImageNode and QSGDefaultTextureNode
is useless, as the symbols fail to resolve

Change-Id: I25a265a7669e5f5015c482aa24fe154c2c9a1062
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-06-17 08:33:50 +02:00
Simon Hausmann 59fd742adc Mark the eval() test as xfail
eval() works differently in strict mode, and it's nicely covered by
test262

Change-Id: I9bb84753032d5106c94d78afe765680f3d85348d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-17 08:01:41 +02:00
Simon Hausmann 42825af048 Revert "Local initialisation is now done in codegen."
This reverts commit 2bd6e240a3.

This doesn't work properly as the code generator will not keep those
initializations at the beginning of the function, resulting in
uninitialized values in ctx->locals[], which gives valgrind warnings
when they're marked.

Change-Id: I81501e0ea80e7f76b7d9112fea261e406084b69b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-17 08:01:11 +02:00
Simon Hausmann e3ee3ecc02 Revert "Local initialization is now done in codegen"
This reverts commit 01526deb81.

This doesn't work properly as the code generator will not keep those
initializations at the beginning of the function, resulting in
uninitialized values in ctx->locals[], which gives valgrind warnings
when they're marked.

Change-Id: I8f671c85b6744c80b6fe11b628bf6b6de125a6bd
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-17 08:00:43 +02:00
Simon Hausmann 02f2cef57f Adjust expected error message for qqmlecmascript::qtbug_22843
Change-Id: Ib6f58c2d7ee5e4f03fcc755d2290bdf204e3aa61
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-17 08:00:20 +02:00
Simon Hausmann 6b71ae03f3 Re-enable two disabled var property tests and make them pass
When marking the var properties of a VME-metaobject (we decided to keep its
QObject alive), then we must also mark the var properties of the parent
VME-metaobject. The two property var inheritance tests verify that.

Change-Id: If1f0d4f3daef78d42adb7052cc1ce7bbdd6da585
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-15 15:27:33 +02:00
Simon Hausmann b5932a162a Fix qqmlproperty::warnOnInvalidBinding
* Add column to expected warning message
* Get rid of eval that doesn't make sense with only one JS engine
  and doesn't work in strict mode

Change-Id: I63cd3784cd8c255af8832ea5ca1e6e5e2d48431e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-06-15 15:26:19 +02:00