aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add QJSValue::callWithInstance() functionKent Hansen2012-01-202-4/+17
| | | | | | | | | | | | | | With the deprecated call() overload, it was confusing what the first argument was (the this-object or an actual argument passed to the function). Introduce a dedicated function for the "explicit this-object" case. This makes code more readable, and eliminates the need to pass a "dummy" this-object to call() in the quite common case where you don't care about the this-object. Task-number: QTBUG-23604 Change-Id: I18f8be6592a848436351516bea266fc7e9195777 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Add QJSValue::call() overloadKent Hansen2012-01-202-0/+23
| | | | | | | | | | | | This overload takes only an argument list, not a this-object, since that is a very common way of calling stand-alone ("non-member") functions. Now there is no longer a need to pass a dummy value for the this-object. Task-number: QTBUG-23604 Change-Id: Iae952d91fce5bcaa62a05b9978c15f32802da90a Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Add QJSValue::isCallable() functionKent Hansen2012-01-202-3/+16
| | | | | | | | | | | This replaces the isFunction() function. isFunction() will be removed. It's possible that objects are callable even if they aren't Function instances. Also, "isCallable" is consistent with call(). Task-number: QTBUG-23604 Change-Id: I42e0ab2ad9dc84e7793199254bbd89d5c9466e6a Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Add QJSValue::toInt() and toUInt()Kent Hansen2012-01-203-5/+31
| | | | | | | | | | These replace toInt32() and toUInt32(), which are obsolete and will be removed. Task-number: QTBUG-23604 Change-Id: I83c055dbbe399fa7242889cee8a177440a693d9a Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Add QJSValue::deleteProperty() functionKent Hansen2012-01-202-1/+30
| | | | | | | | | | | This makes it possible to delete a property without relying on passing a QJSValue of invalid type to setProperty() (the invalid type is going to be removed). Task-number: QTBUG-23604 Change-Id: I653b3349050ad1aac1cf6ccc8547c753abbb9f1d Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Add QJSValue::hasProperty() and hasOwnProperty() functionsKent Hansen2012-01-204-1/+52
| | | | | | | | | | These functions provide a way of querying whether a property exists, without relying on the QJSValue invalid type (which will be removed). Task-number: QTBUG-23604 Change-Id: I2efd53a1e54cc202ecc022d12730b2775384cf53 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
* Build fix.Jędrzej Nowacki2012-01-201-1/+0
| | | | | | | | QBool was removed from QtBase in change I6642f43f (Remove QBool and use bool instead) Change-Id: Ia4c5d12fae8779d7e8c880755cd16e215f073a6d Reviewed-by: David Faure <faure@kde.org>
* Added a few material flagsGunnar Sletta2012-01-204-3/+11
| | | | | Change-Id: Id324ebb82df985f1a7380761cc4923f60c7d1f20 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Use queryAccessibleInterface instead of new QAccessibleQuickItemJan-Arve Saether2012-01-201-7/+2
| | | | | | | | | In some cases this could prevent us from actually returning the expected QAccessibleQuickItemValueInterface. This is also more future-proof in case we add more QAI subclasses. Change-Id: Id66dc21418671a3045d93c0a44dc74aa0aff30af Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Doc: Improve Qt.locale docs.Martin Jones2012-01-201-2/+2
| | | | | Change-Id: I3ef5c4a0bedbaa346b001852bba8e9ff9347e9e0 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Remove the use of QT_MODULE()Gunnar Sletta2012-01-20119-119/+0
| | | | | Change-Id: I1c07231b0bf412fe490a44b9a060bb2e2ef11154 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update TextInput.acceptableInput on component complete.Andrew den Exter2012-01-202-22/+57
| | | | | | | | | | | | QValidator doesn't notify when it's validation criteria changes so is susceptible to order of evaluation issues. Deferring the initial validation will ensure validators with static criteria are correctly applied. Notification from QValidator on changes would solve this for all cases: QTBUG-23694. Task-number: QTBUG-21103 Change-Id: I920f36645fd18ce809db56b5daf73545f1d603dc Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix lockup in views due to endless polish loop.Martin Jones2012-01-205-84/+120
| | | | | | | | | | | | | It was possible to cause an endless polish loop in some rare cases. Eliminate all calls to polish() within existing polish() code paths. Cleanup delegate creation and cancelling in the cacheBuffer area. Adjust first item position correctly when inserting/removing before visibleItems list. Change-Id: I508a2e6de8cb09d904466cbf5fb6b5dfd1e89c49 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Assigning empty object to Q_PROPERTY(QVariantMap)Matthew Vogt2012-01-191-7/+8
| | | | | | | | | Correct the evaluation of an empty javascript object during assignment to a QVariantMap property. Task-number: QTBUG-23586 Change-Id: Ifa891a017690a36bd5837bc6b4dd0e47eb515a46 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Extend the documentation on DoubleValidator.Andrew den Exter2012-01-191-0/+17
| | | | | | | | Elaborate on what is valid, intermediate, and invalid. Task-number: QTBUG-22081 Change-Id: If0ef270eaee60b530fdf6275e36b2208d41c7639 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add a baseUrl property to Text and TextEdit.Andrew den Exter2012-01-196-3/+104
| | | | | | | | | Specifies the base URL which embedded links in rich text are resolved against. By default this is the URL of the item. Task-number: QTBUG-23655 Change-Id: Ib51b8503a18d9ac4e1801c77b77b3595d8f4912a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Don't load embedded images from the current working directory.Andrew den Exter2012-01-197-29/+132
| | | | | | | | | | | Override QTextImageHandler's image loading as it will attempt to resolve relative paths and load the image itself if the document returns an invalid image from loadResource, which we don't want as it bypasses the pixmap cache and resolves against the application and current working directory instead of the Text items context. Change-Id: Ia1d3633036f96d902e1ac03dae5d5b203fba7ff1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Change testlib skipAll function to failure.Jason McDonald2012-01-191-5/+3
| | | | | | | | | | Be more insistent that tests using the obsolete skipAll() function should change to using skip() by treating calls to skipAll() as test failures. After a further grace period the skipAll() function will be removed. Change-Id: Ic2448af2f8176909afa151b6e8c29587dfd17f1f Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use mediump in distance field shaders for the alpha threshold.Yoann Lopes2012-01-181-12/+12
| | | | | | | lowp or highp cause some problems depending on the hardware. Change-Id: I2762c04548656de8fdb34711f52e5cf05d8c2ac5 Reviewed-by: Yoann Lopes <yoann.lopes@nokia.com>
* The rendering signals must be direct connections.Gunnar Sletta2012-01-181-2/+2
| | | | | Change-Id: I6fd492096e21dfe1580d003cd9165a2d4c7f37dc Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Allow QML URLs to contain pre-encoded octetsMatthew Vogt2012-01-184-14/+44
| | | | | | | | | Use QUrl Tolerant parsing mode to permit user-supplied URLs to contain pre-encoded octets which are not mangled by string conversion. Task-number: QTBUG-22756 Change-Id: I4b160b04340b95221d1eb3336bda8c0b38d2e232 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Insertions were calculating wrong insertion posBea Lam2012-01-184-87/+102
| | | | | | | | | | | | | | | | | | | | | | | After removes, and after each insertion, the view must adjust the visibleItems.first() position and call layoutVisibleItems() to ensure that the correct insertion position is calculated for insertions that follow. When applyInsertionChange() in GridView and ListView calculates the position for item insertion, it looks at the current positions of the items in visibleItems, so these positions must be updated prior to this calculation. Otherwise, insertions that follow a remove may not calculate this position correctly and will neglect to add some items, and multiple insertions may unnecessarily create items at positions that are not actually visible. resetFirstItemPosition() is changed to take a set position and it replaces resetItemPosition() since it can do the same thing. Task-number: QTBUG-23610 QTBUG-23609 Change-Id: I8839ee7d15853301435e80c0dc563f93fc3605cf Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Made QQuickTextInput follow input direction changesPekka Vuorela2012-01-173-7/+32
| | | | | | | | | | | | | Cursor of empty field should align based on input method direction. Now input method allowed to change direction on run time. Also earlier cursor wasn't properly drawn on correct alignment at all. Change-Id: I4601f10e6b5dde09591bd484b05f001add6c1573 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com> Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* QQuickTextEdit to follow input method direction changesPekka Vuorela2012-01-172-0/+19
| | | | | | Change-Id: I458f85452a2ffe1c43438f9588cfc271461a42c6 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* Debugger: Simplify protocol of QDebugMessageServiceKai Koehne2012-01-171-6/+2
| | | | | Change-Id: I3f97a344b8d0e0d73a75e84310c1e8ed59573ee7 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Fix crash when using namespaces for JS module APIs.Glenn Watson2012-01-171-1/+1
| | | | | | | Fix unitialized variable in constructor. Change-Id: Ibc39d7512990ad293789280e26797be1ecd1ade1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Connection was accidentally of the Queued varietyAlan Alpert2012-01-171-1/+1
| | | | | | | | | | | This connection needs to be direct, because right after that signal is emitted the next frame is drawn (before we return to the event loop at least). The sprite updating needs to happen in time for the frame or the sprites get confused. Task-number: QTBUG-23407 Change-Id: Ie56465145461486456462154dfafe546fedaaaaa Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update copyright year in Nokia copyright headers.Jason McDonald2012-01-17126-126/+126
| | | | | | | | Update copyright headers from before 2011, and a couple of new ones that were merged after the previous change to copyright headers. Change-Id: Ia76e08e2734afa4ef3f1207dbcda5ff3bc81b366 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Match QRect changeAlan Alpert2012-01-171-7/+0
| | | | | | | | 3b973971fb1e483b9b3514358a415781c3c24ba8 changes the order of data members on mac, the struct we're using to fake QRect needs to match. Change-Id: Id2ecf1726e64514e12dd72980a0c0ad2b693c483 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Added log and status properties to ShaderEffect.Kim Motoyoshi Kalland2012-01-166-36/+221
| | | | | | | Task-number: QTBUG-23531 Change-Id: I136f6d9642ff9d4074fe8dae1f5714a05349107a Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Console API: Add console.infoKai Koehne2012-01-162-2/+5
| | | | | | | | Add console.info for the sake of completeness. It's mapped to qDebug(), just like console.log, console.debug, print. Change-Id: Ife1cfbfe810d4e5e9175343778dff734a56f4a80 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Remove all reimplementations of relationTo() returning Unrelated.Jan-Arve Saether2012-01-162-6/+0
| | | | | | | | QAccessibleInterface::relationTo() already return QAccessible::Unrelated by default. No need to duplicate that code. Change-Id: Ie64e798a1935619af32ae41d7e14ae26bd9bf523 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix preedit text visibility for TextEditJiang Jiang2012-01-161-30/+55
| | | | | | | | | | | | | For an empty TextEdit with preedit text, we need to add the text separately since the blockIterator will not go through that case. Also fixed preedit text appended at the end of any commited text. Move the code for adding text into SelectionEngine so that we can reuse it for adding preedit text. Task-number: QTBUG-22647 Change-Id: Id4fe04099b16949ff5de0747881c6dc96ef0673f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* QDeclarativeExpression: storing column number in expression locationChristiaan Janssen2012-01-1626-61/+89
| | | | | Change-Id: I2d69738158abfc76f80b1cfc0e0ccb145fda2245 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Avoid creating unnecessary copies of TextEdit's text data.Andrew den Exter2012-01-164-21/+26
| | | | | | | | Delay rebuilding the text data from QTextDocument until it is actually requested rather than everytime the contents of the document change. Change-Id: Ibfdc9e9e0372010f0731fb02a223c8b59a67f2c3 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Test more of QQuickImageParticleAlan Alpert2012-01-162-4/+3
| | | | | | | | | | | | | Now the color variance properties are tested, as is the debug code. Just running the debugging code is valid testing, as it contains pointer derefernces that could cause runtime errors, and this codepath is not always enabled at runtime. Additionally, debug mode control has been consolidated in the ParticleSystem. However, this was not necessary for this test addition. Change-Id: Ie56465145461486456462154dfafe546fedabcba Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Handle views with negative width/heightMartin Jones2012-01-162-19/+7
| | | | | | | | | A view with a negative d->size() would get stuck in an infinite loop. Also make sure item layout/visibility is updated when the view size changes. Change-Id: I1f16a714ecebe1c4b71902c460e27fb0f1c4406f Reviewed-by: Bea Lam <bea.lam@nokia.com>
* lower case QML components are accepted when used with 'as' importMatthew Vogt2012-01-161-5/+20
| | | | | | | | | If an Object Binding is in a namespace, ensure that the Component name begins with a capital letter. Task-number:QTBUG-20786 Change-Id: Id4a0c0fdb0c9b9516bea597a4994bb7519339bc9 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* QTouchEvent::TouchPoint::isPrimary() is gone.Samuel Rødal2012-01-131-1/+1
| | | | | Change-Id: I6fbaac28a060fd527e0226d55419a9055125368a Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Reintroduce plugin support for asynchronous hardware specific texturesGunnar Sletta2012-01-135-80/+110
| | | | | Change-Id: Iad36542d2137e7a6470009c308ece3de389907c1 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Don't delete global appCharles Yin2012-01-131-1/+4
| | | | | | | | Sometimes delete the global GUI app causes crash, this is a work around fix. Change-Id: Ic2406e7a085483de5d96321de8257663925b7e5e Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix preedit text visibility when TextInput is emptyJiang Jiang2012-01-121-1/+1
| | | | | | | Task-number: QTBUG-22646 Change-Id: I5162ffdebdee6f956a9a79b2307a2ac53cc4890b Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
* initialize variableGunnar Sletta2012-01-121-0/+1
| | | | | Change-Id: I4841dce8e85df608fd0e38f661301797a3857176 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove out-of-line uses of qMalloc/qFree/qRealloc.Robin Burchell2012-01-1210-33/+33
| | | | | | | | | Per http://codereview.qt-project.org/#change,11562, we are trying to remove these in favour of direct allocation, or (in the case of inline code) specialised out-of-line wrappers. Change-Id: I113609c4f97dc5c8020a72cbd398572cdb5b7505 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Adapt to QInputPanel::inputDirection() APIPekka Vuorela2012-01-127-7/+10
| | | | | | | Information moved from QGuiApplication into QInputPanel. Change-Id: Idd80609f4b67bffae7222a1fa27918724ebf60f6 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
* Accessibility: indexOfChild is 0-based.Frederik Gladhorn2012-01-123-6/+3
| | | | | | | Also test for it to work. Change-Id: I3be913984e2dddce241b538c7801f3376acdd1fa Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
* Remove unnecessary reimplementation of invokeMethod()Jan-Arve Saether2012-01-122-7/+0
| | | | | | | | invokeMethod() is not pure virtual, and the implementation inherited from the baseclass is the same Change-Id: I073ab3a0dc3477f66b82535c1898430f601acee8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Make QAccessibleQuickView::childAt() work properly with overlapping itemsJan-Arve Saether2012-01-124-28/+77
| | | | | | | | | | | | | | | | | | | | The previous code did not consider items that were overlapped due to having different z coordinates. The approach used is now the same as found in QQuickCanvas::mousePressEvent(). Strictly speaking, this is a violation of childAt (since it will disregard the implementation of childAt of all the descendants along the path down to the item actually returned.) However, I don't see any good reason for that the implementation for childAt() would be different than how mousePressEvent behaves. It should also perform better than any other solution I managed to think of. Change-Id: I2d3fa2282437c7b5533c6149c62fc456ccf2ccfa Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
* Fix validators not allowing backspace or delete.Andrew den Exter2012-01-122-4/+6
| | | | | | | | | | TextInput will allow non-valid changes to already invalid text, when a validator is changed update the current validity so changes can be made to bring the text back to a valid state. Task-number: QTBUG-22080 Change-Id: I501961b473f58c317bce474b1df8d91fd1f967d4 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add undo and redo functions to TextInput and TextEdit.Andrew den Exter2012-01-127-14/+148
| | | | | | | | | The functionality already existed and was usable through keyboard short cuts but was not accessible through API. Task-number: QTBUG-16191 Change-Id: I080fa2ddb76668a7a632aa7477004f99037ea68b Reviewed-by: Martin Jones <martin.jones@nokia.com>