aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmllistmodelworkeragent_p.h
Commit message (Collapse)AuthorAgeFilesLines
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Fix failed assertions coming from the QML list modelLars Knoll2017-12-291-25/+2
| | | | | | | | | | | | | | | | | | | | | | | QAbstractItemModel has become more strict in sanity checking the arguments of beginInsertRows and friends with change 00c09e752ff7e482e1308e0e34721dc979204595 in qtbase. Unfortunately, the QML list model was feeding it out of bound rows in some cases, leading to failed assertions. Fix this properly, by calculating the inserted/removed and changed rows on the fly when syncing the list model from the worker thread. Adjust the code in the XML list model as well, so it does call things in the proper order. Fix two tests, one for a minimal change in behavior (more correct now), the other to remove an assertion that is not valid anymore in debug builds (where assertions in QtCore will call rowCount()). Change-Id: Ied85269f78d41b64e06388590be3ed227ac88fdb Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Qml: add missing 'override'Anton Kudryavtsev2016-10-061-1/+1
| | | | | | | ... and drop redundant 'virtual' Change-Id: I8c0d589557f590eb528e80414d9c002504ccb12a Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* V4: allow inlining of ExecutionEngine::{qml,js}Engine()Erik Verbruggen2016-05-201-0/+1
| | | | | | | | All other changes are just to be able to include qv8engine_p.h in qv4engine_p.h Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-071-1/+2
|\ | | | | | | Change-Id: Icfa1d61fcc286c3418d4a625de11d2191336fa60
| * QQmlListModelWorkerAgent: fix -Wmisleading-indentation warning (GCC 6, genuine)Marc Mutz2016-03-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Says GCC 6: qtdeclarative/src/qml/types/qqmllistmodelworkeragent_p.h: In member function ‘QQmlListModelWorkerAgent::VariantRef& QQmlListModelWorkerAgent::VariantRef::operator=(const QQmlListModelWorkerAgent::VariantRef&)’: qtdeclarative/src/qml/types/qqmllistmodelworkeragent_p.h:94:34: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation] if (a) a->release(); a = o.a; ^ qtdeclarative/src/qml/types/qqmllistmodelworkeragent_p.h:94:13: note: ...this ‘if’ clause, but it is not if (a) a->release(); a = o.a; ^~ This one is correct. Change-Id: I6315e4afa6a0cf8bb4dd3a599bd7ffe7b6a5c1e4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Provide a proper constructorFrank Meerkoetter2015-12-151-1/+5
|/ | | | | | | | Fixes coverity CID10755. A proper constructor enforces that the 'Sync' type is properly initialized. Change-Id: I8a4758e5bb1cfea09664961b3d32db5ddf0e4515 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.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>
* Reduce v8engine dependency for the list modelLars Knoll2015-01-081-1/+1
| | | | | Change-Id: Ib9e39a886c918a8f6ee1477465895739f90e1a0a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* 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>
* Fixup list model serializationLars Knoll2013-05-241-0/+18
| | | | | | | | We need to properly refcount the agent, so it doesn't get deleted when it's still in use. Change-Id: Id9a0764e15c10e7b15a216523d6b22764ac863dc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of Get/SetHiddenValue in the v8 APILars Knoll2013-05-241-17/+0
| | | | | | | | | | It was only used to mark an object as something to be used as a binding. Simply use one of the free bits in QV4::Managed for that. Also changed a bit more code over from v8 to v4. Change-Id: I6e787e611041e058fe109df1d7a13598655f8eba Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup v8 dependencies from QQmlV8FunctionLars Knoll2013-05-081-3/+3
| | | | | | | ... and rename it to QQmlV4Function Change-Id: Iad72347babf62691e26306877d4f229fda127eb7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Rename QQmlV8Handle to QQmlV4HandleLars Knoll2013-04-191-2/+2
| | | | | | | | | The handle wraps a V4 Value, so this is the better name for it. Also added some accessor methods to convert to and from V4 Values. Change-Id: I327c83feb5bd3be59909001489979e5a3a9d9e67 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move QML types to types folderAlan Alpert2013-03-141-0/+156
The QtQml module has gain a bunch of QML types cluttering up the qml folder. Moving them to types organizes them a bit better. Change-Id: I570884c00f4abc48f4f1aea048bf002bc70223f3 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>