From b549758c6101aac382769235cbef32323c1d3678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Sun, 19 Jul 2015 01:56:46 +0100 Subject: [PATCH] qvariant: Pass a couple of large types by const-ref in Qt6 sizeof is approx 100 bytes Change-Id: Ibd5fb50674effee832ce4529d737c060c570ffa3 Reviewed-by: Marc Mutz --- src/corelib/kernel/qvariant.cpp | 8 ++++++++ src/corelib/kernel/qvariant.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp index f7a4abbf68..35f178e6a9 100644 --- a/src/corelib/kernel/qvariant.cpp +++ b/src/corelib/kernel/qvariant.cpp @@ -3832,7 +3832,11 @@ QDebug operator<<(QDebug dbg, const QVariant::Type p) /*! \internal */ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QSequentialIterable::QSequentialIterable(QtMetaTypePrivate::QSequentialIterableImpl impl) +#else +QSequentialIterable::QSequentialIterable(const QtMetaTypePrivate::QSequentialIterableImpl &impl) +#endif : m_impl(impl) { } @@ -4140,7 +4144,11 @@ QSequentialIterable::const_iterator QSequentialIterable::const_iterator::operato /*! \internal */ +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) QAssociativeIterable::QAssociativeIterable(QtMetaTypePrivate::QAssociativeIterableImpl impl) +#else +QAssociativeIterable::QAssociativeIterable(const QtMetaTypePrivate::QAssociativeIterableImpl &impl) +#endif : m_impl(impl) { } diff --git a/src/corelib/kernel/qvariant.h b/src/corelib/kernel/qvariant.h index bb996af121..27b19982de 100644 --- a/src/corelib/kernel/qvariant.h +++ b/src/corelib/kernel/qvariant.h @@ -607,7 +607,11 @@ public: friend struct const_iterator; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) explicit QSequentialIterable(QtMetaTypePrivate::QSequentialIterableImpl impl); +#else + explicit QSequentialIterable(const QtMetaTypePrivate::QSequentialIterableImpl &impl); +#endif const_iterator begin() const; const_iterator end() const; @@ -660,7 +664,11 @@ public: friend struct const_iterator; +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) explicit QAssociativeIterable(QtMetaTypePrivate::QAssociativeIterableImpl impl); +#else + explicit QAssociativeIterable(const QtMetaTypePrivate::QAssociativeIterableImpl &impl); +#endif const_iterator begin() const; const_iterator end() const;