aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix the evaluation of JS switch statements in QML bindings.Roberto Raggi2011-11-292-0/+57
| | | | | | | Task-number: QTBUG-17012 Change-Id: Ic132cf63ed08592fec9c759df1b8b4d5830acea6 Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
* Properly protect access to pixmap reader thread with mutexChris Adams2011-11-291-12/+41
| | | | | | | | | | | | | | | | | | Previously, access to the reader thread wasn't guarded properly, causing a crash when the reader thread was deleted prior to QDeclarativePixmapData (which then attempted to dereference the thread pointer to cancel the request). This commit adds locking to ensure that access to the reader is protected properly. This commit also fixes an issue where if a QDeclarativePixmapData was deleted after its QDeclarativePixmapReply was removed from the jobs queue but prior to processing, a pointer to the data could be dereferenced as part of processing, but caching the required information in the reply. Task-number: QTBUG-22125 Change-Id: I32aa2ca41a297b48e68cb358f4aa4fafd999f215 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add a length property to TextEdit.Andrew den Exter2011-11-292-0/+22
| | | | | | | | | | This returns the length of the unformatted text in a TextEdit which should be cheaper to query than the length of the text property and meaningful in the context of the selection and cursor properties. Task-number: QTBUG-18949 Change-Id: Ia25c4553693923f97d299f1fdb8bfcf7f5937b13 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add indexed deleter to sequence wrapper, implement length setterChris Adams2011-11-293-3/+87
| | | | | | | | | | | | | | | | | | Previously, elements could not be deleted from sequences directly without reassignment. This commit adds an indexed deleter which allows elements to be deleted by specifying an index. A deleted element will be replaced with a default-constructed element in the sequence (slight departure from ECMA262r3 which specifies that it should be replaced with Undefined). This commit also implements the length property setter according to the requirements on Array [[Put]] by ECMA262r3 which allows removal of elements from a sequence (required for proper behaviour of Array.prototype methods such as splice() and pop()). Task-number: QTBUG-22808 Change-Id: I62511b3edc2ec35f92d2a2bd719278e129c98547 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Initial window implementationAlan Alpert2011-11-297-4/+174
| | | | | | | | | Includes adding a color property on QQuickCanvas. Note that most Window related properties come from the QWindow inheritance. Task-number: QTBUG-19799 Change-Id: I00f6c90a1e2a5c85d787793d6edac2cd7d5309ab Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove unused function magnitude()Kent Hansen2011-11-291-5/+0
| | | | | Change-Id: I58660467ed38e70606ac727f1d82177efaa19805 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix unused variable warning in QQuickItemParticle::takeKent Hansen2011-11-291-0/+1
| | | | | Change-Id: I7664fdc47e7f42f5eda1bfea09def0cb880f49da Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* QDeclarativeInspectorService: Call updateStatus() in GUI thread.Aurindam Jana2011-11-282-2/+2
| | | | | Change-Id: I8eee3df9cb1b01f220827fb278d91bc3fa4332d4 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Fix unused variable warning in QSGContext constructorKent Hansen2011-11-281-1/+0
| | | | | Change-Id: I8b6fbc7765093e3ec98f5847d99dbb406ff71221 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Debugger: Fix compilation error with msvcKai Koehne2011-11-281-2/+1
| | | | | | | | | MSVC "cannot allocate an array of constant size 0". The argument isnt accessed anyway, so we can just pass 0 instead. Change-Id: I3d65707148f045f2ed2779604c164297830bfe87 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
* Add a getFormattedText function to TextEdit.Andrew den Exter2011-11-282-0/+31
| | | | | | | | The same as getText except it include formatting tags if the TextEdit has a rich text format set. Change-Id: I601e8d396254ab6105aa7d105e25b14fcf69c4e5 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix multiline eliding and support eliding when height is set.Martin Jones2011-11-282-89/+100
| | | | | | | Task-number: QTBUG-22920, QTBUG-22116 Change-Id: Ibe78ce1b0b438eec32955b986a8740f173cd082f Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
* Remove QtQuick1-specific define from declarative.proKent Hansen2011-11-281-2/+0
| | | | | | | | This only needs to be defined in qtquick1.pro; it's used in qtquick1/util/qdeclarativeview.cpp. Change-Id: I14dbf3e192218c6cc740295d4f575842de48dddc Reviewed-by: Martin Jones <martin.jones@nokia.com>
* qml debugger: Create abstraction for State managementKent Hansen2011-11-285-64/+260
| | | | | | | | | | | | | State and PropertyChanges aren't part of the core qml types. The (general-purpose) qml debugger shouldn't have to know those types; they are only relevant when QtQuick (2.0) has been imported. Introduce a delegate interface that performs State processing. Implement a delegate for QtQuick 2, and install it when the QtQuick 2 module is imported. Change-Id: I8af1157346ca9365eb0f7b99ccb71744d17fcebc Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Removed ShaderEffectItem and qt_ModelViewProjectionMatrix.Kim Motoyoshi Kalland2011-11-284-26/+0
| | | | | | | | | | ShaderEffectItem was replaced by ShaderEffect, and qt_ModelViewProjectionMatrix with qt_Matrix a while ago. The old names were kept working for a transition period, but it's now time to remove them completely. Change-Id: Ife030d2122250784fe2ec80b1f8645301b0165d0 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* qmltestrunner reports wrong LOC for failed test casesCharles Yin2011-11-281-4/+4
| | | | | | | | | The callerFile() and callerLine() calls GetFrame() with incorrect index, the right index should be the current frame index + 1. Task-number:QTBUG-22887 Change-Id: I694073b80853bf66e02414a158c8e155f8be8390 Reviewed-by: Chris Adams <christopher.adams@nokia.com>
* Rewrite Connections signal handlers at compile time.Michael Brasser2011-11-287-5/+38
| | | | | | Task-number: QTBUG-22726 Change-Id: I039d54661bbf7d44912c894bf0cc1d70023a9187 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* DeclarativeDebugServices: Cleanup CodeAurindam Jana2011-11-257-60/+21
| | | | | | | | Removed addEngine and removeEngine methods from services that do not use the functions of QDeclarativeEngine. Change-Id: Id2ddcbe8cf5706d1e4ca4b59011c7e3574cfdba8 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* V8DebugService: Optimize Code.Aurindam Jana2011-11-252-265/+267
| | | | | | | Replace usage of QJSEngine with V8 APIs. Change-Id: I5221d11c1fb96a4912063d452af437a7f5bdb471 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Remove harfbuzz cruft from {declarative,qtquick1}.proKent Hansen2011-11-252-8/+0
| | | | | | | | | As of b97215b04c0bf12ecfd51ccdeaedd1fab5e8bc03 in qtbase, modules outside of qtbase can include private text headers without depending on the harfbuzz sources being present. Change-Id: Idb3d70d70c1f0f194382a405daa573e66146272a Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* QtDeclarative: Fix building of tests on Windows.Friedemann Kleint2011-11-251-2/+2
| | | | | | | Export inner classes, add missing module. Change-Id: Iabc69ac5f08b70ade994c26d36bd08359fa71137 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
* Fix crash calling VisualDataGroup.setGroups during initialization.Andrew den Exter2011-11-251-1/+2
| | | | | | | | A VisualDataModel's meta type is constructed in componentComplete(), avoid accessing it before then. Change-Id: Ic9fdfa3c458d5da3014289b777f74df87aa97103 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix searchs for insert positions in QDeclarativeListCompositor.Andrew den Exter2011-11-251-3/+3
| | | | | | | | | | | | When scanning for a start range don't stop on ranges that don't have an group flags unless that range is the terminal range. This fixes a couple of issues where moving an item to the end of the list would position it after a prepend only range instead of before it, or would miscalculate the iterator offset resulting in invalid indexes in the insert range. Change-Id: Ic4aa001edf43ec86a65d432cd8f80abf0b44d276 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove ints from mouse event handling.Martin Jones2011-11-252-12/+12
| | | | | Change-Id: Icda13ae3644dc274e08e626545df75d3e561cf87 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Add getText(), insert(), and remove() functions to TextEdit.Andrew den Exter2011-11-252-0/+64
| | | | | | | | | | The getText() function provides access to the plain text content of a TextEdit, and the insert() and remove() functions allow the text content to be edited inline instead of having to assign an edited string to the text property to make any change. Change-Id: Id4edf0312358e2d2db45e4c649b7bd3d22f02ffa Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Improve performance on touch event delivery.Martin Jones2011-11-242-7/+47
| | | | | | | | | | | | We continuously constructed and sorted the paint ordered items for every touch event (and paint), even though the list in most cases is identical to the childItems list, and when it is different it rarely changes. Detect when we can just use the childItems list directly, and otherwise cache the ordered items list. Change-Id: I5db0f19fc021d0c95aa6f8372ae47e6ce138d5ad Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Fix style issuesKent Hansen2011-11-242-3/+3
| | | | | | | Make the Sanity Bot happy. Change-Id: Idb6d7f8c758de991c60e100b76d54ad49e16212b Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Propegate the smooth property to the textureproviderGunnar Sletta2011-11-241-0/+1
| | | | | | | Task-number: QTBUG-22880 Change-Id: I693a44e87fb87bc92e1647f6158d23986f98623a Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* QDeclarativeDebugService: Crash fixAurindam Jana2011-11-241-5/+7
| | | | | | | Query for serviceNames in registerService. Change-Id: I570bd68c424cec696ca813a7fa1b485b64e328a4 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* QQuickTextInput - Remove nonexisting method from headerPekka Vuorela2011-11-241-1/+0
| | | | | | Change-Id: I48aa6efec784ea3ae937636083f6ce211521bfc6 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* TextInput elements not to have tentative commit in inputMethodQueryPekka Vuorela2011-11-242-2/+2
| | | | | | | | Tentative commit should not be part of surrounding text, it's already a property of the input method. Change-Id: I64aec9763fb20770b6729f7f59dcbe23cf5a6718 Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fixed assert during QQuickCanvas::hideEvent().Kim Motoyoshi Kalland2011-11-242-18/+3
| | | | | | | | Also fixed a memory leak in the non-threaded renderer so that it is on par with the threaded one. Change-Id: Ie3111730a9d10085c83f7aafceda240419b722cd Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* ConsoleAPI: Use environment variableAurindam Jana2011-11-241-15/+19
| | | | | | | | | Show detailed information, such as file and line number, for console.log, console.debug and print when the environment variable QML_CONSOLE_EXTENDED is set. Change-Id: I8f660f58d0fd08971ce9706b4a418ed60f312980 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
* Get rid of unused inputMethodQuery and inputMethodEvent functions in ↵Joona Petrell2011-11-242-41/+0
| | | | | | | | | | | | QQuickCanvas * in Qt5 input method events and queries are meant to be sent directly to QInputPanel::inputItem() instead of the focused QWindow * protected inputMethodEvent was actually never called by QWindow::event() like it called other specialized event functions Change-Id: I68cced106808098c320841d6a17a0cc170a8369f Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Move registration of QtQuick 2 types to separate classKent Hansen2011-11-244-8/+129
| | | | | | | | | Just a bit of cleanup to make QtQuick2's definition follow the convention of QtQuick1, in preparation of moving QtQuick2 to its own library. Change-Id: If9e19e5f5512f9417373bb977bcb424186554c8f Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Move QDeclarativeListModel and friends from util/ to qml/Kent Hansen2011-11-2417-25/+17
| | | | | | | | | | | QDeclarativeWorkerScript depends on QDeclarativeListModel et al, so the latter should also reside under qml/. Note that QDeclarativeOpenMetaObject also had to be moved, since QDeclarativeListModel depends on it. Change-Id: I164cba0e530d22b5771056a2acde12a18d5e83e1 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Move QDeclarativeApplication from util/ to qml/Kent Hansen2011-11-246-4/+3
| | | | | | | | QDeclarativeEngine/QV8Engine depend on QDeclarativeApplication, so this class should reside under qml/, not util/. Change-Id: I2cd49ba1170bfb610a7607525891cb80c8828f27 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Remove unused code.Martin Jones2011-11-241-31/+0
| | | | | Change-Id: Ib6ed3b9ff80593ce84930c0837201be3516b7918 Reviewed-by: Damian Jansen <damian.jansen@nokia.com>
* Use the AST for binding rewriting when possible.Michael Brasser2011-11-236-13/+10
| | | | | Change-Id: I1ac8bd39ea7e02f7c236c030ca233e1060746431 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Debugger: Don't register v8 callback until client is attachedKai Koehne2011-11-232-46/+148
| | | | | | | | | | Registering the v8 debugger callback reportedly slows down performance. Do this only if a client is really attached. When attaching, request the already compiled scripts to make sure breakpoint urls are properly adapted. Change-Id: I9ff24b7ca53e13da06f70a9e5860bbd4b9aa0d99 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Debugger: Make registration of services explicitKai Koehne2011-11-237-17/+24
| | | | | | | | | | Services now have to call registerService() themselves in the constructor. This fixes a race condition where the empty implementation of messageReceived() was called instead of the one in the subclass because the object wasn't fully constructed yet. Change-Id: I590ec8b76e906bdb6b5cdcb18680938edde283ee Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Increase the limit of the QDeclarativePixmapCache to something sensibleGunnar Sletta2011-11-231-6/+1
| | | | | | | | The limit used to be much higher, but was changed due to an accidental tag-along in a commit in April. Change-Id: Ie9f868b3059758aef87c2e1979ef22d840631930 Reviewed-by: Bjørn Erik Nilsen <bjorn.nilsen@nokia.com>
* Remove documentation for non-existing functionGunnar Sletta2011-11-231-8/+0
| | | | | Change-Id: I1f08e0501694bde6991eb35adaadb9fa4a3356c1 Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
* Don't crash when importing script with syntax errorKent Hansen2011-11-231-4/+12
| | | | | | Task-number: QTBUG-22843 Change-Id: I2b1ed6cbbc7a566f54b441359941ea121a9033ba Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* v4: Get rid of dependency on QQuickAnchorLine typeKent Hansen2011-11-236-13/+49
| | | | | | | | | | | | | Delegate the meta-type id query and value comparison to QDeclarativeMetaType. Register a comparison function for QQuickAnchorLine in QQuickItemsModule, so that not even QDeclarativeMetaType needs to know the type declaration. (This is needed in order to be able to move the items to a separate library.) Change-Id: I6404d01b74143946ae0a79fa18d1777b675e4194 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Add QtQuick1 plugin's major version to target pathKent Hansen2011-11-231-1/+1
| | | | | | | | | This ensures that the plugin is only loaded when "import QtQuick 1.0" (or 1.x, rather) is used, and not when "import QtQuick 2.0" (or a later version) is used. Change-Id: I3f7621f316449071d7a891c72840ab1d2fd6b962 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix PathView insertion/removal/move item offsetMartin Jones2011-11-231-23/+20
| | | | | | | | | | Fix item positioning post model changes and add auto tests. Also fixes crash when inserting items before currentIndex, causing offset to increase beyond item count. Task-number: TBUG-22785 Change-Id: I17000ba497a190554c8b137a72b7e6551e8a0e56 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Don't disconnect mid binding evaluationAaron Kennedy2011-11-221-0/+2
| | | | | | Task-number: QTBUG-22816 Change-Id: I7a958203945a051322228b6fade9e1d49d5f4c4a Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Profiler: Preserve line information also for optimized bindingsKai Koehne2011-11-223-3/+8
| | | | | Change-Id: Ibd5abb42364711fab454e6b9c13af53462730471 Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Debugger: Move server into it's own threadKai Koehne2011-11-229-146/+253
| | | | | | | | | | | | | | So far the debugger infrastructure was running in the GUI thread, which required e.g. nested event loops to implement blocking behavior. The server and networking code are now running in their own thread, while the services are still running in the main thread. Because v8 isn't thread safe, we're adding two new JSEngines + isolates to qv8debugservice: One to decode JSON messages in the debugger thread, and one in the GUI thread. Change-Id: I746f5e203968f7bcc510fb66118c88ef0fd0cd14 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>