aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickview.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QQuickView/QQuickWidget: Improve diagnostics message for non-QQuickItem root ↵Robin Burchell2015-02-231-5/+2
| | | | | | | | | | fallback case. We don't want to recommend qmlscene, and QtQuick1 is being deprecated, so there's no need to spell it out anymore either. Change-Id: Ia4b87d1a4b3afdae9ea9c13a89ac5cb78c85f06d Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* QQuickView/QQuickWidget: Improve diagnostics for using a QWindow as a base ↵Robin Burchell2015-02-231-0/+4
| | | | | | | | | | | item in a scene. The current message is rather confusing, as it was aimed at users porting from QtQuick 1 -- but it is perfectly possible to get a non-QQuickItem root in a QQuickView scene right now with QtQuick 2 only. Change-Id: Ibd800f8a817c874af5eaa1746567ee289988fd01 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* QQuickView/QQuickWidget: Report an error if rootObject ends up null.Robin Burchell2015-02-231-0/+7
| | | | | | | | | | | | This can happen when trying to use a non-QQuickItem item as the root item in a QQuickView, for instance, a Window or ApplicationWindow item. This generates a warning (correctly), but does not set an error state on the view, so automated tooling and the like does not know that the scene was not successfully loaded. Change-Id: I1dc4191ef07187e9b1929995aedb01c155b0957c Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* Make sure we always have an engine when assigning to a PersistentLars Knoll2015-01-131-1/+1
| | | | | | | This prepares things for a rewrite of the internals of Persistent. Change-Id: Ib93ec5911984d1bfce87ffdc3f86bc75f6ecafe9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-091-4/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4globalobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/quick/items/qquicktext_p.h src/quick/items/qquicktextedit_p.h src/quick/items/qquicktextinput_p.h Change-Id: If07e483e03197cb997ef47a9c647a479cdb09f4c
| * Doc: removed reference to sizeHintNico Vertriest2014-11-181-4/+0
| | | | | | | | | | | | | | | | sizeHint is not a property of QQuickView Task-number: QTBUG-39044 Change-Id: I6e19e975ab71f73ddaf703956afb90f2e607b6f8 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Changed MemoryManager::alloc<T> to return Heap::T* instead of T*Simon Hausmann2014-11-151-1/+1
| | | | | | | | | | Change-Id: Iede1ba624d1313fbe2f8e5e979e936f1f32efdc9 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Replaced more usages of Returned<T> with Heap::T*Simon Hausmann2014-11-141-2/+2
| | | | | | | | | | Change-Id: I451128ee71610bfeb71139c28da89a00a8209ec6 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Move data for objects in QtQuick into the Heap namespaceLars Knoll2014-11-111-4/+4
| | | | | | | | | | Change-Id: Ic9d5946a8e60d235b8442b964dd1478363626441 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Begin moving the data out of Managed objectsLars Knoll2014-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | We need to move the Data objects out of the Managed objects, to avoid lots of trouble because inner classes can't be forward declared in C++. Instead move them all into a Heap namespace. Change-Id: I736af60702b68a1759f4643aa16d64108693dea2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Let markObjects() operate directly on HeapObjectsLars Knoll2014-11-041-2/+2
| | | | | | | | | | | | | | | | | | This decouples things a bit better and helps moving over to directly store heapobject pointers in other objects. Change-Id: I798f922e018b0a3ca6f8768e4a810187f34d82f6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Changed Value to store Managed::Data pointers directlySimon Hausmann2014-11-041-1/+1
|/ | | | | | | | This is a step towards storing direct heap object pointers for the values on the JS stack, to avoid the costly indirection for data access. Change-Id: Ibb57ed6cf52a7088bbc95ee04ae3a4cb25b8c045 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Select specific features to be recorded when profiling QMLUlf Hermann2014-09-111-5/+5
| | | | | | | | | | | | Some features, like the memory profiler, create huge amounts of data. Often enough, we're not actually interested in all the data available from the profiler and collecting it all can lead to excessive memory consumption. This change enables us to optionally turn various aspects of QML profiling off. Task-number: QTBUG-41118 Change-Id: I7bb223414e24eb903124ffa6e0896af6ce974e49 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
| | | | | | | | | - 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>
* Change the object allocation schemeSimon Hausmann2014-07-221-2/+2
| | | | | | | | | Instead of allocating the data directly, centralize the object and its ::Data allocation in one place in the memory manager. This is in preparation for additional pointer indirection later. Change-Id: I7880e1e7354b3258b6a8965be378cd09c9467d25 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Start implement new Object creation patternLars Knoll2014-07-221-5/+4
| | | | | | | | | Create objects through a static create() method that returns a pointer to the objects Data. This will later on simplify breaking the direct connection between Object and Object::Data. Change-Id: Id8daa3c766429bc36f432868e1957846147c96b6 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert QQuickRootItemMarker to new data layoutLars Knoll2014-07-221-2/+2
| | | | | Change-Id: Id24c561bc04a1dc131492053acec2aeb4041680b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix visual parent ownership with scenes that create windowsSimon Hausmann2014-03-281-5/+5
| | | | | | | | | | | | | | | | | | Commit 39540124dd0900e0c99dcda8c0ebdf4f3cea8d5e introduced the concept that a visual parent marks its children, by recursively marking the children of the root item in a QQuickView. This allowed for the removal of an ugly hack in QtQuick Controls. Unfortunately that fix is incomplete in the sense that it makes the incorrect assumption that a QQuickView is always used. The use-case in the bug report is to have child items inside a QtQuick.Window (a regular ApplicationWindow in fact). That window - implemented by QQuickWindowQmlImpl - also needs to mark its children, so this patch introduces the use of the same GC marking helper class (which now operates on a QQuickWindow instead of a QQuickViewPrivate). Task-number: QTBUG-37711 Change-Id: Id788e84dbb041ac8ba6ff23dc4ef56f6fe9e465a Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Fix issues in QQuickWidget documentationTopi Reinio2014-03-111-1/+1
| | | | | | | | | | 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>
* Move QtQuick profiling to own profiler adapterUlf Hermann2014-02-151-6/+6
| | | | | | | | The QtQuick parts of the QML profiler service thus become a proper global profiler which can be independently enabled and disabled. Change-Id: Ifad03801cab2be66a264fc46fdebdae582fcc99b Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Further pack messages for QQmlProfilerServiceUlf Hermann2014-01-221-5/+5
| | | | | | | | | | | Allow multiple detailTypes in each packet and extend the profiling code to make use of that. Note that this changes the usual order of pixmapSizeKnown and PixmapLoadingFinished events. As far as I can see this doesn't affect the QML profiler frontend and the order of these events isn't specified anywhere. Change-Id: Id39ad98594ccf35add4415e08daf9e92ab561237 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Unify calls to profiler service event methods.Ulf Hermann2014-01-221-5/+5
| | | | | | | | | | | | Don't needlessly duplicate information about the profiler being available and allow inlining. Use macros to check availability of the profiler in calling code and generally simplify the code. Task-number: QTBUG-35315 Change-Id: I0a9daec4a95f74b9db795ef2918a01fb772ea107 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Split ManagedVTable into two classesLars Knoll2014-01-211-2/+2
| | | | | | | | Keep the basic methods in ManagedVTable, but have the Object related stuff in an ObjectVTable class. Change-Id: I9b068acf3caef813686227b8d935e7df1a7d1a6e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix interaction of QQuickItems with the garbage collectorSimon Hausmann2014-01-061-0/+27
| | | | | | | | | | | | | | | | | The QObject ownership of QQuickItem objects is not accessible / mutable in QML, because the parent property maps to the (dynamic) visual parent. There are use-cases of creating QQuickItem objects without a QObject parent and to support this, the visual parent needs to mark its visual children in order to provide intuitive semantics. [ChangeLog][QtQuick][Import Behavior Changes] A QQuick Item is now strongly referenced by its visual parent item, so it doesn't require a QObject parent to stay alive. Task-number: QTBUG-35913 Change-Id: Ief2d40ac76298a0cf241ca73ff654c4ecfa12748 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Made Qt Quick items' \since consistent.Jerome Pasion2013-09-251-1/+1
| | | | | | | | | | | | | | | | Qt 5.2: -"\since QtQuick 2.2" -> "\since 5.2" Qt 5.1: -"\since QtQuick 2.1" -> "\since 5.1" -"\since Qt 5.1" -> "\since 5.1" Qt 5.0: -"\since QtQuick 2.0" -> "\since 5.0" Task-number: QTBUG-32172 Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4 Reviewed-by: Martin Smith <martin.smith@digia.com>
* Doc: Create links to Qt Quick 1Sze Howe Koh2013-04-241-1/+1
| | | | | | | | | | | Point to the porting guide, so that users who search for the old names will be directed to an explanation of the name change. Also made some new links to Qt Quick 2, and changed "favour" -> "favor" (Sanity Bot complained) Change-Id: If30c8d619d8fdb9df72b7b5f3efd356f1e07b23a Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* QQuickView's equivalent in QtQuick1 is QDeclarativeViewDebao Zhang2013-03-151-1/+1
| | | | | Change-Id: I12104e8bd58a406a0ff03c110e2df54bbc1c816c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* qmlscene can start with either an Item or Window as the qml rootShawn Rutledge2012-11-051-0/+25
| | | | | | | | | | | Before, it assumed that the root is an Item and needs to have a Window created. But it's useful for an application to have a Window as the root, and it was already possible by writing a different C++ main function (see qtdeclarative/examples/window/window/window.cpp). It doesn't take much to give qmlscene this flexibility too. Change-Id: Ie808e78a42074e13aa9d3c87723ec9ac8fdbaf4a Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Remove interim compatibility measuresAlan Alpert2012-10-161-1/+1
| | | | | | | | Also update some variables in qtdeclarative which failed to update rootItem->contentItem. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d3 Reviewed-by: Alan Alpert <416365416c@gmail.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Fix documentation issues.Kim Motoyoshi Kalland2012-09-071-1/+1
| | | | | Change-Id: I03c4faa1aee60cd1ad706cb6c1b983f03311d251 Reviewed-by: aavit <qt_aavit@ovi.com>
* Doc: Fix some documentation issues.Kim Motoyoshi Kalland2012-09-051-8/+0
| | | | | Change-Id: I0f7e60fd6060381bd8790dfaacc3a39a890a0fe7 Reviewed-by: aavit <qt_aavit@ovi.com>
* Fix various broken links in documentationBea Lam2012-08-031-2/+2
| | | | | Change-Id: I9e2dac37d18e3ca62e4a92be25e5c2e60ffeba00 Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
* QQuickCanvas renamesAlan Alpert2012-07-171-14/+14
| | | | | | | | | | | | | | | | QQuickCanvas is now called QQuickWindow QQuickCanvas::rootItem is now QQuickWindow::contentItem QQuickItem::canvas is now QQuickItem::window QQuickItem::ItemChangeData::canvas is also renamed window QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow The functions related to the color property have dropped the clear from their names. The first three changes have interim compatibility measures in place to ease the transition. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix qmlscene initial resize for delayed loadingMatthew Vogt2012-07-111-2/+2
| | | | | | | | | | When QQuickView acquires a default initial size while waiting for the source component to be loaded, the resulting width() and height() are 1 rather than zero. Fix the check for default size after component has loaded to account for this disparity. Change-Id: Ifaf418525e66dcc094c87ac1f9b63d1b05a08fd7 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove Qt::WindowFlags from QQuickView constructorAlan Alpert2012-07-061-15/+9
| | | | | | | | It's no longer in the constructor of QWindow. Those who wish to set it can use the setWindowFlags function. Change-Id: I8df57ed1ced8128723d790caaaaaaaaaaaaa787d Reviewed-by: Martin Jones <martin.jones@nokia.com>
* QQuickView doc improvements.Martin Jones2012-06-271-16/+26
| | | | | | Task-number: QTBUG-23193 Change-Id: I8ae081256dabe838e88d1d11713d99ed48b5a0d5 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Create new documentation structureChris Adams2012-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | The documentation currently has no clear separation between Qt QML and Qt Quick. With recent commits like: 6c8378eaf1edbbefe6aaa3672b0127816a004fd7 and ab1e510121c8a679fdaca12ccd30e0f7ac12a26b the separation between the language definition and implementation, provided by Qt QML, and the standard library for the QML language, provided by Qt Quick, is clear. This commit creates a new documentation structure that is more navigable and separates concepts into logical categories, with clear separation between QtQML and QtQuick. It also provides a more generic QML Application Developer Resources page which contains links to information for QML application developers. Change-Id: Ia807ccfbfd24ffa0e1c7f0a51ed9d2ed3aa6a733 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Ensure QQuickView's engine outlives the root componentMatthew Vogt2012-05-241-2/+5
| | | | | | | | If the engine is destroyed before the root component, assumptions of resource availability are broken. Change-Id: I7fe27ff38ae3c215d58fb8811aff449b6c1f7b5b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Introduce a new constructor to QQuickViewCharles Yin2012-05-231-13/+61
| | | | | | | | Make it possible let QQuickView use an existing qml engine and multiple QQuickView objects can share one QQmlEngine instance. Change-Id: I035d1c15155be22f1131b504c40cf4ffb5da0f45 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Add hooks for declarative memory profiler.Glenn Watson2012-05-151-0/+2
| | | | | | | | | | | These macros effectively do nothing if the profiling library has not been preloaded. However, if the library is loaded they provide some additional context for each heap allocation, by tagging each subsequent allocation with the QML file that caused the allocation to occur. Change-Id: Ib1f56d0df0664e118e04e53e22a6942317b1baed Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Set context information for QmlErrors passed to qWarningKai Koehne2012-05-091-2/+4
| | | | | Change-Id: I88b8582e3c757407825f1e77187d725de4242b05 Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Cleanup QQuickCanvas and QQuickView docs.Martin Jones2012-03-061-0/+5
| | | | | | | Mark reimplemented protected methods. Change-Id: I544d68e16d82a37f5612fd72cd185a23c70157a7 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-31/+31
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Debugger: Rename QDeclarativeDebugTrace to QDeclarativeProfilerServiceKai Koehne2012-02-101-6/+6
| | | | | | | | This avoids naming confusion with QDeclarativeTrace + makes it in line with QV8ProfilerService. Change-Id: Ifd801655044cff3ffdb2a9695ffc9868eeb51663 Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
* Remove QtQuick1 elements from qtdeclarativeMatthew Vogt2012-02-031-7/+2
| | | | | | | | QtQuick1 is now contained in a separate repository. Task-number: QTBUG-23737 Change-Id: I09eae67af5693a22b896b916f816f73ccc3a89b1 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>