Optimization in KDE Base
Make KFileItem a Q_MOVABLE_TYPE
The motivation for this change is that this reduces the memory usage of
a QList<KFileItem> a.k.a. KFileItemList, which is used extensively in
KCoreDirLister's API and in applications, by 32 bytes per item on a
64-bit system, and that it may also improve the performance in some
situations because many memory allocations are saved.
Some changes in KCoreDirListerCache were required because this class
stores raw pointers to KFileItems and expects that these always remain
valid. To guarantee that this is the case and that the KFileItems owned
by KCoreDirListerCache do not move, a new class NonMovableFileItem is
introduced, which inherits KFileItem, but is not a Q_MOVABLE_TYPE.
A better solution would be to modify KCoreDirListerCache such that it
does not need the KFileItem pointers any more. The current solution is
meant as a temporary workaround for this problem, to make it possible
to make the binary incompatible Q_MOVABLE_TYPE change for KFileItem
before KF5 is frozen for such changes.