aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Improve parsing of escape characters and regexp literals.Roberto Raggi2011-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | That is, in QML/JS you can escape characters in identifiers, e.g. var c\u0061se = 25 declares a variable called `case' with value 25. In such cases qmlmin needs to preserve the escape sequence in the declaration. Also, fix possible errors when pasting keywords after regexp literals. The minifier needs to preserve the whitespace character after the regexp delimiter, e.g. /x/instanceof blah without the white space after the regexp, the `i' of `instanceof' is parsed as a regexp flag. Change-Id: I5f426ac62949e34d092d4fdb0a41243de8ff2236 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Fix the QML/JS parser to accept empty Javascript files.Roberto Raggi2011-12-061-3/+0
| | | | | Change-Id: I0c5dfdc76489e6d1ec5608dea625cb0d109288e2 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* test/debugutils: Add include guard.Friedemann Kleint2011-12-062-6/+10
| | | | | Change-Id: I3d65569851169ce4aa350b0268ec5ca1c516613e Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Introduce methods to get the source location of the AST nodes.Roberto Raggi2011-12-063-0/+220
| | | | | | | | | Also removed deprecate AST nodes. Change-Id: I9221e81b15b18530bb2ab8b09da2482df543bace Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Remove TESTED_CLASS/TESTED_FILES comments from tests.Jason McDonald2011-12-069-21/+0
| | | | | | | | | These comments were mostly empty or inaccurate. Appropriate naming of tests and appropriate placement of tests within the directory tree provide more reliable indicators of what is being tested. Change-Id: If69bdb39fd162d167cb948ddcbb73503b414e791 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Ignore expected warnings in Item and PathView testsMartin Jones2011-12-062-0/+23
| | | | | Change-Id: I05ebebbfe7f6b107068e9feaf66c03fd3ae71237 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add tests for snapOneItem/snapOneRow snapModeMartin Jones2011-12-064-0/+325
| | | | | | Change-Id: Ia7e8fe6a7da48d8f67914d90377c6fad32ecb415 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Ensure that scarce resources work with var propertiesChris Adams2011-12-0646-100/+832
| | | | | | | | | | Now that we have a new property type which stores JavaScript handles, we need to ensure that scarce resources can be used with them. Task-number: QMLNG-18 Task-number: QTBUG-21843 Change-Id: I4a920ae39e7d33cf5e33362e5e0ee21c74cb35e3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Document function limitation of var propertiesChris Adams2011-12-061-0/+9
| | | | | | | | | | | Functions cannot be assigned to var properties due to the fact that such an assignment signifies a binding assignment. This limitation needs to be documented. One workaround is to assign an array which contains a function element to a var property, and this commit also adds a unit test to ensure this works. Change-Id: I02363b88233282106ac6d26f14df1988155057b9 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Disable tst_qdeclarativepixmapcache::dataLeak() by defaultChris Adams2011-12-061-0/+10
| | | | | | | | This test produces spurious output in the expected case and therefore needs to be suppressed by default. Change-Id: Ib309f96c0291180f2011451605eea7f9cea5744b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't attempt to destroy a null persisted item.Andrew den Exter2011-12-052-18/+31
| | | | | | | | Persisted items are still only constructed on demand so we can't assume the object is non null. Change-Id: I1ce9563eb3b9fb1ae611e8afcf9c8c74f0563aec Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix test failures due to invalid font metrics.Andrew den Exter2011-12-052-122/+102
| | | | | | | | | | | Don't use QFontMetrics to determine expected text dimensions or cursor positions in TextInput and TextEdit tests. Instead Layout the text with the same options as used by the item so the only error should be due to error. Task-number: QTBUG-21689 Change-Id: I7ba008d92f1ebb14c37ae7df06fdb11465c3225d Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add tutorials to examples autotest.Alan Alpert2011-12-051-0/+2
| | | | | Change-Id: I339446212e3ac9608eada0601e83d86789d33e0b Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Test fixes for OS X.Michael Brasser2011-12-053-20/+14
| | | | | Change-Id: Idee212db1ee267d44463886de6a7918404ba549d Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Say hello to QtQuick moduleKent Hansen2011-12-02774-438/+447
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change moves the QtQuick 2 types and C++ API (including SceneGraph) to a new module (AKA library), QtQuick. 99% of this change is moving files from src/declarative to src/quick, and from tests/auto/declarative to tests/auto/qtquick2. The loading of QtQuick 2 ("import QtQuick 2.0") is now delegated to a plugin, src/imports/qtquick2, just like it's done for QtQuick 1. All tools, examples, and tests that use QtQuick C++ API have gotten "QT += quick" or "QT += quick-private" added to their .pro file. A few additional internal QtDeclarative classes had to be exported (via Q_DECLARATIVE_PRIVATE_EXPORT) since they're needed by the QtQuick 2 implementation. The old header locations (e.g. QtDeclarative/qquickitem.h) will still be supported for some time, but will produce compile-time warnings. (To avoid the QtQuick implementation using the compatibility headers (since QtDeclarative's includepath comes first), a few include statements were modified, e.g. from "#include <qsgnode.h>" to "#include <QtQuick/qsgnode.h>".) There's a change in qtbase that automatically adds QtQuick to the module list if QtDeclarative is used. Together with the compatibility headers, this should help reduce the migration pain for existing projects. In theory, simply getting an existing QtDeclarative-based project to compile and link shouldn't require any changes for now -- but porting to the new scheme is of course recommended, and will eventually become mandatory. Task-number: QTBUG-22889 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Change-Id: Ia52be9373172ba2f37e7623231ecb060316c96a7 Reviewed-by: Kent Hansen <kent.hansen@nokia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Add dynamicRoles mode to ListModel for extra flexibility.Glenn Watson2011-12-021-201/+400
| | | | | | | | | | | | | ListModel contains a new property called dynamicRoles. By default this property is disabled, meaning that the type of a given role cannot be changed dynamically. However, when this property is set, the type of a role can change between elements. This allows more flexibility but comes at a significant performance cost over the default static role mode. Change-Id: I478d48c882f51ba2dde37f88e2aac744e919b68b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use QWidgetTextControl in the QtQuick1 TextEdit.Andrew den Exter2011-12-021-3/+3
| | | | | | | | | | | QDeclarative1TextEdit and QTextEdit have the same compatbility requirements so it makes sense they continue sharing the same line control implementation. This allows the QtQuick 2 TextInput to diverge without creating a third variation of QTextControl, Task-number: QTBUG-22627 Change-Id: Id4a8f6a17aeb756c3385cf8fca3de61b8c4be757 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use QWidgetLineControl in the QtQuick1 TextInput.Andrew den Exter2011-12-021-2/+2
| | | | | | | | | | | QDeclarative1TextInput and QLineEdit have the same compatbility requirements so it makes sense they continue sharing the same line control implementation. This allows the QtQuick 2 TextInput to diverge without creating a third variation of QLineControl. Task-number: QTBUG-22627 Change-Id: Ic06f66f1cb55e78f7129889a4877c3aba5ba72f6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove QSGContext and QSGTexture from QDeclarativePixmapDataGunnar Sletta2011-12-022-9/+12
| | | | | | | | | | | | | | | | | | | | | | | In order to cleanly support multiple windows we need to not have the QSGContext reference in QDeclarativeEngine and we need to be able to have one copy of the texture for each QSGContext that is not sharing when we have multiple windows. This also makes it easier to the release graphical resources from a running application, which is another feature that we want to eventually implement. This patch does remove an adaptation feature which is the decodeToTexture, which seemed like a good idea at the time but in hindsight has not been used for anything. Edit: resolved conflict in qquickimage.cpp Edit: updated QDeclarativePixmap testcase Edit: updated QQuickImage testcase Edit: Rebased on top of QDeclarativePixmapCacheChanges Change-Id: Ifc61dd8158d3f841437d029b6031a91196145517 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix test warningsAaron Kennedy2011-12-023-24/+41
| | | | | | | | If the enums aren't correctly registered, the use of signal spy always causes a warning. Change-Id: If7fd0c1765ac33e0c1548701e199e710e2fe3b30 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix listview test warningMartin Jones2011-12-021-3/+6
| | | | | Change-Id: I24cead9eb52f9e1cca39ffe5d6e32a57453186d6 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix gridview test warning.Martin Jones2011-12-021-43/+2
| | | | | | | Also removed unnecessary QtQuick 1.1 test. Change-Id: I6f048d22fbbaa817358da7bb5d85187fabc119ff Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Ignore expected warningAaron Kennedy2011-12-011-1/+6
| | | | | Change-Id: I6e90537461fa4939c724b3031f3b3b5f04343d8e Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* AutotestAaron Kennedy2011-12-013-0/+18
| | | | | | Change-Id: I796ef5e0d70a7e3a95858468583c4ecb447991ee Task-number: QTBUG-21864 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Ignore expected warning messageAaron Kennedy2011-12-011-0/+1
| | | | | Change-Id: I80d2b6e082f6e648ee888820903bc81a21c0d302 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Take multi-line expressions into account when rewriting expressionsKai Koehne2011-12-012-5/+8
| | | | | | | | Take into account the newlines expressions might have when combining multiple expressions into one. Change-Id: Ib7170f624b6b6dee522e2d376a513ac08a8baa46 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Remove debuggingAaron Kennedy2011-12-011-3/+0
| | | | | Change-Id: Ib672ae608446acb1ddf7df8354fb7ae051b9e834 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Fix test warningsAaron Kennedy2011-12-011-1/+19
| | | | | Change-Id: I35428417ef6c21166ac991c28a540fa4e8ec19fb Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Ignore test warningAaron Kennedy2011-12-011-0/+6
| | | | | Change-Id: I030a8be90cc95105ca016b74ad017c46ba7ffe17 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Debugger autest: Don't show debugee output for expected failuresKai Koehne2011-12-011-1/+2
| | | | | Change-Id: Ifd068f8c680dcde7bf9c2e078e13eeee1bcba552 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Delete created objectsAaron Kennedy2011-12-011-0/+1
| | | | | | | | This eliminates "leak" warnings that were generated when the test exited. Change-Id: I66088f29b88b95662d6ab4e65b5e2a77b415a9f9 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Don't build an app_bundle on OS XAaron Kennedy2011-12-012-0/+2
| | | | | Change-Id: I7d5aa114baaea881a3fe56157e2530d1f89be91c Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Delete created objectsAaron Kennedy2011-12-011-0/+4
| | | | | | | | This eliminates "leak" warnings that were generated when the test exited. Change-Id: Ia186241c05c28a6e5eb7b6b431e084f95f5934be Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Move QDeclarativePropertyValueInterceptor into a private headerAaron Kennedy2011-12-012-0/+2
| | | | | | | This should never have been public. Change-Id: I77811413c93fdc7767d0921e12284e9a8bc88752 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Remove debugging outputAaron Kennedy2011-12-011-1/+1
| | | | | | | | The console.log() is not a significant part of the test, so it can be removed. The exception will still be thrown if keys is not a function. Change-Id: Ifaec6e0ed5ecc32ad7b885bff31df493120ed9aa Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Remove debuggingAaron Kennedy2011-12-011-1/+0
| | | | | Change-Id: I64cc9fb96f5f456cb9b18ba5706a79bf7c6cde16 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Ignore test warningsAaron Kennedy2011-12-011-1/+13
| | | | | Change-Id: Ib22ea43970e2e4c9635063dc3af6d6f130cc2a18 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Ignore expected warningAaron Kennedy2011-12-011-0/+2
| | | | | Change-Id: I09696b9d522fd791a4a33f812bb3c858bfd692ff Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Made TextInput mouse events commit preeditPekka Vuorela2011-12-012-97/+119
| | | | | | | | | Similar to what was earlier done on QWidgets editors. Additionally updated tests to check QInputPanel::invokeAction instead of the obsolete QInputContext mouse handler. Change-Id: Ia2bd22eebdeed79cff7a4925129b28dd1500b1ad Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Add missing testsAaron Kennedy2011-12-011-6/+7
| | | | | Change-Id: I73df9b553045acf8dd4164543d42ba6db48dced6 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Release pixmap cache data to avoid leaking memoryChris Adams2011-12-012-11/+80
| | | | | | | | | | | | Previously, QDeclarativePixmapStore did not release cache entries on destruction. This commit ensures that all cache entries are released properly. Note that while any QDeclarativePixmapData which contains a texture will be deleted, the texture itself will be scheduled for cleanup rather than released directly. Task-number: QTBUG-22742 Change-Id: I62ddf57f2b55b732ab369321eb9ed0d7af01c135 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Repeater delegates have no parent in Component.onCompletedMartin Jones2011-12-012-0/+24
| | | | | | | Task-number: QTBUG-22279 Change-Id: I5c0b4a9becfee06dfc4a52e546ad81fb0b6f238a Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Move XmlListModel to seperate pluginCharles Yin2011-12-0112-155/+146
| | | | | | | | | | | | | XmlListModel is the only feature inside QtDeclarative which depends on the QtXmlPatterns module, move this item to a separate plugin can reduce the unnecessary dependency in most use cases. To use the new XmlListModel, an additional "import QtQuick.xmllistmodel 2.0" is needed. Task-number:QTBUG-22158 Change-Id: I9e19eb6cbba46cd40fb7ffcdbd741f346779a54d Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Add support for assigning literal value to sequence propertyChris Adams2011-12-017-0/+153
| | | | | | | | | | | | | | | | | It is a language semantic that we allow clients to assign a single value to a sequence/list property (assuming that the types match). Now that we support sequence types, this commit adds support for this semantic by determining whether the built-in type of the literal corresponds to the associated sequence (eg, int for QList<int>, qreal for QList<qreal>, bool for QList<bool>, QString for QStringList etc). Similarly, some value types can be constructed from literal string values (via string converters) and these need to be handled also. Task-number: QTBUG-18062 Task-number: QTBUG-21770 Change-Id: Iacd91b2af122cd8f20b7df2fa6056a7d7c52bf53 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Cleanup and optimize QQuickContents.Michael Brasser2011-12-011-2/+2
| | | | | Change-Id: I12e51b431a7568bc80d8200d1c619373a72521c0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Non-blocking view delegate instantiation.Martin Jones2011-12-0110-20/+557
| | | | | | | Task-number: QTBUG-21792 Change-Id: I29a4028cd24eb55d4768aacaa3abbd1786061398 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Extend the grammar of QML binding declarations.Roberto Raggi2011-11-307-0/+147
| | | | | | | | | This allows the use of non-iterative statements on the right hand side of a binding declaration. Change-Id: I60fac880766ba99a410b3647e41b1252677a372f Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Add QQuickItem::setImplicitSize()Michael Brasser2011-11-301-1/+0
| | | | | | | | This allows us to batch up size changes better, leading to fewer layout recalculations. Change-Id: I423113fab78666a99ca05439f852f57c92f6f821 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Deleting an incubated object after setInitialState() crashesMartin Jones2011-11-301-0/+37
| | | | | | | | | | | Incubating objects are often parented in setInitialState(), which can lead to the incubating object being deleted after object creation, but before completion. When incubator.clear() is called after this point, it would attempt to delete the already deleted object. This change guards the incubation object in the incubator. Change-Id: I9585e93027250b8b6b3f1777b10ee1008ae7b818 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Debugger: Disable breakpoint relocation in JSKai Koehne2011-11-291-5/+7
| | | | | | | | | Because we pass scripts lazily to v8, breakpoints can be relocated to lines unexpected to the user. Therefore disable breakpoint relocation alltogether for the time being. Change-Id: I34b4b9b1267270014c3a17cb6cad1e3c7eded074 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>