aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Run includemocs in qtdeclarativeThiago Macieira2017-04-261-0/+2
| | | | | 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>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-04-111-20/+10
|\ | | | | | | Change-Id: Ib3d81ad33a6ba28d891da91271a64d5fcc4874e6
| * Avoid access to declarativeData when isDeletingChildren is setBernhard Übelacker2017-04-101-20/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-1/+1
|\| | | | | | | | | | | | | Conflicts: src/qml/qml/qqmlimport.cpp Change-Id: I26f8d18fe8af664ee8573116f182fe12b71e089a
| * QThreadData::threadId is now QAtomicPointer, so relax loads from AcquireThiago Macieira2017-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | operator T() does loadAcquire, to match std::atomic behavior. We don't need that, so let's use a relaxed load. Side note: why does QtQml need to access the thread ID this way? Couldn't it do object->thread()? This code comes from a pre-5.0 commit 5570040771ec610583473e2d9e8e069474364cf1 ("Permit signals to be emitted in a different thread"). Change-Id: I4139d5f93dcb4b429ae9fffd14a34a84d3255a6f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* | Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-241-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4ssa.cpp src/quick/accessible/qaccessiblequickview_p.h src/quick/items/qquickmousearea.cpp src/quick/util/qquickanimatorjob.cpp tools/qmlplugindump/main.cpp Change-Id: I84474cf39895b9b757403971d2e9196e8c9d1809
| * Doc: Fix documentation warningsTopi Reinio2017-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | src/qml/jsapi/qjsengine.cpp:524: warning: Undocumented parameter 'metaObject' in QJSEngine::newQMetaObject() src/qml/qml/qqmlengine.cpp:1023: warning: Undocumented parameter 'retCode' in QQmlEngine::exit() src/qml/doc/src/qmlfunctions.qdoc:182: warning: Undocumented parameter 'reason' in qmlRegisterUncreatableMetaObject() src/qml/qml/qqmllist.cpp:393: warning: Undocumented parameter 'at' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:393: warning: Undocumented parameter 'count' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'at' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'count' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'append' in QQmlListProperty::QQmlListProperty() src/qml/qml/qqmllist.cpp:402: warning: Undocumented parameter 'clear' in QQmlListProperty::QQmlListProperty() src/quick/items/qquickwindow.cpp:4461: warning: No such parameter 'backend' in QQuickWindow::setSceneGraphBackend() Also do some minor language editing. Change-Id: I2e806d1a77e3c4264d709c27d2bfc4542a782716 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Rename Window.targetScreen to screen, and pick up changes to the screenTor Arne Vestbø2017-02-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | The screen property can be used for both setting the initital screen, and for reading out the current screen, so 'targetScreen' was not an ideal name for this property. Change-Id: I1b617085b1e8e0e437355740be5d3cee9379c47f Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | Add missing include to qmlengine.cppFriedemann Kleint2017-02-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix error: qml\qqmlengine.cpp: In member function 'QString QQmlEngine::offlineStorageDatabaseFilePath(const QString&) const': qml\qqmlengine.cpp:2191:51: error: variable 'QCryptographicHash md5' has initializer but incomplete type QCryptographicHash md5(QCryptographicHash::Md5); ^ qml\qqmlengine.cpp:2191:28: error: incomplete type 'QCryptographicHash' used in nested name specifier QCryptographicHash md5(QCryptographicHash::Md5); Change-Id: I1f116758fe061a6bad4718cc264cf608dd3cc0b5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* | add QQmlEngine::offlineStorageDatabaseFilePath(db), use in LocalStorageShawn Rutledge2017-02-021-0/+21
| | | | | | | | | | | | | | | | | | | | | | This is C++ API to get the actual storage path for a particular database. [ChangeLog][QtQml] Added QQmlEngine::offlineStorageDatabaseFilePath(dbName) to allow getting the actual storage path for a particular database. Task-number: QTBUG-52013 Change-Id: I1cbd9454c537f08c97f4dafc06fd6b14e81c51af Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove support for WinRT 8.1 and Windows Phone 8.1Maurice Kalinowski2017-01-191-1/+0
| | | | | | | | | | | | Task-number: QTBUG-57288 Change-Id: Id106f09dc824fbd95780dc5b479e16802d183e57 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove remnants of blackberry platform supportRobin Burchell2017-01-161-1/+0
| | | | | | | | | | | | | | | | The last remnants were removed from qtbase in 5.7 making this all dead code, so match here too. Change-Id: I10f3f1c614562f2a97ade7cdf5002065d6f79e07 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Remove QQuickWebView from QQmlEngine documentationRobin Burchell2017-01-161-2/+1
| | | | | | | | | | | | | | | | | | | | It's not part of this module, and promising something against a module so distinct from qtdeclarative seems like a risky choice, even if the class was a public and supported one -- checking qtwebkit's source shows QQuickWebView is in a private header. Change-Id: Ib250542e5a78083cbabe55217b9b9192d3a863fb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QQmlInfo: Add qmlDebug & qmlWarning functions alongside qmlInfoRobin Burchell2017-01-111-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | This way, we can correctly write to multiple levels of QDebug with QML context information. A followup change will port all existing callers, and subsequently change qmlInfo's message level to QtInfoMsg. [ChangeLog][QtQml] Introduced qmlDebug & qmlWarning functions to qqmlinfo.h, in addition to the pre-existing qmlInfo function. As a side effect, QQmlError has also gained messageType() and setMessageType(). Change-Id: I04ced5952c5c3c58293a89a6767c7b545c03cc0a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-141-1/+1
|\| | | | | | | Change-Id: I905dcd29377bf1b2e0ee086823b54277d18e78dd
| * Fix OS platform label documentationMaurice Kalinowski2016-11-241-1/+1
| | | | | | | | | | | | Task-number: QTBUG-49033 Change-Id: I2e8157f8d2b40299799cbf31b424060ff89ab75a Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-221-7/+11
|\| | | | | | | Change-Id: I171c7dbb6a74fe743c2eec63e86e9c0bef7c7dfd
| * QML: Split two QQmlData methods into fast/slow pathsErik Verbruggen2016-10-181-7/+11
| | | | | | | | | | | | | | | | | | The common case is that the property cache and the QQmlData itself are already created. By splitting the creation off into a slow-path method, these simple methods are cheap to inline. Change-Id: I73c702b5e66f35379647946a0c431561fd87499b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add QQuickApplication::displayName propertyBenjamin Terrier2016-10-181-0/+4
| | | | | | | | | | | | | | | | | | [ChangeLog][QtQuick] Add Qt.application.displayName property. Task-number: QTBUG-53091 Change-Id: I810eb381ac8e6151cbc07f3f66f2e661ff3e09f4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-10-181-4/+4
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4variantobject.cpp src/qml/types/qquickworkerscript.cpp src/quick/scenegraph/util/qsgdefaultpainternode_p.h tools/qmljs/qmljs.cpp Change-Id: I876242714ec8c046238d8fd673a5ace2455b2b59
| * Turn the no-network support into a configurable featureLars Knoll2016-10-101-4/+4
| | | | | | | | | | | | Change-Id: Ic70f60c124fe166b37fbe9b853735be3c5e0d46d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Enable making window-screen associations from QMLLaszlo Agocs2016-10-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt Quick provides a Screen attached property to query information about the screen an item's window belongs to. This is a good start, but has two problems: it lacks some virtual desktop related info (e.g. the position in the virtual desktop) and it cannot be used in combination with the Window element in order to achieve a QML equivalent of QWindow::setScreen(). Therefore add the missing virtualX and virtualY properties and introduce Qt.application.screens. The latter is an equivalent to QGuiApplication::screens() and is a JS array the elements of which can be set as the value of the new Window.targetScreen property. This means that a call like window->setScreen(QGuiApplication::screens()[0]) translates to Window { targetScreen: Qt.application.screens[0]; ... } when using the Window type from QML. Screen addition or removal can be acted upon via onScreensChanged. QQuickScreenAttached has been split into two in order to allow reusing the QScreen wrapping queries for other purposes as well. Task-number: QTBUG-56115 Change-Id: I4b2fbd873315b40d0afe878da2fc50966c00e2e0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-09-211-0/+33
|\| | | | | | | | | | | | | Conflicts: src/qml/compiler/qv4isel_moth_p.h Change-Id: I8e86a649d1ef8ad27dc66cc8c290093b2faabc69
| * Add qmlRegisterUncreatableMetaObject convenience functionBogDan Vatra2016-09-071-0/+33
| | | | | | | | | | | | | | | | | | qmlRegisterUncreatableMetaObject is needed to register Q_NAMESPACE QMetaObjects. Task-number: QTBUG-54982 Change-Id: I767dfcb15db647e0dceb0c37b17e64f2a5c1dd8f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Qml: replace 'foreach' with 'range for'Anton Kudryavtsev2016-09-201-2/+2
|/ | | | | | | Not all, just instances with low risk. Change-Id: Ie6b4530f748e04ccb90e7ef23415a91d6c377417 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge dev into 5.8Oswald Buddenhagen2016-08-221-2/+1
|\ | | | | | | Change-Id: If0f273d3d33cec20edda539de6372337c2e4e969
| * Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-191-2/+1
| |\ | | | | | | | | | Change-Id: I326616356ee26d4532c6d57558c43c919f0a900d
| | * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-181-1/+1
| | |\ | | | | | | | | | | | | Change-Id: I20c622263f40c322954328e4d10a8071db3ca6d1
| | | * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the Mac platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: Iea114ac73c01d74401bcd77373b41a825d2636c9 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Jake Petroules <jake.petroules@qt.io>
| | * | Doc: Remove references to Windows CEVenugopal Shivashankar2016-08-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The platform is not supported since Qt 5.7 Task-number: QTBUG-55331 Change-Id: I5a38940bd8ebf7dd62d04015e1738ee23ac65bb2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Merge remote-tracking branch 'origin/dev' into 5.8Liang Qi2016-08-161-20/+39
|\| | | | | | | | | | | | | | | Change-Id: Ib9f44a557bc1d9cf38058252efa0856c61f44c91
| * | | Qt object: Add exit(int)Cavit Sina Dogru2016-08-091-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is similar to the Qt.quit() function but also specifies the return code that the event loop will return. [ChangeLog][QtQml] Added exit(int retCode) method to the Qt global object. An application can call Qt.exit to specify a return code of the engine. Task-number: QTBUG-54360 Change-Id: Iaa319e6dc4d6b99dc3a5c01845e87b936fd2cab0 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | | QML: Make use of all inline bits for bindingBits on 64bit platformsErik Verbruggen2016-08-081-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also initialize the size of the bindingBits to the size of the inline value, so there is no need to check this every time a bit is set. Change-Id: I56be4511ceb6801d6a109a6ab78f7430124fa82b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | | Added Logging Category support to QMLDominik Holland2016-08-101-0/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New Logging Categories can be defined by using the LoggingCategory type and define a name for the category When the id of a valid LoggingCategory is provided as the first argument to console.log and friends the LoggingCategory is used instead of the default "qml" LoggingCategory [ChangeLog][QML Elements] Added a LoggingCategory type and added support for it to the console object Change-Id: Ifaeed5f71de6ea6d8172d8c838d6e7789c4d6b9d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QML: Introduce QQmlPropertyIndexErik Verbruggen2016-08-041-4/+14
| | | | | | | | | | | | | | | | | | | | | | | | This helps in making it clear when an index is a plain old number and when it consists of an encoded value type index. Change-Id: Ic50d95caf244ed0ee2d62bdba53910a371cfee04 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Reduce the amount of malloc calls when instantiating objectsSimon Hausmann2016-08-031-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For regular Qt types we currently perform three mallocs, one for the public class, one for the private and one for the declarative data. The latter we can fold quite easily into the malloc of the public class. The plan for the private is a bigger separate one ;-) Change-Id: I69973652ba70a4a238b491dff3d47a9db9a226f1 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | Remove some unused members on -no-qml-debugUlf Hermann2016-07-281-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | It's debatable if the uglification is worth the overhead of a few pointers. Change-Id: I63b55b2043b8752a94d4b862c3892915135a72b7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Qml: Create profiler adapters in the pluginsUlf Hermann2016-07-281-5/+0
| | | | | | | | | | | | | | | | | | | | | This way QtQml doesn't need to know the ctors. Change-Id: Ie74049092b5eb9837537591c0cf37ad1487e4066 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Remove some unnecessary includesUlf Hermann2016-07-261-1/+0
| | | | | | | | | | | | | | | Change-Id: I18f2b6f44decf5ecde45e20722541b9a18d60b16 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | QML: Unify property reads/writes and use accessorsErik Verbruggen2016-07-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pass property reads/writes through utility functions in QQmlProperty, which in turn will try to use accessors when available (and no interceptors have to be called). Change-Id: I60ecfc202b6024bfe4a33206a46299787b152546 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Qml: replace QStringLiteral with QL1SAnton Kudryavtsev2016-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or with QL1C in such cases: - if there is overloaded function - in QStringBuilder expressions Saves ~1.5 KB in text size. Build config: ubuntu 16.04 x64, gcc 5.3 Change-Id: Icc0789f1c244ce20a3182494b0c7f35c9d77e41d Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | QtQuick: clean up shader effect property connectionsErik Verbruggen2016-07-051-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't use a signal mapper, but handle the mapping using a custom slot object and a lambda to do the dispatching ourselves. - Don't do meta-calls by property name, but by index. - Cache the meta-object. - Resolve the property indices by using the QML property cache. For a shader with 6 property connections, the time spent goes from 320k instructions to 80k instructions (valgrind on x86_64). Task-number: QTBUG-53901 Change-Id: I2809198cf62f9716b3683798222203fc3e97fbb3 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-211-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/items/qquickflickable_p_p.h src/quick/items/qquickpathview_p_p.h tests/auto/qml/qqmltypeloader/tst_qqmltypeloader.cpp Change-Id: I77664a095d8a203e07a021c9d5953e02b8b99a1e
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-201-1/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jit/qv4targetplatform_p.h src/quick/accessible/qaccessiblequickitem_p.h Change-Id: Ic95075a5fad81ec997a61561bd65979dfa3b9d4d
| | * Fix reference to Windows RT which actually meant Windows Runtime.Jake Petroules2016-06-161-1/+1
| | | | | | | | | | | | | | | Change-Id: I701b25bc73cf84b1daae481eebfd2dc19003ce78 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | V4: make QQmlEnginePrivate::dereferenceScarceResources inlinable.Erik Verbruggen2016-05-041-22/+10
| | | | | | | | | | | | | | | | | | | | | | | | Done by giving the "expensive" part its own function, that's even unlikely to be called anyway. Change-Id: I35621fb0a764879f9339b9e23f210c66971ff5b7 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | | Remove QQmlCompiledData in favor of QV4::CompiledData::CompilationUnitSimon Hausmann2016-06-011-26/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlCompiledData used to contain the binary data for instantiating QML types in the QML VME. Nowadays the QML type compiler as well as the JavaScript compiler create a QV4::CompiledData::CompilationUnit. Change-Id: I155f62a5ecfb55a3fe230520231b6d8fd5b28ac9 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>