aboutsummaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Insert items into VisualDataModel.Andrew den Exter2011-12-2312-56/+2022
| | | | | | | | | | | Add API for inserting data directly into a VisualDataModel which can be used among other things to create temporary items that are later resolved to an actual item in the source model. Task-number: QTBUG-21516 Change-Id: I835f0e8d6c5edfb3a21029687de5b700f7400317 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Minimize the number of objects created per item in VisualDataModel.Andrew den Exter2011-12-232-13/+9
| | | | | | | | | | | | | | Derive from QDeclarativeContext and reference count the context object instead of parenting it to the context. Combined with a weak persistent v8 handle the allows the context object to be returned by javascript accessors instead of creating a new instance for every use. In addition to the efficiency advantages of creating fewer objects, routing all data access through a single object means that object can also persist data instead of just acting as a proxy. Change-Id: I107dc8c901f16f2a4b420ff1cbffa7a6be27de89 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix crash in var property setterChris Adams2011-12-233-0/+14
| | | | | | | | | | | 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>
* Add a pressed property to TouchPoint.Michael Brasser2011-12-232-113/+227
| | | | | | | | | | | Remove the valid property, and replace it with pressed. The semantics have changed slightly for a release -- pressed will immediately become false, whereas valid remained true until the next touch event. Also make sure touch information is correctly updated on release. Change-Id: Ic61e1b6884c67f19100a6f8fc218b8b05b291ff0 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Detect and optimize qsTr() and qsTrId() bindingsAaron Kennedy2011-12-214-0/+34
| | | | | | | | | 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>
* QDeclarative tests: Introduce base class for data tests.Friedemann Kleint2011-12-21122-1917/+1900
| | | | | | | | | | | | | | | | | In tests/auto/shared/util.* replace macros/find functions by a base class QDeclarativeDataTest with accessors for the data directory helper functions to create URLs from it. The class relies on QFINDTESTDATA, which is the standard way of locating test data. Using the class should reduce the number of calls to QFileInfo.exists(), etc significantly. In addition, provide utility functions for messages. Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Change-Id: Id2beacb157922ee9412f9e45cf9695cec1f8379a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Adapted QDeclarativeTextEdit test to platform input contextPekka Vuorela2011-12-211-208/+151
| | | | | | | | Also couple more tests start to pass as side-effect Change-Id: Ie3e8bafa1d397301da3f7af57b026f52b9cf5d21 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Adapted QDeclarativeTextInput test to platform input contextPekka Vuorela2011-12-211-130/+117
| | | | | | | | Also a couple more tests starts to pass as side-effect. Change-Id: I1723d4b5eccbe7abe2ac91ddc8318ac32c1f7e61 Reviewed-by: Lars Knoll <lars.knoll@nokia.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Remove uneccessary layout in TextInput initialization.Andrew den Exter2011-12-211-0/+5
| | | | | | | | | | The layout was only done to ensure there was always at least one QTextLine in the layout to avoid validity checks later, but since lineForTextPosition can return an invalid QTextLine the checks are still needed anyway. Change-Id: Iae65e3460812a60e2aafecd553bf4241bd640d04 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update obsolete URL's in test data.Jason McDonald2011-12-212-4/+4
| | | | | | | Task-number: QTBUG-19653 Change-Id: I5682c9d99569a318ea8ffc7fa883cb41f51a32d6 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* qdeclarativexmlhttprequest: Stabilize, ensure deletion of server.Friedemann Kleint2011-12-201-3/+3
| | | | | | | | | Introduce QScopedPointer to make sure the server is also deleted in case the test fails thus suppressing follow-up errors caused by the port still being in use by a leaked server. Change-Id: I9fd8a96ea5aba42487df8f22bc9a79917b9d8c16 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* QQuickLineControl more robust on input method & selection statePekka Vuorela2011-12-201-0/+8
| | | | | | | | | | | | | Input method event having replacement information out of bounds left the controller in selection state when it shouldn't be. Also now more liberal on accepted events. We cannot detect if input method is confused for replacement inside boundaries, but going beyond the end is more likely to be meant to replace until the end than to leave previous text in addition to the new one. Change-Id: I485009ac682c11876b39f7e22d7dfb91a6d162fe Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Small Text creation performance improvements.Martin Jones2011-12-201-2/+4
| | | | | | Change-Id: Ie92129887730d3738e14116cf22e1c30b836a415 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Delay masking the last character in Password echo mode.Andrew den Exter2011-12-201-5/+11
| | | | | | | | | | | | | | | If QT_GUI_PASSWORD_ECHO_DELAY is defined in qplatformdefs.h with an integer value in milliseconds, QLineEdit and TextInput will display the last character entered unmasked for that delay period and then mask the character as normal. If QT_GUI_PASSWORD_ECHO_DELAY is not defined then the behaviour is unchanged. Task-number: QTBUG-17003 Task-number: QTBUG-20719 (cherry picked from commit f9e7aee2019d321edd655bfde7de43f20a106971) Change-Id: I9a8647a0adeb94fc6beea949cdce7336671c898e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add wrapMode and verticalAlignment properties to TextInput.Andrew den Exter2011-12-204-35/+163
| | | | | | | | | | | | Wrap mode provides an alternative to horizontal scrolling when the width of the text exceeds the width of the TextInput. With auto scroll wrapping introdoces an implicit verticalAlignment so support setting it explicitly as well. Task-number: QTBUG-22305 Task-number: QTBUG-16203 Change-Id: I1bd3a5335edb3ac48df3d5ccd8ae7274caa91883 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Ensure items in ListView and GridViews viewport are visible.Andrew den Exter2011-12-204-4/+473
| | | | | | | | | Unrequested items and items in the cache buffer are hidden by the views. Make these items visible again if they enter the viewport due to a relayout. Change-Id: I574d1513e88c31c3c01a4a20ac77c21111279d3e Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Qt.locale() always returns the 'C' locale.Martin Jones2011-12-201-0/+12
| | | | | | | | 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-0/+289
| | | | | | | | | | | | 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>
* Implement "headless mode" for hidden QQuickCanvasesGunnar Sletta2011-12-194-1/+113
| | | | | | | | | | When all views are hidden, we stop the rendering thread, kill the OpenGL context and all scene graph content. The entire scenegraph is recreated based on the QML scene when a view is shown again. Change-Id: I734619d9f29263a5cdecbcc9b88c3808d1d64a7f Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Correctly resolve elements of QList<QUrl> propertiesChris Adams2011-12-192-0/+61
| | | | | | | | | | 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>
* Remove another fragile assumption from var prop unit testChris Adams2011-12-191-1/+2
| | | | | | | | | Commit 32c6ba2c3802bfda11e455c8aaaee41662c237fb removed hardcoded prop indices from one test, but missed another test case which also hardcoded a property index. Change-Id: Iaac863f8176d09077ce1773b642cb88a01cc3fd1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix compilation due to header changesSergio Ahumada2011-12-174-4/+4
| | | | | | | | | | - Fix QtGui/QApplication => QtWidgets/QApplication - Fix QtGui/QStylePlugin => QtWidgets/QStylePlugin - Fix QtWidgets/QStringListModel => QtCore/QStringListModel - Fix QtWidgets/qstringlistmodel.h => QtCore/qstringlistmodel.h Change-Id: I8df28f032f039107b900c81be27d2d6e5e69e06e Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* DeclarativeDebug: Add version info to service pluginsAurindam Jana2011-12-165-26/+16
| | | | | | | | Send the version info of each plugin alongwith the plugin names to client. Change-Id: I223689b32cdc5b0c48a4f508330033352b427937 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Make PlainText the default textFormat of a TextEdit.Andrew den Exter2011-12-162-2/+68
| | | | | | | | | | | With AutoText as the default it's easy to assume that a TextEdit accepts plain text or rich text only which can lead to unexpected behaviour when user supplied text is does not have the expected formatting and implicitly changes the text format. Task-number: QTBUG-23109 Change-Id: I08900fb23545672fd0e181058633bafeb826a746 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Merge QQuickLineControl into QQuickTextInput.Andrew den Exter2011-12-161-4/+2
| | | | | | | | | | There's no clear separation of responsibilty between these classes and keeping them in sync and forwarding signals is a unnecessary overhead that can be avoided by combining them. Task-number: QTBUG-22627 Change-Id: I4350eb3c612b10d4ed34886374889ae893b8183a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* V8: Remove extra V8::Context allocated for expressing strong referencesSimon Hausmann2011-12-152-5/+29
| | | | | | | | | | | | Moved the Referencer code into QV8Engine and re-used the available v8 context there. That also makes things a bit cleaner in the sense that now references from one object to another are guaranteed to be within the same context. Previously some strong references would be across contexts that do not actually share a security token. Change-Id: I717b27a4d96323feb570023d4d84f2b2176d1a84 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com> Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Add support for QUrl types to V4Roberto Raggi2011-12-153-0/+38
| | | | | | | | | | | | | Extended the V4 instruction set with instructions to `fast convert' url registers to string and bool registers and `resolve' urls using QDeclarativeContext::resolvedUrl. Also, made IR::UrlType a special `string' type. It's a little trick to ensure that the compiler will generate correct conversions for the binary expressions. Change-Id: Ibc9e5b99302bd513f0cc52b598a1b198b11d4d30 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* QV8DebugService: add version commandAurindam Jana2011-12-151-0/+21
| | | | | | | Version command to retrieve debugger version info. Change-Id: I711e2a3d639c648cef50498fe5bbb9b6b8c6c1fe Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Fix that QJSEngine cannot be used from threads other than the gui threadSimon Hausmann2011-12-151-0/+30
| | | | | | | | | | | | | Implicitly allocate & enter an isolate per thread if needed, store it in TLS and exit it upon thread destruction. As the code that represents QObject dependencies in the GC through implicit dependencies uses its own context, its per-thread data is folded into the v8engine TLS to ensure that it is destructed before the isolate is exited. Task-number: QTBUG-23099 Change-Id: I86538b54939b2fe64db843052eac04c7fd31813e Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Don't emit model reset on completing a VisualDataModel.Andrew den Exter2011-12-156-39/+330
| | | | | | | | | The views try and retain their current state as much as possible on a reset which prevents the current item being set to a valid item as would happen if the VisualDataModel was completed before the view. Change-Id: I593a850aeeb58846ab500f193487db4033e26399 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Activate links in a read only TextEdit.Andrew den Exter2011-12-152-0/+45
| | | | | | | | | Don't ignore mouse press events if the LinksAccessibleByMouse interaction flag is set. Task-number: QTBUG-23065 Change-Id: I25b3e3b0cf194b71fc863ed239196a567f42c19c Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove fragile assumption from var properties unit testChris Adams2011-12-151-2/+2
| | | | | | | | | Previously, the test included some hardcoded property index values which would break if the layout of an item changed. This commit ensures that the index of the properties are looked up dynamically. Change-Id: I5a499f81a0cb859d89f0972eb7cd645107336bc9 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove unused code from QQuickTextControl.Andrew den Exter2011-12-151-2/+2
| | | | | | | | | | | QTextControl included a lot of functionality that was unused by TextEdit. Anything that is unused and therefore untested should go. Task-number: QTBUG-22627 Change-Id: Ie68b279cb8618bec0af76287c7c4db34d0642a0a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* qdeclarativelanguage-test: Fix location.Friedemann Kleint2011-12-151-20/+11
| | | | | | | | Introduce the standard method of locating test data (QFINDTESTDATA). Change-Id: I4074396a7631cf68060c02b716fa7e1b95d6e22d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update QDeclarativePinchArea autotest.Laszlo Agocs2011-12-151-20/+30
| | | | | | | | Similarly to the QtQuick2 tests this one also needs some minor changes to make it compile with the recent touch changes in qtbase. Change-Id: Ie7114dc181579b45c850cb0cf18eb1168a37d8d4 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QV8DebugService: Add breakaftercompileAurindam Jana2011-12-141-0/+28
| | | | | | | | Add breakaftercompile command that will set the v8::DebugBreak() whenever a new script is compiled. Change-Id: Id9027066826b6de621058d3170fa628463ef0152 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* QV8DebugService: Simplify the service codeAurindam Jana2011-12-1412-336/+777
| | | | | | | | | Removed all parsing functionality. The service only acts as a delegate to v8 debugger. Apart from that, it calls the v8 debug static APIs when requested by client. Change-Id: I2917c2d080e5b409a4b5f39d386279c33634cade Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* TextEdits to include tentative commit in text propertyPekka Vuorela2011-12-141-1/+13
| | | | | | | | | | Similar to what qtbase 1dbfbf4c66187e7522888c19d78024cfceaea570 did for QTextEdit. Now available only in plain text, html support pending. Change-Id: I0b23a45fc484512d3354f66e1a6134e2d70eb8b5 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Cleanup: Fold QV8GCCallback class declaration(s) back into qv8engine_p.hSimon Hausmann2011-12-142-2/+0
| | | | | | | The implementation lives in qv8engine.cpp. Change-Id: I2898556fea867cdc82ea534eaf020dd8d12b25d6 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Correctly ignore unknown tags in StyledTextMartin Jones2011-12-141-21/+67
| | | | | | | Also improve tests to compare expected formatting and improve coverage. Change-Id: I021dbdcd147dd7340a0dc1c30f4b104f22efece0 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Fix crash when items are moved in model.Andrew den Exter2011-12-141-0/+17
| | | | | | | | | | | When erasing an item we need to backtrack to the previous item so the next iteration doesn't skip an item. In the worst case the next item is the last and a failure to backtrack will cause the loop to wrap around and run over the list again. Task-number: QTBUG-23107 Change-Id: I82156f6fc1f7973ba11f09a4694230c77c293757 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* QV8Engine: Console APIs, Extend functionalityAurindam Jana2011-12-143-7/+19
| | | | | | | Added console.trace, console.profile, console.profileEnd. Change-Id: Icc38ddd550989eaba0085ece120695a13ec17322 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Made QSGNode flags togglable and added StaticSubtreeGeometry.Kim Motoyoshi Kalland2011-12-141-8/+8
| | | | | | | | | | | | The UsePreprocess and ChildrenDoNotOverlap flags could previously only be set during node initialization. They can now be toggled. This change also introduces the StaticSubtreeGeometry flag which is meant to be used to indicate that all the nodes in the sub-tree have static matrices and vertex data. Change-Id: I3b182b81f7010aea636f8f654ef22dab19bc6b29 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Support <strong> in styled text.Martin Jones2011-12-141-0/+1
| | | | | | | Task-number: QTBUG-23105 Change-Id: I15968c43fd0797b94584f110c6aeca06eca832b7 Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Add basic custom easing curve docs and testMartin Jones2011-12-131-0/+16
| | | | | Change-Id: Id38434cb71417276635b501d13d0145759de9864 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Create a copy of QLineControl in the QtDeclarative library.Andrew den Exter2011-12-121-2/+2
| | | | | | | | | | First half of a move of QLineControl from qtbase to qtdeclarative, some time in the future QLineControl will be deleted from qtbase to finish the move. Task-number: QTBUG-22627 Change-Id: I0c3449f57f1a3296a0ff52f2b9a1a78041ae28b2 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix test failures in QtQuick 1 TextEdit and TextInput.Andrew den Exter2011-12-122-32/+40
| | | | | | | | Port various fixes for incompatibilites from the QtQuick 2 item tests. Task-number: QTBUG-21017 Change-Id: I0234fa2623c57138a132558ff4f48602675c3784 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix package items not being destroyed when a package is destroyed.Andrew den Exter2011-12-122-1/+134
| | | | | | | | | The views parent the delegate items to themselves on creation, before we delete the package we need to reparent them back to it or they'll persist indefinately. Change-Id: I01a36fadb2b0ff1035de46ec2b84a54d73c49bcf Reviewed-by: Bea Lam <bea.lam@nokia.com>
* QmlProfiler: stream snapshots to reduce memory footprintMikko Harju2011-12-121-1/+24
| | | | | | | | | | Taking a V8 heap snapshot with QV8ProfilerService created multiple copies of the snapshot data, causing overhead of several megabytes. This patch changes the snapshot protocol to stream the contents over the debugger connection. Change-Id: I90054210233d52dd02aa838201f9b024d578fcea Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Set target and device for touch events.Laszlo Agocs2011-12-093-77/+90
| | | | | | | | | | | The QWidget dependency is being removed from QTouchEvent and therefore widget() will be removed. There will be QObject *target() instead. deviceType() has been deprecated and is replaced by QTouchDevice *device(). Change-Id: Ic07b2c620fbfc1ae2e5eff85c8fc7269c7d5e2a8 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>