aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
Commit message (Collapse)AuthorAgeFilesLines
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-242492-215825/+0
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* DebugMessageService: Remove unneeded dataAurindam Jana2012-02-221-6/+3
| | | | | | | Do not send version info of QMessageLogContext. Change-Id: I32dd4a548ee2b918e5d04dcdffd4d5545fd2f54f Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Add test verifying that QObject-derived pointer is passed correctly.Matthew Vogt2012-02-222-0/+57
| | | | | | | | Ensure that an object derived from QObject is correctly passed to an invokable function from QML. Change-Id: I71eefe8c480e1f1574804d05244b53f29c7fbf0d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Implement String.localeCompare() using QString::localeAwareCompare()Martin Jones2012-02-222-0/+48
| | | | | | | | v8's localeCompare() implementation is not locale aware, so we use Qt's locale aware compare. Change-Id: Ia9092b3d6754545bb797adac26080ac7a29dcd92 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* DebugMessageService: Also pass Debug Context InfoAurindam Jana2012-02-211-5/+31
| | | | | | | | Use QMessageHandler which provides context information such as line, file and function for the debug output. Change-Id: I475faf4a1363d8419dec910b8a23cc44666c1908 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* v8profiler: Actually submit dataKai Koehne2012-02-212-25/+41
| | | | | | | Fix regression introduced in 82dfecab3. Change-Id: Icd90c483b9b2fde8d4cf522f3a35368cd395b120 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Renames QAnimation2ChangeListener to QAnimationJobChangeListenerCharles Yin2012-02-213-7/+7
| | | | | Change-Id: I921b252380d095fb878b4e5d36df0b5a13a3888f Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add optimizations for QJSValue tests for MSVC.Jędrzej Nowacki2012-02-211-6/+0
| | | | | | | | The comment is not valid. It was added for QScriptValue generated test which are not included in QJSValue tests. Change-Id: I958e3c1d1f57cfa0ad34d1a8c8387deec792efaf Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* DeclarativeEngineDebugService: Fix CrashAurindam Jana2012-02-211-0/+7
| | | | | | | | Iterate through contents of QVariantMap to convert QObjects to streamable type. Change-Id: I2cb64a84aef674904de43f9a0c0fee539b87a59a Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Console API: Pass context information from js to qt logging frameworkKai Koehne2012-02-202-47/+26
| | | | | | | | Log the file, line, function context from the original calls in js. Also print the stack trace as part of one multi-line message. Change-Id: I53836df081f3ce06e9b52ebb647ba172ff6bdbef Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Stabilize test.Michael Brasser2012-02-201-4/+4
| | | | | Change-Id: I5b4c4298653186216e6e093ce3194cfde0cd51b9 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Make QLocale::uiLanguages() available in Qt.locale() objectMartin Jones2012-02-172-0/+42
| | | | | | | Available as uiLanguages property returning an array of strings. Change-Id: Ic698bbaff2eb0f9f6720ae06952c12a987298964 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Set the type for unary expressions in v4.Michael Brasser2012-02-163-0/+74
| | | | | | | | | Previously unary expressions were being discarded because the type was not set. Also add tests verifying the results. Change-Id: Icbb493fbb6f036e59c8a4a1fe232c118312a63a5 Reviewed-by: Chris Adams <christopher.adams@nokia.com> Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Fix warnings in sequence wrapper codeChris Adams2012-02-153-0/+133
| | | | | | | | | | | | | | | Previously, the sequence wrapper had unsigned int / signed int comparisons (due to Qt container classes only allowing signed int indexes (where negative indexes are invalid). This commit ensures that unsigned indexes are bounds checked appropriately, and also fixes a warning due to QString construction from QByteArray. Finally, it updates the documentation for sequences to clarify the indexing semantics. Change-Id: I4c6e133bef6e980a9ccb62ff15a70a5d41537ee3 Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add string comparison test for v4.Michael Brasser2012-02-152-0/+66
| | | | | Change-Id: Ibd98608ca0c757afdde1db18877a5a92cdeb24ba Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Debugger: Rename QDeclarativeDebugTrace to QDeclarativeProfilerServiceKai Koehne2012-02-105-53/+53
| | | | | | | | This avoids naming confusion with QDeclarativeTrace + makes it in line with QV8ProfilerService. Change-Id: Ifd801655044cff3ffdb2a9695ffc9868eeb51663 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Debugger: Consistenly use 'state' instead of 'status'Kai Koehne2012-02-1010-67/+67
| | | | | | | | | Fix inconsistent naming e.g. in QtDeclarativeEngineDebug by always using 'state' instead of 'status'. This is in line with the other source code, which also seems to favor 'state'. Change-Id: I65a7a3bd0eb7dfffeb37b5f8dad15b0a4a78de70 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Debugger: Allow trace service to send data on exitKai Koehne2012-02-094-15/+72
| | | | | | | | Add a statusAboutToBeChanged virtual that allows services to send data e.g. on application exit. Change-Id: I28fa513ab2a12d6973c444aac3062d64a0957207 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Check dynamic slot function for nullness before evaluationChris Adams2012-02-092-0/+29
| | | | | | | | | | | | | | Previously, we didn't check whether the function object handle associated with a dynamic slot's method index was null before attempting to evaluate it, which could cause a crash in some circumstances. This change also adds better error reporting during function compilation. Task-number: QTBUG-24064 Task-number: QTBUG-24037 Task-number: QTBUG-23387 Change-Id: I3c5e35e8c16187870125736013a5935fcc5cb1f2 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Handle exceptions while compiling v8 bindingsChris Adams2012-02-092-0/+33
| | | | | | | | | | | | | Previously, no exception handling existed, which could cause a crash if an invalid v8 binding expression was generated. Such invalid bindings should usually be rewritten into valid form by the bindings rewriter, but in some cases it is too costly to do so, so we need to handle exceptions. Task-number: QTBUG-24064 Task-number: QTBUG-23387 Change-Id: I7da12a936780a561c9e9cad3a4a7b62c06d6973e Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix error in qdeclarativeecmascript autotest.Jason McDonald2012-02-091-5/+2
| | | | | | | | | | | | The test did not correctly ignore warning messages, but instead ignored too many messages for one data row and too few for another data row. This error was exposed when testlib was changed in qtbase commit d9e35e2884cc75969f0eb860082ea11f8bb95a64 to be more strict with checking that all ignored messages are correctly produced. Task-number: QTBUG-24156 Change-Id: Iae73fb26bda83317256c504a8cb3d45783444f66 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Rewrite multiline strings properlyAlan Alpert2012-02-092-0/+46
| | | | | | | | | | | | | | | | Because the bindings rewriter works on code strings, it would leave multiline strings across multiple lines (which is illegal in ECMAScript. It now manually breaks them up when it sees them, by replacing a \n character with a literal \n. Since RewriteSignalHandler now likes to have the AST passed in too, the related method in QDeclarativeCompiler (and its customers) have been altered to use the QDeclarativeScript::Value instead of just a string. Task-number: QTBUG-23387 Change-Id: Id060de37e70590c9da2a902038ed02d948fdd70f Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Disable broken testGunnar Sletta2012-02-081-0/+2
| | | | | Change-Id: I3588153c37ef3d2ced43dba308502dd06428e0a6 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add and use new animation backend.Michael Brasser2012-02-0712-0/+3590
| | | | | | | | | The new backend improves performance, and allows us to create multiple running animation jobs from a single Transition. It is based off of the existing Qt animation framework. Change-Id: Id1d0162f6e5c65bf31267f3f9f2042c354375d57 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix crash bug related to QDeclarativeListModelCharles Yin2012-02-031-0/+22
| | | | | | | | | | If QDeclarativeListModel is deleted, all references to this object in QDeclarativeListModelWorkerAgent and WorkerScript objects should be removed and additional checking is needed when process the pending sync() events. Change-Id: I12b1f06699cc908e684af0886cf06d811c3fceb4 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Ensure || expressions in v4 will always exit.Michael Brasser2012-02-032-0/+30
| | | | | | Change-Id: I7188e38403fec96f83f3bdfc68b763a9aec9346a Task-number: QTBUG-24038 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Remove QtQuick1 elements from qtdeclarativeMatthew Vogt2012-02-0331-50/+43
| | | | | | | | QtQuick1 is now contained in a separate repository. Task-number: QTBUG-23737 Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove QJSEngine::undefinedValue() functionKent Hansen2012-02-021-32/+32
| | | | | | | | | | | | | | | | Rationale: It's strange to have an undefined value factory function. There should just be one way of constructing undefined values: By passing UndefinedValue to the QJSValue constructor. The undefinedValue() function created a value that was bound to the engine; the QJSValue constructor does not. In order to ensure that we're testing the same behavior as before, I've replaced undefinedValue() calls by toScriptValue(QVariant()) in the autotests. Task-number: QTBUG-23604 Change-Id: Ie9295b7af49c853b5a4a3445da48c325fef8d6b1 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
* Debugger Test Case: Fix failuresAurindam Jana2012-02-021-10/+11
| | | | | | | | | Fix test cases related to verifying debug messages. Task-number: QTBUG-23977 Change-Id: Ieab6a5975bff1ef7fcee3eb1befe0c544a63ea1f Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Revert "Mark tst_qdebugmessageservice as insignificant until it passes again"Alan Alpert2012-02-021-2/+1
| | | | | | | | This reverts commit 27427efbb9c898b08de92e6b0a1b4d890fcdcabc, as it passes again. Change-Id: Ie05729c024c748ff5c4c58c143ee8601f7c466c2 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QJSEngine::nullValue() functionKent Hansen2012-02-021-20/+20
| | | | | | | | | | | | | | | Rationale: It's strange to have a null value factory function. There should just be one way of constructing null values: By passing NullValue to the QJSValue constructor. The nullValue() function created a value that was bound to the engine; the QJSValue constructor does not. In order to ensure that we're testing the same behavior as before, I've replaced nullValue() calls by evaluate("null") in the autotests. Task-number: QTBUG-23604 Change-Id: Ie40b61fa64e070b90c6245fd21554963073c5f80 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove QJSValue constructors that take QJSEngine argumentKent Hansen2012-02-024-234/+220
| | | | | | | | | | | Rationale: These were remnants from QtScript. The difference from the standard constructors is that the value is eagerly bound to the engine, so they can be a bit faster. But they are also more low-level and look ugly in use. Task-number: QTBUG-23604 Change-Id: I5dae7452389383f60055d5ccc4f28d53c52f6092 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove QJSValue::propertyFlags() functionKent Hansen2012-02-023-86/+0
| | | | | | | | | | | | | | | | Rationale: The API is incomplete. There is no way to set/update the flags; adding a third (optional) argument to setProperty() is ugly. If necessary, a QJSPropertyDescriptor API should be added, to enable complete setting/querying of properties. The flags were moved to QJSValuePrivate, and the propertyFlags() implementation kept, because there is one place the read-only flag is checked internally (in qv8typewrapper). Task-number: QTBUG-23604 Change-Id: I089dce28dbda428662aac7c8d1536987fe6d855c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove invalid QJSValue typeKent Hansen2012-02-023-166/+158
| | | | | | | | | | | | | | | | | | | Rationale: It's confusing to have an invalid type (which doesn't exist in JavaScript), and it creates lots of extra cases that have to be handled e.g. in value conversion and comparison. The Undefined type should be sufficient. Also, the invalid value type was being (ab)used to 1) make setProperty() act as a property deleter, and 2) signify that a property queried by property() doesn't exist. The recently introduced functions has(Own)Property() and deleteProperty() now provide that functionality. Default-constructed QJSValues now have the Undefined type. Task-number: QTBUG-23604 Change-Id: I1847492724d31e03ee1212c09ec87a2010920dc5 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* QmlProfiling: don't send v8 data if not profilingChristiaan Janssen2012-02-021-2/+7
| | | | | | Change-Id: I41085ed06bcf28e9de0a72f25076b91b9a3b2aea Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Fix outdated license headers.Jason McDonald2012-02-015-7/+7
| | | | | Change-Id: I8448e0d3dbce0c18f38a1ed9b6e2d75ba83f7088 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove QJSEngine::newVariant() functionKent Hansen2012-02-012-164/+25
| | | | | | | | | | | | | Rationale: This is a remnant from QtScript. There is no reason one should be able to explicitly wrap an arbitrary C++ type in a QVariant. toScriptValue() will automatically wrap the type in a QVariant if it's a type that's not specifically handled by the meta-type system, or if it can't usefully/losslessly be converted to a native JavaScript type. Task-number: QTBUG-23604 Change-Id: I5790cd92b9ffd5fcfbee1cd73a8eaa16fc74846f Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove QJSEngine::newDate() functionsKent Hansen2012-02-012-17/+18
| | | | | | | | | | | | | | Rationale: Passing a QDateTime to toScriptValue() should be sufficient, there's no need to have a dedicated factory function for Date objects. QDateTime has API for specifying a time in milliseconds, so the newDate() overload that takes a double argument should be redundant. Task-number: QTBUG-23604 Change-Id: Iec1d4ce8e1fd0a6ebef58dde3141730d27c2fb8c Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove QJSValue::instanceOf() functionKent Hansen2012-02-013-46/+2
| | | | | | | | | | | | | Rationale: This is a remnant from QtScript. There is no good reason for providing this type of low-level "prototype inheritance chain" checks in this high-level QJSValue class. If you want to check if an object is of the "right type", you can check if it has the properties you require using property(). Task-number: QTBUG-23604 Change-Id: I3a274212cc57c38228fab73423af481e1b95d8a5 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* QJS{Engine,Value}: Remove QRegExp-specific functionsKent Hansen2012-02-012-36/+31
| | | | | | | | | | | | | Rationale: QRegExp regular expressions have different semantics than JavaScript RegExp. This can cause data loss and unexpected behavior. qjsvalue_cast() and fromScriptValue() can still be used to convert between QRegExp and JS RegExp. Task-number: QTBUG-23604 Change-Id: Iacf4aaea232aff9e4cecf4afa40753229bc5d643 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove QJSValue::toUInt16() functionKent Hansen2012-02-012-158/+0
| | | | | | | | | | | Rationale: Remnant from QtScript. The implementation is just zeroing the upper 16 bits of the 32-bit integer conversion. Task-number: QTBUG-23604 Change-Id: I6b4b40883da01713d2a946eb028264f3a351276b Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove QJSValue::toInteger() functionKent Hansen2012-02-013-89/+1
| | | | | | | | | | | | Rationale: This is a remnant from QtScript. A function called toInteger() that returns a double looks strange. Use toInt32() to convert a QJSValue to an integer. Task-number: QTBUG-23604 Change-Id: I2829704c64b077fca264b660c46248c3f35cb5c0 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Remove QJSEngine::toObject() and QJSValue::toObject()Kent Hansen2012-02-014-232/+39
| | | | | | | | | | Rationale: There is no compelling usecase for these functions. They are a remnant from QtScript. Task-number: QTBUG-23604 Change-Id: I6d8b4299956dd8f6284934739c4f1a65e4deb64c Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Mark tst_qdebugmessageservice as insignificant until it passes againAlan Alpert2012-02-011-1/+2
| | | | | | | Task-number: QTBUG-23977 Change-Id: I1dbbad33788b3a52866fc4b48c96152a8c93f280 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3088-88/+88
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Improve QRegExp property literal assignment error messageChris Adams2012-01-272-6/+25
| | | | | | | | | | | Previously, the error message given when a string literal was assigned to a regular expression property was not very helpful. This commit adds a better error message. Task-number: QTBUG-23068 Change-Id: Ia57b6434b9cdf009429e7b55edab4ab5c2b91c2a Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix breakage due to meta-type id reordering in qtbaseKent Hansen2012-01-261-1/+1
| | | | | | | | | | | | | | | Commit aee1f6cc413f56bf4962324799ee3887c3dd037f in qtbase changed the order/IDs of the "extended" meta-types, so that they are not bigger than QVariant::UserType (127) anymore. This caused autotests in qtdeclarative to assert/fail. Ths commit adapts the logic in qtdeclarative accordingly, in particular so that QVariant/QObjectStar aren't treated as value types. Change-Id: I3e6c0b2c9fb04bfd7f7fd94da2741f9536229b87 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* tst_qdeclarativedebugjs: Use new QJSValue::call() overloadKent Hansen2012-01-251-66/+65
| | | | | | | | | | | | | | The old QJSValue::call() function that takes a this-object as the first argument is going away. The new overload simply takes a list of arguments, so that the "dummy" this-object doesn't have to be explicitly passed. The new function callWithInstance() can be used to call a function where you want to use a specific this-object. Change-Id: I2d9bd79f8e5d00a2b89568171ccc5ffcee52686c Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* tst_qdeclarativedebugjs: Don't use QJSValue::isValid()Kent Hansen2012-01-251-16/+16
| | | | | | | | | The QJSValue::isValid() function is being removed. !value.isUndefined() can be used to check if a value is defined. Change-Id: I91e96bb7f76a5c31edaa409aaf4a1b1fffbc5317 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com> Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Move sqldatabase into a module API pluginCharles Yin2012-01-2516-20/+51
| | | | | Change-Id: Icd0bbfe16804abf1bbadbabddf3a30b5b18df30c Reviewed-by: Martin Jones <martin.jones@nokia.com>