aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Add new property "designersupported" to qmldirTim Jenssen2014-08-2811-1/+64
| | | | | | | | | | | | | | | | | This patch adds a property called "designersupported" to qmldir. This allows the Qt Quick Designer to only load plugins that have the line ""designersupported"" in their qmldir file. So the designer can load sub components without risking to load plugins that have never been tested in the designer and that might crash. The check for "designersupported"" is activated by using QQmlImports::setDesignerSupportRequired(). Change-Id: I4bf07cc163faa47996eacb1365a7961c51c51060 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
* TestCase.qml: add missing closing parenthesis to example.Mitch Curtis2014-08-271-1/+1
| | | | | Change-Id: I93f1f8ec74808fc0a9f681cd88f7e5616089c80c Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Fix not having a context when making a QQuickWidget visible againLaszlo Agocs2014-08-271-9/+7
| | | | | | | | | | | | | | | | If we hit the size-is-zero path, the condition that got recently introduced (if fakeHidden && d->context) is not really sufficient. It could be that d->context is valid but the scenegraph is invalidated (i.e. offscreenWindow->openglContext() is null). This case has to be handled the same way. Therefore, the function is now simplified to perform polish & sync in one place. Task-number: QTBUG-40794 Change-Id: Ia54f25fbdc199a0b88501a2d89edb5cee5411972 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Make minimum FBO size 1x1 on newer OSX.Gunnar Sletta2014-08-271-3/+3
| | | | | | | | | This problem existed on 10.6, but is not reproducible on newer MacBookPros, so disable it for 10.8 and up. Change-Id: I0ae216c8e2307df5f77a783ec2d2031bf12ccbf2 Task-number: QTBUG-20193 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Added QSGPainterNode abstraction to QSGAdaptationLayerAndy Nichols2014-08-277-32/+69
| | | | | | | | | This allows the scenegraph backend to customize how QSGPainterNodes are rendered. Change-Id: I640dcf121d0be6bda615cf30591d502329fc89d0 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* V4 JIT: fix stack layout.Erik Verbruggen2014-08-261-13/+15
| | | | | | | | | | | | | | | | | Commit d9f33ccdef985badc56fd8940373748626beffc7 introduced an off-by-one in the calculation of the offset of a saved register (in StackLayout::savedRegPointer), resulting in overwriting a callee saved register with the tag of a QV4::Value. This method now calculates those pointers relative to the bottom of the stack frame. The off-by-one didn't happen before that patch, because there was a magical +1 used in the constructor for the number of callee saved registers, thereby prevented this from happening. However, that resulted in a frame size that was unnecessary big. Task-number: QTBUG-40927 Change-Id: If88fe9f3490a4d23a1e69c630c87219fcfef671f Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* V4: disable type inference and loop peeling for the interpreter.Erik Verbruggen2014-08-267-21/+39
| | | | | | | | | | Loop peeling is always disabled. Type inference is still enabled for QML code, because of the static-type nature of the properties. This speeds up crypto.js by 20%. Change-Id: Ibf51cb36f8904d64df0793980d463451dfd361e2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix cursor blinking for TextInput and TextEditSimon Hausmann2014-08-265-44/+25
| | | | | | | | | | | | | | | Before commit fb339b21b8a24b835cea7a057c47b7c5ad80dd72 relied on the simple transparent rectangle node to remain invisible. After that commit we used the regular rectangle node, which doesn't seem to like toggling the color between transparent and solid black and therefore the cursor was always visible. As advised by Gunnar this patch implements a much simpler logic: When the cursor is supposed to be invisible, we just don't create a scene graph node for it anymore. Change-Id: I7b0e173f6d37997559ee0911f37903efdb14847f Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Make QQuickFramebufferObject a texture provider.Gunnar Sletta2014-08-262-4/+60
| | | | | Change-Id: Ib9cf0f99dc07e4125c4ccd2d45da2839d8af88b6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Do not send deferred deletes from the QQuickWindow dtorLaszlo Agocs2014-08-261-2/+0
| | | | | | | | | | Otherwise doing deleteLater() on an ancestor of the QQuickWindow will cause double deletion for that ancestor. This is typical when using WA_DeleteOnClose since that uses deleteLater(). Task-number: QTBUG-40920 Change-Id: I9146fc0854f77c42cad2eda23b3cdaa7a9e22080 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Simon Hausmann2014-08-2614-25/+63
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-2614-25/+63
| |\ | | | | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlobjectcreator_p.h Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
| | * Don't use d->instanceModel after free'ing itLars Knoll2014-08-262-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | prevModel points to d->instanceModel and is being used further down in the code. So reset the pointer to 0 after freeing the old instanceModel. Change-Id: I8854ae3e09c8b2fe50ad311f3dbc7b8ed26805e1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Fix crash with early QObject property accessSimon Hausmann2014-08-252-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the reported bug, it can happen that we try to access the compile-time resolved QObject property of an object that is referenced by id. The binding that uses this is triggered when the property changes but _also_ when the id referenced object gets either created or deleted. The first time the binding is evaluated is very early on, when the id referenced object is not created yet, so the binding evaluation fails. However the dependency is set up, and so later then the id referenced object is created and the id property is set on the context, the notification triggers and the binding is re-evaluated. During that binding evaluation a QObject property access happens by index on an object that doesn't have its VME meta-object set up yet. Therefore the property access fails and a crash occurs or the Q_ASSERT(property) assertion fails. The fix is to set register the id named object in the context _after_ the VME meta-object is setup. Task-number: QTBUG-40018 Change-Id: Ic2d7b4a0c49635efe68e93f2f6c316eb65f0c309 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Fix typo in DelegateModelGroup documentationAlbert Astals Cid2014-08-251-1/+1
| | | | | | | | | | | | | | | Change-Id: Ic01f0935c469f85f32699aebaeb1fc6f8b2279fb Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| | * Protect some members in QQmlObjectCreatorLars Knoll2014-08-252-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | Avoid dangling pointers when nested incubators are being used. Task-number: QTBUG-40437 Change-Id: I73922d2f373b2efbc00983305cdea9e8d60f0c41 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Initialize variableLars Knoll2014-08-241-1/+1
| | | | | | | | | | | | | | | Change-Id: Ia54dc43d22b8edaa49634c6a364f87b4a06d659d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Don't abuse new to do a reinterpret_castLars Knoll2014-08-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using new to do a reinterpret_cast is rather confusing. Also protect the list model case against self-assignment which could lead to memory corruption. Change-Id: I10b81644d0004d4a50a5a74e5b8c58e27cbe6934 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Protect incubation against its creator being deleted.Gunnar Sletta2014-08-231-1/+1
| | | | | | | | | | | | | | | Change-Id: Ica7ed02c9b67243310ddce3feaf91935b699086d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
| | * Fix crash with recursively loading cached compilation unitsSimon Hausmann2014-08-222-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a cached compilation unit depends on an import that is implemented as a Qml C++ plugin and that plugin in turn loads an asynchronous component that is cached, we would get a crash in the typeloader and a failing assertion (ASSERT: "d->m_mainThreadWaiting == false" in file qml/ftw/qqmlthread.cpp, line 300) This is because we did not implement the asynchronous loading within the loader thread for cached compilation units. This is simply done using a posted event, using the same mechanism used for other async load methods. Change-Id: Iefce67ab634ce26122c348dcdfc8e66b00fec671 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Fix typo in StateChangeScript documentation.Mitch Curtis2014-08-191-1/+1
| | | | | | | | | | | | | | | Change-Id: Iec72331c183ea02680bad01f04eae82ebd815cdb Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
| | * The cached objects can be deleted, so keep them in a QPointer.Gunnar Sletta2014-08-141-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: Ieaebd2e7b9823cbe22efc331e42ceab8fbbda0e8 Task-number: QTBUG-40201 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
| | * Fix potential deadlook in threaded renderloop.Gunnar Sletta2014-08-141-0/+12
| | | | | | | | | | | | | | | | | | Change-Id: I415e632aa4e584c8fca745581f25a676db0eae42 Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| | * Fix typo in Context2D documentation.Mitch Curtis2014-08-141-1/+1
| | | | | | | | | | | | | | | | | | Change-Id: Ib6e2436ba383a2caf78ac359883338016c2b7668 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
* | | Added an example that shows how to consume texture providers from C++.Gunnar Sletta2014-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | And how to use use two textures in the same material. Change-Id: Idcc618ed359422c2a104eeed105b7c4f5086ee4e Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | | Clamp QQuickItem::opacity to [0,1].Gunnar Sletta2014-08-261-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was an oversight the the implementation of setOpacity. QSGOpacityNode already does the right thing. [ChangeLog][QtQuick][Item] When Item.opacity is set to a value outside the range of 0 to 1, it will be clamped. Change-Id: Ib7f23c5d8860c76e009a25e5ab2c36db20301faf Reviewed-by: Raine Mäkeläinen <raine.makelainen@gmail.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* | | Fix QML2 hang on gcc 4.6.3 armhfPelle Johnsen2014-08-251-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With gcc 4.6.3 armhf (defualt for Ubuntu 12.04) some optimization bug results in QML2 v4 compiler hang during type inference. Task-number: QTBUG-40364 Change-Id: Iea1a8be3b5a7d9410304110d89dae3735339cb72 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | | QSM: Reintroduce guard argument evaluationSebastian Sauer2014-08-255-12/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements the suggestion from Simon Hausmann (codereview 89716 from 08-05 14:46) to use QQmlScriptString rather then the previous used MetaObject-manipulation. This also introduces comparison operators for QQmlScriptString to be able to determinate if a QQmlScriptString changed what is needed cause there is otherwise no way to access (all) the needed details within QQmlScriptStringPrivate. Change-Id: I198479eac8fd37cbdd98a99aacdd8eebf7b75d21 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | | Remove references transforms have to items in QQuickItem's destructor.Mitch Curtis2014-08-251-0/+11
|/ / | | | | | | | | | | | | | | | | | | In case they try to remove themselves from our list of transforms when that list has already been destroyed after ~QQuickItem() has run. Task-number: QTBUG-40877 Change-Id: Ie57f5dd1e8b791846f08629183974c771553c4bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Make QQuickPaintedItem a texture provider.Gunnar Sletta2014-08-264-1/+84
| | | | | | | | | | Change-Id: I605dc35fcc2284a890851c41946cf95537e92d2e Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Make use of QQuickWindowQObjectCleanup in QQuickImage.Gunnar Sletta2014-08-261-14/+5
| | | | | | | | | | | | | | Saves us a few lines.. Change-Id: I572f6fc44ede3b923208ce3563116d8fcc9bb922 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Make Canvas a texture provider.Gunnar Sletta2014-08-262-10/+76
| | | | | | | | | | Change-Id: I8b5c9d8a5ed9ef9079eafb30ef0cb73786204ee6 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Update license headers and add new licensesJani Heikkinen2014-08-25867-16384/+9448
| | | | | | | | | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* | Add const & to argumentsAlbert Astals Cid2014-08-2414-28/+41
| | | | | | | | | | Change-Id: I1bcf69638fee32b6e6565b8ea828c0adcff48a67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Mark QQuickFBO's node dirty after rendering the texture.Gunnar Sletta2014-08-241-0/+2
| | | | | | | | | | | | | | | | It is impossible to use in a shader effect otherwise. Change-Id: I489e6ae43cdc3fe8f54efa6d86ead4d21831b84d Task-number: QTBUG-40809 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Introduce QQuickWindowQObjectCleanupJob.Gunnar Sletta2014-08-241-0/+14
| | | | | | | | | | | | | | | | Convenience for cleaning up texture providers. Private class for now, we can maybe make it public in 5.5. Change-Id: I3489fde2a268bc988634a16f87ee558b9ac5dba2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Improve the internal NodeVisitorEx APISimon Hausmann2014-08-232-21/+33
| | | | | | | | | | | | | | | | | | Allow the implementation of visit to control whether the children should be processed afterwards or not. This is modelled after the JS AST visitor in Qml. Change-Id: I5b1adf5e1aefd8899bf444e993ddfbf2c5c125c9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Downscale textures which exceed the GL texture limitGunnar Sletta2014-08-233-8/+29
| | | | | | | | | | | | | | | | | | | | This way they will at least render. [ChangeLog][QtQuick] Images exceeding GL_MAX_TEXTURE_SIZE will be downscaled to fit so they will still show. Change-Id: I169ecac768036812b8e14265ec1a0a8902655666 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* | Cleanup: Separate the sub-tree layering out of QtQuick into the scene graphSimon Hausmann2014-08-2315-516/+663
| | | | | | | | | | | | | | | | | | | | This basically renames QQuickShaderEffectTexture to QSGDefaultLayer and introduces QSGLayer as interface to be used. QQuickShaderEffectTexture is generic for the scene graph and has no QtQuick dependencies. The interface separation allows scene graph backends to customize layers. Change-Id: I9a7f37addaa4b80a34ff9a1456b0cb9b16d4e9f3 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Introspect qrc files in FolderListModel.Gatis Paeglis2014-08-222-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | And don't use "file watchers" for resource file paths, otherwise it generates the following warning: QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory Change-Id: I6b75c9195fb2b2ba7b3e0bb7d146fc5cd343927e Task-number: QTBUG-40307 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Avoid creating fbo with zero size in QQuickWidgetLaszlo Agocs2014-08-221-0/+5
| | | | | | | | | | | | | | Get rid of incomplete attachment warnings on Android. Change-Id: I7da546861b1814677b0c8ae110416f69bbbb7edc Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | Cleanup: Remove ShaderEffectSourceNodeSimon Hausmann2014-08-222-30/+34
| | | | | | | | | | | | | | | | We can simply use a standard image node and do the dirty marking also directly in the texture (both live in the same thread). Change-Id: I7345c702613782adec3c6a36a7705a2a54ed82ec Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | v4: Enable primitive conversation to QQmlScriptString in javascriptSebastian Sauer2014-08-224-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes following QML-code proper working: ParentChange { x: 0 Component.onCompleted: x = 10 } where x is a QQmlScriptString. Before this patch an error-message would be thrown that the bool/int/string/etc cannot be converted to a QQmlScriptString. With the patch primitive types including null and undefined are proper converted to a QQmlScriptString. The patch ignores (as in not implements) function/binding assignment. Unfortunately since commit aa25ad8d5f4 its not possible any longer to instanciate QQmlScriptString what means there is otherwise no (easy) way to inject a QQmlScriptString from within Javascript. Change-Id: I18aac6a6e9a57f3b7d0a2d66cdab2be6c3c153c5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix memory corruption in shader materials.Gunnar Sletta2014-08-191-2/+4
| | | | | | | | | | | | | | | | | | | | Change ee616b3905106a3eedef9ee964ab283ef45c7dbc accidentally removed the member variable used to refcount the attribute names. This resulted in the names being deleted and the stored const char *'s to become invalid. Add it back. Change-Id: Ie33f75cd76085283a5ee685602e023bb3c42c896 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | V4 IR: Add loop peeling.Erik Verbruggen2014-08-183-23/+243
| | | | | | | | | | | | | | | | | | | | | | | | By peeling the first iteration off of a loop and putting it in front of the loop, type inference can deduce more type information for esp. loop induction variables. To prevent increasing the code size too much, only the inner-most loops are peeled. This gives a 10% speed-up on crypto.js. Change-Id: I57f9611695bc8defc0bff84e440b8a20b2c8a34e Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* | V4 IR: add immediate dominator re-calculation.Erik Verbruggen2014-08-183-98/+276
| | | | | | | | | | | | | | | | | | When removing edges, the control-flow graph changes, so some immediate dominators might need to be updated. This change collects all candidates and processes them in a single batch. Change-Id: I928f42232427a84bcb9658e314dadd0bd021b12f Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* | Doc: Removing url variable from qdocconf file.Topi Reinio2014-08-162-2/+0
| | | | | | | | | | | | | | | | -url inherited from the url variable set in qtbase/doc/global Change-Id: I94a0da7aa98af1fdd6140168fe9feb27b11c0bdb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* | Fix setContextObject to re-evaluate bindingsAlex Montgomery2014-08-151-0/+1
| | | | | | | | | | | | | | | | | | Fix QQmlContext::setContextObject to reevaluate bindings as the documentation says that it should. Task-number: QTBUG-40798 Change-Id: Ifbd97c7a07a5432f4948937da863370b05705206 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix cursorShape with QQuickWidgetLaszlo Agocs2014-08-152-6/+12
| | | | | | | | | | | | Task-number: QTBUG-40729 Change-Id: If3b2f8ca8795da1ac7c626db9c872f735d1e7b5d Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* | CleanupSimon Hausmann2014-08-1520-192/+185
| | | | | | | | | | | | | | | | | | Merge QV4::CompiledData::QmlUnit into QV4::CompiledData::Unit. For pure JS units it means a slight increase of memory usage by a few bytes, but overall it makes the code a lot simpler. Change-Id: Ib48927749720b056f004aac0fe22cb8ec729e3f6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>