[Development] Qt 5 types under consideration for deprecation / removal in Qt 6

Mutz, Marc marc at kdab.com
Thu May 30 10:40:20 CEST 2019

On 2019-05-30 10:23, Alberto Mardegan wrote:
> It's not clear to me why splice() cannot be implemented: it would just
> mean that the list data would detach as in all other non-const methods.
> Or am I missing something?

You're passing two iterators. In order to implement slice(), you'd need 
to iterate over the list, counting the items, then detach, find the new 
two iterators, then do the slice(). That makes an O(M) operation into an 
O(2N) operation, M being the number of sliced entries (it was O(1) in 
C++98), N the size of the list.

More information about the Development mailing list