aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add accessibility to qmlFrederik Gladhorn2012-01-0236-1/+2281
| | | | | | | | | | | | | | | 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-301-2/+3
| | | | | | | | 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>
* Minor cleanup: use standard emit syntax.Michael Brasser2011-12-301-3/+3
| | | | | Change-Id: Ic8a86e78bc16dd091eb03ba74ffdf831eda65a7a Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Handle exceptions inside QV8QObjectConnectionList::qt_metacallChris Adams2011-12-291-0/+12
| | | | | | | | | 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-1/+1
| | | | | | Task-number: QTBUG-23327 Change-Id: I959c9ba40e4ce3972fc3fde2f1c7e73615e78e2e Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* VisualDataModel performance improvements.Andrew den Exter2011-12-233-27/+16
| | | | | | | | | | | | | | Avoid a linear scan of all cache items and associated accesses by getting the cache item from an objects vdm attached object instead. Make the model context property a property of the context object instead of a separate property on the context object. Parent the vdm attached object to the delegate object with QDeclarative_setParent_noEvent instead of passing it in the constructor. Change-Id: Ib77c5cdb963f3dfe8f2bdef039e010a6bb30140f Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Insert items into VisualDataModel.Andrew den Exter2011-12-236-165/+556
| | | | | | | | | | | 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-238-740/+983
| | | | | | | | | | | | | | 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>
* Add currentSprite property to SpriteImageAlan Alpert2011-12-232-7/+24
| | | | | | | | Also renames goalState to goalSprite, to help distinguish it from item states. Change-Id: I77e81595586e69e47a50a7a767fdb7ad775ad7be Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix crash in var property setterChris Adams2011-12-231-0/+1
| | | | | | | | | | | 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-26/+31
| | | | | | | | | | | 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>
* Reserve enough space in the QDeclarativePropertyCache hashAaron Kennedy2011-12-224-11/+56
| | | | | | | | It was too easy for callers of copy() to pass the wrong reserve size, so a new copyAndAppend() method has been added to reduce error. Change-Id: If2f13e2e0733e5d87c527934dc5a6c8d0c8df572 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Always register accessor propertiesAaron Kennedy2011-12-221-0/+3
| | | | | | | | Otherwise if an Item gets created without the QtQuick module being imported, the engine would fatal. Change-Id: I441c7a61a60f07f2a7e3249253dea359d4ab1c35 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Initialize more variablesAlan Alpert2011-12-221-1/+3
| | | | | Change-Id: I22f98c1562887769bc0f262120bd524f6f3b64df Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Clear pending commits on resetAlan Alpert2011-12-223-2/+5
| | | | | | | They will be caught when the nodes are rebuilt, if they're still valid. Change-Id: Iac6e790b604a7deaba98a50dd07754459e9f5e14 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Detect and optimize qsTr() and qsTrId() bindingsAaron Kennedy2011-12-217-40/+210
| | | | | | | | | 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>
* Debugger: Allow transmissions of network packets in one goKai Koehne2011-12-219-24/+38
| | | | | | | | | We did call a flush() after every single packet, which was slowing down things especially for the QDeclarativeDebugTrace service. Change-Id: Idab074941a22364e154502eb12afa43b4dd33c22 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com> Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Reference count glyphs in QSGDistanceFieldGlyphCache.Yoann Lopes2011-12-215-39/+38
| | | | | | | | | | | | | This was previously done only in the default cache implementation. It has been moved to the base class. releaseGlyphs() is called when a glyph is not referenced anymore by any node. Added a virtual function referenceGlyphs() that is called everytime glyphs are being used in a node. This function is called just before requestGlyphs(). Change-Id: If90f86c328c18ae2a5977847a6adf50b99ea1241 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* Remove uneccessary layout in TextInput initialization.Andrew den Exter2011-12-212-28/+12
| | | | | | | | | | 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>
* Delay initializing the canPaste property until it's requested.Andrew den Exter2011-12-215-8/+27
| | | | | | | | | | With xcb querying data from the clipboard can take as long as 50 ms. Deferring the check until it is requested speeds up construction time when it's not used and only checking the available formats when it is requested should also help. Change-Id: I796fc83d0457d9ac1490cfb9f510c6342eb8a872 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Debugger: Fix livelock on exit (Windows)Kai Koehne2011-12-202-14/+32
| | | | | | | | | | | | We used to close the debugger thread when the last service was killed: This happened in the unloading of static global variables. Apparently this is too late on Windows, since the OS thread associated was already terminated. Instead, we now kill the instance when the QCoreApplication event loop is exiting. Change-Id: I12a46ab9e7ac64561c94c0cd0d88b78fbaf8554c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Make editors commit preedit themselves on losing focusPekka Vuorela2011-12-203-4/+9
| | | | | Change-Id: I1d42a8804068718c7347b4f652289f9724c25a3c Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Use input event timestamps in QQuickFlickable if available.Andras Becsi2011-12-202-15/+32
| | | | | Change-Id: If89ad205dec9ffdba4ca196cdc1a2e5fd9258260 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QQuickLineControl more robust on input method & selection statePekka Vuorela2011-12-201-0/+1
| | | | | | | | | | | | | 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>
* Debugger: Get rid of SG* prefix in qtquick2 pluginKai Koehne2011-12-208-76/+76
| | | | | Change-Id: Ib8a40d633c169652258480748cfc162593ed9f6c Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Emit the QQuickCanvas::frameSwapped signal again.Gunnar Sletta2011-12-202-1/+6
| | | | | | | This got lost in the window manager rewrite Change-Id: Ibaed76814ae676ce4ce3f50def196b8d67fd3df0 Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
* Remove hardcoded assumptions about methods in QObjectChris Adams2011-12-201-4/+7
| | | | | | | | | | This commit ensures that the number of methods available from the QObject::staticMetaObject is looked up rather than hardcoded to a value in the QDeclarativePropertyCache. Task-number: QTBUG-22985 Change-Id: If61c02f0d32066cddaeac2d8143c58db97acb609 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Small Text creation performance improvements.Martin Jones2011-12-202-30/+56
| | | | | | 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-202-3/+54
| | | | | | | | | | | | | | | 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-142/+323
| | | | | | | | | | | | 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-203-4/+15
| | | | | | | | | 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>
* Fix affector group cachingAlan Alpert2011-12-202-2/+5
| | | | | | | | It was possible for the cache to be updated before groups were properly assigned, and it didn't update when they were. Change-Id: If6835e2aad4a2412d17eb727da5d2414e4c20d60 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix sprite choppingAlan Alpert2011-12-201-2/+2
| | | | | | | Had some rounding around the wrong way. Change-Id: I90ea339c35074ca7287c069bdbdd106578b1501b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Qt.locale() always returns the 'C' locale.Martin Jones2011-12-201-1/+4
| | | | | | | | 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 valgrind warning.Andrew den Exter2011-12-201-1/+1
| | | | | | | | Update the initial values of the VisualDataModel attached object when binding to an object. Change-Id: I2e11c8bf13198e848d11c8cea9885cb64240f941 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't enable multiline eliding unless wrap is enabled.Martin Jones2011-12-201-4/+4
| | | | | | | | | | Setting the height of the Text element to less than the height of the font caused the multiline eliding to activated. Also ensure multiline eliding only elides a truncated first line if it does not fit in the width allowed. Change-Id: If7e88d6ad82cb12cdb53d92616e62c3895611115 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix QDeclarativePropertyCache crash.Andrew den Exter2011-12-202-13/+34
| | | | | | | | | | | | 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-193-17/+59
| | | | | | | | | | 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-191-25/+40
| | | | | | | | | | 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>
* Fix compilation due to header changesSergio Ahumada2011-12-171-1/+1
| | | | | | | | | | - 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-1611-27/+79
| | | | | | | | Send the version info of each plugin alongwith the plugin names to client. Change-Id: I223689b32cdc5b0c48a4f508330033352b427937 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Fix sprite-less sprite modeAlan Alpert2011-12-163-28/+37
| | | | | | | | | | | Sprite performance mode is supposed to work even without sprites, mostly for testing purposes. Also renamed the testing variable from bloat to bypassOptimizations, and removed it from the QML API (although it previously was hidden). Change-Id: I436554d4ee2ed3a1770839b28aba8d8ef843469a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add some more particles debugging informationAlan Alpert2011-12-161-0/+8
| | | | | | | | Output registrations to help make system ownership clear. Only if debug output flag set. Change-Id: I75370eff1140e54aa5c23cc820342c89ef3af282 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Make PlainText the default textFormat of a TextEdit.Andrew den Exter2011-12-162-2/+3
| | | | | | | | | | | 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-166-2206/+1896
| | | | | | | | | | 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-154-111/+75
| | | | | | | | | | | | 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>
* Fix IR code generation for member expressionsRoberto Raggi2011-12-151-13/+15
| | | | | | | | | The generated code for member expressions (e.g. parent.width) was using a wrong mix of types from the base object and names from the current member expression. Change-Id: I167df285ae44f9dc1538e2b1019998f02a0479a8 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Add support for QUrl types to V4Roberto Raggi2011-12-155-12/+169
| | | | | | | | | | | | | 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-31/+32
| | | | | | | 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-153-52/+63
| | | | | | | | | | | | | 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>