aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Don't append garbage to the function parameter slotswip/gcThiago Macieira2014-04-041-1/+2
| | | | | | | | | | | | | | If the argument is neither a temporary nor a constant, slot isn't initialized. So don't try to add it. qqmltypecompiler.cpp:2548:36: error: variable 'slot' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized] qqmltypecompiler.cpp:2553:36: note: uninitialized use occurs here _functionParameters.append(slot); ^~~~ Change-Id: I5a538bfa0ef1fbbd00e23dfd6e15c404359c7c46 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Regression: Fix id objects in group propertiesSimon Hausmann2014-04-043-6/+14
| | | | | | | | | Setting someGroupProperty.id should not be subject to the usual restrictions with regards to valid values for id properties. Task-number: QTBUG-38085 Change-Id: Ie66d9d4d4524ddaf5a6a0b0e260354db44d9995e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make the destroy method optionalLars Knoll2014-04-041-4/+5
| | | | | | | | | | | | This allows us to avoid calling a destructor on objects that don't require one. After the memberData change this should be most objects. Also fix a bug where we didn't call the destroy() method on large objects, potentially leaking memory. Change-Id: I1708055d568d85b0a3876899d35e8c3eb92dd222 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Garbage collect member dataLars Knoll2014-04-0412-43/+207
| | | | | | | | Move the allocated member data into the garbage collected area, so that we can avoid using malloc/free for it. Change-Id: I20625efa67ecd60238568742b74854b0c8cb2e3e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Stop the animation driver when no animations are ticking.Gunnar Sletta2014-04-041-1/+2
| | | | | | | | | | | | | | | | | When animations were registered we made a queued connection to 'startAnimations' to start the animation driver and also set the 'startAnimationPending' state to true. In 'stopTimer' we aborted if 'startAnimationPending' was true, presumeably to avoid stopping just to restart shortly after. However, if an animation is registered which triggers the invoke and then is immediately removed again, 'startAnimationPending' will be true with no pending animations at the time of 'stopTimer'. As a result, the driver would not stop and the system would continue animating and trying to render. Change-Id: Icbb01d7129c3a1bddef08a9f2a7aee957e3d2909 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Use global context sharing from QtGui instead of QSGContextJocelyn Turcotte2014-04-048-32/+11
| | | | | | | | | This removes QSGContext::sharedOpenGLContext and replace its uses with QOpenGLContextPrivate::globalShareContext, which is also going to be used by QOpenGLWidget and QQuickWidget. Change-Id: I1e296c3e6832f717caaf31ba7d7b27c06249219b Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Initialize variables in QQuickItemParticleGunnar Sletta2014-04-041-1/+1
| | | | | | Change-Id: I42a7b1481014e06e25ab4d9d6f2f36fb3515f735 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: Fix some code snippet warningsSergio Ahumada2014-04-033-8/+8
| | | | | | | | | | | Seems like \qml \endqml is not able to parse some snippets, so using \code \endcode instead to fix warnings like: Unable to parse QML snippet: "Expected token `{'" at line 1, column 13 Change-Id: Iecf033ff5610405d946390e69c3aa7ec54a21998 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Use RAII for VME profilerUlf Hermann2014-04-034-151/+80
| | | | | | | | | | | | | | Now that object creation is done in nested function calls we can use an RAII-type profiler to trace it. This makes the profiling much simpler and more robust. Also, the stack of profiling data in the VME profiler has to match the stack of completion callbacks in the VME, so the push and pop operations are synchronized now. Task-number: QTBUG-37978 Change-Id: I1bc5e0665b88e5b3772e48c8676cdda3fae59e1b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* QtQuick test: Do not complain about Qt specific argumentsKai Koehne2014-04-031-17/+23
| | | | | | | | | | | | | | | Commit 1ca5e82cccae0 caused a regression for Qt arguments like -qmlsjsdebugger=xxx . These are automatically removed from argv by QCoreApplication, but since we copied argv before instantiating QCoreApplication this didn't have any effect. Fix this by moving Q[Core]Application instantiation again before the parsing and copying of testlib-specific arguments. Task-number: QTBUG-37793 Change-Id: Ief41640b6cf3251f700a5d24d2e1141233a3888f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Liang Qi <liang.qi@digia.com>
* Fix 'missing header' compilation error (shadow build)Kai Koehne2014-04-031-1/+1
| | | | | | | | Change the private header path to the canonical one. This fixes shadow builds for me on Windows. Change-Id: I7c18ec2d9f0769a51d296deac16c78ae41894c36 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Work around warning by GCC 4.8 with -O3 about array out of boundsThiago Macieira2014-04-021-2/+2
| | | | | | | | | | | | | | | | | | | qqmldelegatemodel.cpp:1140:53: error: array subscript is above array bounds [-Werror=array-bounds] attached->m_currentIndex[i] += deltas[i]; ^ qqmldelegatemodel.cpp:2009:29: error: array subscript is above array bounds [-Werror=array-bounds] m_currentIndex[i] = m_previousIndex[i] = incubationTask->index[i]; ^ I can't tell how the count can be higher than MaximumGroupCount. Either GCC is seeing something I'm not while inlining multiple functions, or it's just getting lost. If it's the former case, this is change could be a fix, but it's probably the wrong type of fix. If it's the latter, we're just throwing the inliner a curve ball and it just stops complaining. Change-Id: I7907074005f5327a8592f47d72a4e79f9c6cd5ff Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* On Mac only editable text input should receive tab focusLiang Qi2014-04-023-5/+192
| | | | | | | | | | | | | | | It's for all items with "readOnly: false" and has "text" property. [ChangeLog][QtQuick] Mac: any editable text input will get tab focus when "Text boxes and lists only" option was selected. About "Text boxes and lists only", see commit 06332df7438c8d2215b02f1e01ce2ed28a49a320. Task-number: QTBUG-38004 Change-Id: I73947b71b2fec69a66e122514d440656f4650e99 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Reduce memory consumption of runtime compiled QML typesSimon Hausmann2014-04-024-7/+87
| | | | | | | | | Don't store the string of binding scripts in the compiled data. The only exception to the rule are properties of type QQmlScriptString as well as types with custom parsers. Change-Id: I7f53262bf957b442bac4db71d0a2c0bed74a9b54 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Avoid recompiling of signal handlers defined in QtQuick state changes and ↵Simon Hausmann2014-04-0218-54/+86
| | | | | | | | | | Connection objects We can re-use the expression we've compiled at QML type compilation time, as long as we "inject" the signal parameters in the dynamic qml lookup chain. Change-Id: Icc417531c41dea06ff5d033011179af49b03f542 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix performance regression for bindings from QtQuick state changesSimon Hausmann2014-04-022-2/+4
| | | | | | | | | | | | | | | | This is a regression from the compiler change. We can and should try to use the binding as it was compiled in the loader thread for things like PropertyChanges { target: foo width: someExpresion + to + calculate * width; } It is already ensured that these expressions are compiled without type optimizations. Change-Id: Ib855d8a848fcab2524df008727eab436ac98514e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compilation of script stringsSimon Hausmann2014-04-0210-33/+145
| | | | | | | | | | | | | | | | | | | | | | | | | The right hand side of script string properties can be evaluated in entirely dynamic scopes, due to QQmlExpressions' public API of allowing construction from a QQmlScriptString and a variable scope/context. Nevertheless we should compile these bindings at type compile time, as long as we make sure that the compiled code doesn't try to do any compile time determined property lookups and type resolution. This is implemented using a separate compilation pass that ensures the disableAcceleratedLookups flag is set. A few minor cleanups come with this patch: * Ensure that the property caches array is always symmetric to the list of compiled QML objects, as that allows the use of at() instead of value(). * The code for creating a QML callable function object for a given run-time function is now centralized in a static function QmlBindingWrapper, used for script strings and bindings from custom parsers. The provided unit test verifies the successful execution of the same script string with two different scope objects. Change-Id: Ica2cea46dd9e47263b4d494d922d3cc9664b08ae Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make example work when QOffscreenSurface == QWindowGunnar Sletta2014-04-023-36/+47
| | | | | Change-Id: I7435d91b37a46c0bced301c5c9c82fdf499e0587 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Maroon example: use multimedia for audio; mute when inactiveShawn Rutledge2014-04-012-2/+2
| | | | | | Task-number: QTBUG-37742 Change-Id: If1a6ded9ccdaa4cd6f5e6e405e2d5caa21710d4c Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* PinchArea docs: elaborate on confusing aspectsShawn Rutledge2014-04-011-11/+22
| | | | | | | | | | | | The pinch property and the pinch signal parameter are confusing, especially since limits in the property don't apply to the values in the signal parameter. Task-number: QTBUG-37917 Change-Id: Id8fac60f505a1c54cc8debd3a29e013ca9d29773 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Give the QML and the debug server thread an objectname.Thomas McGuire2014-04-012-0/+2
| | | | | | | | | Now it is easier to identify the threads in e.g. the debugger in QtCreator. Change-Id: I032822e869df09cf43dc1d6e01d14610005ce217 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
* Move inline function Bool Runtime::compareEqual() above usage.Friedemann Kleint2014-04-011-19/+19
| | | | | | | | | | Fix MinGW-warnings: src/qml/jsruntime/qv4runtime_p.h:496:13: warning: 'static QV4::Bool QV4::Runtime::compareEqual(QV4::ValueRef, QV4::ValueRef)' redeclared without dllimport attribute after being referenced with dll linkage Change-Id: Ieb212ed6aba2a0deeeddd033126ae7e9737bb38e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Making the CHUNKSIZE setable via environment variableKarim Pinter2014-04-011-4/+8
| | | | | | | | | With this modification the CHUNKSIZE is setable by QV4_MM_MAX_CHUNK_SIZE environment variable so the memory usage which is important for embedded devices can be finetuned. Change-Id: I3cd75158f2255651edd341873de035c1222e3c92 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix typoSimon Hausmann2014-04-017-9/+9
| | | | | | | creatScriptFunction -> createScriptFunction Change-Id: Icdb9214b1ae067fa2b8693d50cdac0be9fe6d390 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Fix compilation on QNXSergio Ahumada2014-03-311-5/+5
| | | | | | | Task-number: QTBUG-37979 Change-Id: Ie877317cded5b9eaf95389344712c66192696552 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Document the QSG_VISUALIZE environment variable.Mitch Curtis2014-03-316-0/+117
| | | | | | | The explanations are taken from 3f8d5d0. Change-Id: I9901b5f2c42f7bec6573101eb91eb9116089d4e9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix performance regression of parent setting during QML object creationSimon Hausmann2014-03-314-3/+37
| | | | | | | | | | This showed up in the profiles again: In QML we create a lot of objects with many children and sending a child event each time is expensive. That's why the VME didn't do that and hadn't done so in ages. This patch restores that behavior and aspect of loading performance. Change-Id: I5078fe330d913dc832b284aaecf031152dc80802 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Don't crash when render node doesn't have a batchrootGunnar Sletta2014-03-311-1/+3
| | | | | Change-Id: Ib8f70414eb477b4ec45097c8784a5fe1375cf012 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Remove object index parameter from QQmlCustomParser::compileSimon Hausmann2014-03-2910-19/+15
| | | | | | | | There is no need anymore to pass through the object index of the object being "custom compiled". Change-Id: I8ef8e578b27523d9e7190503fbf95d1eb863a149 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Eliminate noop translation bindingsSimon Hausmann2014-03-297-67/+48
| | | | | | | | | | | We can store them as regular strings. This has the advantage that the entire special handling from the custom parser of the list model goes away, we don't need astForBinding in QQmlCustomParser anymore neither and types with a custom parser can now generally benefit from the expression simplification pass. Change-Id: I39d1b76edd1273d8c73b847aed71f7bcce37d877 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove dead codeSimon Hausmann2014-03-293-38/+0
| | | | | | | | | Remove qquick anchor line comparison hooks, which were intended to be used inside the old v4 interpreter (but that was incomplete) and are now completely unused. Change-Id: I06b0dd684a292adb44efa52d27258242954285ee Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Make it possible to supply compilation units from pluginsSimon Hausmann2014-03-295-38/+205
| | | | | | | | | This also cleans up the script and type initialization in the type loader, for example by getting rid of the m_irUnit member for scripts. Change-Id: I207afeb21c0bae9091d3c7b4cac2e80e9aae0ea3 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Enable GL context sharing for QtQuick windows by defaultSimon Hausmann2014-03-292-1/+16
| | | | | | | | | | | This is required for running QWebEngine inside qmlscene. It can be disabled with --disable-context-sharing and it remains off in QtQuick. Instead apps have to use QWebEngine API to enable this, where this patch here is merely convenience. Change-Id: I123893a7c8c644c49c66fe2b42d2b7b2e03622d9 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Destroy render loop when QCoreApplication is cleaned up.Gunnar Sletta2014-03-292-8/+9
| | | | | | | | | Doing it on 'aboutToQuit' meant we would clean it up whenever an application ran QCoreApp::exec() which could be multiple times per application run. Change-Id: I59e06398a551ae7979e3832dff811937037fa106 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Fix visual parent ownership with scenes that create windowsSimon Hausmann2014-03-285-8/+90
| | | | | | | | | | | | | | | | | | Commit 39540124dd0900e0c99dcda8c0ebdf4f3cea8d5e introduced the concept that a visual parent marks its children, by recursively marking the children of the root item in a QQuickView. This allowed for the removal of an ugly hack in QtQuick Controls. Unfortunately that fix is incomplete in the sense that it makes the incorrect assumption that a QQuickView is always used. The use-case in the bug report is to have child items inside a QtQuick.Window (a regular ApplicationWindow in fact). That window - implemented by QQuickWindowQmlImpl - also needs to mark its children, so this patch introduces the use of the same GC marking helper class (which now operates on a QQuickWindow instead of a QQuickViewPrivate). Task-number: QTBUG-37711 Change-Id: Id788e84dbb041ac8ba6ff23dc4ef56f6fe9e465a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove custom code for converting from QString to QColorSimon Hausmann2014-03-281-47/+5
| | | | | | | | | After commit 9b021a1fbd0b974a452a6e18a8c0b4b97cbf8edb in qtbase we can now (about a year later ;-) remove the custom code from handling alpha when converting from string to color and rely on the implementation in qtbase. Change-Id: Ia8086c99f0f782742d3adf12cb2c3b79dee8d578 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* Fix crash in conversion from QVariantMap to QJSValueSimon Hausmann2014-03-282-1/+13
| | | | | | | | | | When the key is an array index, use arraySet instead of trying to insert an array index as internal class member. Task-number: QTBUG-37854 Change-Id: I23f01cc9d6be98b57d3f13ac7ee847298e9632a3 Reviewed-by: Matt Broadstone <mbroadst@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* V4 string table cleanupsSimon Hausmann2014-03-283-18/+19
| | | | | | | | | | Move the string table (index and data) to the end of the compilation unit. That makes it easier to extend the string table later with new strings - for example when transitioning from JS data to an entire QML unit - because all the other offsets within the JS data remain the same. Change-Id: Ib28caf943ee2ec74b7acc19c2980de0853bb8086 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Various cleanupsSimon Hausmann2014-03-2810-164/+205
| | | | | | | | | | | | | * Encapsulate the string pooling for the V4 data generation into a StringGenerator class. * Move type reference collection into the IR::Document, where it belongs (as it writes into the typeReferences there) * const fixes * Remove unused methods and members * Store unit and qml unit sizes right in the generated data structure. That makes copying easier (like we do when generating the QML data based on the JS fields) Change-Id: I053146ab0b00cc90ac7f72f867415962d1be121b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix crash in sparse array handlingSimon Hausmann2014-03-282-12/+14
| | | | | | | | | | | | When re-allocating the sparse array data, make sure to initialize the free list correctly. Previously this was only done for the first allocation. Test cases uses an object literal, as that's a reliable way to ensure a sparse array is created. Task-number: QTBUG-37892 Change-Id: Ib38cfce50104904af0c980f022c9dbb7461ae5f8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix a link in QQuickDragAttached::dragType documentationJędrzej Nowacki2014-03-281-1/+1
| | | | | Change-Id: Ia704b3c84215b519e86a0aed884d89538ba7e4f9 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix interpreter math routines.Erik Verbruggen2014-03-281-6/+9
| | | | | | | | | | | | | | | | This: qint64 result = a + b; is not equal to: qint64 result = static_cast<qint64>(a) + b; So checking if the former will overflow, and then doing the "double case", will get thrown out by an optimizing compiler. While we're in the area, optimize the X86 case a bit too. Change-Id: Idfb69b16dbaaa0ae9f013a430ff060ca789526ba Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix double deletionSimon Hausmann2014-03-281-1/+1
| | | | | | | | | | | | | | Small regression from commit 7ae796cb141b73a1b215b2b0fd64b7ffbbd1e510. Processing the deletables might result in the onDestruction emission, which in turn may end up in GC allocation and thus GC runs. That in turn may result in m_deletables processing, which at this point is nested then. For that to work we need to set m_deletables back to zero _before_ beginning with the iteration. Fixes tst_qqmlecmascript with aggressive gc. Change-Id: Ibb310b30cd496644557f4c1bb23318b18ee8f36c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Add a module page for Qt Quick WidgetsTopi Reinio2014-03-281-1/+18
| | | | | | | | | | | | Although the documentation is part of Qt Quick, a separate module page with a \qtvariable command is still needed to have correct information about which module to link against. Task-number: QTBUG-37272 Change-Id: Ie00e9418be4feec299cb36c526ca366504c89008 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix QtSharedPointer::ExternalRefCountData object leak in v4 engineLiang Jian2014-03-281-4/+5
| | | | | | | | | | | | Always call ~QObjectWrapper() to the wrapper object in QObjectWrapper::destroy(), otherwise the m_object member of QObjectWrapper may still hold a QtSharedPointer::ExternalRefCountData object which will never been deleted. I don't know why this will not cause leak in the past, but it seems that the leak was introduced in 7ae796cb141b73a1b215b2b0fd64b7ffbbd1e510 Change-Id: I24b49bb11f95b7e3060c7adba1ab80b615da2942 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Document signals (not handlers) under \qmlattachedsignalSze Howe Koh2014-03-285-28/+40
| | | | | | | | | | - They're not "attached properties" either. - Append the handler names to the end of the corresponding signal doc. - Update descriptions and links Task-number: QTBUG-35846 Change-Id: I54e93187b3209546ec344a20e0482c98d7f14109 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Be a bit more conservative with allocating memoryLars Knoll2014-03-271-2/+2
| | | | | | | | | | Cap the max chunk size at 2MB. This value still still doesn't affect the v8 benchmark noticably, but should avoid extreme memory usage in some corner cases Task-number: QTBUG-37134 Change-Id: If2050374c4a7df7ff74194d64880e2d660ea26fd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix instantiation of QML list models with custom object propertiesSimon Hausmann2014-03-275-6/+66
| | | | | | | | | | | | | | | | | | When doing something like property Item blah: Item { ... } in a list model, we would erroneously pass "blah" to the custom parser of the list model, which is wrong as the binding to blah is on an existing property (not custom). For regular properties there's a code path in place to avoid passing this to the custom parser, but for sub-object bindings we'd unconditionally register it with the custom parser. This patch corrects that and also adds a unit test to verify that we don't pass any bindings to existing properties to the custom parser. Task-number: QTBUG-37795 Change-Id: I1a3091fb5fad4be08b577cf74a85f24c3ab62ef4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove the scribble option from the memory managerLars Knoll2014-03-271-7/+0
| | | | | | | | This option doesn't make sense anymore, as we memset the object to 0 on destruction anyway. Change-Id: Ie40563394f9cacda1b35fde114c9a6043f53d460 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of collectDeletablesLars Knoll2014-03-276-45/+24
| | | | | | | | | The method is only required for the QObjectWrapper, but there we can instead simply register the deletable in the destroy method. Change-Id: I944319d327859cce33ac31a174e8d56fc4babfc1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>