aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/types/qqmldelegatemodel_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Get rid of most uses of ValueRefLars Knoll2015-01-231-6/+6
| | | | | | | | | | | | Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove all the setVTable() calls that aren't required anymoreLars Knoll2015-01-211-1/+0
| | | | | | | | The memory manager's allocation methods now set this up correctly for us :) Change-Id: I8492bf732df601f95a1a851fb3804127ffc83935 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Cleanup destruction of heap objectsLars Knoll2014-11-211-2/+1
| | | | | | | | Generate the code from a macro instead of duplicating boiler plate code. Operate on Heap::Base instead of Managed. Change-Id: I84c5a705980899be3e5b931a093645e50d3923bf Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move data of some Qml related objects into Heap namespace.Lars Knoll2014-11-101-11/+19
| | | | | Change-Id: I6e6b24466de1e49efd5f3eaa67db82873170445b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move Object::Data into the Heap namespaceLars Knoll2014-11-081-2/+2
| | | | | Change-Id: I9d30081f71b83bc86f5e5714e23396b18c4d54c5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Simon Hausmann2014-08-261-1/+1
|\ | | | | | | | | | | Conflicts: src/qml/qml/qqmlobjectcreator_p.h Change-Id: I60858ddb46866a8fa1a8576bb05b412afeeb4e41
| * The cached objects can be deleted, so keep them in a QPointer.Gunnar Sletta2014-08-141-1/+1
| | | | | | | | | | | | Change-Id: Ieaebd2e7b9823cbe22efc331e42ceab8fbbda0e8 Task-number: QTBUG-40201 Reviewed-by: Lars Knoll <lars.knoll@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>
* | Cleanup: Get rid of __data membersSimon Hausmann2014-07-221-4/+0
| | | | | | | | | | | | | | These are not needed anymore Change-Id: Ib834aa294e84ca9fbdd5b6850d5bc172e8b54ba1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix Managed::as<>() methodLars Knoll2014-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The as<> casting method was not doing the right thing in 100% of the cases. It only checked if the object in question was exactly of the type being asked for. It however didn't check if the object was derived from the type. This commit fixes this by adding a parent chain to the vtables, that is then being used to check this safely at runtime. Change-Id: I9e0b13adbda668aee8c7451e2bb71cd6d4e316d9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Convert delegate model and indexed builtin functionLars Knoll2014-07-221-8/+7
| | | | | | | | | | Change-Id: Ic7d50aa472d6a1bafadb6641f88b5f89a9b893ad Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Rename V4_OBJECT_NEW back to V4_OBJECTLars Knoll2014-07-221-1/+1
| | | | | | | | | | | | | | | | The _NEW variant was there only temporarily to aid converting to the new data layout. Change-Id: I1d126ee0999c8f0a49f5a08c2e8c090497dd6dd5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix QQmlDelegateModelChangeArrayLars Knoll2014-07-221-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | The class had a vtable, clashing with assumptions about Managed objects. The derived classes where actually only cosmetic sugar on top of the basic change class. Clean this up and unify the functionality in the base class. In addition adjust the class to the new data layout. Change-Id: I8677f6c71465381f7ebdf82eb6025fda6d137ec3 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* | Fix crash in QQmlDelegateModel during destruction phaseSimon Hausmann2014-06-241-1/+1
|/ | | | | | | | | | | | | It has been reported multiple times (with different back traces) that the QQmlDelegateModel tries to access a dangling QQmlContext pointer. The scenarios for reaching this point differ slightly, one such scenario is very late model activity during the scene destruction. The provided test-case simulates that and the provided patch guards the QQmlContext in a QPointer. Task-number: QTBUG-39780 Change-Id: I594ee4918cd1b78c5db5c164314e85e9eea99fbd Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
* Implement proper support for layoutChange in QQmlDelegateModelDaniel Vrátil2014-05-121-0/+2
| | | | | | | | | | | | | | | | | | | | | Current implementation is treating model layoutChange the same way as modelReset, which causes problems when using ListView on top of a QSortFilterProxyModel. The model emits layoutChanged whenever a data within sorting column change. Treating it as modelReset leads to poor performance on large models and caused UI issues, because the scrolling position is reset every time. This patch implements proper handling for layoutChanged signals by first handling all items moves and then simulating dataChange for all items. This fixes regression from Qt 5.1 introduced by Change I16b859d9 Task-number: QTBUG-37983 Task-number: QTBUG-34391 Change-Id: I6d3873b7b87e7f0e8fc0c1ed5dc80c6f8fdf6c22 Reviewed-by: Albert Astals Cid <albert.astals@canonical.com> Reviewed-by: Michael Zanetti <michael.zanetti@canonical.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Prevent a crash when the item is deleted but not removed from cacheAndy Shaw2014-04-181-1/+1
| | | | | | | | | | | | | | If the item is not removed from the cache when it is deleted then the cache can end up pointing to an invalid item which when accessed will cause a crash. Task-number: QTBUG-38430 [ChangeLog][QtQml] Prevent a crash when the item is deleted but is not removed from the QQmlDelegateModel's cache. Change-Id: I8cf76b014be62a432d909a3573231cec84a6d678 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Split ManagedVTable into two classesLars Knoll2014-01-211-2/+2
| | | | | | | | Keep the basic methods in ManagedVTable, but have the Object related stuff in an ObjectVTable class. Change-Id: I9b068acf3caef813686227b8d935e7df1a7d1a6e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move the vtable pointer from the object to the internal classLars Knoll2013-12-041-1/+1
| | | | | | | | This saves one pointer per object, and willmake other optimizations easier in the future. Change-Id: I1324cad31998896b5dc76af3c8a7ee9d86283bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Simplify & speed up function callingLars Knoll2013-11-091-3/+3
| | | | | | | | | Get rid of the SimpleCallContext, instead simply use the CallContext data structure, but don't initialize the unused variables. Change-Id: I11b311986da180c62c815b516a2c55844156d0ab Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove most uses of Value from qml/qmlLars Knoll2013-09-301-6/+6
| | | | | Change-Id: I409a8505a9e01f86d777bc694d24516d1c8f0c4d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert most remaining return values from Value to ReturnedValueLars Knoll2013-09-181-4/+4
| | | | | Change-Id: If8b0c3b91be50678693868c10fefc3678008834d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert builtin methods to return a ReturnedValueLars Knoll2013-09-181-3/+3
| | | | | Change-Id: I6b75adbf53a5be0deab023d2eed98ce2a7915551 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Allow QtQuick private headers to be used with QT_NO_KEYWORDS.Jocelyn Turcotte2013-09-121-4/+4
| | | | | | | | | | | This is necessary for the QtWebEngine module. This also adds an empty nokeywords test using the same mechanism as qtbase/tests/auto/tools/moc/no-keywords.h to find conflicts at compile time. Change-Id: I9df541720797dd61f078178c2af68ead18ff8bfe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of the first half of QQmlGuard usageLars Knoll2013-07-051-2/+2
| | | | | | | | | QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove the last v8 dependency from the delegate modelLars Knoll2013-06-071-3/+18
| | | | | | | Don't use a qv8objectresource for the items anymore. Change-Id: I5aadd58bf432e0a8984234c03a369aaea92c5f9e Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert more of the delegate model to v4Lars Knoll2013-06-071-1/+0
| | | | | Change-Id: Ie74d092d9e4fbe66131a61ca7e2e713ef797214d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Port the first half of the delegate model code to v4Lars Knoll2013-06-051-16/+14
| | | | | Change-Id: Ieda3de0a297ba15e4d6634a1123df27347830cfa Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move QV8QObjectWrapper::newQObject into QV4::QObjectWrapperSimon Hausmann2013-06-051-1/+1
| | | | | | | | ...where it is just called wrap(), because it doesn't always create a new JS wrapper for the QObject. Change-Id: Ieed0fc97174eb51cd04df0149e715c234a5822bd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Cleanup v8 dependencies from QQmlV8FunctionLars Knoll2013-05-081-1/+1
| | | | | | | ... and rename it to QQmlV4Function Change-Id: Iad72347babf62691e26306877d4f229fda127eb7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Convert qqmldelegatemodel to not use v8::PersistentLars Knoll2013-05-081-4/+1
| | | | | Change-Id: I337aaa546f7fa93c829ad0f3c1f651347e93f8d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of v8::LocalLars Knoll2013-05-061-10/+10
| | | | | | | | | The class was doing exactly the same thing as v8::Handle in our implementation. Removing it cleans up quite a bit of code. Change-Id: I37a3dcdef062fc388751e9ef0a158b5926ba2efb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move QML types to types folderAlan Alpert2013-03-141-0/+411
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>