aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* QDoc: Fix syntax error on the definition of the Q_GADGETHolger Hans Peter Freyther2017-07-131-1/+1
| | | | | Change-Id: I1a0ec09441e7791bcdaf34f16a71be9e535625f0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Add \keyword for "Grouped" and "Attached" property topicsVenugopal Shivashankar2017-07-034-5/+5
| | | | | | | This enables searching the index list for the \keyword in Qt Creator Change-Id: Ic8fde82def48c4d0f4cbf0e75bc862e00ca3ca65 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.9.1' into 5.9Liang Qi2017-06-303-9/+11
|\ | | | | | | Change-Id: I3fc699beeb45e01abc644018db53f3c75d396f7c
| * Merge 5.9 into 5.9.1Oswald Buddenhagen2017-06-1910-12/+21
| |\ | | | | | | | | | Change-Id: I4154bf5f6f0b74176e333541372511d47d408546
| * | Fix QML compiler crashes on big endian systemsDmitry Shachnev2017-06-183-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit be491913c036b148 changed QV4::CompiledData::Unit to use LEUInt32 structures internally, rather than native uints, however the generators were not updated at that time and still wrote native uints. Also initialize constants field of CompilationUnit to prevent crashes in unlink() where operator delete[] is called. Change-Id: Id6c6e6ad519c9927ba6027479689ecfde9ea86de Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Fix ObjectModel::move() to mark the changes as movesJ-P Nurmi2017-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QQmlObjectModel::move() created a QQmlChangeSet with moveId -1, which made item views and controls see the changes as removals and insertions, because QQmlChangeSet::Change::isMove() returned false. Consequently, item views did not update the current index when the current item was moved. Task-number: QTBUG-60894 Change-Id: I4a64b7670c1fae12337995627437cc83efb9f1ef Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | | Fix alignment issue on ARMv7Simon Hausmann2017-06-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As analyzed in the bug report, it appears that we may get QV4::CompiledData::Function pointers for writing that are not aligned for the 64-bit fields at the beginning. [ChangeLog][QtQml] Fix crash due to misaligned data structures on ARMv7 Task-number: QTBUG-61552 Change-Id: I6b2c166b725496150c8850475577628ccd811d65 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
* | | 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>
* | | Silence -Wuninitialized warningAllan Sandfeld Jensen2017-06-201-0/+3
| |/ |/| | | | | | | | | | | | | Task-number: QTBUG-61089 Change-Id: I8b1fb03d040b04b3b14f371bf1a5ba8c2318054f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 784ea8c09d448a418b3128be8bee14d9535e36c9)
* | 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>
* | Doc: Avoid copyright text in the codeblock by using \snippetVenugopal Shivashankar2017-06-165-9/+12
| | | | | | | | | | | | Change-Id: Ib6f1a1e796a085d0f274c7e87d4ed1314e958a06 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | Prospective build fix for qml compiler on WindowsSimon Hausmann2017-06-141-1/+1
| | | | | | | | | | | | | | | | | | Do not try to decorate the internal MoveMapping class with an export macro that becomes an import macro on usage, when using it in the context of QtQmlDevTools. Change-Id: Id5349763572a144ac7d51d0af1f07d6cc19d683d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | 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>
* Use pre-generated QML caches even if they are not writableAlexander Volkov2017-06-091-1/+1
| | | | | | | For example, if they are installed into system paths. Change-Id: Id14ccfbe57c5bcf273c79510034dc20400073451 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Change temp allocation when generating IRLars Knoll2017-06-095-56/+155
| | | | | | | | | For functions that won't get optimized, it's useful to limit the number of temporaries as much as possible. Change-Id: I6e9be3129c064fdc4c01e1ec6f1617e901c05935 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Doc: Simplify documentation about integrating QML and C++Venugopal Shivashankar2017-06-086-1/+352
| | | | | Change-Id: If110d02aad991646054ee6e522549c07f00946e1 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Fix gcc5 miscompile of qle_bitfieldVille Voutilainen2017-06-081-0/+4
| | | | | | | Task-number: QTBUG-61123 Change-Id: I124d925846a2f485f7b69870c5eebc7f7f6b50f7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix integer divisionErik Verbruggen2017-06-081-1/+3
| | | | | | | | 0/-1 == -0.0 in JS, which cannot be encoded in an int. Change-Id: Ice5b09fa3d42dc24d543d4581d77c6bfa743b2ca Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Jit: fix unary minus for integersErik Verbruggen2017-06-071-0/+9
| | | | | Change-Id: Ib2cdfe6f09528d169e9ea6f8b872de875317c9c9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Move Q_REQUIRED_RESULT to the beginning of the declarationThiago Macieira2017-06-031-2/+2
| | | | | | | That's the correct place and works with C++11 attributes. Change-Id: I7814054a102a407d876ffffd14b6a2f74423c222 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-313-10/+15
|\ | | | | | | Change-Id: I3f77593ca944114534fff5df26bbb09150ee4400
| * QQmlIRBuilder: Only query type name cache for type namesRobin Burchell2017-05-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The behavior here was always incorrect: type names must start with an uppercase letter, so querying the type name cache with a lowercase string is wrong. However, this was turned into a larger problem by making more extensive use of QQmlTypeNameCache in e74a1d0b342f2c95dc3a543c8c9ec07fd52d8fe0, as it contained a lot of new types (including composite types, which previously were only in the cache if they were singletons). Task-number: QTBUG-60547 Change-Id: I40be2d535e99d3e1af250d995d7149ecbe2965d7 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * don't try to pull in the regular config headers when bootstrappingOswald Buddenhagen2017-05-192-8/+12
| | | | | | | | | | | | Task-number: QTBUG-60675 Change-Id: I7ae9ab4f442d34f6eaa770652029b5dfccef346a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add sections and update purposes of featuresStephan Binner2017-05-301-3/+6
| | | | | | | | | | | | Change-Id: I95923fa183172bb4fe5d0a6ae34c801e0cee2a63 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Revert "Fix compilation of QtScxml"Liang Qi2017-05-231-4/+0
| | | | | | | | | | | | | | | | | | | | This reverts commit 3f9367cb32533b691cb8c761213f21a524e3d1cb. QtScxml adapted to new API. Task-number: QTBUG-60938 Change-Id: I417b604ceb9949ee3c0197ac9f88efdbe53ebe48 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QtQml: Restrict alloca definition to MSVCFriedemann Kleint2017-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix developer build with MinGW: In file included from memory\qv4mm.cpp:60:0: jsruntime/qv4alloca_p.h:62:0: error: "alloca" redefined [-Werror] # define alloca _alloca ^ In file included from .../mingw32/i686-w64-mingw32/include/stdlib.h:686:0, from .../mingw32/i686-w64-mingw32/include/c++/cstdlib:72, from .../mingw32/i686-w64-mingw32/include/c++/bits/stl_algo.h:59, from .../mingw32/i686-w64-mingw32/include/c++/algorithm:62, from .../qtbase/src/corelib/global/qglobal.h:109, from ...\qtbase\include/QtCore/qglobal.h:1, from jsruntime/qv4global_p.h:54, from jsruntime/qv4engine_p.h:53, from memory\qv4mm.cpp:40: .../mingw32/i686-w64-mingw32/include/malloc.h:183:0: note: this is the location of the previous definition #define alloca(x) __builtin_alloca((x)) Amends change a225bddf67f4786c845193630d4ab20b99a2fc3a. Change-Id: I4a758776dbf78225f62883393eb50b7121297a1b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix compilation of QtScxmlLars Knoll2017-05-221-0/+4
| | | | | | | | | | | | | | | | | | QtScxml was using internal API in v4, that has changed. Restore the old function signature until all it's uses have been cleaned up. Task-number: QTBUG-60938 Change-Id: Ie40c09da9df9e5684972669cd9a511a868b920a4 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Get rid of the MemoryManager pointer inside StringLars Knoll2017-05-195-14/+11
| | | | | | | | | | | | | | We can always get the pointer through the internalClass. Change-Id: If68432845e7c67da70d9e19aef1a90ebe1e6056b Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Move the engine() accessor from Object to ManagedLars Knoll2017-05-1918-89/+71
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Get rid of the old way of defining builtin functionsLars Knoll2017-05-196-117/+22
| | | | | | | | | | | | | | | | | | | | The old calling convention used for builtin functions is very inefficient. It was still being used in a few places. Clean those up and convert them to the new and much more effiecient calling convention. Change-Id: I6b769c6185df7e9be1e80709330fc1ca868576c1 Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
* | Optimize marking of prototypes in the InternalClass treeLars Knoll2017-05-192-17/+16
| | | | | | | | | | | | | | | | | | There's no need to iterate over all internal classes, as prototype changes always happen in the first or second level of the tree. Change-Id: I99bf11a6cd238286c1547922d61ab47319b6eb97 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Give standard objects a bit more inline storage by defaultLars Knoll2017-05-191-1/+1
| | | | | | | | | | | | | | | | | | Make sure we have at least 2 slots for inline storage available for regular JS objects. Speeds up JS execution quite a bit, while still keeping memory consumption low for most other cases. Change-Id: I01824d8db1ffd828c1c1b6a9cbcf9bf1a9070ec3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Optimize lookups in the internalClassLars Knoll2017-05-194-23/+47
| | | | | | | | | | | | | | | | Inline the version taking an identifier, and use that one where it makes sense. Change-Id: I414c5999e61cdba219ecd1080957f3037dfebc1b Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Optimize lookups based on IC changesLars Knoll2017-05-193-24/+31
| | | | | | | | | | Change-Id: I1f4f4aaad0c8194bce2ebde4503df38cab0990a2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move the prototype into the internal classLars Knoll2017-05-1916-118/+215
| | | | | | | | | | | | | | | | | | | | This saves another pointer on all Objects. Currently introduces a slight performance regression on some of the v8 benchmarks, that needs addressing. Change-Id: I87de8e1d198d2683f4e903c467ce2a60ba542243 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move the internalClass field from Heap::Object to Heap::BaseLars Knoll2017-05-1924-36/+81
| | | | | | | | | | | | | | | | | | | | | | | | And do not store the vtable in Heap::Base anymore. This change makes the internal class the main distinguishing feature of all garbage collected objects. It also saves one pointer on all Objects. No measurable impact on runtime performance. Change-Id: I040a28b7581b993f1886b5219e279173dfa567e8 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add support for storing the Vtable in the InternalClassLars Knoll2017-05-192-25/+59
| | | | | | | | | | | | | | | | | | Prepare for moving the vtable pointer into the internalClass. This adds the required infrastructure to InternalClass, so it can store a vtable pointer and properly handles vtable changes. Change-Id: I688fee1647268dd185d0f9636ab5b3390465daca Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Properly encapsulate all accesses to the vtableLars Knoll2017-05-194-15/+15
| | | | | | | | | | Change-Id: I3f6ae59d01c7b6c898e98d3b6f65b84a19b8851a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Add ICs for String, MemberData and ArrayDataLars Knoll2017-05-197-3/+18
| | | | | | | | | | Change-Id: I43ddcb4842e501cbea8a950ab6ffa2d906014efd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move the list of default internal classes into EngineBaseLars Knoll2017-05-1916-89/+97
| | | | | | | | | | | | | | | | And store them in an enumerated array. This will simplify upcoming changes. Change-Id: I82eac03b9f6264843ae625e36e150464fe08be9d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move the EngineBase class into it's own header fileLars Knoll2017-05-194-35/+101
| | | | | | | | | | Change-Id: Idf87618e4ebff99f3b3c269c950191d67a0182b2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Move a few more members from ExecutionEngine to EngineBaseLars Knoll2017-05-193-14/+9
| | | | | | | | | | Change-Id: I5d1e0d2251e04cc871f9c298849aafac17f23fbf Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Smaller cleanupsLars Knoll2017-05-191-22/+18
| | | | | | | | | | | | | | | | Don't store the current context in Moth's run() method, instead always retrieve it through the engine. Change-Id: I9d56f2c93a02fc1e2f03839b14b3c0053d60b6b2 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Optimizations to the generated byte codeLars Knoll2017-05-194-97/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cut the size of the generated byte code in half, by storing parameters in a more compact form and always storing the instruction type in the instruction. We can still used computed goto's for a fast interpreter, by looking up the jump point for the next instruction in the jump table. Another advantage is that the byte code is now platform independent (modulo endianness). The change comes with a 3% performance impact on x86_64, which is acceptable considering the size savings on the bytecode. Change-Id: I37de3e1f94611987a85e65ea86536583aa965d6d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Free up completely empty Chunks, and return the memory to the OSLars Knoll2017-05-192-9/+27
| | | | | | | | | | | | | | | | Detect any Chunk that's completely empty, deallocate it and return the memory to the OS (as far as that's supported). Change-Id: I6b6a77f2cdf478cbf16aad30a9cae37c98c6500e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix QML Connections element ignoring the enabled propertyThomas McGuire2017-05-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | The enabled property was ignored if it was set before componentComplete() was called. [ChangeLog][QtQml] Fixed the QML Connections element ignoring the initial state of the enabled property Change-Id: I40c92fcb30f0bb8ca406f248b3bde2fced5ab58f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | qmlcachegen: Fix MinGW developer buildFriedemann Kleint2017-05-162-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | MinGW was unable to link qmlcachegen due to missing symbols from the autotest-exported class QV4::ExecutableAllocator. Introduce a separate Q_QML_AUTOTEST_EXPORT macro that is defined to empty when used by qmldevtools. Change-Id: Ib7f8984dd7617fae05bb4e1e6cc1fae0745ac3bc Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Disable loop peelingLars Knoll2017-05-121-1/+5
| | | | | | | | | | | | | | | | | | | | Loop peeling does in our current JIT not give us any measurable performance benefits (no measurable diff in any of the v8 benchmarks), and significantly increases the size of the generated JIT code. Change-Id: Icab7887300f9c1cd5891983cbfe5885fc2b4db91 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>