apply upstream commit

upstream commit:
113e921684

Signed-off-by: Ivailo Monev <xakepa10@laimg.moc>
This commit is contained in:
Ivailo Monev 2019-06-26 13:32:03 +00:00
parent 3709c00891
commit 4575b97b6b
3 changed files with 2 additions and 4 deletions

View file

@ -230,8 +230,6 @@ private:
template <typename T>
inline QLinkedList<T>::~QLinkedList()
{
if (!d)
return;
if (!d->ref.deref())
freeData(d);
}

View file

@ -159,7 +159,7 @@ public:
inline QMap() : d(&QMapData::shared_null) { d->ref.ref(); }
inline QMap(const QMap<Key, T> &other) : d(other.d)
{ d->ref.ref(); if (!d->sharable) detach(); }
inline ~QMap() { if (!d) return; if (!d->ref.deref()) freeData(d); }
inline ~QMap() { if (!d->ref.deref()) freeData(d); }
QMap<Key, T> &operator=(const QMap<Key, T> &other);
#ifdef Q_COMPILER_RVALUE_REFS

View file

@ -84,7 +84,7 @@ public:
explicit QVector(int size);
QVector(int size, const T &t);
inline QVector(const QVector<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
inline ~QVector() { if (!d) return; if (!d->ref.deref()) free(p); }
inline ~QVector() { if (!d->ref.deref()) free(p); }
QVector<T> &operator=(const QVector<T> &v);
#ifdef Q_COMPILER_RVALUE_REFS
inline QVector<T> operator=(QVector<T> &&other)