diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2019-02-06 16:02:19 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-02-08 11:40:17 +0000 |
commit | fb2fb95f8b6d23715728b702ccdb9ec5587872a9 (patch) | |
tree | 9de18dd57f54c1a6275950075b0a47c3552f8516 /src/qml/types/qqmlmodelsmodule.cpp | |
parent | 56a5103781a17a2ae0369bbd468d7103d8df6d6b (diff) |
Make QQmlRefCount usable for immutable types
refcounting should still be possible if the object is const. You can
safely take and release references to const objects, after all. operator
delete also works for const pointers.
Therefore, make the refCount member mutable and declare addref() and
release() as const. Additionally, drop the unused destroy() method and
make the dtor protected for marginally more protection from accidental
manual deletion.
Plus, refcounted types should really not be copied or moved.
Change-Id: I28fdc96c60b6ed5a056782568717c16b76234883
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/types/qqmlmodelsmodule.cpp')
0 files changed, 0 insertions, 0 deletions