aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Reshuffle inlined functions to fix MinGW-warnings.Friedemann Kleint2013-10-052-58/+58
| | | | | | | | | | | | | | | | | | | When compiling QtQuick: qv4value_p.h:80:17: warning: 'QV4::Managed* QV4::Value::asManaged() const' redeclared without dllimport attribute after being referenced with dll linkage ^ qv4value_p.h:180:14: warning: 'static QV4::Value QV4::Value::fromManaged(QV4::Managed*)' redeclared without dllimport attribute after being referenced with dll linkage ^ qv4value_p.h:285:16: warning: 'QV4::String* QV4::Value::asString() const' redeclared without dllimport attribute after being referenced with dll linkage Change-Id: I548a2f8049b8eca06ab1061f56416a332820dc01 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Fix regression in pressDelay behavior.Michael Brasser2013-10-041-9/+0
| | | | | | | | | | | | | | | Don't deliver a press event when a Flickable is moved before the pressDelay expires. This prevents delegates flickering between pressed and unpressed states when beginning to flick a Flickable. Fixes regression introduced by 429af6244518172e19abf7fecd7112f26bac6b31/ d02131e743597b9bd3070d986c61a1c91ea8317a. Task-number: QTBUG-31168 Change-Id: Id4e853fabe99000837df3681acd8fc4e76d2e9b3 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* Respect DirtyForceUpdate in QSGBatchRenderer.Gunnar Sletta2013-10-041-1/+9
| | | | | | | | | | | | | | There is a way this could have been done slightly more efficitently. If we moved all "combined" logic out of the scene graph and into the Node shadow tree, we could ignore the forceupdate all together. However, this is a quite large change for what is currently a non-common case. It would also increase overall memory consumption a bit as we would have superfluous combined matrix and opacity in the QSGNodes. Task-number: QTBUG-33838 Change-Id: I06c486ace2be15bef1f1dc72a8b41cb649d7c813 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* V4 JIT: enable register allocator for linux/x86.Erik Verbruggen2013-10-041-1/+7
| | | | | Change-Id: I9424838139a419beb2e207f168fc25c0c47c64e3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 JIT: fix visitRet for 32-bit architectures.Erik Verbruggen2013-10-041-10/+43
| | | | | Change-Id: I004fe8d5de0f5a932c23393ed06a04738b8e8bf1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Signal no region descriptors follow the ETH table.Petr Nejedly2013-10-041-1/+2
| | | | | | | | | | | | In our implementation, the 2-word EXIDX is directly followed by a 3-word ETH for personality 2 unwind interpretter. According to ARM EHABI 9.2, "region of interest" descriptors should follow, finished by a single zero word. As the generated functions don't have any such regions, only the closing zero needs to be present. Change-Id: I65fde548371cf12a31aac3e8829275965e034f3a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Make sure to markDirty the node from UniformAnimator.Gunnar Sletta2013-10-031-0/+4
| | | | | | | | Failure to do so will not repaint scene graphs which only has changes from the animator. Change-Id: Id420775d704df17379ca9b0eecd543fd3829fd00 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Make sure we apply the last transformation step.Gunnar Sletta2013-10-031-7/+6
| | | | | Change-Id: Ie9b9a04cf41033bb475875f419b16ce91f6a477d Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Make transform and opacity animators work when layer.enabled: trueGunnar Sletta2013-10-032-0/+15
| | | | | Change-Id: I6d9ece93a75782d524c211fc81a43f4311a38571 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Remane private QQuickAction into QQuickStateActionGabriel de Dietrich2013-10-0316-130/+130
| | | | | | | | | | | This avoid symbol conflicts when statically linking with Qt Quick Controls, that has its own QQuickAction class and which may become public some day. (QQuickPropertyAction might be a more apt name, but it's already taken). Change-Id: Ia9514d63d38295603a89d8ec5a88815a651380f7 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* Don't print garbage or crash when using console.logJan Arve Saether2013-10-031-8/+17
| | | | | | | | | | | | | | | | | The problem was that the ctor of QMessageLogger did not make a deep copy of the source or the function. Since the QByteArray returned from toUtf8() was only guaranteed to live within the statement it was used, the pointers that QMessageLogger held would point to released memory as soon as the QByteArray got destructed. This could only be reproduced if the logging framework tried to print the source file or the source function. In my case, I had set this environment variable to provoke this: $env:QT_MESSAGE_PATTERN="%{file}(%{line}):%{message}" Change-Id: I4ea4cf309c6c6420cef5bab0108a6cb2b2f9e841 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* A dynamically-created Window can have a parent Item and vice-versaShawn Rutledge2013-10-031-8/+28
| | | | | | | | | | | | There can be a QML-declared Item which uses Component.createObject to instantiate a Window; in that case the Window will be transient for the window containing the Item. There can also be a QML-declared Window which uses Component.createObject to instantiate an Item; in that case the Item's parent will be set to the Window's contentItem. Task-number: QTBUG-33644 Change-Id: I0b1fe2e98c862c100e52bd5952788af3a727d25e Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* A dynamically created Window can have a parent WindowShawn Rutledge2013-10-031-9/+17
| | | | | | | | | | | | | So far the parent relationship has existed only for Items. parent is still not exposed as a property of Window, but since it was possible to give a parent parameter to Component.createObject(), it makes sense to try to interpret it as a Window in that case. So now a Window can be created with another Window as its parent just as an Item can be created with a parent Item. Task-number: QTBUG-33644 Change-Id: I796198a38bd47253eef462c80f5098825451c59c Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Invalidate the bounding rects when the roots change.Gunnar Sletta2013-10-031-1/+3
| | | | | | | | | When roots change, matrices are updated in the nodes, so we need to also invalidate the bounding rects for geometry nodes. Change-Id: I61f60ad069c3b1d018ce31c57310a1e5c4807684 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Animator overview docs and example.Gunnar Sletta2013-10-031-0/+19
| | | | | Change-Id: If0852e48dbbfea4fadca9c897ea0e62393763055 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Separate and fix 8/24-bit text mask materials.Gunnar Sletta2013-10-033-119/+189
| | | | | | | | | | | | | | | | | | The logic was a bit cluttered, trying to handle two rather different pieces of logic in one material shader. The 8-bit shader does not try to be fancy in any way, it just takes the alpha * color which gives similar intensities as the distance fields. The logic for 24-bit contains a tiny fix for opacity. The patch also includes a change from QColor -> QVector4D and QPointF -> QVector2D to simplify the conversion needed and be consistent with what kind of types we use. Task-number: QTBUG-33805 Task-number: QTBUG-33633 Task-number: QTCREATORBUG-10176 Change-Id: Ia8c464f98a1fc2c190a1d323fc21466a4d7b0dfd Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Remove QSGContext's precompilation step.Gunnar Sletta2013-10-032-77/+0
| | | | | | | | | Materials are managed solely inside the renderer now, so these are just wasting time. Task-number: QTBUG-33456 Change-Id: Ie320df20b7971633c257b1bd3a218e7d70e52c3d Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
* Enable profiling of materials and atlas texturesGunnar Sletta2013-10-032-8/+60
| | | | | | | Task-number: QTBUG-33459 Change-Id: Ie9ea176fbb7ee46a128b4bf66a8f4475a5d4c90b Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Get lookups working (somehow) on ARMPetr Nejedly2013-10-031-1/+7
| | | | | | | | | | | Edit(Simon): This is a workaround for the register clash on ARM. r0 (ReturnValueRegister) is also used to pass the first argument, therefore we can't use it as "temporary" register for the duration of the parameter setup. Temporarily allocate r8 for now until we have constraints like these properly propagated into the register allocator. Change-Id: Iae266672856dea247b720367b8e8393333622e4e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Temporarily disable libunwind exception throwing on MacSimon Hausmann2013-10-032-3/+3
| | | | | | | | | The run-time appears to have a slightly different behaviour wrt exception ownership. We don't strictly need this code path on Mac, so use regular C++ exceptions until I can figure out what happens there. Change-Id: Idd540c8656d25ffdb4002843f398114881e33214 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix backtrace generation on Android/ARM/QNXSimon Hausmann2013-10-031-5/+37
| | | | | | | | | | | | Use a GCC extension to the common C++ ABI's called _Unwind_Backtrace, which generate backtraces if possible. Its direct use will ensure we use the statically linked unwind, which knows about our unwind tables. This also helps for the setup when libc doesn't have the glibc specific backtrace() function we used previously. The unwinder on Mac OS X with clang also implements the same extension. Change-Id: I0b780590c10c16e50ec570f7da1efae2e64c46dd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup exception handlingSimon Hausmann2013-10-0319-234/+97
| | | | | | | | | | The code in the Exception class operates entirely on the engine's data, so move it into ExecutionEngine instead. This eliminates the need for a QV4::Exception class and catches and old code that tries to still do catch (Exception &) instead of catch (...) Change-Id: Ie608bec6af652038aca6c9423c225a4d7eb13b39 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change v4 exceptions to use the common C++ ABIs foreign exceptionsSimon Hausmann2013-10-035-65/+56
| | | | | | | | | | | | | | | | | | | On platforms where we use the common C++ ABI, throw the exception not using a dummy C++ exception structure and the throw keyboard, but instead use the lower-level _Unwind_RaiseException to throw a foreign exception. It is caught with the existing "catch (...)" and re-throw is implemented similarly, by grabbing the current exception from the globals (a standardized data structure) and re-throwing it. On platforms such as ARM that lack hooks for supplying our unwind tables to the system run-time, this patch will make it possible to link the unwinder statically into libQtQml (libgcc or libunwind) and thus force it to use our unwind tables, because throwing or re-throwing will always go through our statically linked code through direct calls to _Unwind_RaiseException (instead of libstdc++). Change-Id: Ic2ac056fc7ed9e93fb51e30ab45f35b260487c5f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Forward-declare QV4::String in qqmlmetatype_p.h.Friedemann Kleint2013-10-031-2/+2
| | | | | | | | | Required for follow-up changes reordering inline functions for MinGW as otherwise QV4::Value::isString() is reported as used but not defined. Change-Id: Ib07caa9eee667295ecc88f94ab8960b100cd084b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Mark DirtySubtreeBlocked correctly from OpacityNodeGunnar Sletta2013-10-031-2/+2
| | | | | | | | | In the edgecase where the opacity was exactly the OPACITY_THRESHOLD we would fail to mark the tree as dirty. This led to a crash in the renderer. Change-Id: I618910d0c792a215133598b6a87217be1f8729bc Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Respect Qt.vector2d as input to ShaderEffect uniforms.Gunnar Sletta2013-10-031-0/+3
| | | | | Change-Id: I7c24f822424d36cf16648d17df161f15083b0da5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Use a QVector instead of a QListLars Knoll2013-10-035-15/+20
| | | | | | | | This makes the code go quite a bit faster (saves ~7-8% of the total amount of instructions executed when running crypto.js Change-Id: I6b3bd08eca98b45593262e2fc6e0ce5056257e76 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 JIT: implement convertUInt32ToDouble on ARMv7.Erik Verbruggen2013-10-034-22/+12
| | | | | Change-Id: I11caf07a8776bb2c6527639f22d47103f4ca1cef Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4 IR: fix dead-code elimination.Erik Verbruggen2013-10-031-93/+109
| | | | | Change-Id: If00a108fb107d331478dd36ad7feae4c4521c2ae Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4: invert conditions when the true block follows the test.Erik Verbruggen2013-10-037-24/+52
| | | | | Change-Id: I5044acd4263b71734e4eb5d7e74b1a4a8414741e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change exception handling APISimon Hausmann2013-10-0238-280/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the exception handling API in the engine slightly, encapsulating any use of direct throw statements and catch blocks with concrete types. In the future we need to be able to change the way these are implemented, in order to ensure that the correct stack unwinding code is triggered for throw and re-throw. This patch separates the C++ exception object thrown from the V4 exception (that includes value, throwing context pointer) and stores the latter inside the engine. In order for that to compile, ExecutionEngine::StackTrace and StackFrame had to move into the QV4 namespace directly. In addition the syntax for catching exceptions changes from try { ... } catch (QV4::Exception &ex) { ex.accept(context); QV4::ScopedValue exceptionValue(scope, ex.value()); } to try { ... } catch (...) { QV4::ScopedValue exception(scope, context->catchException()); } Context::catchException() checks if there's a "current" exception in the engine, and if not assumes that we caught an unrelated exception and consequently re-throws. partiallyUnwind() is also gone and replaced with rethrowException(), in order to encapsulate the re-throw. Lastly, in the future nesting try/catch blocks isn't going to be possible due to limitations in the common C++ ABI with regards to foreign exceptions. Change-Id: Ic81c75b057a2147e3176d8e0b4d326c14278b47d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup API of Safe<T>Lars Knoll2013-10-0215-37/+62
| | | | | | | | Don't have an implicit cast operator to Returned<T> anymore, and return a T* from the operator->() Change-Id: If4165071b986bfc84a157560d94d39c2dcfbc9e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use SafeValue instead of Value in ScopedValue methodsLars Knoll2013-10-0219-71/+69
| | | | | Change-Id: Ie463efe600d498ce77d4b9e8b48abcfd61c1ab78 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove some more uses of QV4::ValueLars Knoll2013-10-0210-41/+44
| | | | | | | All remaining uses should be GC safe now. Change-Id: I05c962de6ab896f108f70caa1bf937a24e67bfe1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove more uses of ValueLars Knoll2013-10-0227-116/+118
| | | | | Change-Id: I889e760f75b485a28e1f2a2c26b2337ae9bfafac Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix ObjectIterator API to be GC safeLars Knoll2013-10-0229-160/+250
| | | | | Change-Id: I3a9c48d53d8dbadcb9b32c00fcef1f89447c4b8c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't create a ValueRef to a temporaryLars Knoll2013-10-021-3/+4
| | | | | Change-Id: I6d7fbcee594298517b880e4b0fac9df1f9e54d61 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Always call callCompleted in QQmlDataBlob::tryDoneAlbert Astals Cid2013-10-021-4/+2
| | | | | | | | | | | | | | | | | | | We need this since it could happen that in QQmlComponentPrivate::loadUrl we did QQmlTypeData *data = QQmlEnginePrivate::get(engine)->typeLoader.getType(url, loaderMode); and got a sync QQmlTypeData even if we asked for async, and thus the async loader was never notified when it finished and we were never loaded. Situation in which this can happen is: * ListView with an async Loader as delegate * Loader loads two items A and B, while A is a B * Item 0 of the ListView triggers an async loading of A that triggers the sync loading of B * Item 1 of the ListView triggers an async loading of B * Since B is already being loaded (though in sync), we just add ourselves to the people that want to be notified * sync loading of B is done and QQmlDataBlob::tryDone does not call the callbacks because it's sync * Item 1 is never finished loading Change-Id: I52a0979a1d3cfcfe73a71196bf24f491d6cf8e9a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4 IR: fix type inference.Erik Verbruggen2013-10-021-0/+8
| | | | | | | | | | | | | | | | | | When a phi-node couldn't be fully typed (e.g., when one of the temps was not yet typed), VarType was assumed. When a circular dependency between two phi-nodes occurred, like with a condition inside a loop, then depending on the ordering of the work-list, the two phi-nodes could start oscillating between VarType and the correct type. The fix is to check if one of the temps is not fully typed, and if so, assume whatever we currently have as the result and have the statement re-scheduled. Full typing will occur when the temp with the missing type information is typed. Change-Id: I950d81fe7fa8272cb37f7eea5b88092d1eb4817e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Don't delete scene-graph atlas manager if it hasn't been created yetTor Arne Vestbø2013-10-021-2/+4
| | | | | | | | | | | | QSGContext::invalidate() is called from the QSGContext destructor, but the atlas manager is only created if QSGContext::initialize() is called, which may not always happen. The result was a bunch of "QCoreApplication::postEvent: Unexpected null receiver" messages during testing. Change-Id: I11a294d48c06d687a9f82cf1ce825063cda8ecf6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-02101-1467/+1467
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix compilation on Android with 4.8 toolchainLaszlo Agocs2013-10-015-10/+17
| | | | | Change-Id: I1ce4ec8c9c671f0130c1530c772c1dd74f1fb1f4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4: fix ArrayPrototype::method_isArray() build breakJ-P Nurmi2013-10-011-1/+1
| | | | | | | | | With a recent Clang in C++11 mode: error: incompatible operand types ('QV4::ArrayObject *' and 'bool') Task-number: QTBUG-33706 Change-Id: I7bd4fe01176745fb6f8dbdf8f271edb7121eb35e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix PathView stealing mouse grab from its child items.Andrew den Exter2013-10-011-11/+22
| | | | | | | | | | Apply the improvements that have been applied to Flickables handling of child items over time to PathView to bring its behavior back in line. Task-number: QTBUG-33699 Change-Id: I76a412d75c48f9cf2f12f5f6f1aa01ff62d06364 Reviewed-by: Joona Petrell <joona.petrell@jollamobile.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix invalid alias error reporting in new compilerSimon Hausmann2013-09-304-14/+68
| | | | | | | | Match exactly the VME code path by reporting the right type of error as well as the right hand side of the alias binding if necessary. Change-Id: I35d192a20641e0acbf25d20f3dc5fb53cc7cbae5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Improve error location reporting for invalid aliases in old VMESimon Hausmann2013-09-301-1/+1
| | | | | | | | | When an alias declaration is missing a location, report the error with the location of the alias declaration, not the object declaration. This matches the code patch in the new compiler, which also reports it accurately. Change-Id: I709dbddb3273f4e05cc4d63079da52d7224466bd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix error message for group property definitions on signals in new compilerSimon Hausmann2013-09-301-3/+4
| | | | | | | | | | | | | It may happen that people forget the colon after the handler name in onSomeSignal { code here } and we have to print out the correct error message. It looks like a group property, but we can identify this binding due to its reserved use of starting with "on". Change-Id: I7c502c1a2a5f2a6c613879468a60bc57a7d20fe8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Improve component boundary detect in new compilerSimon Hausmann2013-09-301-3/+4
| | | | | | | | | | Instead of going through the property cache and the potential creation of a dynamic meta object to determine inequality with QQmlComponent::staticMetaObject, we can simply use the QQmlType and its know metaObject directly to perform the check. That's faster and more reliably. Change-Id: If6484b059ec2bed234009755adf2fa3aa19b2b9f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix error messages when assigning to non-existent properties in new compilerSimon Hausmann2013-09-305-8/+115
| | | | | | | | | Introduce a simple valdator pass early on to catch those assignments. Also fix storing the correct line/col for default property object bindings and remember the minor/major version of an import in the final type reference. Change-Id: Ib2a93dfe1a30fcd9c09b5443fb8199ad11b19769 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix line/column in import related error messages with the new compilerSimon Hausmann2013-09-301-2/+2
| | | | | | | | Grab the line/column from the import token, not the import id token, as the latter is not always present in all import statements. Change-Id: Iaa0c2f1d60422fb779fa7a6c4fd1c895fa3f777b Reviewed-by: Lars Knoll <lars.knoll@digia.com>