aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Make sure QSGRenderLoop is cleaned up cleanly.Gunnar Sletta2014-03-148-17/+66
| | | | | | | | | | | | | | | | | | | | | e13547c595913c58e6bd6a5ed80fdc729fae7d47 used a global static to clean up QSGRenderLoop which is triggered very late, potentially after SG backend API plugins have been unloaded. This results in crashes when used in combination with scenegraph-playgrounds's customcontext. Partially revert the change and instead clean up at the time of QApp::aboutToQuit and make sure we also disconnect cleanly from all QQuickWindows. This change also ensures that QSGRenderLoop::windowDestroyed() gets called for all QQuickWindows registered with the render loop. This ensures that rendering stops and that scene graph nodes and resources will be cleaned up regardless of whether the application has remembered to delete the window or not. This is a good thing as it makes the scene graph shutdown a bit cleaner. Change-Id: I9cb9093979f8eac05542f118a6ff9cfe5c84f745 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Fix WorkerScript object leakLiang Jian2014-03-141-1/+5
| | | | | | | Delete WorkerScrip object in WorkerRemoveEvent::WorkerRemove event Change-Id: I1a304838e4a43577a5781216e32610ea36c5a7fd Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Qt Quick Widgets example and document itTopi Reinio2014-03-142-2/+1
| | | | | | | | | | | | | | | Because QtQuickWidgets is part of Qt Quick module documentation, its examples need to also be moved under the examples/quick directory structure. This change moves the example, creates minimal documentation for it, and adds a link to it from the QQuickWidget class reference. Task-number: QTBUG-37272 Change-Id: Iffb67849f150b9aaf0edaef5852364e93f7752b8 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix QQmlContextData object leakLiang Jian2014-03-141-1/+1
| | | | | | | | Mark the QQmlContextData object created in QmlContextWrapper::urlScope() as owned by its QmlContextWrapper to prevent leak. Change-Id: Ie7afee676e0745a78ef4f3a56984f52f638227e0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix QmldirCache object leakLiang Jian2014-03-142-3/+19
| | | | | | | Delete all the QmldirCache objects in the linked list Change-Id: I9948ccce3d72aaed4f8b14b131e040177d7a15ef Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix CompiledData::CompilationUnit object leakLiang Jian2014-03-131-5/+0
| | | | | | | | Don't ref CompiledData::CompilationUnit in constructor of ScriptFunction since its has been referenced in its base class Change-Id: I9ad2d6e190c2ac11de4ccd63015c81d2dead3971 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix QQmlTypeNameCache object leakLiang Jian2014-03-131-1/+0
| | | | | | | | Remove redundant ref to QQmlTypeNameCache object in QQmlTypeCompiler::compile() Change-Id: Ie166e8d04c1504194bec227bf5e945b273778a20 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix rendering issue with material changes from opaque <-> alphaGunnar Sletta2014-03-132-6/+18
| | | | | | | | | | | | When I introduced the invalidation of z ranges, I forgot that we need to rebuild render lists when nodes move from opaque to alpha batches or vice versa as that sorting happens in buildRenderLists(). To remedy this, make Batch::isMaterialCompatible report blending changes separately and trigger a full rebuild in this case. Task-number: QTBUG-37422 Change-Id: I020813cb531ed58353f8340fcad58dec8d7856dd Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Allow maximum block size to be specified as an environment variable.Michael Brasser2014-03-131-3/+11
| | | | | | | | A smaller maximum block size helps limit RAM usage on constrained systems, at the cost of more frequent garbage collection. Change-Id: Iba07d9cc628e3178dfaad35664c631844540bc9d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't crash if a ScriptAction changes state mid-transition.Michael Brasser2014-03-131-14/+15
| | | | | Change-Id: Ia85cb128c7410e2276bf4da02f946d3d0bf44989 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix QQmlTypeData object leakLiang Jian2014-03-132-0/+6
| | | | | | | | 1) unref QQmlTypeData object stored in m_compositeSingletons 2) unref QQmlTypeData object in resolveQmlType() Change-Id: I5f2e3a542637f62509c4a2f2ed8a6ba080eacf1b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix QQmlBoundSignalExpression::Data object leakLiang Jian2014-03-131-0/+1
| | | | | | | | Delete QQmlBoundSignalExpression::Data object in QQmlBoundSignalExpression's destructor Change-Id: I92dfb534f1ea937ee9a85b60b824417fbac21f3b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix QV4::IR::Function object leakLiang Jian2014-03-131-0/+1
| | | | | | | Delete the QV4::IR::Function object before removing it Change-Id: Ie85de6f18034b2def5645c07df1ccc84ac3060ec Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Ensure TextEdit's text is vertically aligned after resizing its height.Mitch Curtis2014-03-131-1/+2
| | | | | | | | | | | | | The current code only updates the alignment if the width of the TextEdit changed, but we must also check if the height has changed. Task-number: QTBUG-36069 [ChangeLog][QtQuick][TextEdit] Fixed TextEdit not vertically aligning its text after having its height changed. Change-Id: I0b2d6a7384457ca1018fc9899c82699e8ecfcbd4 Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
* Fix property caches out of sync with grouped properties that have a VME meta ↵Simon Hausmann2014-03-133-32/+22
| | | | | | | | | | | | | | | | | | | | | | object Because QQmlObjectCreator::populateInstance would take the property cache to install from the outside and also pass it as the cache to use for the VME meta object to install, it could happen that the wrong cache was installed - the one supplied by engine->cache(propType) instead of the cache created together with the VME meta-object at type compilation time. This patch ensures that they're always in sync and correct by removing the responsibility of the caller to supply the cache to use and install. Instead the function will always use the cache calculated at type compile time (and also use that when installing the VME meta object). Installation of the property cache on the declarative data of the instance is now done only at createInstance() time, which fortunately also simplifies the code. Change-Id: Ia722cd57bc48007aaf725f1f59daa2f21569e324 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Consolidate context creation failure handling in Quick.Friedemann Kleint2014-03-139-49/+122
| | | | | | | | | Add QQuickWidget::sceneGraphError() equivalent to QQuickWindow::sceneGraphError(), move message formatting code to QQuickWindowPrivate. Change-Id: I18cd4d7e0f6ee1011c29375218dc6a044b0d2cf2 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* QQuickWindow: let clearFocusObject actually clear the focus objectRichard Moe Gustavsen2014-03-131-1/+2
| | | | | | | | | | | | | | | | On iOS we clear the focus object when the virtual keyboard is hidden (to stop blinking cursors etc). The current implementation in QQuickWindow would then tell the root item to clear focus. This was wrong, since setFocus is expected to be called on the item you either want to gain, or release, focus (not the root item). This sometimes caused items to end up in an incorrect focus state. With this patch we ensure that we call setFocus on the focus object. Change-Id: I0c08fbc35f6695064b7c911466fdc62f4027385e Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* Static plugins: support loading static plugins from several enginesRichard Moe Gustavsen2014-03-133-16/+58
| | | | | | | | | | | | | When loading dynamic plugins, we register them as loaded so that we don't try to register their types several times if using several engines. The same was not done for static plugins. This patch will ensure that we follow the same logic also for static plugins. Task-number: QTBUG-36532 Change-Id: Icc1e089ae5d682c38b2d36bf4808f1c753c122a4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Item views: avoid fixing up the position while moving/flickingJ-P Nurmi2014-03-131-4/+8
| | | | | | Task-number: QTBUG-35920 Change-Id: Id6a68400eed69d880dd1c218ec4a1beda8a8fbb9 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: Re-organized Qt Quick's examples page.Jerome Pasion2014-03-121-90/+119
| | | | | | | | | | -Organized into "Demo", "Tutorials", and "Examples". -Added Controls, Dialogs, and other Qt Quick examples. -Added links to Qt Creator tutorials related to Qt Quick. Task-number: QTBUG-36838 Change-Id: I9ca000a73465217a2c42ebac9288e6462afa4cf5 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Don't crash when a signal/slot connection outlives the engineSimon Hausmann2014-03-121-2/+7
| | | | | | | | | | In the test case in the bug, the signal was emitted from the QApplication destructor (somewhere from the qpa plugin when the platform windows were destroyed) Task-number: QTBUG-37351 Change-Id: Ieec59e12be10bab1428743b80eecdf22ef9d8bf6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QQuickWindow cleanup: Remove forceRendering flagPaul Olav Tvete2014-03-124-11/+7
| | | | | | | | | | | forceRendering was introduced for QQuickWidget, but QQuickWidget now has full control of when the rendering functions are called. It makes more sense to not call the QQuickRenderControl functions, than to set a flag on QQuickWidget that decides whether those functions have any effect. Change-Id: I69819b13000120c04cecd1a467c08e8df9330df8 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* qmldebugger: avoid loading tcp module in inspectorFawzi Mohamed2014-03-111-0/+2
| | | | | | | | | loading the module twice starts two threads, and creates issues when unloading. Change-Id: I861df6a6b6a8942557d31d455b35e7987478a527 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
* Avoid crash when unlinking compilation unitSimon Hausmann2014-03-111-1/+2
| | | | | | | Don't free static data Change-Id: I315b98841e1a44492d54ac2732743706c286e527 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove redundant QQmlBinding members.Michael Brasser2014-03-118-83/+107
| | | | | | | | | This reduces the size of QQmlBinding by 12 bytes. Task-number: QTBUG-37134 Change-Id: Id55257edec8cee88d863374e8a96d7eebbeaf523 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* Doc: Fix issues in QQuickWidget documentationTopi Reinio2014-03-112-15/+20
| | | | | | | | | | Fix qdoc warnings, do some editing and cross-link between QQuickWidget and QQuickView class references. Task-number: QTBUG-37272 Change-Id: I48d3a01e7c6315be329e24a5c5f7635697629316 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* qmldebugger: handle static builds correctlyFawzi Mohamed2014-03-115-13/+34
| | | | | | | | | | | | The loading of the qml debugger was hardcoded to dynamically load its plugins. Now directly build and instantiate the QQmlDebugServerConnection in static builds. Done-with: Kai Koehne <kai.koehne@digia.com> Change-Id: I38bf0e310caaa6aaa743e3814b0108c6fe7001df Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Add support for resolving translation bindings at compile timeSimon Hausmann2014-03-1110-24/+479
| | | | | | | | | | Simple calls to qsTr and qsTrId are detected at type compile time and reduced to a special Translation and TranslationById binding type, which avoids allocating a QML binding at type instantiation type just to perform a translation. Change-Id: I61e4f2db2a8092b5e6870e174b832d9c20cd62b5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix incorrectly initialized property cache on group objectsSimon Hausmann2014-03-111-6/+11
| | | | | | | | | | | | When initializing bindings on group objects, we would accidentally set the property cache for the property type instead of preserving a possibly earlier initialized cache on the ddata of the QObject. Task-number: QTBUG-37390 Change-Id: I4d6a4ce6b3382f378f9a9ddfe11924860a15979d Reviewed-by: Sérgio Martins <sergio.martins@kdab.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix linkingSimon Hausmann2014-03-112-2/+2
| | | | | | | Add some missing exports Change-Id: I0c250231e902b6efeda257951ee5653ea363e288 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Adding QQuickWidget's path to the qtquick.qdocconfJerome Pasion2014-03-111-2/+5
| | | | | | | | -allows QDoc to detect and generate documentation. Task-number: QTBUG-37272 Change-Id: I83aedead99c7fccb03fe4a7fa34be45fc94ae010 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Allow detaching V4 debuggers in agent destructorUlf Hermann2014-03-111-0/+3
| | | | | | | | We don't know in which order the QML engines and the debug service are deleted on shutdown. Change-Id: I9d23b3c88eee125a93c5b0f8ea85466013233737 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Doc: Qt QML: Document signals (not handlers) under \qmlsignalSze Howe Koh2014-03-113-9/+17
| | | | | | | | Task-number: QTBUG-35846 Change-Id: I989617865a79bfbf1f1ffd3b105598025dde54c5 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Don't delete the QML engines from the profiler service destructorUlf Hermann2014-03-111-1/+1
| | | | | | Task-number: QTBUG-37382 Change-Id: Ib40d69813794e18cc7c7f05e10881b1b23a93b4e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup our runtime methodsLars Knoll2014-03-1125-578/+564
| | | | | | | | | Move all our runtime methods into the QV4::Runtime struct and give them nicer names without underscores. Sort them logically and remove a few unused methods. Change-Id: Ib69b71764ff194d0ba211aac581f9a99734d8180 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix copying of Property'sLars Knoll2014-03-1013-46/+68
| | | | | | | | | | Data properties don't contain valid data in the set field if they are being stored in Objects. Thus we should never access that field unless we are dealing with accessor properties. Change-Id: I19dcbaee7ebd042ae24387f92a93571d75ca578a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix compile errorLars Knoll2014-03-101-1/+1
| | | | | Change-Id: Iba3860ef8ea940b8f232e21e273b0ac83d895882 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Stack size increase for x86 QNX systemsJames McDonnell2014-03-101-0/+4
| | | | | | | | | | | Increase the size of the stack for the scene graph thread on x86 QNX systems. The default stack size (132K) is too small for the MESA graphics driver shared libraries on these systems. Task-number: QTBUG-37338 Change-Id: I8b50aece98ef3f530f2202fc89a0e90b0b2e2e72 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Fix TextEdit::lineCount to update as appropriateJ-P Nurmi2014-03-101-1/+1
| | | | | | | | | | The total line count needs to be updated when geometry, document size or wrapping mode changes. Task-number: QTBUG-37263 Change-Id: If58a2f77022475e8bcb7cca0f2a091ee837b39a5 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Caroline Chao <caroline.chao@digia.com>
* Remove several uses of module includesAndrew Knight2014-03-102-2/+2
| | | | | | | | | | Module includes are discouraged because they may increase compilation time. While debugging a broken core module include header, a number of module include infractions were discovered in qtdeclarative. Replace them with their more specific counterparts. Change-Id: I614e9a6aa2177f396e5289f3cdb3c35faa0202c9 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* MultiPointTouchArea: handles mouse too, unless mouseEnabled is falseShawn Rutledge2014-03-102-10/+156
| | | | | | | | | | | | | | | | | | | A new boolean property mouseEnabled is introduced (true by default). If set to true, then it will handle any non-synthetic mouse event as if it were a touch point. If set to false, the area becomes transparent for real mouse events so that a MultiPointTouchArea can be stacked on top of a MouseArea in order to separate handling of touch and mouse. In either case it continues to absorb and ignore synthesized mouse events (including touch-to-mouse synthesis in QQuickWindow). [ChangeLog][QtQuick][MultiPointTouchArea]handles mouse as a touchpoint; added mouseEnabled property to permit transparent pass-through to mouse-sensitive items Change-Id: I4af94d838f0060154494589c0f15c6858ee89ddb Task-number: QTBUG-31047 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
* QQuickWidget: handle resize to empty sizePaul Olav Tvete2014-03-102-0/+15
| | | | | | | | | | | Resizing to an empty size needs to be handled as if the widget was hidden. Restoring to a non-empty size is like a show, except that we are rendering synchronously. Task-number: QTBUG-37046 Change-Id: I572e4763c4a28bfe7347868e109acca5b357db50 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* V4 SSA: remove unused code.Erik Verbruggen2014-03-081-49/+1
| | | | | Change-Id: I56b3e5400e7b9880b9534117ac17a80436ff1733 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4: fix address printing for real.Erik Verbruggen2014-03-081-7/+15
| | | | | | | | | | The previous patch contained the wrong formatting string for 64bit platforms. Good compilers will warn on this (and fail compiling with -Werror). Fixed the issue in such a way that we now have static checking for both 32bit/64bit platforms by the compiler. Change-Id: Idf4a80d8795605c61ef812426c9984df1ceac4d4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* V4 JIT: enable JIT on win64.Erik Verbruggen2014-03-082-1/+11
| | | | | Change-Id: I640d507c33fd4c4df6d6284b473df5cea9e5c4b4 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use an array of Value's for Object::memberDataLars Knoll2014-03-0710-95/+81
| | | | | | | | | | This cuts the memory required to store properties in an object in half for the common case. Accessor properties require two slots inside memberData, but data properties only one. Change-Id: I0bab1b88ca9ed5930abf065c77c89985b9ed5320 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Reserve a double slot for accessor propertiesLars Knoll2014-03-074-45/+118
| | | | | | | | | | Reserve two slots in the internal class for accessor properties. This opens up reducing the default storage required per data property to one Value. In practice this implies cutting the required memory in half. Change-Id: Ifed897852bbdfd810018f0d6b049fca6690ead2c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use fuzzy comparison for another Flickable StopAtBounds case.Michael Brasser2014-03-071-4/+4
| | | | | | | | | | | | | Be consistent with 268f4615dcf19aad3603833af83ba28eca886aa5, and use fuzzyLessThanOrEqualTo when checking whether we are at or past the bounds when dragging. This prevents a condition where: 1. A Flickable with StopAtBounds is at one of the bounds. 2. A quick flick will sometimes (rarely) cause the Flickable to flick past the bounds. Change-Id: I4165fa133f556fb9d47cc691d11b2ecb77746b33 Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
* QQuickWidget: handle windowChangePaul Olav Tvete2014-03-072-5/+28
| | | | | | | | When the toplevel window changes, QQuickWidget needs to recreate the context so it is compatible with the new window. Change-Id: Ic7c3410061a33f223e20e3d1f93437917abcff18 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Move some methods from ExecutionContext to CallContextLars Knoll2014-03-073-42/+35
| | | | | | | | This is where they really belong. Slightly simplifies and cleans up the code. Change-Id: Ib5782c1f57c761c46f4bc52c3d496220299f8ac9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>