January 2019
Intermediate to advanced
384 pages
11h 50m
English
One will often hear that Qt containers haven't changed since the Qt 4 days, but that is not entirely true. Not much work has been done, but there hasn't been a standstill either. First, the move constructors and assignment operators were added in Qt 5.2 for the container classes, as can be seen in the definition of QMap:
QMap(QMap<Key, T> &&other)QMap<Key, T> & operator=(QMap<Key, T> &&other)
As the Qt containers all support COW copies, they are cheap but they are not completely free. So, the move semantics were added for additional optimization.
Another change which was done in Qt 5.4 was adding the support for C++11 reference qualifiers, a move-semantics-related feature we haven't yet discussed. The idea for that feature ...
Read now
Unlock full access