aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix === operator for value typesLars Knoll2013-11-152-3/+6
| | | | | | | | | Fix === comparison for urls and other QML value types. Task-number: QTBUG-33546 Change-Id: I4a7066e6bbc7de7c599fe2c7b2fdfb75e0ff5196 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Fixed QtQuick.Window documentationJerome Pasion2013-11-153-35/+35
| | | | | | | | | | | -fixed import statement in \qmlmodule and \inqmlmodule command. -Removed extra identifier in property documentation. Task-number: QTBUG-33360 Change-Id: I1e7ca5f418c327d42247ab4f4a11733c63d8c273 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix stacking order bug in the rendererGunnar Sletta2013-11-151-0/+7
| | | | | | | | | | Since we are sorting batches based on the zorder of the first element it is crucial that we don't continue adding to batches once an overlap with a compatible element is found. Task-number: QTBUG-34864 Change-Id: Ic2194c5c17bba0bc9874a14e8a69c81bff75bd1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Don't crash when trying to assign to null.propLars Knoll2013-11-151-0/+2
| | | | | | | | | | Fixes a regression introduced during the exception handling refactoring. Task-number: QTBUG-34544 Change-Id: Ib751274d759030db3e5d3b1380b30dc07ec85f83 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't dereference a null animationTemplateLars Knoll2013-11-141-1/+2
| | | | | | | | | | If the SpringAnimation gets used inside a Transition, the animationTemplate might get cleared, but updateCurrentTime() still gets called on the SpringAnimation after that. Task-number: QTBUG-34539 Change-Id: I1f27fdbfc594e6ff9a4343e45f7f4001964bb012 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Avoid deadlock in Qt CreatorGunnar Sletta2013-11-141-1/+15
| | | | | | Task-number: QTCREATORBUG-10699 Change-Id: Ia88df5ec4ea74fda6a0449aa739a9c6976fedb02 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Improve internal debug statements.Gunnar Sletta2013-11-141-92/+79
| | | | | | | | Now that we have one thread per window it is useful to know which thread and window prints out the messages. Change-Id: I699eae180575fd3355551ebe0bfe6fd6ac8837c9 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* V4 debugging: fix step-over and step-out.Erik Verbruggen2013-11-144-37/+54
| | | | | | | | | | | | | | | | - step-out: only stop if we’re leaving the context for the function we previously stopped at, so intermediate calls between the current position and the end do not stop the engine - step-over: set breakpoints on all lines in current function and continue to run. When hitting a breakpoint, see if we are in the same context, because recursive calls might happen. Breakpoints on all lines are needed, because the (pure) next line might be jumped over (like when doing step-over a single-line then clause, where the next line might be in the else clause). Change-Id: Idf35dc740ca64fae5079162162906490a96af2a7 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Allow passing qmlRegisterSingletonType QObjects to C++ as QObject*Albert Astals Cid2013-11-143-0/+14
| | | | | | | | | | | | | At the moment you can pass them as their FinalType* or as one of their ParentType* but not as QObject* which does not make much sense to me Task-number: QTBUG-34617 Task-number: QTBUG-30730 Change-Id: Id5cfb7bbb123456ef43f44f33b450f8966a7641a Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Adapt Qt Quick 2 renderer to work with OpenGL Core ProfileSean Harmer2013-11-1369-65/+1545
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The basic approach is to have the batched renderer create and bind a vertex array object if it detects we are using an OpenGL Core profile context. The VAO is bound for the duration of the QQ2 renderer's work cycle and unbound at the end so as to not interfere with any other VAO's a user may wish to use. All shaders have been copied and ported to be compliant with the GLSL 150 core specification which is the minimum for a Core profile context (OpenGL 3.2 Core). We are not using any newer features as yet so this will work anywhere we can get a Core profile context. The QSGShaderSourceBuilder class has been extended to resolve any requests for shaders to the same basefilename with "_core" appended prior to any file extension. This could be extended in the future to allow version, or GPU or platform specific shaders. The QSGShaderSourceBuilder has also been extended to allow it to insert #define definitions in the prologue of a shader. Any such definition is inserted: * After the last #extension directive (if any are found) * Otherwise after the #version directive (if found) * Otherwise at the start of the shader source This is required by the custom particle shaders which make extensive use of such #defines. In addition the mechanism used by the distance field glyph cache to extend the cache with new glyphs has been modified to work (and work more efficiently) when using a Core profile context. Rather than using a shader program and a buffer filling quad to blit the old texture into the new cache texture, we instead use the technique of framebuffer blitting. The existing fallback implementation using glTexSubImage2D() is still available if needed. The DECLARATIVE_EXAMPLE_MAIN macro has been extended to allow easy testing of any of the QtDeclarative examples with a core profile context. Just run the example with QT_QUICK_CORE_PROFILE=1 ./text for e.g. The only ones that may not work out of the box are those that provide GLSL shader source e.g. the customparticles or shader effect examples. These work fine if the shader source is adapted to GLSL 150 core. In the future it may be a good idea to expose some context property to QML that the user can use to determine what shader source variation to provide to Qt Quick. Along these lines it would also be very nice to allow the provision of shader source to ShaderEffect or CustomParticle from a separate source file just as we now do within Qt Quick. Task-number: QTBUG-32050 Change-Id: Ia6e9f06dbb8508af9ae03c6b60fb418b4cc9e41f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Adding FontDialog type to group "dialogs".Jerome Pasion2013-11-131-0/+1
| | | | | | | | | -needed for FontDialog to show up in the landing page. Task-number: QTBUG-33360 Change-Id: Ic3ea5722e963045704e81a673ebd85770c0253a3 Reviewed-by: Matti Paaso <matti.paaso@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix native compilation on linux/arm with gcc 4.7.2Erik Verbruggen2013-11-131-1/+1
| | | | | | | | | | | /disk/qt5-dev/qtdeclarative/src/qml/jsruntime/qv4function.cpp: In instantiation of ‘int QV4::LineNumberMappingHelper<field, SearchType>::lowerBound(int, int, SearchType) [with int field = 0; SearchType = int]’: /disk/qt5-dev/qtdeclarative/src/qml/jsruntime/qv4function.cpp:142:49: required from here /disk/qt5-dev/qtdeclarative/src/qml/jsruntime/qv4function.cpp:106:13: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] cc1plus: all warnings being treated as errors Change-Id: Ic97d6a2a9acd392d565e9c66f30159552473e092 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Revert ffaf39e9a7f11d4e2800b3b37160a2a952795614Alan Alpert2013-11-1310-10/+13
| | | | | | | | | Making it public right now seems a little premature, given all the work happening on the engine now (and for 5.3). We'll be in a better position to commit to it or not next release. Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2bbbb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Polish up QQmlFileSelectorAlan Alpert2013-11-134-13/+84
| | | | | | | | Incorporate beta feedback, and hide QQmlAbstractUrlInterceptor as the implementation (instead of making that "the API"). Change-Id: Ib7b14afeb9205fb8a87ed16a6d38b1f468b2aaaa Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix warnings about deprecated string conversions in V4-debugservice.Friedemann Kleint2013-11-131-3/+3
| | | | | Change-Id: I1b45876d2016fdcf1117c4f77b33c75f7d712657 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix boundingbox calculation of rotated items.Gunnar Sletta2013-11-122-8/+34
| | | | | | | Task-number: QTBUG-34328 Change-Id: If0202a67d95500333a0fb6f4ca3eb19ecb027770 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix property dependency generation for accelerated QML QObject propertiesSimon Hausmann2013-11-1217-155/+65
| | | | | | | | | | | | | | The previous approach of collecting the dependencies through an IR visitor doesn't work, because it relies on a fixed structure - for example MEMBER(NAME, prop) - which we can't guarantee (it's usually MEMBER(TEMP, prop)). But it turns out that we can only pre-calculate dependencies for context, scope or id properties, so we can do that right away in the QML specific JS codegen, store that information in the IR function and use it from there in the data structure generator as well as in the isel as a parameter to getQObjectProperty to tell the run-time whether capture is required or not. Change-Id: I33711c3420d6534c653c2a6a4284f0fc12e941cf Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix out of bounds array index in the generated JIT codeLars Knoll2013-11-121-3/+5
| | | | | | | | | When converting a double to int, make sure we check for >= 0 before using it, otherwise we get out of bounds accesses. Task-number: QTBUG-34635 Change-Id: If72e116c08fe1dff03cd88ce510cf8b96d249b92 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* V4 IR: change basic-block cleanup to remove unreachable cycles too.Erik Verbruggen2013-11-121-22/+57
| | | | | | | | | | | | | | | | | | | | The previous version left unreachable cycles untouched. For example in: function f() { if (false) while (true) { doSomething(); } anotherThing(); } The edge to the then-part would be removed, but the loop itself would not be removed. This resulted in the basic-block scheduler choking when hitting the block with the anotherThing() call, because it wants to have all blocks from incoming edges resolved first. Task-number: QTBUG-34776 Change-Id: I5b3a79140e6058c4ade4ec7687c1a795f1a74f97 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Update .qmltypes files for 5.2Alan Alpert2013-11-129-64/+1028
| | | | | | | | Task-number: QTBUG-34601 Change-Id: Icf5bdc2ea66b9a13186de957d5ae9c8701b481c7 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QtQuick.Dialogs: hide internal functions and propertiesShawn Rutledge2013-11-122-75/+74
| | | | | | | | with double-underscores Change-Id: If397bfaf50e0878516296eb4237bcf012eb8dae4 Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Fix Object::getArrayHeadRoom()Lars Knoll2013-11-121-0/+1
| | | | | | | | | | The method didn't adjust the size of the allocated array properly, leading to crashes when being called repeatedly. Task-number: QTBUG-34723 Change-Id: Ib58e7dcab6d0f5f46f3cf342eb541c1cc6b6cdc6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* Fix Canvas2d.createConicalGradientLars Knoll2013-11-121-1/+1
| | | | | | | | The method requires 3 arguments, not 6 Task-number: QTBUG-34718 Change-Id: Ib6c117ba18844acecea3707720c0c88449b50fb6 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove unused _info on non-debug buildsShawn Rutledge2013-11-121-0/+7
| | | | | | | | | Otherwise clang generates a warning which is fatal because of treating warnings as errors. Change-Id: I47c280edf6b0f8efa5ce24f9e92551304aed15fb Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* V4 JIT: fix invalid sanity assert.Erik Verbruggen2013-11-121-2/+22
| | | | | | | | | | | | | If there are multiple incoming edges to a block, and there are one or more phi nodes at the start, then only check the temp uses for the edge we are resolving. Task-number: QTBUG-34770 Change-Id: Ibb5c7c323d6be8bc1ed492b08ed098de2f2726cc Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* V4 IR: scan arguments when entering function scope in QML.Erik Verbruggen2013-11-122-1/+8
| | | | | | | | | | | | | When doing IR generation for a function declaration in a QML object, call through the helper methods to check for forbidden names, and most importantly, also checks if the function has parameters. If the latter is the case, they need to be added as a member for the current scope in order to get IR generation correct. Task-number: QTBUG-34493 Change-Id: I0ade15ee19e1b1ac8ee2f2d3fa186d1551800199 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4: fix loop block marking for initializer blocks.Erik Verbruggen2013-11-121-4/+4
| | | | | | | | | | | | | | Any new blocks generated as part of the initializer were incorrectly marked as belonging to a loop. For example, if a LocalForStatement would contain a ternary expression, the generated then and else blocks would be marked. This would confuse the block scheduling, because all blocks are postponed unil the condition block (“group start”) is scheduled. Task-number: QTBUG-33754 Change-Id: I45919ebeac356f015bb91fe0210472b3df0b56d8 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4 interpreter: remove stack-slot allocator.Erik Verbruggen2013-11-124-161/+70
| | | | | | | | | | The life-ranges are only valid when the IR is in SSA form. So the use of them in the interpreter after converting out of SSA form introduced bugs. Instead, allocate a stack-slot for each unique temporary, and re-use the code for this from the JIT. Change-Id: I294f1116064f0b85996cf96a0b408b41a3c785e2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Intercept qmldir files with the url interceptorAlan Alpert2013-11-111-7/+20
| | | | | | | | | | | There's another code path which loads qmldir files directly, and it did not use the interceptor when available. Note that this, like other interceptors, does not affect baseUrl and so any other qmldir file still must have paths relative from the initial URL. Change-Id: I620943c36d488d22fbaf1793514075d31ab76e3e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Implement missing compare() function for Raised/Sunken textGunnar Sletta2013-11-112-0/+8
| | | | | | | Task-number: QTBUG-34715 Change-Id: Ifdac2511b7f642b1ea4bd06847c840b5a951a753 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Animate when only one out of several windows is exposed.Gunnar Sletta2013-11-111-3/+9
| | | | | | Change-Id: I7f76ed722f91076ee308a47c699984d371a220f0 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Debugging with V4Erik Verbruggen2013-11-1011-374/+1836
| | | | | | | | | Currently missing, but coming in subsequent patches: - evaluating expressions - evaluating breakpoint conditions Change-Id: Ib43f2a3aaa252741ea7ce857a274480feb8741aa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* moveOffset in QQuickPathView::modelUpdated uninitializedMarco Bubke2013-11-091-1/+1
| | | | | | | Get a error for compiling with gcc 2.8.1. Change-Id: If93ed69695fb523eff05cae2960e3743dc496310 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Fix assert with native text rendering.Gunnar Sletta2013-11-091-1/+3
| | | | | | | | | | | | | | | | | | The renderer only passed the very first node's material to updateState() as "new", yet pass the following node's materials to updateState() as "old". This triggered an assert in the QSGTextMaskMaterial's updateState as the native text nodes are invalid until they get called with their own material as "new". This goes against how the scene graph is supposed to be used, but update the code in the renderer regardless as this used to work and the fix there is not wrong. Every node in a batch has identical material, so pass the same instance for both "new" and "old" except for the first node in the batch which gets old==0. Change-Id: Ie8ae6fcd63adde08d80e9083e910836ede6694ee Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Avoid using huge floating point values in the renderer.Gunnar Sletta2013-11-092-5/+32
| | | | | | | | | | | | We pretransform vertices relative to their batch root and upload these using single-precision floats. If the offsets are huge then the floating point numbers start to get unstable and we get rendering artifacts as a result. This typically happens for lists/tables with huge models. Task-number: QTBUG-34312 Change-Id: I2516f2b4fa93f44a1288659d05458fb1af0df943 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Add a new variant of qmlRegisterSingletonType for QML singletons.Antti Piira2013-11-092-1/+68
| | | | | | | | | | | | | | Adds a new public API to register a QML based singleton type from C++. This is the equivalent of the the qmlRegisterType, but for singletons. qmldir file is not needed for types registered through this function, but the type still needs to include the following pragma statement among the import statements: pragma Singleton Change-Id: Icb35b665fe2a8605667fe8ac575347be2a60490c Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fallback to native font rendering for bitmap fonts.Yoann Lopes2013-11-091-1/+2
| | | | | | | | | Distance field rendering requires glyph outlines, which are not available for bitmap fonts. Task-number: QTBUG-32737 Change-Id: I64569e4e6b2285ca998b5f80ec31ab04cf1f3d09 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* For x86 builds, try to detect SSE2 availability early and bail outSimon Hausmann2013-11-091-0/+7
| | | | | | | | | | ...instead of potentially just crashing. This is for the rare case of somebody trying to run a QML2 based application on a Pentium 3 from before 2001 or older. Change-Id: Ia5606fe28ef5579654ec939c86830af70dbb84d7 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove stray warn_off in pri fileLars Knoll2013-11-091-2/+0
| | | | | Change-Id: I9abf1180aecbd2e87fa7f52b51ad1c59665723fc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix a few more compiler warnings in release buildsLars Knoll2013-11-093-14/+7
| | | | | Change-Id: I826226b7ddd4a74037b5bbe9a4a7322d404f53a9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Workaround for glyph upload bug with the Mali-400 GPU.Yoann Lopes2013-11-092-8/+50
| | | | | | | | | | Uploading unaligned and alpha-only data seems to be broken with that GPU, uploading line by line does the trick. Task-number: QTBUG-33951 Change-Id: I2790990ca1d3a3016ec3d9fefaea7002b92faeb7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Make QQuickWindow::forcePolish() private.Morten Johan Sørvig2013-11-091-1/+1
| | | | | | | | Adding public API was not the intention when adding this slot. Change-Id: If477917c434b32d5e5cd1fa6c640f1a6b167dd24 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* Remove include of empty QAccessible2 headerFrederik Gladhorn2013-11-092-2/+0
| | | | | Change-Id: I62dd3364909179c364e91682e4cece8ae5a847d4 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Remove debug outputEskil Abrahamsen Blomfeldt2013-11-091-1/+0
| | | | | | | | | Some applications (like e.g. the Tweet Search example) prints out a ton of these "scanEscape" messages to the console. Change-Id: Ibfa9c4780705167693c7fb6af8cad1e312549a5f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Move Primitive::emptyValue() to qv4value_def_p.h.Friedemann Kleint2013-11-092-9/+8
| | | | | | | | | | | | Silence MinGW-warnings: warning: 'static QV4::Primitive QV4::Primitive::emptyValue()' redeclared without dllimport attribute after being referenced with dll linkage Task-number: QTBUG-34152 Change-Id: Id6971a20f1901022ab0d1c8f1834b135c71510ae Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Initialize variableLars Knoll2013-11-091-0/+1
| | | | | Change-Id: I540b08bd1c60215a63cad1233f09e060b70df66f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Simplify & speed up function callingLars Knoll2013-11-0960-924/+922
| | | | | | | | | Get rid of the SimpleCallContext, instead simply use the CallContext data structure, but don't initialize the unused variables. Change-Id: I11b311986da180c62c815b516a2c55844156d0ab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix crash in animation controller upon destructionSimon Hausmann2013-11-091-0/+2
| | | | | | | | | | Triggered by tst_examples, it appears that we can have jobs in m_deleting that are also still listed in m_starting. So similar to what we do in beforeNodeSync, we now also take any deletion-scheduled jobs out of m_starting/m_stopping in the destructor. Change-Id: I2e00570a4e4669f8172354bf5806c5285920030a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Generalize check for localtime_rKai Koehne2013-11-081-6/+6
| | | | | | | | | | | | | | | Use the _POSIX_THREAD_SAFE_FUNCTIONS define to decide whether localtime_r is available, instead of guessing by Mingw-w64 version. This copies the logic of qdatetime.cpp in qtbase, and should fix compilations with older Mingw-w64 versions. It replaces ce3e8f93c. Task-number: QTBUG-34038 Change-Id: Iee8a9aa61d2af3e069e6365c40f81007c479d147 Reviewed-by: Mark Brand <mabrand@mabrand.nl> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* MessageDialog: handle clicked(button, role) signal properlyShawn Rutledge2013-11-087-88/+158
| | | | | | | | | | Depends on I7be753080794adabb784df9b95ac04aa1c29151c in qtbase. Now the Android native dialog can provide the same functionality as the QML and QMessageBox implementations. Change-Id: Icc9c610669742199d48497096524f6cf8ed4d835 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org>