aboutsummaryrefslogtreecommitdiffstats
path: root/src/declarative
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into animation-refactorwip/animation-refactorMichael Brasser2012-01-25254-591/+1160
|\ | | | | | | | | | | | | Conflicts: tests/auto/declarative/declarative.pro Change-Id: Ie339be2989fac553d351f3077869f1847367b504
| * Allow JS API in modulesMatthew Vogt2012-01-2411-73/+266
| | | | | | | | | | | | | | | | | | Allow modules to export verisoned javascript code into specified namespaces. Task-number: QTBUG-20857 Change-Id: Ic968c697ba36cbc4535870ed5eed2fe7f01af11d Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Console API: Add console.exceptionAurindam Jana2012-01-243-0/+12
| | | | | | | | | | | | | | | | | | console.exception writes a message to the console and prints the JavaScript stack trace at the point where it is called. Change-Id: Idd2ff5982826accae0895db44c7ecf6130338cc7 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
| * Console API: Add console.assertAurindam Jana2012-01-243-13/+41
| | | | | | | | | | | | | | | | | | console.assert tests if an expression is true. If it is false, it writes a message to the console and prints the JavaScript stack trace at that point. Change-Id: I5487552cb8a947e1947914166834e0bdedba3354 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
| * Don't hang the worker script engineCharles Yin2012-01-243-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | 1. Wake up the syncDone wait condition when delete the QDeclarativeListModelWorkerAgent, otherwise the the whole worker script engine thread will hang at the sync() call and can't exit gracefully. 2. Call QCoreApplication::processEvents() before delete the worker script engine to cleanup all pending events in main thread to release wait conditions which some worker scripts/agents are waiting for (QDeclarativeListModelWorkerAgent::sync() for example) Change-Id: Ia3712318771633e68238b4d629ba870ff7ce45b9 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
| * Console API: Add console.countKai Koehne2012-01-244-13/+58
| | | | | | | | | | | | | | | | console.count can be handy to check how often code snippets are executed. Change-Id: I0eaf17ab893c76e7b8956122aa31e218745e92bf Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
| * Update obsolete contact address.Jason McDonald2012-01-23254-275/+275
| | | | | | | | | | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Mark deprecated functions in QJSEngine and QJSValueKent Hansen2012-01-204-38/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | This functionality will be removed or renamed in the final Qt 5 API. From this commit and with deprecated warnings enabled (DEFINES += QT_DEPRECATED_WARNINGS), it's easy to see how existing users of this API (e.g. qtjsondb) are affected. Task-number: QTBUG-23604 Change-Id: I242c43377bb34ddcca84b6ed5b7ef9fbf2017a83 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * Add QJSValue::callAsConstructor() functionKent Hansen2012-01-204-27/+38
| | | | | | | | | | | | | | | | | | | | The old name, construct(), was bad. This name is more descriptive and consistent with the other callXXX() functions. Task-number: QTBUG-23604 Change-Id: Ie205b0c52721782101e665f7dfedcac9051a00d0 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * Add QJSValue::callWithInstance() functionKent Hansen2012-01-202-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With the deprecated call() overload, it was confusing what the first argument was (the this-object or an actual argument passed to the function). Introduce a dedicated function for the "explicit this-object" case. This makes code more readable, and eliminates the need to pass a "dummy" this-object to call() in the quite common case where you don't care about the this-object. Task-number: QTBUG-23604 Change-Id: I18f8be6592a848436351516bea266fc7e9195777 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * Add QJSValue::call() overloadKent Hansen2012-01-202-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | This overload takes only an argument list, not a this-object, since that is a very common way of calling stand-alone ("non-member") functions. Now there is no longer a need to pass a dummy value for the this-object. Task-number: QTBUG-23604 Change-Id: Iae952d91fce5bcaa62a05b9978c15f32802da90a Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * Add QJSValue::isCallable() functionKent Hansen2012-01-202-3/+16
| | | | | | | | | | | | | | | | | | | | | | This replaces the isFunction() function. isFunction() will be removed. It's possible that objects are callable even if they aren't Function instances. Also, "isCallable" is consistent with call(). Task-number: QTBUG-23604 Change-Id: I42e0ab2ad9dc84e7793199254bbd89d5c9466e6a Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * Add QJSValue::toInt() and toUInt()Kent Hansen2012-01-203-5/+31
| | | | | | | | | | | | | | | | | | | | These replace toInt32() and toUInt32(), which are obsolete and will be removed. Task-number: QTBUG-23604 Change-Id: I83c055dbbe399fa7242889cee8a177440a693d9a Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * Add QJSValue::deleteProperty() functionKent Hansen2012-01-202-1/+30
| | | | | | | | | | | | | | | | | | | | | | This makes it possible to delete a property without relying on passing a QJSValue of invalid type to setProperty() (the invalid type is going to be removed). Task-number: QTBUG-23604 Change-Id: I653b3349050ad1aac1cf6ccc8547c753abbb9f1d Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * Add QJSValue::hasProperty() and hasOwnProperty() functionsKent Hansen2012-01-204-1/+52
| | | | | | | | | | | | | | | | | | | | These functions provide a way of querying whether a property exists, without relying on the QJSValue invalid type (which will be removed). Task-number: QTBUG-23604 Change-Id: I2efd53a1e54cc202ecc022d12730b2775384cf53 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * Build fix.Jędrzej Nowacki2012-01-201-1/+0
| | | | | | | | | | | | | | | | QBool was removed from QtBase in change I6642f43f (Remove QBool and use bool instead) Change-Id: Ia4c5d12fae8779d7e8c880755cd16e215f073a6d Reviewed-by: David Faure <faure@kde.org>
| * Doc: Improve Qt.locale docs.Martin Jones2012-01-201-2/+2
| | | | | | | | | | Change-Id: I3ef5c4a0bedbaa346b001852bba8e9ff9347e9e0 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
| * Remove the use of QT_MODULE()Gunnar Sletta2012-01-2050-50/+0
| | | | | | | | | | Change-Id: I1c07231b0bf412fe490a44b9a060bb2e2ef11154 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
| * Assigning empty object to Q_PROPERTY(QVariantMap)Matthew Vogt2012-01-191-7/+8
| | | | | | | | | | | | | | | | | | Correct the evaluation of an empty javascript object during assignment to a QVariantMap property. Task-number: QTBUG-23586 Change-Id: Ifa891a017690a36bd5837bc6b4dd0e47eb515a46 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Allow QML URLs to contain pre-encoded octetsMatthew Vogt2012-01-184-14/+44
| | | | | | | | | | | | | | | | | | Use QUrl Tolerant parsing mode to permit user-supplied URLs to contain pre-encoded octets which are not mangled by string conversion. Task-number: QTBUG-22756 Change-Id: I4b160b04340b95221d1eb3336bda8c0b38d2e232 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Debugger: Simplify protocol of QDebugMessageServiceKai Koehne2012-01-171-6/+2
| | | | | | | | | | Change-Id: I3f97a344b8d0e0d73a75e84310c1e8ed59573ee7 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
| * Fix crash when using namespaces for JS module APIs.Glenn Watson2012-01-171-1/+1
| | | | | | | | | | | | | | Fix unitialized variable in constructor. Change-Id: Ibc39d7512990ad293789280e26797be1ecd1ade1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Update copyright year in Nokia copyright headers.Jason McDonald2012-01-175-5/+5
| | | | | | | | | | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Match QRect changeAlan Alpert2012-01-171-7/+0
| | | | | | | | | | | | | | | | 3b973971fb1e483b9b3514358a415781c3c24ba8 changes the order of data members on mac, the struct we're using to fake QRect needs to match. Change-Id: Id2ecf1726e64514e12dd72980a0c0ad2b693c483 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Console API: Add console.infoKai Koehne2012-01-162-2/+5
| | | | | | | | | | | | | | | | Add console.info for the sake of completeness. It's mapped to qDebug(), just like console.log, console.debug, print. Change-Id: Ife1cfbfe810d4e5e9175343778dff734a56f4a80 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
| * QDeclarativeExpression: storing column number in expression locationChristiaan Janssen2012-01-1619-48/+71
| | | | | | | | | | Change-Id: I2d69738158abfc76f80b1cfc0e0ccb145fda2245 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * lower case QML components are accepted when used with 'as' importMatthew Vogt2012-01-161-5/+20
| | | | | | | | | | | | | | | | | | If an Object Binding is in a namespace, ensure that the Component name begins with a capital letter. Task-number:QTBUG-20786 Change-Id: Id4a0c0fdb0c9b9516bea597a4994bb7519339bc9 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* | Animations may be deleted while changing stateBea Lam2012-01-251-5/+6
| | | | | | | | | | | | | | Move check for deleted animation from setCurrentTime() to setState(). Change-Id: I8160c4cf68f7e7b11185d3190d42e5c375540254 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* | Rename animation backend classes.Michael Brasser2012-01-1911-234/+234
| | | | | | | | | | Change-Id: I8796086097b5464dbe16a92df055e5a153971f21 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* | Port autotests for basic animation classes and make them pass.Michael Brasser2012-01-185-6/+9
| | | | | | | | | | Change-Id: Ifd9ec5817f6c06ccb282ee32e1a86d1465752c2b Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* | Fix regressions.Michael Brasser2012-01-173-2/+12
| | | | | | | | | | Change-Id: I1a961d257801ed98bc06675d34b19833e7486e61 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* | Merge branch 'master' into animation-refactorMichael Brasser2012-01-16254-1113/+2161
|\| | | | | | | | | | | | | | | Conflicts: src/quick/util/qdeclarativetimer.cpp tests/auto/qtquick2/qdeclarativeanimations/tst_qdeclarativeanimations.cpp Change-Id: I981b0d01c71035f6611682e742f4330d0ef7891b
| * Remove out-of-line uses of qMalloc/qFree/qRealloc.Robin Burchell2012-01-125-22/+22
| | | | | | | | | | | | | | | | | | Per http://codereview.qt-project.org/#change,11562, we are trying to remove these in favour of direct allocation, or (in the case of inline code) specialised out-of-line wrappers. Change-Id: I113609c4f97dc5c8020a72cbd398572cdb5b7505 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * Remove obsolete toBoolean() and isBoolean() QJSValue gettersSimon Hausmann2012-01-112-28/+0
| | | | | | | | | | | | | | We should use "toBool" and "isBool" for consistency with QVariant. Change-Id: I266f2a36a034a5b323e614777ceacbc0d2ffec16 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
| * QDeclarativeDebug: Add a debug message service.Aurindam Jana2012-01-094-2/+217
| | | | | | | | | | | | | | | | | | | | | | QDeclarativeDebugMsgService installs a QtMsgHandler which forwards debug output to a client defined port only if the service is Enabled. It also forwards the debug output to the previous message handler. Effectively, this service just eavesdrop on debug output, forwarding it to a port only if a client is connected. Change-Id: Ie0ee7bab57ef8f03a2de34d91921f054a7ec147f Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
| * Fix importing of files on Windows.Friedemann Kleint2012-01-071-1/+1
| | | | | | | | | | | | | | | | | | Do not create local file Urls by adding 'file://' + path, use QUrl's logic to correctly add missing slashes for Windows drive letters. Change-Id: I1a8a58a0d88ef291bb814303747ce53093be17a2 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * QDeclarativeEngine: Polish code for file name case check.Friedemann Kleint2012-01-061-9/+8
| | | | | | | | | | | | | | | | | | | | - Use Q_OS_WIN instead of Q_OS_WIN32 - const-correctness - Use QString::fromWCharArray() Change-Id: I67aa4bb69240cf187832ea456dd74d2909e7ae62 Reviewed-by: Kai Koehne <kai.koehne@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
| * Improve QML error messagesAaron Kennedy2012-01-063-11/+25
| | | | | | | | | | | | | | | | Point at the actual property and method name when raising errors about them. Change-Id: Id36df4850b91ae0d225fcda4d101f4b2a073a72e Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
| * Update copyright year in license headers.Jason McDonald2012-01-05249-251/+251
| | | | | | | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
| * Added a link to Number::toLocaleCurrencyString in the doc.Denis Dzyubenko2012-01-041-0/+1
| | | | | | | | | | Change-Id: If44cc225d132bd309efdb250aad74f8e11062e8f Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Handle exceptions inside QV8QObjectConnectionList::qt_metacallChris Adams2011-12-291-0/+12
| | | | | | | | | | | | | | | | | | Previously, exceptions were not handled in the connectionlist. This could cause v8 to assert under certain circumstances. Task-number: QTBUG-23375 Change-Id: Ie5f043b50bb6b02a77be464ca18ea8e3bbb0f501 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Fix crash in var property setterChris Adams2011-12-231-0/+1
| | | | | | | | | | | | | | | | | | | | | | Previously, the function didn't terminate after calling the setter recursively, as it should have. This patch ensures that the setter is called correctly and then returns, and adds a unit test to ensure that no regression occurs. Task-number: QTBUG-23330 Change-Id: If512fca174e5224c2c53caad11f77782e6cead9f Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Reserve enough space in the QDeclarativePropertyCache hashAaron Kennedy2011-12-224-11/+56
| | | | | | | | | | | | | | | | It was too easy for callers of copy() to pass the wrong reserve size, so a new copyAndAppend() method has been added to reduce error. Change-Id: If2f13e2e0733e5d87c527934dc5a6c8d0c8df572 Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Detect and optimize qsTr() and qsTrId() bindingsAaron Kennedy2011-12-217-40/+210
| | | | | | | | | | | | | | | | | | As these two are frequently used with constants, we can detect them in the compiler, and run the appropriate C++ functions directly in the VME. This saves pointlessly creating and running bindings. Change-Id: I148a150400c13fda7955949453405202f18b1a6b Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
| * Debugger: Allow transmissions of network packets in one goKai Koehne2011-12-217-18/+31
| | | | | | | | | | | | | | | | | | We did call a flush() after every single packet, which was slowing down things especially for the QDeclarativeDebugTrace service. Change-Id: Idab074941a22364e154502eb12afa43b4dd33c22 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
| * Debugger: Fix livelock on exit (Windows)Kai Koehne2011-12-202-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | We used to close the debugger thread when the last service was killed: This happened in the unloading of static global variables. Apparently this is too late on Windows, since the OS thread associated was already terminated. Instead, we now kill the instance when the QCoreApplication event loop is exiting. Change-Id: I12a46ab9e7ac64561c94c0cd0d88b78fbaf8554c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
| * Remove hardcoded assumptions about methods in QObjectChris Adams2011-12-201-4/+7
| | | | | | | | | | | | | | | | | | | | This commit ensures that the number of methods available from the QObject::staticMetaObject is looked up rather than hardcoded to a value in the QDeclarativePropertyCache. Task-number: QTBUG-22985 Change-Id: If61c02f0d32066cddaeac2d8143c58db97acb609 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
| * Qt.locale() always returns the 'C' locale.Martin Jones2011-12-201-1/+4
| | | | | | | | | | | | | | | | QLocale(QString()) does not return the default locale. If no locale is specified, use the QLocale() constructor. Change-Id: I76198b7ea66a6326483ec47ac36e080159ca459a Reviewed-by: Martin Jones <martin.jones@nokia.com>
| * Fix QDeclarativePropertyCache crash.Andrew den Exter2011-12-202-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | Reserve enough space in the signalHandlerIndexCache so that it will not reallocated while the property cache is being built as this will invalidate the pointers stored in the stringCache. Also ensure signals for all cached meta-objects are included in signalHandlerIndexCache, and don't over allocate propertyIndexCache and methodIndexCache. Change-Id: Ic285d832d4b86106176bfe723ff10bdd65143910 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
| * Correctly resolve elements of QList<QUrl> propertiesChris Adams2011-12-191-25/+40
| | | | | | | | | | | | | | | | | | | | Previously, the value of a QList<QUrl> sequence was only resolved if there was only one element in the sequence. This commit ensures that all elements in the sequence are resolved correctly. Task-number: QTBUG-23131 Change-Id: Id27748853fe01ae22800fbd02d062e268ad7ec70 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>