aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Reduce the size of QTextPrivate.Andrew den Exter2012-02-211-5/+4
| | | | | | | | Remove some unnecessary members, store colors as QRgb values instead of QColor, and reorder members to minimise alignment padding. Change-Id: Id3958429008c97a5714734a529250fe881e2161b Reviewed-by: Yann Bodson <yann.bodson@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>
* cacheBuffer makes delegates appear briefly in wrong positionMartin Jones2012-02-211-2/+1
| | | | | | | | | Set delegates that are created asynchronously to non-visible. This would have happened the next time addVisibleItems() was called. Task-number: QTBUG-24364 Change-Id: I4b628bef186c8c41bd6a4d9e4ac402d59bcb4972 Reviewed-by: Bea Lam <bea.lam@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>
* Added QSGRenderNode class.Kim Motoyoshi Kalland2012-02-205-0/+346
| | | | | Change-Id: I8c903cae490158b864af60f53c10c10f2faea7c0 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Improve test coverage for AnchorChanges.Michael Brasser2012-02-201-4/+15
| | | | | Change-Id: If6d62febed093a07d75a6125a920aac628c35e54 Reviewed-by: Yann Bodson <yann.bodson@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>
* Have input method hints on only classes using themPekka Vuorela2012-02-172-4/+23
| | | | | | | | | | | Removed inputMethodHints setter and getter from QQuickItem. No need to consume memory for input method hints on every item when only QQuickTextInput and QQuickTextEdit actually use them. Additionally introduced change signals on the editor hint properties. Change-Id: Ice380d4f4dd47fdde73d2468f4a44a7d1540ad45 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* QtDeclarative/Quick: Fix warnings.Friedemann Kleint2012-02-161-1/+1
| | | | | Change-Id: I71bd638fcc41356e0b76df27ec76ad3ed5ef90d9 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Ensure visibility changes are communicated through itemChange.Michael Brasser2012-02-162-0/+45
| | | | | | | Also added MouseArea test that depends on this functionality. Change-Id: I1c303504ffd63d6b9dbdf95ab63e8426dc09c02d Reviewed-by: Andrew den Exter <andrew.den-exter@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>
* Built-in transition support for ListView & GridViewBea Lam2012-02-1615-12/+3407
| | | | | | | | | | | | | | | | | ListView and GridView can now be assigned transitions to be run when: - Populating the view (when initially setting the model / resetting) - Adding items - Removing items - Moving items The ViewTransition attached object can be used from within a transition declaration to access various information about the items that are being transitioned. Task-number: QTBUG-21504 Change-Id: Ie5c75ea511c8b15acc3f06fccf19abe34d3677f9 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix multi-length string substitution.Andrew den Exter2012-02-163-0/+96
| | | | | | | | | | Multi-length string eliding was provided by QFontMetrics::elidedText() which is no longer used for layouts. So we instead have to do the string substitution ourselves if the text doesn't fit before finally eliding. Change-Id: Iab2e54b332390290d656299a5be148f39f78df9d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Allow binding the size of a Loader to its item.Martin Jones2012-02-162-0/+52
| | | | | | | | | | | If the size of the Loader is bound to the item, the item was resized before the binding was evaluated, resulting in an item height of 0. This change allows bindings to the item to be evaluated before we apply the resize logic. Task-number: QTBUG-22628 Change-Id: I30acdb54214b422a9d4aa4e7e02a0af3674322db Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Introduced QQuickCanvas::releaseResources().Gunnar Sletta2012-02-151-1/+3
| | | | | | | | This function can be used in certain situations to purge the texture cache and triggers more lazily to take down the scene graph and GL context Change-Id: Icd9360ff50fda0e721ba0f1b520cda678e457a35 Reviewed-by: Aaron Kennedy <aaron.kennedy@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>
* Improve test coverage for QQuickItem.Michael Brasser2012-02-154-0/+95
| | | | | Change-Id: I1a49fd44ba85e0fa87a76c07e39cb603cd4f12e7 Reviewed-by: Yann Bodson <yann.bodson@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>
* Preserve aspect ratio when setting Image.sourceSizeMartin Jones2012-02-142-0/+53
| | | | | | | | | | | Setting both sourceSize.width and sourceSize.height results in changing the image aspect ratio. This is never what you'd want. Fit the image to the provided sourceSize, maintaining the aspect ratio. Task-number: QTBUG-21161 Change-Id: I77e9aacb8d31475d5df0aef1de52c0edbd1e2fc9 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Cleanup auto.pro.Michael Brasser2012-02-141-5/+3
| | | | | | | Start running qmltest tests again. Other minor cleanup. Change-Id: I0b823e3ac5ce1d894015d683b0a6bb6503538703 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Fix access to context properties within TextEdit.cursorDelegateAndrew den Exter2012-02-148-2/+92
| | | | | | | | | | Don't create the cursorDelegate instance before componentComplete as the context may not be fully populated prior to that. Task-number: QTBUG-21780 Change-Id: I6ca8a24989bc28e5c5ca06d61a85e32ff630ce7c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix and stabilise sectionsPositioning() testBea Lam2012-02-141-4/+13
| | | | | | | | | | | | | The 'Turn sticky footer off' part was setting the content y to 40 which meant the sect_new was already below the last visible item of the previous section, so turning off the NextLabelAtEnd flag didn't move sect_new further down the view. (This test only occasionally failed since the window didn't always update after changing the content y, but now it changes the content y then waits for a polish before continuing.) Change-Id: I6a424f4bbd2eec1904a5fd20eb2bd79d5cac5b84 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't crash when an animation update causes it to delete itself.Michael Brasser2012-02-132-0/+46
| | | | | Change-Id: Ic108adfb99a09e6ede71d474240fb0917cee6961 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add basic TouchCancel handling to canvas.Laszlo Agocs2012-02-131-1/+34
| | | | | | | | | | This makes sure that touchEvent() is properly called for all items in the scene that have an active touch. It does not handle the cancel event in any other special way. Change-Id: Id66527ced8cb63d0b29f25f37c139e6d6aec9ba0 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix anchor jitters that could occur during animation.Michael Brasser2012-02-132-1/+11
| | | | | | | | | | | | The anchors were using a different definition of center than the actual center (9337c140cab7db1285f893b66d0e56423a74c253). With this change center-anchored Rectangles may sometimes have fuzzy antialiasing again. Task-number: QTBUG-12441 Task-number: QTBUG-21730 Change-Id: Iaf61409c7c523510d0d657fe7ba96f29a8610090 Reviewed-by: Martin Jones <martin.jones@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>
* Use QInputMethod instead of deprecated QInputPanelPekka Vuorela2012-02-105-77/+93
| | | | | | | | | | Similarly deprecate Qt.application.inputPanel and introduce replacement Qt.inputMethod. Change-Id: Ie4fd467f93f75023c86b0a2d038d858fe5001146 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Sami Kananoja <sami.kananoja@nokia.com>
* Refactor Canvas rendering paths.Justin McPherson2012-02-104-45/+126
| | | | | | | Refactor Canvas rendering paths to enable different drawing contexts. Change-Id: If0e00a14baa673fca6b999a787b4e89885bb1e51 Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Added new convenience readonly visibleChildren property to ItemMathias Malmqvist2012-02-102-0/+204
| | | | | | Change-Id: I5ec541226fabd72c05ce8ccb8bb7e56f6ec7717a Task-number: 22724 Reviewed-by: Aaron Kennedy <aaron.kennedy@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>
* Add linkColor property to Text.Andrew den Exter2012-02-091-1/+86
| | | | | | | | | | | | | | | Allows the color of links in text to be changed from the default blue. This currently only works with StyledText and the distance field rendererer. It could be made to work with RichText overwriting the specified foreground color in all instances or by not setting a default color in the html parser. The former would prevent the color being set with CSS or some future means for altering text formats. The latter would break rendering with QPainter. Task-number: QTBUG-23048 Change-Id: I98df215cabe8a089f648fd4a6206622b4318fb8f Reviewed-by: Martin Jones <martin.jones@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>
* 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>