aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Document new Path elements.Michael Brasser2012-01-051-0/+1
| | | | | Change-Id: Ic1e2aa7da63a7d9e12357a609fc52b3913f14f28 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Support <pre> in StyleText textFormatMartin Jones2012-01-051-0/+1
| | | | | | | Task-number: QTBUG-23159 Change-Id: I842d066efb3a78defba61cc31060840f771f9b11 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Make tst_QQuickListView::margins() more reliableBea Lam2012-01-051-1/+2
| | | | | Change-Id: Ib66f5717316b4c8d71dbef408afbbb9b0698ad7a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Eliminated usage of qttest_p4.prf in newly added test.Sergio Ahumada2012-01-051-2/+4
| | | | | Change-Id: I8f531276e1d769be116fea155c4c68cd698b8fec Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix clipping of TextInput contents.Andrew den Exter2012-01-051-16/+52
| | | | | | | | | | | | The boundingRect represents the clip rectangle of an item rather than the size and position of its unclipped content. This would prevent any content from being clipped except the boundingRect is only re-evaluated when the size of the item changes so the content is instead clipped to the size of the original content. Task-number: QTBUG-23422 Change-Id: I96f830f833129b3230f65452db67b00028c40d6a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use QSignalSpy to save some codeGunnar Sletta2012-01-041-24/+5
| | | | | Change-Id: If4a9b68c39facdca34482bbf3dc22ae607b294e8 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Fix moving mixed visible and non-visible View items.Andrew den Exter2012-01-041-0/+19
| | | | | | | | | | | | | | A removal for a move that included both cached and non-cached was only evaluating the first part of the removal and skipping the remainder. Don't skip all subsequent removals when two ranges are merged, instead reset the current indexes to the start of the merged range and continue on as normal. Task-number: QTBUG-23432 Change-Id: Ieda49e2f68cd0bbbd31ba1e7dfd5af7c3e350d78 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Add length property and insert, remove and getText functions to TextInput.Andrew den Exter2012-01-041-0/+797
| | | | | | | | These mimic the functionality of their pre-existing counterparts in TextEdit. Change-Id: Idcb7549cd07ed3c287ab00b7828a3158690faf0e Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix crash in TextInput.Andrew den Exter2012-01-042-0/+34
| | | | | | | | | Ensure the text is laid out before calling componentComplete() on QImplicitSizeItem, as that can potentially evaluate bindings which would then access the uninitialized layout. Change-Id: I5152c1494c54209dae61c13b2f45d343fb76bf9e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Introduce layerering support (ShaderEffectSource) directly in ItemGunnar Sletta2012-01-0311-2/+594
| | | | | | | | | | | | | This is enabled by doing "Item.layer.enabled: true". The implementation is solely based on the existing shader effect (source) and simply swaps in a sibling next to the item when enabled. This change also adds the QSGTextureProvider to the public API, as it is now a natural part of the QQuickItem API since all items can be textures. Change-Id: I26705c11e92d5623a5121300acc123782b784077 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Combined platform input contexts in tests into one sharedPekka Vuorela2012-01-035-164/+100
| | | | | Change-Id: Ie56f5f8ca5617db6be92d256d455cae585cd6a71 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Use Qt::ImhSensitiveData input hint on TextInput with password echo modePekka Vuorela2012-01-031-4/+4
| | | | | Change-Id: I1e9255af24b51ca42c1e6df7a92664be532ce725 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Fix test failures with shadow builds.Andrew den Exter2012-01-0363-206/+215
| | | | | | | | | | QFINDTESTDATA uses __FILE__ to determine the source directory, which means it finds the wrong source directory when the macro is used from a shared base class. Define the correct source directory in a pri file and include that wherever QDeclarativeDataTest is used. Change-Id: If3ef435f4bb3049733f49402338303c8b440f1fa Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Simplify MultiPointTouchArea signal names.Michael Brasser2012-01-032-4/+4
| | | | | Change-Id: I0617bf7138b76495c111739e2cbdf3b77c4b6a5d Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Add accessibility to qmlFrederik Gladhorn2012-01-025-0/+570
| | | | | | | | | | | | | | | This consists of two parts: An attached property for QML items and a plugin for the accessibility framework. The attached property simply takes care of some properties (name, role) that are needed in order to expose semantics of the application to assistive tools. The plugin exposes the hierarchy of QML items to the accessibility framework. Change-Id: I32f5603d0d9549b01b3645b205b710b9801762f7 Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* touchUpdated should be called for release and cancel.Michael Brasser2011-12-303-1/+17
| | | | | | | | touchUpdated should be emitted whenever the touch is updated, even if the update means there are no longer any valid touch points. Change-Id: Iceac5a65094784928108acc764bbc1d5c2b9a08a Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Handle exceptions inside QV8QObjectConnectionList::qt_metacallChris Adams2011-12-292-0/+39
| | | | | | | | | 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>
* Invisible items should not respond to touch events.Michael Brasser2011-12-281-0/+28
| | | | | | Task-number: QTBUG-23327 Change-Id: I959c9ba40e4ce3972fc3fde2f1c7e73615e78e2e Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* 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-203-35/+161
| | | | | | | | | | | | 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>