aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Don't crash if focus issues arise.Alan Alpert2012-02-091-0/+2
| | | | | | | | The test has some strict focus requirements, but if they are not met then the test should FAIL with a bit of explanation instead of crash. Change-Id: I796e8a8092833f3413b3dc98a22466575dfe241d Reviewed-by: Yann Bodson <yann.bodson@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>
* Don't hide virtual method.Michael Brasser2012-02-082-10/+10
| | | | | | Task-number: QTBUG-20994 Change-Id: Iaeeb23ed758ef52e0a3a61c4310aafec383e8a28 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Allow Item components to be assigned to Item.layer.effect.Kim Motoyoshi Kalland2012-02-074-1/+76
| | | | | | | | | Some complex effects are easier to implement as Items using ShaderEffects internally rather than with a top-level ShaderEffect. Auto-tests added. Change-Id: I4b99811b87e7ca5054bf119b99207b7f5a7c666e Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Resolve StyledText img tags relative to baseUrl.Andrew den Exter2012-02-072-1/+84
| | | | | Change-Id: I954195d52330c65e851b7c0fcdb6c8dabf29335d Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fixed some Item.layer bugs and added auto-tests.Kim Motoyoshi Kalland2012-02-077-4/+259
| | | | | Change-Id: I3f66f911d1c499c37a66904f8ddab6951ba85e60 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Separate out some of the common test codeBea Lam2012-02-0725-1205/+858
| | | | | | | | | Moves findItem, findItems() etc. into shared/visualtestutil.h and moves duplicate list model test classes and other common view-specific code into shared/viewtestutil.h. Change-Id: Ia79bc4df1ab7fb618597755c0288a2e8f5054faf Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add additional animation autotests.Michael Brasser2012-02-074-1/+279
| | | | | Change-Id: I11894325e73b8bb5b6ece4c626b15bd1d099f229 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Add contentWidth and contentHeight properties to Text elements.Andrew den Exter2012-02-073-111/+213
| | | | | | | | | | | For Text and TextEdit this is a rename of paintedWidth and paintedHeight both of which remain as synonyms of the content properties for compatability. For TextInput this is a new property. Task-number: QTBUG-23691 Task-number: QTBUG-15160 Change-Id: Idbdc72fad34922be21b649ca45fc39b5e533ed1a Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Add and use new animation backend.Michael Brasser2012-02-0724-43/+4044
| | | | | | | | | 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>
* Update test files to API changesAlan Alpert2012-02-073-4/+4
| | | | | | | | API changes are being managed, but the test files shouldn't be triggering the warning. Change-Id: Ifd6c0c08be9979d72f98eb6a1df07daf9302772e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Ensure Flickable moving and flicking properties are correct.Martin Jones2012-02-071-1/+43
| | | | | | | | | Flicking, then touching to stop the flick should set flicking property to false. Moving or flicking vertically should not set flickingHorizontally, and vise-versa. Change-Id: Iee42a92ffff2707f0691ffa285dec514b47c9986 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Section header is not made visible when changing currentIndex.Martin Jones2012-02-071-0/+7
| | | | | | | | | Make section header visible when setting currentIndex to an item on a section boundary. Could also affect initial position if view size started at 0. Change-Id: Ie65f91826311d34a290d369d8956f1c88f7efb70 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix acceptance of unhandled mouse events.Simon Hausmann2012-02-061-0/+39
| | | | | | | | | | | | Mouse events not handled by the canvas need to be ignored, in order for features like touch synthetization to work. In case of the initially delivered mouse press event, the canvas did not ignore the event if it was not handled. This patch corrects that and adds an auto-test to verify the new behaviour. Change-Id: I8499701f5a161ce1e90a70303aa7ca4ccf2f0b6f Reviewed-by: Andras Becsi <andras.becsi@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix vertical offset of TextInput.positionToRectangle.Andrew den Exter2012-02-061-1/+53
| | | | | | | | | Offset the y value of the rectangle by the vertical scroll and line offset. Task-number: QTBUG-23934 Change-Id: I43815b480f43a089a9a03b0aec32dfc0598b6154 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix TextEdit vertical alignment.Andrew den Exter2012-02-061-0/+25
| | | | | | | | | | Don't ignore the position of a QTextDocument when contructing a text node, and translate the rectangle returned by positionToRectangle by the y offset. Task-number: QTBUG-23935 Change-Id: I55a2b69a32a8b623be7e36de54ad083c2f8591e5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add support for resizing fonts to fit Text dimensions.Andrew den Exter2012-02-063-10/+607
| | | | | | | | | | | This adds a mode where if the content of a Text item doesn't fit within its bounds the font size is reduced during layout until it does or a minimum font size is reached. Task-number: QTBUG-22832 Change-Id: I6198ef03899e2f21b32e313548966ef4b0e3bff1 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Teach build system tst_qdeclarativepixmapcache needs QtConcurrentAlan Alpert2012-02-061-0/+3
| | | | | | | So if QtConcurrent is disabled, this test should be too. Change-Id: Ib4c6a952f73fc21bb201cf6017cd3e73732fbe7b Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Add "QT += concurrent" to a test that needs itAlex Wilson2012-02-061-1/+1
| | | | | | | | QtConcurrent became its own module in qtbase as of http://codereview.qt-project.org/15206 Change-Id: Ie9b638d83012aa83f854b92fec80d48babcf6ef0 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Skip tst_qquickitem::simpleFocus on Mac OS X 10.7Yann Bodson2012-02-061-0/+5
| | | | | | | Task-number: QTBUG-24094 Change-Id: I521707891d2695d7dde8eea4ef8a6a2e3f5ea935 Reviewed-by: Alan Alpert <alan.alpert@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-03651-40864/+126
| | | | | | | | QtQuick1 is now contained in a separate repository. Task-number: QTBUG-23737 Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Adapt to QGuiApplication::focusObject() for notifying input methodPekka Vuorela2012-02-024-66/+53
| | | | | | | | | Emitting focusObjectChanged() signal now instead of explicitly setting inputItem to QInputPanel. Also adapted from deprecated QInputPanel::inputItem() to QGuiApplication::focusObject(). Change-Id: I97460625cc8bb2820ec7716a06330aecd1b585ea Reviewed-by: Joona Petrell <joona.t.petrell@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>
* Support inline images with <img> tag in StyledTextYann Bodson2012-02-027-2/+161
| | | | | | Task-number: QTBUG-21793 Change-Id: Ie7b9f293c6c9a949c1899152c38b61251b0069d3 Reviewed-by: Yann Bodson <yann.bodson@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>
* Incorrect initial pos after resizing view with margins.Martin Jones2012-02-023-0/+96
| | | | | | | | | | The currentItem tracking didn't position the view to show the margins. This affects resizing the view and also changing currentIndex. Task-number: QTBUG-24028 Change-Id: I47d4c771c0d712c93abadfb6b2deb5194241fb6b Reviewed-by: Bea Lam <bea.lam@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>
* Fix unhandled touch events not being ignored.Simon Hausmann2012-02-021-11/+89
| | | | | | | | | Unhandled touch events need to be ignored in order for things like mouse event synthetization in QtGui to work. Change-Id: I6fe9dad205c8bb8547d2424c2e2a3b3518598006 Reviewed-by: Andras Becsi <andras.becsi@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@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>
* Must update columns when GridView geometry changesBea Lam2012-02-022-2/+63
| | | | | | | | | | Regression from changes in 80d85e0017cb5cc4b0a0df6c19d4126bf5062731 Also remove shared duplicate code in visibleItemsChanged() in ListView and GridView. Change-Id: Ic3ab3ba070ddf9901a232ed5b3250c725797cf69 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Multiple fast flicks with large content moves fasterMartin Jones2012-02-022-3/+19
| | | | | | | | | Repeatedly flicking quickly in a large view moves faster than the velocity of the touch. Task-number: QTBUG-18600 Change-Id: Ie6747e0d945022e0c0c5f6c5f95bc35403a14d56 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* More StyledText autotestsYann Bodson2012-02-021-0/+2
| | | | | Change-Id: I4fab5f0b421ddccce2c4bce58861ec236f3434f9 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Compress consective StyledText whitespaces into a single space.Andrew den Exter2012-02-021-0/+12
| | | | | | | | | This improves the correctness of the parser and prevents line feed characters appearing as unrendereable characters. Change-Id: I54e8be011ba4d9ad65ee2142e6b1f423a7579352 Reviewed-by: Yann Bodson <yann.bodson@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add a persistentSelection property to TextInput.Andrew den Exter2012-02-024-16/+101
| | | | | | | | Improves feature parity with TextEdit. Task-number: QTBUG-16355 Change-Id: I3919c71454a4f4574a1ee35ad38969459beb8363 Reviewed-by: Martin Jones <martin.jones@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>
* Add autotests for StyledText list tags (<ol> and <ul>)Yann Bodson2012-02-021-0/+19
| | | | | | Task-number: QTBUG-23979 Change-Id: Ic050e443ceed3cc41bd156de1455b2a9bc25fb35 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Don't leave windows hanging outside test functionsGunnar Sletta2012-02-011-18/+14
| | | | | Change-Id: I2df2167386b0827ae25a14f958ee50d0a15eba0b Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Fix outdated license headers.Jason McDonald2012-02-017-9/+9
| | | | | Change-Id: I8448e0d3dbce0c18f38a1ed9b6e2d75ba83f7088 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Guard against event recursion in QQuickDrag.Andrew den Exter2012-02-011-0/+207
| | | | | | | | Do not emit drag events recursively as this will send events out of order and corrupt the grab stack. Change-Id: Ieede7123c96304e23c809ac895318ed76c8c95c1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fixes for removing before visibleBea Lam2012-02-012-19/+43
| | | | | | | | | | | | | Account for removing multiple items over visible and non-visible items and calculate these using the index of the first visible item rather than the visibleIndex (which can be above the visible position). Also, don't take the changeBeforeVisible into account if the first visible is already being adjusted, otherwise it moves back one more row than it should. Change-Id: Iea7247102e06697d10eb41301ca689c0cdc35ece Reviewed-by: Martin Jones <martin.jones@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>