aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Reduce memory pressure on JS stack when garbage collectingSimon Hausmann2014-04-091-3/+8
| | | | | | | | | | | | As the identifier table grows with long running programs, we may end up allocating more identifiers than we have space left on the JS stack for them alongside all the other objects in the environment. To mitigate this, we can simply treat the identifiers as roots, mark them manually and only end up putting sub-strings onto the JS stack if necessary. Task-number: QTBUG-36183 Change-Id: Ie6994555305c84b007860792d066a8df60089847 Reviewed-by: Lars Knoll <[email protected]>
* Fix unreliable behavior of array methods on qml list propertiesSimon Hausmann2014-04-095-5/+27
| | | | | | | | | | | Array methods such as forEach rely on the hasProperty boolean of getIndexed to be set appropriately. Some getIndexed implementation - such as the QQmlListProperty one - didn't initialize it correctly and therefore the behavior was undefined. Task-number: QTBUG-38088 Change-Id: I34bc3136d8cc2bc280397d0c4d5051e7d72269e8 Reviewed-by: Lars Knoll <[email protected]>
* Add support for dynamic properties for QObjects in JavaScriptSimon Hausmann2014-04-092-3/+21
| | | | | | | | | | | | | | | | | In QtScript you could add properties to a JS object that wraps a QObject. Depending on the wrap option the property was either stored on the JavaScript side or as dynamic QObject property. In QJSEngine/QJSValue, neither was supported - properties could not be added. For QObjects wrapped in JavaScript that weren't created by QML, we can restore the behavior of storing dynamically added properties as JavaScript properties. This makes porting from QtScript to QJS* much easier. Task-number: QTBUG-37408 Change-Id: I5ef1f379c08c3d84de9bdcac9b6a9397238064de Reviewed-by: Jędrzej Nowacki <[email protected]> Reviewed-by: Lars Knoll <[email protected]>
* ListView: fix rounding errorsJ-P Nurmi2014-04-094-7/+197
| | | | | | | Task-number: QTBUG-37339 Change-Id: I223e4d6bcabb1daa705c0ed2212e7e2b2fc3f37c Reviewed-by: Andy Shaw <[email protected]> Reviewed-by: Alan Alpert <[email protected]>
* Fix remaining QQmlLocale auto-test failuresSimon Hausmann2014-04-082-5/+5
| | | | | | | | | | | | | | | | Thanks to improvements in QDateTime's parser, we can unskip a bunch of tests. What remained was dateFromLocaleTimeString, which failed because it relied on the earlier behavior of a failed conversion from a _time_ string to a date also returning an invalid date object. This behavior is restored by leaving the QDateTime object as invalid unless the converted time is valid. In Qt <= 5.1, QDateTime::setTime would make the entire datetime object invalid if the provided time was invalid. In Qt >= 5.2 it remains potentially valid if the date at least is correct - which was the case here as it was initialized from currentDateTime. Change-Id: I32a2cd2a9631cca3b12773e4c55169baa3eeaf1a Reviewed-by: Lars Knoll <[email protected]>
* Fix wrong register usage for integer binopsSimon Hausmann2014-04-081-23/+8
| | | | | | | | | | | | | | | | | | | | | | When doing of integers where we use a three argument variant of masm (lhs/rhs/target), we need three general purpose registers. If the target temp of the binop is a register, we use that as a target, otherwise fall back to ReturnValueRegister (scratch). In that case we don't need to move from RVR to target register. Additionally we need to load lhs and rhs into registers, and for the lhs we use the target register and for the rhs the scratch register. So we start by loading the lhs into the target register and the rhs into the scratch register. However if the rhs is already assigned to a register and that register happens to be the target register, then the earlier load of the lhs into the target register overwrote our rhs! This is fixed by being more careful in the choice of the target temp's assigned register as "scratch" register for the lhs, i.e. don't use it if the target temp is also assigned to the same register as the rhs. Task-number: QTBUG-38097 Change-Id: I2ffec55cb98818fa9ebb5a76a32b6dca72175893 Reviewed-by: Lars Knoll <[email protected]>
* Zero memory in WinRT allocatorAndrew Knight2014-04-081-0/+1
| | | | | | | | | The memory is assumed to be zero-initialized, and this wasn't happening on WinRT. Task-number: QTBUG-38132 Change-Id: I8686a40dacdc20bd702cc43a067209bfa997e7b2 Reviewed-by: Simon Hausmann <[email protected]>
* make accessibility plugin declare that it extends QuickOswald Buddenhagen2014-04-081-0/+1
| | | | | Change-Id: I62789da1ec45ad0647705dc5a7b509ff36c388f8 Reviewed-by: Alan Alpert <[email protected]>
* Fix XHR auto tests always failingSimon Hausmann2014-04-082-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | The test (rightly so) expects that even for a 400 response, the responseBody must be preserved - as per commit 0949071f13e7bcbc16a0f07f496e0b6a23b04edd. However before commit fd5dd2712656cbc674c8360754394e41dd82e40c in qtbase, 400 was mapped to QNetworkReply::UnknownContentError, which is "handled" by QQmlXMLHttpRequest::error in the sense that the body is preserved. After the qtbase behavioral change, 400 now maps to QNetworkReply::ProtocolInvalidOperationError, which was _not_ handled, the body was cleared and the test failed. The revdep of qtdeclarative for qtbase should've caught the behavioral change in qtbase, but unfortunately the auto-test was disabled (marked insignificant). This patch adjusts the xhr implementation to the behavioral change in qtbase and also re-activates the xhr auto-test (we really should be testing our xhr implementation in the CI system...). Task-number: QTBUG-38180 Change-Id: I7655fd9037752ad644a98d01257bf5f81e7daa15 Reviewed-by: Mandeep Sandhu <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]> Reviewed-by: Peter Hartmann <[email protected]>
* Fix memory corruption in XHR implementationSimon Hausmann2014-04-081-0/+1
| | | | | | | | | | | | Now that the member data of Object is also on the GC heap, it is even more important to call the base implementation of markObjects when re-implementing it ;-) Fixes also three XHR auto tests (text, cdata and stateChangeCallingContext) Change-Id: Ifd033cac64a8cf27a9186d8cd9eb94369d8a60a5 Reviewed-by: Michael Brasser <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]>
* Set font correctly in canvas example.Mitch Curtis2014-04-081-1/+1
| | | | | | | | | | | This fixes the following warning: Context2D: Missing or misplaced font family in font string (it must come after the font size). Task-number: QTBUG-38103 Change-Id: I0902e6e095fb76cdc8619229dccf2601007c3216 Reviewed-by: Jeff Tranter <[email protected]> Reviewed-by: Jerome Pasion <[email protected]>
* Verify empty SmoothedAnimation doesn't keep animation system running.Michael Brasser2014-04-081-0/+22
| | | | | Change-Id: I8f8a9d31241e1bff9e72524b69d625258885558a Reviewed-by: Robin Burchell <[email protected]>
* Support dumping of animation jobs via QML_ANIMATION_TICK_DUMP.Michael Brasser2014-04-0819-3/+167
| | | | | Change-Id: I0b444321667691be3e1037164d02f29ed4dfc13e Reviewed-by: Gunnar Sletta <[email protected]>
* OSX: fix QQuickListView testShawn Rutledge2014-04-073-13/+16
| | | | | | | | | | | outsideViewportChangeNotAffectingView was failing on OSX. Make the window larger; flick a longer distance in the same time to ensure that the flick takes the list to the end. Task-number: QTBUG-37828 Task-number: QTBUG-27740 Change-Id: Iefa44942a8f8318861781db820e830b459114a83 Reviewed-by: J-P Nurmi <[email protected]>
* Fix marking of prototype objects in chainSimon Hausmann2014-04-072-9/+24
| | | | | | | | | | | | | | | | With a real prototype chain it can happen that an internal class' prototype's class itself has a prototype. Therefore the first transition on the empty class is a PrototypeChange one, but the class the transition leads to may have PrototypeChange transitions itself, which weren't marked. There are multiple solutions to this, but this patch is the minimal fix by recursing fully through the internal class tree. That way it's easier to back-port the fix also into 5.2.x based branches. Task-number: QTBUG-37834 Change-Id: I901b13a2663fbad5844003ca5752f2f304de320c Reviewed-by: Lars Knoll <[email protected]>
* Doc: Fix apidoc for QQuickLoader::sourceComponentKevin Funk2014-04-071-2/+1
| | | | | | | | | | Setting this to an empty string doesn't make sense nor works Change-Id: I4dd89d0356da30bc46e5fdac827e30b6f9a6a7a4 Reviewed-by: J-P Nurmi <[email protected]> Reviewed-by: Gunnar Sletta <[email protected]> Reviewed-by: Topi Reiniö <[email protected]> Reviewed-by: Alan Alpert <[email protected]>
* Don't start continuing animation when it doesn't have children.Gunnar Sletta2014-04-071-2/+5
| | | | | | | If we did, it would never stop. Change-Id: Ie9d8f1731f6fa555f8dd6a56d6967a8f8f19a9f4 Reviewed-by: Michael Brasser <[email protected]>
* Don't mipmap by default in QSGSimpleTextureNodeGunnar Sletta2014-04-071-0/+2
| | | | | | Task-number: QTBUG-37646 Change-Id: I2f27568ebd89c1f451f910dd03ea21c01c4adad1 Reviewed-by: Laszlo Agocs <[email protected]>
* 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 <[email protected]> Reviewed-by: Lars Knoll <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* Initialize variables in QQuickItemParticleGunnar Sletta2014-04-041-1/+1
| | | | | | Change-Id: I42a7b1481014e06e25ab4d9d6f2f36fb3515f735 Reviewed-by: Laszlo Agocs <[email protected]> Reviewed-by: Alan Alpert <[email protected]>
* 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 <[email protected]> Reviewed-by: Sze Howe Koh <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Liang Qi <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Andy Shaw <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Lars Knoll <[email protected]>
* Make example work when QOffscreenSurface == QWindowGunnar Sletta2014-04-023-36/+47
| | | | | Change-Id: I7435d91b37a46c0bced301c5c9c82fdf499e0587 Reviewed-by: Laszlo Agocs <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]> Reviewed-by: Jędrzej Nowacki <[email protected]> Reviewed-by: Martin Jones <[email protected]>
* 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 <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* Fix typoSimon Hausmann2014-04-017-9/+9
| | | | | | | creatScriptFunction -> createScriptFunction Change-Id: Icdb9214b1ae067fa2b8693d50cdac0be9fe6d390 Reviewed-by: Michael Brasser <[email protected]>
* Fix compilation on QNXSergio Ahumada2014-03-311-5/+5
| | | | | | | Task-number: QTBUG-37979 Change-Id: Ie877317cded5b9eaf95389344712c66192696552 Reviewed-by: Simon Hausmann <[email protected]> Reviewed-by: Jędrzej Nowacki <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* Don't crash when render node doesn't have a batchrootGunnar Sletta2014-03-311-1/+3
| | | | | Change-Id: Ib8f70414eb477b4ec45097c8784a5fe1375cf012 Reviewed-by: Laszlo Agocs <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>