aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Support threading with QQuickRenderControlLaszlo Agocs2014-12-122-1/+17
| | | | | | | | | | | | | | | | | | | | | Reorganize the rendercontrol example to demonstrate both the single and multi threaded approaches. A small helper function is introduced to the QQuickRenderControl API: The QSGRenderContext has to live on the render thread. Previously there was no way for applications to move it to the desired thread. This is now possible. Pass --threaded to the rendercontrol example to use a separate render thread. [ChangeLog][QtQuick] QQuickRenderControl can now be used to render the Qt Quick scene on a dedicated render thread, similarly to how the built-in threaded render loop operates. Task-number: QTBUG-42813 Change-Id: I01c3b2ffca8a174d9d2c267a51f2e484ed7b34b3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Fix the V4 valgrind integrationJocelyn Turcotte2014-12-121-8/+14
| | | | | | | | | | | | | 87a055bc8eee653a18d51f94a546cd452732223a broke the build and introduced invalid writes to chunks outside of the existing VALGRIND_DISABLE_ERROR_REPORTING block. Fix the build by using MemoryManager::Data* instead of MemoryManager* as the pool argument to VALGRIND MEMPOOL calls since the Data pointer is protected. Change-Id: I24136e25291570ade825dcd84a9568d8169a235b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Default to threaded when using opengl32Laszlo Agocs2014-12-121-1/+6
| | | | | | | | | | | | | | | | | | This appplies only when using opengl32.dll. When using ANGLE or when using another non-opengl32 DLL, the "windows" single-threaded loop is chosen, just like before. One badly written autotest is fixed. We must never assume that performing some QQuickWindow related work will leave a context current on the main thread. The assumption worked by accident with the single-threaded render loop. [ChangeLog][QtQuick] Changed to use the threaded render loop by default on Windows when running with desktop OpenGL (opengl32.dll). Change-Id: I21798622c19ca510a97a96c19c1e70e29f086e3a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Remove QML bundle codeSimon Hausmann2014-12-128-896/+41
| | | | | | | | | | This feature is effectively not maintained, experimental and undocumented. Consensus on the mailing list is to remove it: http://lists.qt-project.org/pipermail/development/2014-December/019384.html Change-Id: Iaa73b3e90806c338ef81bbd4307ddd2addd37964 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Add default parameter value for ExecutionEngine::newString()Oleg Shparber2014-12-125-9/+9
| | | | | Change-Id: I8efbfb07ea61e2c6d03eeb79671006d209e4d48e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Add default parameter value for ScopedCallData()Oleg Shparber2014-12-128-8/+8
| | | | | Change-Id: I16b6662a47c682e145d3e2201f9e90f58405a599 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Release the VM of unused heap chunksJocelyn Turcotte2014-12-112-45/+98
| | | | | | | | | | | | | | | | | | | | | | This changes the way that available items are linked together to allow releasing chunks not containing any inUse item after being swept. Instead of putting a freed item at the top of the stack and make it link to the item previously at the top, relink all items !inUse to point to the previously visited unused item during sweeping. This allows any chunk to be released in the process while making sure that no previous or next item will link to an address in that chunk. The performance penality of relinking the list has been measured to be ~0.6% with v8-bench.js tst_QJSEngine::largeSweep. In exchange, this helps keeping the amount of chunks to sweep lower after peaks of heap allocation, even though that ability will be restrained by heap fragmentation in long running applications. Task-number: QTBUG-41099 Change-Id: I81a70f0a930b679a1bef47e630b23dab5f6d1218 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move prototype back from the vtable into ObjectLars Knoll2014-12-1135-327/+309
| | | | | | | | This is the only way we can support a GC that moves objects around in memory. Change-Id: I1d168fae4aa9f575b730e469e762bc5b5549b886 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Better encapsulate access to the global objectLars Knoll2014-12-1118-80/+80
| | | | | Change-Id: I8a76112d821cb3fc172ba0d16ee8410d39b4422a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Encapsulate accesses to the root contextLars Knoll2014-12-1114-65/+66
| | | | | Change-Id: I668cef1363a5c1a5c5b9a7e138f3bd0338712eea Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix Object::arrayData() accessor to return a heap objectLars Knoll2014-12-117-50/+52
| | | | | Change-Id: Iffc82c2f415251d73bb7446848399b54b16589c9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of a not required reinterpret_castLars Knoll2014-12-111-1/+1
| | | | | Change-Id: I076fa02589cc91eca46dd652375585bc7ca5b559 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup header inclusion orderLars Knoll2014-12-113-80/+77
| | | | | Change-Id: I6f7973370c4468e7d1686a147efca66bfbfdd5b1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove arrayData() calls from qv4object.cppLars Knoll2014-12-102-28/+31
| | | | | Change-Id: I92c74e87918a5f958ff17f4cbbc1888b58833fc6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Changed value type property index encodingSimon Hausmann2014-12-107-32/+36
| | | | | | | | | | | | | | | | | | | | | | We used to encode property index and value type property index in one int with 16 bits each, for example font.pixelSize with index of "font" in the lower 16 bits and "pixelSize" in the upper 16 bits. Detecting if a given encoded index was using value types or not was based on whether the value type index (upper 16 bits) were non-zero. That assumption holds given that all valid property indicies of value types are > 0 because they are all sub-classes of QObject, which provides the first property (objectName). With the introduction of gadgets property index zero will become popular again, and value types are a core use-case for gadgets. Therefore we need to change the encoding to allow for zero to be a valid value type property index. This is implemented by centralizing all decoding call sites to call one function that indicates -1 as non-present value type core index return value. That way we can encode the index with an offset of 1. Change-Id: I266abf140211a4f7204b47b94d07c364f0a8f408 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix arrayData accesses in qv4lookup.cppLars Knoll2014-12-101-12/+12
| | | | | Change-Id: I39a2e4f14afda2c0e909584682ef24a8b030025b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove non required arrayData() accesses from qv4arrayobject.cppLars Knoll2014-12-101-7/+7
| | | | | Change-Id: Iaa012b85cad20fa3887c1308dd38d35da8c423b4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move readonly accessors into Heap::ArrayDataLars Knoll2014-12-102-56/+69
| | | | | | | | these methods don't modify the object, so it's safe to have them there and this simplifies quite a bit of the code. Change-Id: I2f591758efba9cb8d17b956bc7c02e2d7a468ea4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move function definition where it belongsLars Knoll2014-12-092-5/+5
| | | | | Change-Id: I93e98813d2ffaf7dc648ad81b15e907dfdc276d0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-0998-830/+1033
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4globalobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/quick/items/qquicktext_p.h src/quick/items/qquicktextedit_p.h src/quick/items/qquicktextinput_p.h Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
| * Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into ↵Simon Hausmann2014-12-0915-35/+305
| |\ | | | | | | | | | refs/staging/5.4
| | * Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-0515-35/+305
| | |\ | | | | | | | | | | | | Change-Id: I5978bab8a4fde4c2ee33907fd81f49cb69e4fb26
| | | * QQmlInspectorService: handle views only with supported plugins.v5.4.0Ulf Hermann2014-12-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-43048 Change-Id: I5b32bd0a1e28fdf56b5346580daf21e7ec1b9f8c Reviewed-by: Kevin Funk <kevin.funk@kdab.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| | | * qttest: make findChild available only for QtTest 1.1Fawzi Mohamed2014-12-056-12/+14
| | | | | | | | | | | | | | | | | | | | Change-Id: I4ceb1a969bd4296b82f899088b02b5e8cf100bcd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | | * Update plugins.qmltypesKai Koehne2014-12-057-16/+278
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9b6c54b572d4653d609b154000e274b9e64d591f Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | | * Add string::arg method in installTranslatorFunctionsKai Koehne2014-12-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QJSEngine::installTranslatorFunctions install the translator functions to any given JS object. However, the custom string::arg() method is only added in qqmlbuiltinfunctions.cpp, making the use of qsTr() in other pure-JS programs quite hard. Task-number: QTBUG-43113 Change-Id: Ia9ed97a4c07a4d167c792f3ea13e4f6e96c97423 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | | * Fix crashes on QNX/x86Simon Hausmann2014-12-031-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On x86 we assume that ebx holds the address of the global offset table for position independent code. So before placing a run-time call we restore the register from it's position we saved it on earlier on the stack. However after commit d9f33ccdef985badc56fd8940373748626beffc7 the register wasn't saved on the stack anymore in the prologue because we skipped because it's caller saved. So when we seemingly reloaded ebx with the GOT from the stack, we loaded it from a location we never saved it to. This patch makes sure to always save it on the stack so that we can always restore it. Change-Id: I8f6a8e38779151fff517f17220f29a7cb45ca89d Task-number: QTBUG-43036 Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
| * | | Avoid string-based connect in QQuickImageBase.Michael Brasser2014-12-082-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | String-based connect is relatively slow, and should be avoided in core items. This improves performance of the tst_librarymetrics_performance::instantiation_cached(043) image - empty test case (approximately halving the time). Task-number: QTBUG-43096 Change-Id: I02485c515435eceacc95c55f877fc8566e7406d7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| * | | Fix \inqmlmodule usage: only use one parameterAlejandro Exojo2014-12-0833-36/+36
| |/ / | | | | | | | | | | | | | | | | | | | | | Since the command just links back to the corresponding module page, only the first parameter is used, and the version causes more confusion. Change-Id: I73ed289550c576747132f77b83c1257094059cd1 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * | Correct QtQml.Models \qmlmodule version.Mitch Curtis2014-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For example, the following documentation [1] says: Import Statement: import QtQml.Models 2.0 This should be: Import Statement: import QtQml.Models 2.1 The module documentation [2] is correct, but there's no visible link to that page from [1]. [1] http://qt-project.org/doc/qt-5/qml-qtqml-models-objectmodel.html [2] http://qt-project.org/doc/qt-5/qtqml-models-qmlmodule.html Change-Id: Ib2ab7b821ad7e98c20b396b26f745ee39434b7fb Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * | Fix QtQuick2 module unload supportChris Adams2014-12-046-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit ensures that the value type providers installed by the QtQuick2 QML module during initialization are uninstalled when the plugin is unloaded. It also fixes a bug in the type compiler so that it now works with types from plugins which get unloaded and then reloaded. Task-number: QTBUG-43004 Change-Id: I4b3fb75aae65dfbc5de9c88701ed82514087ab7d Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
| * | Error out when trying to set an item as its own parentFrederik Gladhorn2014-12-031-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-43063 Change-Id: I92a33047ac7fa2afeff4986b6e42c07afbc59918 Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
| * | Fix application build when combining with Mac OS X Cocoa headersSimon Hausmann2014-12-031-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OSX's AssertMacros.h unconditionally defines macros like "check" and that clashes with qml's type discovery templates that define a check function and that are used by qmlRegisterType and friends. There's a comment in the OS X headers suggesting that this will be fixed in the "next" release, but that hasn't happened for a while and the bug is still present in 10.10. So let's work around it and make life easier for people using Qml and Cocoa at the same time. Change-Id: I005d21188f92deaebd45bce2e6484cd4deeb9a34 Task-number: QTBUG-36309 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Fix conditional breakpoints in QMLSimon Hausmann2014-12-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We need to set "inheritContext" to true for the QV4::Script that's used during conditional break point evaluation, because that will also disable fast property lookups, which is still required for QML lookups to work. Change-Id: I8976df1c827b5058eae9bdce6e86e5ea856cbfe1 Task-number: QTBUG-43018 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Fix expression evaluation in specific frames in the debuggerSimon Hausmann2014-12-031-13/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expressions from the QML/JS console are intended to be executed in a specific frame / context. However that wasn't implemented properly, we should pop the current context frameNr times. [ChangeLog][QtQml] Fix inspecting objects in QML/JS console in different frames. Change-Id: If575d4005c52a9fe6805538a7b1a02b9e32049d6 Task-number: QTBUG-42831 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | Remove dead codeSimon Hausmann2014-12-032-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | The eval code tracking was used last time for the old exception handling, but that's long gone :) Change-Id: I6fa80a5197745fde461e4da66cd65a50149c6048 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| * | QtQuick.Window: add missing documentation for Window methodsShawn Rutledge2014-12-031-19/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Several more methods/slots are inherited from QWindow but are not documented for the QML Window type. Also some other documentation improvements. Task-number: QTBUG-40093 Task-number: QTBUG-42426 Change-Id: Ib753be269cbc41ee540e6556e0ef483758eefe62 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| * | Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-026-19/+33
| |\| | | | | | | | | | Change-Id: I89bbb2977350a03c156d531f810d08a5560ffbb3
| | * Regression: Fix array data corruptionSimon Hausmann2014-12-022-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When inserting into a sparse JS array, we may have to re-allocate the underlying data vector. When that happens we must reload the ArrayData pointer, to avoid returning a wrong pointer in ArrayData::insert. This patch also fixes the valgrind support in the memory allocator by correctly marking the mmap'ed memory region as inaccessible. Change-Id: I86aabc2cec74a4f3c8396463910d90c8968a741d Task-number: QTBUG-42956 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Fix loading of .ui.qml form files with cached compilation unitsSimon Hausmann2014-12-021-15/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify the type loading logic and try the Type -> Type.qml and Type -> Type.ui.qml mapping in a simple loop that tries off-disk and cached compilation unit loading. Change-Id: I537feabd0a158a71f330bede9e6988291298ae81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Make effectiveDevicePixelRatio() return a qreal.Morten Johan Sørvig2014-11-302-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fractional scale factors are not as broken as previously believed, especially for Qt Quick. Keep the door open for finding a way to support it at some point in the future. Change-Id: Ifeadcc53175ac6c25ea0288d5fe1966e3de408f9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
| | * Document Qt.application.supportsMultipleWindows property.Mitch Curtis2014-11-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The documentation was not added in 0df606e2ab8f3b60e1ad57dba245acf2e7810612. Change-Id: I0a5802a66021e17d1280f3969981c9e8a62c8119 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
| * | Don't default to HighQualitySubPixelAntialiasing on WinRTAndrew Knight2014-12-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The subpixel shader is probably not a good default here because most devices are mobile (can change screen orientation) and have high pixel densities. Furthermore, it breaks text rendering on the Surface RT, where the graphics hardware is too weak to support the number of uniforms the subpixel shader uses. Task-number: QTBUG-41769 Change-Id: I10210af91976ab55e611025c0452a1ee1f3114a9 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
| * | Add missing call to rendercontrolLaszlo Agocs2014-11-281-1/+3
| | | | | | | | | | | | | | | Change-Id: Ic8c8e6d7a9d99216292b8b4faa2926d849333a05 Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
| * | Add since 5.4 markersAlbert Astals Cid2014-11-281-0/+4
| | | | | | | | | | | | | | | | | | Change-Id: Ic0e594cb53016e6f68fbfb6e6064707344afefef Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| * | Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into ↵Frederik Gladhorn2014-11-2118-465/+213
| |\ \ | | | | | | | | | | | | refs/staging/5.4
| | * | Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-2118-465/+213
| | |\| | | | | | | | | | | | | Change-Id: I2e7fc085663e00dd0390593a91c30d23d1369c4e
| | | * Invalidate font caches when switching between threadsv5.4.0-rc1Eskil Abrahamsen Blomfeldt2014-11-137-3/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The font caches can only be used from a single thread at a time. QFontEngineFT for instance, uses a global static thread storage which is accessed on releasing and creating engines, and this causes a crash if the font engine is created on one thread and released on another. We use the updatePolish() function to make sure the caches are empty before entering updatePaintNode(), and then we invalidate the cache again after updatePaintNode() is done. [ChangeLog][Text] Fixed uncommon crash in text nodes. Change-Id: I01dbc2ed58aeebd03d77a157c700330334bdb385 Task-number: QTBUG-38800 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
| | | * Doc: Change the div classes for three-column layoutTopi Reinio2014-11-111-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new documentation style for publishing docs under qt.io requires dedicated div classes for pages that use a three- column layout. The new divs enable the columns to stack and react to changes in the window width. Task-number: QTBUG-42086 Change-Id: Id0ccb0ef7e0be237789b8c891db05413efc1f8aa Reviewed-by: Martin Smith <martin.smith@digia.com>
| | | * Don't embded qmldbg_tcp plugin to libQt5Qml in static buildPasi Petäjäjärvi2014-11-111-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Embedding qmldbg_tcp sources to libQt5Qml causes multipled definitions of QTcpServerConnection symbols with static build on Qt Quick 2 applications. Qmake can resolve dependencies to static plugins applications use, so no need to embed this to libQt5Qml. Change-Id: I18c5e44b9ac3de4ef8be29cc5944de3527566b3c Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>