aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cleanup: Move ResolvedTypeReference(Map) one scope upSimon Hausmann2016-08-019-49/+59
| | | | | | | | The class is a candidate for further functionality, it doesn't have to be nested in CompilationUnit. Change-Id: I100553160f5ae34f66b9f8ff5df9f636da2ffb67 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add a checksum to QQmlPropertyCacheSimon Hausmann2016-08-013-0/+85
| | | | | | | | By running an md5 hash over the meta-object data and string tables this will allow us to detect changes to meta-objects and invalidate QML disk caches. Change-Id: I15b92de4cdf0cb525281b86e1c7b8ba0b11347a0 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Add a function to QQmlPropertyCache to calculate the meta-object sizesSimon Hausmann2016-08-013-37/+293
| | | | | | | | This will be used later for calculating checksums of the meta-object data. Change-Id: Iba925eae298cbfc7b89196f4dd6fb2854ce75e2e Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Simplify control flow in the type loaderSimon Hausmann2016-07-291-23/+53
| | | | | | | | Using a golang-style defer lambda to run "cleanup" code that should always be run allows us to do early returns when encountering errors. Change-Id: I92ff3e05a99f15f04e3d0f8b9ad258e549c491fc Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Remove some unused members on -no-qml-debugUlf Hermann2016-07-287-6/+40
| | | | | | | | It's debatable if the uglification is worth the overhead of a few pointers. Change-Id: I63b55b2043b8752a94d4b862c3892915135a72b7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Make ExecutionEngine's debugger and profiler privateUlf Hermann2016-07-2811-45/+48
| | | | | | | | This will allow us to #define them away on -no-qml-debug, saving two pointers per engine. Change-Id: I400cffd32cd7f55ff0e68565734b6002b9f901d5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Leave out Debug and Line istructions on -no-qml-debugUlf Hermann2016-07-284-18/+36
| | | | | Change-Id: Ida861af5636a1605783f7af4bf88cb46b44f9022 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Unbreak build on AndroidMitch Curtis2016-07-281-0/+1
| | | | | | | 6a1667bc added usage of QDateTime without an include. Change-Id: I6e93a27d6e05dced4cdb5c842a03615852802bce Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Replace debugger and profiler with stubs on -no-qml-debugUlf Hermann2016-07-2818-61/+278
| | | | | Change-Id: I0f029d92366b3b508bf024c67b877a14bae27cd6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Don't pass size and pointer through allocation trackersUlf Hermann2016-07-282-33/+32
| | | | | | | | By not relying on the return value of the macros we can #define them away later, when compiling with -no-qml-debug Change-Id: I24d50fa3f5d8e8765a42b050c81ddfae20f20a23 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Qml: Create profiler adapters in the pluginsUlf Hermann2016-07-286-11/+5
| | | | | | | This way QtQml doesn't need to know the ctors. Change-Id: Ie74049092b5eb9837537591c0cf37ad1487e4066 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Tooling: Convert connects to Qt5 styleUlf Hermann2016-07-2841-250/+241
| | | | | Change-Id: I6746b777f73d047f5cf610bfca9b320ac1e13676 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QmlDebug: Inline most of QQmlDebugServiceUlf Hermann2016-07-272-38/+8
| | | | | | | | The compiler might be able to optimize better if it knows the methods are empty. Change-Id: Ib730e857d1ab948bb2f5c5006f4911d2e6db282d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Remove QQML_NO_DEBUG_PROTOCOLUlf Hermann2016-07-271-16/+1
| | | | | | | There is no sane way to set this. Change-Id: I5f7b70d1947d469dd01a1454180f01ad0d1c099d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4: Remove empty fileUlf Hermann2016-07-272-61/+0
| | | | | Change-Id: Ibae2334336f5cc4f16cd9c9d8d142ea4b013462b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't needlessly look up debug servicesUlf Hermann2016-07-271-5/+7
| | | | | Change-Id: Idcca82b85e07ca0a8a9a2f370af90403bc4342c7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove some dead codeUlf Hermann2016-07-272-6/+0
| | | | | Change-Id: I1fa95d3c91e7f3ad5f2bf8f9d732ef72b74a98c8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Software Adaptation: Fix issue with clip node handlingAndy Nichols2016-07-271-1/+2
| | | | | | | | Under certain circumstances the clip node state would not get propagated properly to child nodes. Change-Id: I6f34690c7cc6f2837854fbcaff9aa4d7522e47c3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Software Adaptation: Add threaded render loopAndy Nichols2016-07-274-2/+1124
| | | | | | | | | | | This is a new attempt at providing a threaded render loop for the software adaptation in scenegraph. This approach is modeled after the D3D12 backend, and provides a separate thread for each window. To enable use the environment variable QSG_RENDER_LOOP=threaded as with the other backends. Change-Id: I6932975dd9c5579d36f0135aa4626dcc43b45ecd Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Move QQmlMemoryProfiler to debugger directoryUlf Hermann2016-07-264-2/+2
| | | | | Change-Id: Ia1b1038a684f6ec34af777090d4d21021eac01f1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Don't set QT_QML_DEBUG_NO_WARNING on -no-qml-debugUlf Hermann2016-07-263-3/+4
| | | | | | | It won't work anyway. Change-Id: I2bc8f6b1b72cf30f0314ad551838db4f04c11297 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Remove some unnecessary includesUlf Hermann2016-07-264-6/+0
| | | | | Change-Id: I18f2b6f44decf5ecde45e20722541b9a18d60b16 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QmlDebug: Fixes for QQmlDebugConnectionUlf Hermann2016-07-251-3/+4
| | | | | | | | Properly close the connection on invalid hello messages and implement flush() also for local sockets. Change-Id: Ie78441b9933c6de053962a11b5d7e2636792a31c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Clean up and re-order QQmlPropertyPrivate::writeErik Verbruggen2016-07-251-65/+81
| | | | | | | The most common cases of property writes now come first. Change-Id: I225b73746120870d9ca01d09983ad225e32bd99c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Expose HSV and HSL color values to QMLNikita Krupenko2016-07-257-5/+153
| | | | | | | | | [ChangeLog][QtQuick] Added properties to access color values for the HSV and HSL color models to the basic QML color type. Task-number: QTBUG-48723 Change-Id: I45fa52f9f3878553e1b3d0a34b47804ede7794f8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QML: Unify property reads/writes and use accessorsErik Verbruggen2016-07-2522-199/+155
| | | | | | | | | Pass property reads/writes through utility functions in QQmlProperty, which in turn will try to use accessors when available (and no interceptors have to be called). Change-Id: I60ecfc202b6024bfe4a33206a46299787b152546 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Improve robustness of qml disk cachingSimon Hausmann2016-07-2313-37/+210
| | | | | | | | Perform various basic checks before proceeding to load an existing cache file, including the qt version, architecture, data structure version and others. Change-Id: Ie822b056e944ac120643aad260e97f62616688bf Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* ICC: suppress the warning about -fno-delete-null-pointer-checksThiago Macieira2016-07-231-1/+1
| | | | | | | Recent qtbase updates set QT_GCC_MAJOR_VERSION even for ICC. Change-Id: I149e0540c00745fe8119fffd1463d34701f370f3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix ICC change-of-sign warningThiago Macieira2016-07-231-1/+1
| | | | | | | | | | INT_MIN is negative. qv4assembler_p.h(108): warning #68: integer conversion resulted in a change of sign Change-Id: I149e0540c00745fe8119fffd1463d31acd727690 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* V4 CompilationUnit: missing #include for date-time comparisonEdward Welbourne2016-07-211-0/+1
| | | | | | | | MinGW's cc got upset at a QDateTime comparison when it only had a forward declaration of the type. Change-Id: I0404248cbdfc35610d8465294534bd5201dcf2a2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Add support for saving/loading the moth interpreter byte codeSimon Hausmann2016-07-213-11/+76
| | | | | | | | With the JIT and moth supporting persistence, we can enable the disk cache tests unconditionally. Change-Id: I6d6652411237001433a32a2de21d1f78f51b43ef Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Prepare moth bytecode for serializationSimon Hausmann2016-07-212-6/+24
| | | | | | | | | When using the threaded interpreter, don't produce the instruction handler addresses right away but perform that as a separate step when linking against the engine. Change-Id: I216100f8b99f45eb8d954c733ac128e83aa6da38 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Add tryVerify()Mitch Curtis2016-07-202-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful for conditions which can't be tested using tryCompare. One such situation is that of the currentItem property of ListView. In Qt Quick Controls 2, the currentItem property of the ListView that is internally a child of Tumbler can be null for a certain period of time, so using tryCompare() would result in errors due to trying to access a property of a null object: tryCompare(tumblerView.currentItem, "text", "2") The current workaround is to use wait(50) in a for loop, which is ugly and could lead to flaky tests: for (var delay = 1000; delay >= 0; delay -= 50) { if (tumblerView.currentItem) break; wait(50); } verify(tumblerView.currentItem); compare(tumblerView.currentItem.text, data.currentIndex.toString()); Using tryVerify(), we can first ensure that currentItem isn't null, and then use a regular synchronous compare afterwards: tryVerify(function(){ return tumblerView.currentItem; }); compare(tumbler.currentItem.text, data.currentIndex.toString()); [ChangeLog][QtTest][TestCase] Added tryVerify() function to allow verification of asynchronous conditions that can't be tested using tryCompare(). Change-Id: Ie93052b650f7fe0bf26853054a8f0f35a483e387 Task-number: QTBUG-19708 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Add support for caching of .js files imported from QML sourcesSimon Hausmann2016-07-191-0/+20
| | | | | | | This requires only minimal changes. Change-Id: I89e16bad97bf26669f8e4f4336ac6d32e5027c35 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify reference management in QV4::ScriptSimon Hausmann2016-07-192-29/+3
| | | | | | | | | There's no apparent need to store the refptr to the compilation unit in a persistent value, when the persistent's life time is bound to the life time of the V4::Script. Change-Id: Ib4f3008f45c17a680dbe12ca1f80522fd7f6fdfc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Improve robustness of qml cache expiry checkingSimon Hausmann2016-07-197-14/+32
| | | | | | | | | | | Instead of relying on two time stamps in the file system (source file and cache file), make the determination on whether the source file is newer than the cache solely depend on the time stamp of only the source file. This means that when cache files are stored in archives for example their modification date does not need to be preserved upon extraction. Change-Id: I0b4362663868c6fb9bd7e106028161b2d67274d4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Added basic loading of compilation units from diskSimon Hausmann2016-07-1911-6/+209
| | | | | | | | This remains hidden behind the QML_DISK_CACHE flag until all backends support it and the verification code is in place. Change-Id: Ic77c64e20a2dc4c43473c47640e09f8070237e85 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QML: Fix check when to use accessorsErik Verbruggen2016-07-191-3/+3
| | | | | | | | | | The bit indicating if accessors could be used only returned true when an interceptor was added to the object, but the property in question was not intercepted. So it missed the case where no interceptor was installed on any property of the object. Change-Id: I355eb7bbe232f512d02c1b9783a0e6f990552689 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QML: Fix property notifier registration for constant propertiesErik Verbruggen2016-07-191-1/+1
| | | | | | | | Constant properties typically do not have change notification signals, so do not attempt to listen to those. Change-Id: I4b3622d014aa2f8b3794a63f78ada9806c53966b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* D3D12: clean up loggingLaszlo Agocs2016-07-192-35/+38
| | | | | | | | | | | | Make QSG_RENDERER_DEBUG more fine-grained, the maximum set is now loop;build;change;render;descheap;buffer;texture;shader meaning "render" is broken up into 5 categories. Fix also a comment on the root signature to avoid future headache with trying to optimize the descriptor table for textures away (in vain). Change-Id: I06a2a624ed39aaf5de42b8e984a192c7966360ab Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* SoftwareImageNodes: Support textureFiltering and mirroringAndy Nichols2016-07-192-8/+63
| | | | | | | Missing features in the QSGImageNode based software node. Change-Id: If6a759873d201307e013a3ab019bd906d98ba7d5 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* software: Add support for QSGRenderNodeLaszlo Agocs2016-07-1931-40/+344
| | | | | | | | | | | | | | | | | Have to change getResource() a bit since it turns out it is not suitable currently for backends that do not have a per-window rendercontext and do not implement the interface on the rendercontext. Pass in the window to make sure it can always figure out which window we want the resources for. (we do not want rendererInterface() to return window-specific instances created on the fly, with ownership issues, so stick with the simple model where backends implement the interface on one of their existing classes) To support clipping, QSGRenderNode::RenderState is extended accordingly. Also updated the docs since some claims in the rendernode docs are not true since Qt 5.3. Change-Id: I34779c83926f5231b888fcab7131e873ae97964f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Stabilize tst_QQuickView::resizemodeitemFrederik Gladhorn2016-07-191-0/+1
| | | | | | | | | | | | | | FAIL! : tst_QQuickView::resizemodeitem() Compared values are not the same Actual (sizeListener.at(i)): QSize(80x100) Expected (view->size()) : QSize(200x300) Loc: [tst_qquickview.cpp(172)] The "SizeChangesListener" can be instantiated too early, catching signals from the previous resize events. Make sure to flush all events before. Change-Id: Ib0933429f5c589f120c263619f00893fa813e361 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove redundant compare in testFrederik Gladhorn2016-07-191-1/+0
| | | | | | | The same condition is tested in the line above. Change-Id: I99720e3603b1ae5e2f5161696f1de3dd03f6ff50 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix compilationSimon Hausmann2016-07-191-0/+2
| | | | | | | | | Commit be491913c036b148cd4f90fa0132e269a507dbad regressed the build with some compilers that complained that the RegExp fields were uninitialized. Fix is the same as for the Lookup class. Change-Id: Ie6b2adf14496d75845f6a9d9b8fc680e61aa1155 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* D3D12: Move swapchain/color buffer format to a constantLaszlo Agocs2016-07-191-9/+11
| | | | | | | | So it can be changed to BGRA, if desired, although tests show that BGRA reduces perf a little bit in fact. Change-Id: Ieb87bba2298426f1503658f8dffb0c659c265ca5 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12: Show a warning when the requested adapter is not usableLaszlo Agocs2016-07-191-5/+9
| | | | | Change-Id: I3cbc4bf45b22f8bf772163be24ca4c9ccb63fcad Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* move QQuickCloseEvent from qquickwindow_p.h to qquickevents_p_p.hShawn Rutledge2016-07-152-18/+17
| | | | | | | It seems to be the same sort of persistent event for exposure to QML. Change-Id: I4ebc48422ee517f37e300629b6d100f68b9703b3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* Split out creation of alias properties in the property cachesSimon Hausmann2016-07-156-120/+252
| | | | | | | | | | | | Similar to the regular property cache creation code, this also has to become a template function so that it can be run on the compilation units loaded from disk in the future. What is shared between the code path of a fresh compilation vs. re-use of a unit from disk is the code to propagate the CompiledData::Alias entries into entries in the property cache. The code for iterating through the component spaces and resolving the alias references is not shared. Change-Id: I04c2a5575310400156b457ae7b709cffecb7455e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix alias resolution algorithmSimon Hausmann2016-07-159-109/+300
| | | | | | | | | | | The resolution of aliases needs to to be solved in iterations as an alias can refer to another alias, which may not be created yet in the property cache by the time we try to perform the resolution. Therefore the alias resolution code works off a list of pending aliases after the initial pass of resolution. This also requires the ability to detect circular references. Change-Id: Id4e159b9c713aa8a8a095759e22e3fac456a38a0 Reviewed-by: Lars Knoll <lars.knoll@qt.io>