aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
Commit message (Collapse)AuthorAgeFilesLines
* Fix qmlClearEnginePlugins() to clear engine plugins.Dominik Holland2013-09-051-16/+38
| | | | | | | Task-number: QTBUG-32078 Change-Id: I2d3aeb6b91ffdb9b8c70ad93d1e43daada84fb7f Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Fix crash on QV8Engine destructionJosh Faust2013-08-301-1/+1
| | | | | | | | | | | | QObjects tracked by QV8Engine can end up causing bindings to execute when the QV8Engine is being deleted, which can call through to QV8Engine::fromVariant(). This change ensure that that is valid while the QObjects are being destroyed. Task-number: QTBUG-31555 Change-Id: Iaea402ff65993bb2322af403d3590653005e30fe Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix crash when trying to set versioned group propertiesSimon Hausmann2013-08-281-1/+3
| | | | | | | | | | | If a property isn't available due to revisioning, we print an error message. Producing the error message should be done with care of obj->type being -1 to avoid out-of-bounds on the output->types array. Task-number: QTBUG-33179 Change-Id: I7bd420f2dfa0ca2d616340a68999d58022974435 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* fix include guard to not clash with qscriptvalueiteratorMichael Zanetti2013-08-231-3/+3
| | | | | | | Change-Id: Ifb51ed15c93ed68e2a18edd4cda4a921f7e41c34 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org>
* Debugger: Fix crash when app exits while debuggingKai Koehne2013-08-211-1/+2
| | | | | | | | Make sure we don't access an already deleted v8engine any more. Task-number: QTBUG-33100 Change-Id: Ic517577ae30b41375cbf9f787cfe0a29121171e2 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Doc fixAlan Alpert2013-08-161-2/+3
| | | | | | | Grammar and word choice Change-Id: If736f1d7a6f6396101924c9357c5235605b80b43 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix needless conversion from char * to QStringKai Koehne2013-08-091-20/+20
| | | | | | | | | Converting the strings to UTF-16 unconditionally whenever the library is loaded is overkill. Anyhow, the literals are only passed to methods also accepting a QLatin1String, so we don't have to convert at all. Change-Id: I84e813ac989344bc2e359f340696423766392c93 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Remove unused local variablesKai Koehne2013-08-091-3/+0
| | | | | Change-Id: I910c47cd404c0c5c1c324e956927966e834b488e Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: createObject: adapted description of exampleNico Vertriest2013-08-061-51/+52
| | | | | | | | | | | | Plus language/style edits Restored brief statement QQmlComponent.cpp Task-number: QTBUG-32222 Change-Id: I07da54bad3e13f163475ed2a0760e66d50795f6f Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Merge remote-tracking branch 'origin/release' into stableSergio Ahumada2013-07-261-4/+1
|\ | | | | | | Change-Id: Ibb0e597c0cd02732bae3ef0ccc31c3ef36c75584
| * Doc: Modified the term for the Qt global object.Jerome Pasion2013-07-251-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | QtQml::Qt is a "QML global object" to differentiate it from the Qt namespace. "QML Qt object" "QML Qt global object" "Qt global object" (in the context of QML-only pages) Change-Id: I1d2896ad48e8432c5eb8b18f05af247986bff336 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Always use QDir::exists() for checking if something existsAndy Shaw2013-07-251-16/+2
|/ | | | | | | | | | | If there is a custom file engine in use by the application then it will not be able to tell if the file exists if the system stat() call is used. Therefore we let it use QDir::exists() on all platforms to ensure that this is taken care of. Change-Id: I0c93cfdad1e71b40512bcf1766de6a705a76bd9c Reviewed-by: Marcus Tillmanns <maddimax@gmail.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Use GET method for redirect in QDeclarativeXMLHttpRequest.Friedemann Kleint2013-07-221-0/+5
| | | | | | | | Initial-patch-by: Marek Więckowski <wiecko@fuw.edu.pl> Task-number: QTBUG-32332 Change-Id: I5514d97ef8574f8e7eef8fcca39bed4cd7e917ad Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
* Doc: Fix documentation of ownership of in QmlComponent::createKai Koehne2013-07-031-4/+2
| | | | | | | | | Fixes documentation introduced in b1ee75d377fc9517d6 : Actually the ownership is _always_ transferred to the caller. Change-Id: I3b50588b69fa45730ac09c46912f8319e7581a5f Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix access to invalid memory in ~QQmlEnginePrivateKai Koehne2013-07-031-3/+0
| | | | | | | | | | | | | | ~QQmlEnginePrivate tries to set incubationController->d to 0. However, we're already setting the backpointer (q) of incubationController to 0 in ~QQmlEngine, so that the IncubationController destructor might run in between without being able to reset incubationController. To fix this, just handle the unsetting of incubationController once, in ~QQmlEnginePrivate. Task-number: QTBUG-32161 Change-Id: I43a72dcfc0f95938ebfa67d3998adff1fb2d05a1 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-283-3/+10
|\ | | | | | | Change-Id: I140852ef7fbbfe303dac620af5e6eba5ee3a4b02
| * QtQml: document QQmlExtensionPlugin::baseUrlShawn Rutledge2013-06-281-1/+8
| | | | | | | | | | | | | | | | | | | | | | It was added here https://codereview.qt-project.org/#change,47532 without documentation. Also updated \since because for now qdoc seems to interpret \since 5.0 as QtQml 5.0. Task-number: QTBUG-31928 Change-Id: I652e9471f1ad8e83b355bffc8498a6565dc9aa2b Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Switch to non-streaming version of qWarning()Alan Alpert2013-06-271-2/+1
| | | | | | | | | | | | | | | | | | Allows us to drop the qdebug.h include in a public and frequently used header. Change-Id: I2cb05fbec6298ba600020db684e9eea4093ce663 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
| * Undo presumably accidental line deletionAlan Alpert2013-06-271-0/+1
| | | | | | | | | | Change-Id: I7ddb3ef9b45cfb95c48c2060dc62acd4ed9d64f9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/release' into stable" into ↵Frederik Gladhorn2013-06-262-3/+3
|\ \ | | | | | | | | | refs/staging/stable
| * | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-252-3/+3
| |\| | | | | | | | | | Change-Id: I6e060496b8c252fb4e2d5d2d40ae16bf950e2ec4
| | * QQmlPlatform: rename "mac" to "osx"J-P Nurmi2013-06-242-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: Ie458690b8008b211785cf9dcc0312a7e25c84f6b Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* | | QQmlTrace: getpid() requires unistd.hShawn Rutledge2013-06-251-0/+1
|/ / | | | | | | | | | | | | | | Doesn't build on MacOS if you omit this include and uncomment define QML_ENABLE_TRACE in qqmltrace_p.h Change-Id: I78ed43b16a006699449202dd234e43be2f7b84fd Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | fix case insensitive issue with image provider idTasuku Suzuki2013-06-181-2/+2
| | | | | | | | | | | | | | Task-number: QTBUG-31614 Change-Id: I866df6e3ed6226b443640a51f66a3dbb92b31249 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Remove use of 'register' from QtQml.Stephen Kelly2013-06-181-3/+3
| | | | | | | | | | Change-Id: Id9848e3161346c7519d430c47718670cabe556de Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix -Wpedantic warningsAlbert Astals Cid2013-06-127-7/+7
| | | | | | | | | | | | | | | | Don't need these extra ; and give warnings with -Wpedantic Change-Id: I877fee2a6421b1aaa97ca3845a09d70f3b2b302b Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2013-06-106-23/+50
|\| | | | | | | Change-Id: Iafc0497812acb7850cd4e72c49d63ec9c9320b58
| * Add future compatibility noteAlan Alpert2013-06-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | File selectors are being delayed from releasing at the same time as QQmlApplicationEngine, but will need to be enabled by default (in QQmlApplicationEngine only) when they do arrive. Adding a note to the documentation to help forwards compatibility. Change-Id: Ia47a1da1afebd0da3bd1a97e7e4c8ee85f70b49a Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
| * Set incubation controller when a Window{} is loaded via QQmlApplicationEngineAlan Alpert2013-06-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was the one convenience that was lost when transitioning templates from QQuickView + Item{} to QQmlApplicationEngine + Window{}. As the default window incubation controller was tied to the first window's frameSwapped, we could easily run into a situation where a secondary window required incubation while the first window was idle. This would then starve the incubation controller. Instead make it so that the renderloop emits "timeToIncubate" once it is done with a renderpass over all windows, so the incubator gets to run once and exactly once per vsync when animating. The incubator logic was also flawed in that it could post a lot of events to itself as a result of incubatingObjectCountChanged and thus starve system events while processing incubation requests. Now we start a timer and don't start it again until we have completed an incubation pass. Task-number: QTBUG-31203 Change-Id: Iea9e2c81efb46bb7875c70ccda0cdc4b3b3e58e7 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
| * QQmlPropertyCache: check methods before propertiesAlberto Mardegan2013-05-311-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When creating the QQmlPropertyData, search within the methods list before searching for properties. The reason is that if the meta object is dynamic, looking up a property will always return a result (if the property doesn't exist, it will be created) and therefore all methods will be obscured. By swapping the search order, we eliminate this risk (methods are not dynamically added). Task-number: QTBUG-29836 Change-Id: Ie367f757c37ef4bc834a6c1c009f27bcf344fe76 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Fallback to QMetaObject for properties not in QQmlPropertyCacheAlberto Mardegan2013-05-312-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | QQmlOpenMetaObject does not update the QQmlPropertyCache when new properties are added, meaning that the QQmlPropertyCache might not contain all of the dynamic properties of an object. Therefore, make QQmlPropertyCache fallback to reading the QMetaObject when a property is not found. Task-number: QTBUG-31226 Change-Id: I760aaa155b1952f6f52ab9ce173fb9547f8e34a6 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
| * Deprecate the with statement in QMLSimon Hausmann2013-05-313-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | It is generally considered deprecated in JavaScript and its use disables a whole range of optimizations that we would like to apply in the future. Therefore this patch will issue a warning if the with statement is detected. This change is also documented, along with the plan on enabling strict mode in the future. Change-Id: Ie60f0536e0bdd6ecc537d8e34efbd8868bcad743 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix -Wpedantic warningsAlbert Astals Cid2013-06-075-6/+6
| | | | | | | | | | | | | | Don't need these extra ; and give warnings with -Wpedantic Change-Id: I877fee2a6421b151697ca3845a09d70f3b2b302b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* | Doc: Clarify object ownership of QObject* returned by QmlComponent::createKai Koehne2013-06-071-1/+9
|/ | | | | | | | | | Link to relevant section in QQmlEngine::ObjectOwnership. It's a big gotcha that a QObject * returned by a Qt method won't be deleted eventually, by default. Change-Id: I2367b7ae2673adc7fa181b759c79683091020462 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Partial fix for deferred properties when combined with componentsAlan Alpert2013-05-225-15/+36
| | | | | | | | | | | | | | | | | Current deferred properties implementation did not store context or compiled data pointers correctly. Those pointers are now stored when the defer is reached, so as to avoid confusion (confusion leads to asserts or crashes). Does not extend the deferred property support to allow multiple deferred blocks per item. This now prints and error and the side effect is only that one of the deferred blocks is lost. This use case is sufficiently rare that it may not be worth the cost. Task-number: QTBUG-30325 Change-Id: I80cb074ed4452e95020208a0142a91e721bced7d Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Fix some broken linksSze Howe Koh2013-05-201-6/+6
| | | | | Change-Id: I1385a8947107a7c80b32306fc587aff45536a4ec Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Prefer qFatal to assert for failure conditionMatt Vogt2013-05-191-4/+7
| | | | | | | Otherwise the explanatory message won't be seen in release mode. Change-Id: I5c9fbc86753ac5ecea3d0714b8f17207f6b713d6 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Assert instead of crashingAlan Alpert2013-05-161-0/+4
| | | | | | | | | | | Using a singleton (at least a QJSValue one) improperly leads to a crash. Assert with an explanatory comment is a low-cost improvement until better capitalization checking is implemented. Task-number: QTBUG-30090 Change-Id: I237a1dd2aab743ae1f09e8d653aa5aeb4bd0240f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Do not use an export macro in the function definitionThiago Macieira2013-05-151-1/+1
| | | | | | | | | | qmlExecuteDeferred is exported using Q_QML_EXPORT in qqml.h, so we don't need to use one here. Better not have any than have the wrong one, which can cause problems. Cherry picked from d6d2074ff in qtquick1 Change-Id: Ief978feb503b7381ed462f71ebbd7986bd6862c3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Move exports conflicting with QtDeclarative into namespaceKai Koehne2013-05-154-12/+84
| | | | | | | | | | | | | | Move exported qml* symbols that conflict with QtDeclarative into an - automatically imported - namespace. This ensures apps can link against both QtDeclarative and QtQml. To keep the BC promise the old symbols are still exported. Task-number: QTBUG-29584 Change-Id: I3d31c36ca4e2faaf6f5d67a77c5c5a304c0338a4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: corrections, spelling, and ListView requirements commentsDavid Fries2013-05-151-3/+2
| | | | | | | | | | From the ListView comment I thought the model had to be derived from QAbstractListModel, but that's not the case, QAbstractListModel will work just fine, it just doesn't support specific cases such as trees. Change-Id: I59305006540ddc049e276cf412571373cbfa6c67 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Doc: Fixed a bunch of missing snippets.Jerome Pasion2013-05-151-5/+5
| | | | | | | | -moved delegate model related snippets from Qt Quick to Qt QML. -corrected snippet paths Change-Id: If688f97fb9317def16f343d5502a6a54d6761e95 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
* Doc: Define Qt global object as a QML type and fix referring docsTopi Reinio2013-05-154-10/+11
| | | | | | | | | | | This change adds the Qt global object as a QML type in the Qt QML module and fixes links to it in documentation. Task-number: QTBUG-29353 Change-Id: I1690224091a79a3309fac7a78aa0c0c734449e4f Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: fixed some WS issues.Jerome Pasion2013-05-141-9/+9
| | | | | | | -generated by git-split-ws tool Change-Id: Icf1e85d01c818396e8dffb9b6aba2c132acfaaa1 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix crash in QQmlApplicationEngine when loading finishesJosh Faust2013-05-141-1/+2
| | | | | | | Task-number: QTBUG-30997 Change-Id: I10cb2c689408d1b31360095c2aa9e0943a5d9452 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Fix MSVC-warning about inconsistent DLL-linkage.Friedemann Kleint2013-05-091-2/+2
| | | | | | | | Introduced by 9b5a55101d7c519446c1cf3706a235dea81ad4de . Task-Number: QTBUG-28572 Change-Id: I5e7d012d22c701b2b15ab288d2c72f177caf904e Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Add qmlClearRegisteredTypes FunctionAlan Alpert2013-05-077-3/+44
| | | | | | | | | | | Registered types are stored in a global static variable, not on an engine instance. For applications managing multiple engines over their lifetime, there needs to be a way to clear the existing types so they can register new ones and avoid memory leaks. Task-Number: QTBUG-28572 Change-Id: Ic70a4dd1e29d99399b21fb42eaf10d4a52bf2adf Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>
* Add a URL interceptor to the QML engineAlan Alpert2013-05-0710-20/+240
| | | | | | | | Allows for custom file handling to a greater extent than the QNetworkAccessManager. Change-Id: Ifd3946bf33530c40ca2edeeb9f441f712e4941f6 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Avoid rare crashAlan Alpert2013-05-041-10/+12
| | | | | | | | | In the case where a QML type had been registered with the same metaobject, you could dereference the c++ type union data when it hadn't been allocated. Change-Id: I906d68710cf88b379933eb13cf0668738f07d5f4 Reviewed-by: Matthew Vogt <matthew.vogt@qinetic.com.au>
* Document percieved memory leakAlan Alpert2013-05-012-0/+6
| | | | | | | | | | | | QJSEngine doesn't call collectGarbage upon deletion, because this operation can be expensive and in most cases the JS engine is deleted during application shutdown, when the memory can be deallocated cheaper. This can lead to an apparent memory leak if multiple engines are created and destroyed in the same process. Documenting how to avoid this. Change-Id: Ie02cb8bedc8821e0bb04dfa52a5a2d65b4b085a3 Reviewed-by: Christopher Adams <chris.adams@jollamobile.com>