aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-07-287-13/+26
|\ | | | | | | Change-Id: I7d092cce33cb009d63e7b0df7c71183089dea53f
| * Fix loading of QML plugins with old IID in static buildsSimon Hausmann2017-07-262-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After commit 709f6370884b110def2e4665df8fa7bbf5fae734 we required the use of QQmlExtensionInterface_iid in qml plugins for static linkage. This mean that plugins using the "/1.0" variant would also continue to load, but those not would fail to load. This is annoying when porting apps from older Qt versions. To make the upgrade path easier, let's just support both IIDs. [ChangeLog][Qml] Fix loading of static qml plugins using the old plugin interface id Change-Id: I1c662b1fedad3f32b7dea1eddc32838d2eb9f3be Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| * Do not (dis)connectNotify on dynamically created model item objectsErik Verbruggen2017-07-254-10/+15
| | | | | | | | | | | | | | | | | | | | | | | | These item objects are direct subclasses of QObject, and cannot override connectNotify/disconnectNotify. This prevents the creation of the backing QMetaObject during disconnect, which happens during destruction, which in turn will call back into the model that is being destroyed. Task-number: QTBUG-59704 Change-Id: I7f997e5d2fda242b38e67b9147224d72aa4508ba Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Rebuild QQmlData::propertyCache if deleted by another engineDavid Edmundson2017-07-131-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | QQmlData is shared between engines, but the relevant QObjectWrapper is not. Since 749a7212e903d8e8c6f256edb1836b9449cc7fe1 when a QObjectWrapper is deleted it resets the shared QQmlData propertyCache. In most cases the propertyCache except when a property updated in an existing binding in the first engine, where it currently asserts. Task-number: QTBUG-61681 Change-Id: I6efdc506e5c7e30b95cda1be282afa9feb781cd2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add support for QEvent::LanguageChangeSimon Hausmann2017-07-148-13/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Respond to the language change event by refreshing all binding expressions. For constant string translation bindings we must now create special QQmlBinding instances instead of a one-time property write meta-call upon instantiation. Those however are more lightweight than an entire JavaScript expression. In addition this provides a slot to explicitly trigger a re-evaluation of bindings, to make it a little easier to discover for the developer. [ChangeLog][QtQml][QQmlEngine] Added retranslate() slot and QEvent::LanguageChange support to refresh bindings when changing the language at run-time. Task-number: QTBUG-15602 Change-Id: Ide174648e1d8a5738acb88e15495018d0869d7bc Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Add support for enum declarations in QMLMichael Brasser2017-07-139-119/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enums can be declared with the following syntax: enum MyEnum { Value1, Value2 } Grammar changes done by Simon Hausmann. [ChangeLog][QtQml] Enums can now be declared directly in QML. Task-number: QTBUG-14861 Change-Id: Ic6b6e032651d01ee2ecf9d5ce5734976cb3ad7ab Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Refactor le integer types from qjson_p.h to qendian_p.hAllan Sandfeld Jensen2017-07-062-4/+4
| | | | | | | | | | Change-Id: Ibb24b0a55dd94e03fea3104e8af5ddb266004300 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-043-2/+2
|\| | | | | | | | | | | | | | | Conflicts: .qmake.conf src/quick/doc/src/qmltypereference.qdoc Change-Id: Ia58f1c5a98309c32ef8d8e5c893faf261215f19f
| * Doc: Fix link to Window.screenTopi Reinio2017-06-201-1/+1
| | | | | | | | | | | | | | | | src/qml/qml/qqmlengine.cpp:455: warning: Can't link to 'QtQuick::Window::screen' Change-Id: I3f662ff574673d86ca048aec709948b236c17fd9 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
| * Don't leak QQmlJavaScriptExpression errorsColin Ogilvie2017-06-162-1/+1
| | | | | | | | | | | | | | Ensure any error is deleted when the expression is Change-Id: Ibbfd28f50279d4c66830b40c5c917eb8d98f266e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlXMLHttpRequest: support sending ArrayBuffer dataAlberto Mardegan2017-06-261-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The XMLHttpRequest.send() method should be able to send arbitrary binary data, and not just UTF-8 text: with this change we first attempt to use the parameter to the send() method as an ArrayBuffer, and fall back to a QString if that fails. [ChangeLog][QtQml] Allow sending binary data, encoded as ArrayBuffer objects, via XMLHttpRequest's send() method. Task-number: QTBUG-61599 Change-Id: I25781969ee39b4d168e5c76315ed9853092b322b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-152-1/+7
|\| | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4codegen.cpp Change-Id: I3c41b9fc9ba7d41741e4dd400402ae80dd7726d9
| * Fix loading QML caches for qrc:/// urlsAlexander Volkov2017-06-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Running examples/quick/window/window produces debug messages: "QML source file has moved to a different location." This is because QQmlFile::urlToLocalFileOrQrc(const QString &) overload is incompatible with QQmlFile::urlToLocalFileOrQrc(const QUrl &) when it deals with qrc:/// urls. For example it returns ":///window/window.qml" while the QUrl overload returns ":/window/window.qml". Thus the comparison of source paths in CompilationUnit::loadFromDisk() fails. Fix the incompatibility and add a test. Change-Id: I20449b8cf13d715d88860f2cd413ab39c893f3ef Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Doc: correct link issuesNico Vertriest2017-06-131-1/+1
| | | | | | | | | | | | | | | | qqmlengine.cpp:2182: warning: Can't link to 'LocalStorage.openDatabaseSync()' qqmlengine.cpp:451: warning: Can't link to 'Window.screen' Change-Id: Ib2a3548805125366d7a81982fa2039f6b9341d9b Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devLiang Qi2017-06-065-27/+37
|\ \
| * | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-065-27/+37
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qml/jsruntime/qv4argumentsobject.cpp src/qml/jsruntime/qv4arraydata.cpp src/qml/jsruntime/qv4context.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4errorobject.cpp src/qml/jsruntime/qv4functionobject.cpp src/qml/jsruntime/qv4internalclass.cpp src/qml/jsruntime/qv4lookup.cpp src/qml/jsruntime/qv4managed.cpp src/qml/jsruntime/qv4managed_p.h src/qml/jsruntime/qv4object.cpp src/qml/jsruntime/qv4object_p.h src/qml/jsruntime/qv4qmlcontext.cpp src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/memory/qv4heap_p.h src/qml/memory/qv4mm.cpp src/qml/memory/qv4mm_p.h src/qml/memory/qv4mmdefs_p.h src/quick/scenegraph/util/qsgdistancefieldutil.cpp src/quick/scenegraph/util/qsgdistancefieldutil_p.h tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp Change-Id: I7ed925d4f5d308f872a58ddf51fdce0c8494ec9c
| | * Move the engine() accessor from Object to ManagedLars Knoll2017-05-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can easily do this now that Managed has a pointer to an internal class (which always has a back pointer to the ExecutionEngine). Remove the extra engine pointer from ExecutionContext, and clean up tow methods in String. Change-Id: I98d750b1afbdeadf42e66ae0c92c48db1a7adc31 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
| | * Don't crash: Connections with a signal on a nonexistent objectShawn Rutledge2017-05-071-1/+4
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-56551 Change-Id: Ide09f177d3f6a3e9902f8ea904b3e6e4b998bd39 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
| | * Fix concurrent loading of the same qmldir from different scriptsAndy Shaw2017-05-022-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlQmldirData keeps a pointer to a QQmlScript::Import, and an integer priority. Each Blob that is waiting on it was setting its own import and priority even though the QQmlQmldirData itself was shared. This resulted in whichever one began loading last succeeding to load, and the rest failing. This change instead stores the import and priority data per-dependent Blob Fix was originally done by Josh Faust <jfaust@suitabletech.com>. I added the test. Task-number: QTBUG-30469 Change-Id: Id3d15569a999a7c22eeb12b431e5daf1ddae51dc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Add Qt.platform.pluginName propertySami Nurmenniemi2017-06-065-0/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | This exposes QGuiApplication::platformName() for qml. It is required at least for tests that are run on the "offscreen" platform (armv7 tests on qemu). [ChangeLog][QtQuick] Added Qt.platform.pluginName property. Task-number: QTBUG-60268 Change-Id: Ie55a282485d4d76ffe7ed8e77359ad7183f579c2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QML: emit messages when breaking bindingsOlivier JG2017-05-171-4/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new logging category that can be used to debug issues with unexpected binding breakages caused by assignment to previously bound properties. If enabled, outputs a message when a binding is broken with detailed location and property/value information. [ChangeLog][QtQml] The QML engine can now emit informational messages (in the "qt.qml.binding.removal" logging category) whenever a binding is lost due to an imperative assignment. This can be used to debug issues due to broken bindings. Change-Id: Ie31e5a198450b6f998c1266acfc97e8f33a92e3d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Allow creating attached properties for objects instantiated in C++Frederik Gladhorn2017-05-041-2/+2
| | | | | | | | | | | | Task-number: QTBUG-57396 Change-Id: I31912677ebfdcea9ba97fe0bb66d56bb82b4c90c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QmlTypeWrapper: -> QQmlTypeWrapperRobin Burchell2017-05-042-33/+33
| | | | | | | | | | | | | | That poor Q looked so lonely. Change-Id: Ie4cef3fa8f2ecb8ba106654e8a9d6611a9407aa2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlComponent: Move incubateObject from QQmlDelegateModel to ↵Robin Burchell2017-05-032-0/+36
| | | | | | | | | | | | | | | | | | QQmlComponentPrivate This feels like a slightly tidier encapsulation. Change-Id: Iff6c05e1fe7fbc6bb1ec58a7ea42d32ee03187df Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | C++11 scoped enum support for QMLMichael Brasser2017-05-035-6/+265
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQml] Support C++11 scoped enums in QML. These can now be accessed as <TypeName>.<EnumName>.<EnumValue> Change-Id: I29bd3f16e980f3e6f1b2390b5a8e9e8e999952a3 Task-number: QTBUG-54961 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLars Knoll2017-05-0213-3/+34
|\| | | | | | | Change-Id: I71275a2076c3d32ee2896571be882067320a2e9e
| * Run includemocs in qtdeclarativeThiago Macieira2017-04-2612-0/+24
| | | | | | | | | | Change-Id: I84e363d735b443cb9beefffd14b8c023a37aa489 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * Doc: correct link errorNico Vertriest2017-04-261-1/+1
| | | | | | | | | | | | | | qqmlengine.cpp: cannot link to LocalStorage.OpenDatabaseSync Change-Id: I37ee96072a1f1973dd501b6c4c2950f51a4224d2 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| * QQmlApplicationEngine: Fix using invalid pointersRainer Keller2017-04-261-2/+9
| | | | | | | | | | | | | | | | | | | | When a root object was deleted before QQmlApplicationEngine the invalid pointers stayed in the list of root objects leading to crashes when destructing QQmlApplicationEngine. Root objects are watched for destruction and removed from the list. Change-Id: I1babab54dbb7d7b16ed883ada5b3e420ca8690cb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-04-211-1/+2
|\| | | | | | | Change-Id: Ibed6ee74d36b4ce37391c82db00a0abd30d09e7a
| * Fix for dangling object pointers in QQmlErrorsRobert Griebl2017-04-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This rarely happens - only seen with Delegates - when - an object is created during incubation - some error occurs in this object - the object gets deleted before the incubation run finishes Because the errors are delivered after the incubation run finished, the object() pointer of QQmlError is now a dangling pointer that will crash your application if accessed. Change-Id: Idd9fccbc58e4ada67bde3ca1aeec736aa9374789 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-04-114-25/+19
|\| | | | | | | Change-Id: I95914046889022e0ef9bdc17338dc5895c5223fe
| * Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-114-25/+19
| |\ | | | | | | | | | Change-Id: Ib3d81ad33a6ba28d891da91271a64d5fcc4874e6
| | * Avoid access to declarativeData when isDeletingChildren is setBernhard Übelacker2017-04-104-25/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QObject's members declarativeData and currentChildBeingDeleted share the same memory because they are inside a union. This leads to a problem when destructing mixed Widgets and QML objects. Then in QObjectPrivate::deleteChildren the member currentChildBeingDeleted is set. But unfortunatley QObjectWrapper::destroyObject retrieves the same pointer via declarativeData. This patch should avoid this by disallowing retrieval of declarativeData when isDeletingChildren is set (or at least adds a Q_ASSERT). Task-number: QTBUG-57714 Change-Id: I9ee02f79be3e8226c30076c24859b49b8dcfaecf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/devSimon Hausmann2017-04-081-0/+4
|\ \ \
| * | | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-04-071-0/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4assembler.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4vme_moth.cpp Change-Id: I865d794e550a263387a39ca8d051ebf48b70cbc0
| | * | Fix build without features.animationTasuku Suzuki2017-04-031-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie45a2f01def64941a323973ea27446e3fc85a72b Reviewed-by: Robin Burchell <robin.burchell@crimson.no> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | | Cleanups: Remove Steele barrier codeLars Knoll2017-04-071-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the code related to the Steele write barrier and incremental garbage collection. This is in preparation for a fully concurrent GC, that will not have and incremental mode and will use a Yuasa write barrier. Change-Id: I155a85211c5be61e792e056321fbceaee47c0d87 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Separate the stack used for GC from the regular JS stackLars Knoll2017-04-072-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | This is required to be able to implement concurrent or incremental garbage collection. Change-Id: Ib3c5eee3779ca2ee08a57cd3961dbcb0537bbb54 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-03-301-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4assembler.cpp src/qml/jit/qv4assembler_p.h Change-Id: Ibfe69610ccd1f275f181b2bd87feece4ba221e50
| * | Add missing header inclusionKimmo Ollila2017-03-281-0/+1
| | | | | | | | | | | | | | | Change-Id: I7c215db87552c63291e6c82d7b962ee17ec2f610 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.9' into devSimon Hausmann2017-03-272-8/+47
|\| | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4functionobject_p.h Change-Id: I4bbed45f1fe02cf64df3c8a5f92f811e38e772f3
| * | Merge "Merge remote-tracking branch 'origin/5.8' into 5.9" into refs/staging/5.9Simon Hausmann2017-03-252-8/+47
| |\ \
| | * | Merge remote-tracking branch 'origin/5.8' into 5.9Simon Hausmann2017-03-152-8/+47
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qqmltypecompiler.cpp src/qml/compiler/qqmltypecompiler_p.h src/qml/qml/qqmltypeloader.cpp src/qml/qml/qqmltypeloader_p.h Change-Id: I4894555ab7a0879b56bbda7a46d16d1c40c19e7c
| | | * Fix QQmlTypeLoader::Blob::qmldirDataAvailable memory overwriteJosh Faust2017-03-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An invalid iterator was being dereferenced. Task-number: QTBUG-59268 Change-Id: I58635667ab4591c06f1d7644243b83fd0172e74f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| | | * Fix caching of QML singleton typesSimon Hausmann2017-03-132-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a QML file depends on a QML singleton, we failed to include it in the dependency hash. Thus changes to the QML singleton did not result in a re-creation of the caches of files that use it. The list of singletons comes from random-ordered hashes in the qml import handling. We provide an order to the direct dependencies by sorting by the singleton type names. Task-number: QTBUG-58486 Change-Id: Ie7e9d006f9bf3a60af1f819ee439c29bc234bd8a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | | * Clean up type dependency hashing for QML cachingSimon Hausmann2017-03-132-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of passing the engine parameter all the way through the data structure generator, along with the dependent type data structure that is unused otherwise, let's simply provide a function object for the dependency hashing. This is also in preparation for adding singleton types to the dependency hash. Task-number: QTBUG-58486 Change-Id: I5bb5e5c06b7b5c77195cec3da13141333cfea7a8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | | Merge remote-tracking branch 'origin/5.9' into HEADSimon Hausmann2017-03-236-73/+92
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp src/qml/jit/qv4assembler.cpp src/qml/jit/qv4assembler_p.h src/qml/jit/qv4isel_masm.cpp src/qml/jsruntime/qv4context.cpp src/qml/jsruntime/qv4context_p.h src/qml/jsruntime/qv4engine.cpp src/qml/jsruntime/qv4vme_moth.cpp src/qml/memory/qv4mmdefs_p.h Change-Id: I9966750b7cd9106b78e4c4779f12b95a481cca40
| * | | Speed up source code readingSimon Hausmann2017-03-221-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we always convert the source code of .qml/.js/qmldir files from utf-8 to utf-16, we always end up copying bytes around. That means instead of allocating memory on the C++ heap and copying bytes from kernel space to user space and then a few times through QIODevice buffers until we reach QString::fromUtf8, we might as well mmap() the file directly - if possible. Change-Id: I54c88d4d9f03f9967130d65a7b53cfec93734018 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | Avoid an extra stat() on the source .qml file when loading cacheSimon Hausmann2017-03-222-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For timestamp comparison it is not necessary to create another QFileInfo() object and call exists() and lastModified(), when we can pass that information through from the type loader. Change-Id: I225cd36e672f1f390bddb4e6ebfafa3fc1269795 Reviewed-by: Lars Knoll <lars.knoll@qt.io>