Skip to content

Commit

Permalink
qvariant: Pass a couple of large types by const-ref in Qt6
Browse files Browse the repository at this point in the history
sizeof is approx 100 bytes

Change-Id: Ibd5fb50674effee832ce4529d737c060c570ffa3
Reviewed-by: Marc Mutz <[email protected]>
  • Loading branch information
iamsergio authored and marc-kdab committed Jul 22, 2015
1 parent e3d0ea7 commit b549758
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/corelib/kernel/qvariant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
}
Expand Down Expand Up @@ -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)
{
}
Expand Down
8 changes: 8 additions & 0 deletions src/corelib/kernel/qvariant.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,11 @@ class Q_CORE_EXPORT QSequentialIterable

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;
Expand Down Expand Up @@ -660,7 +664,11 @@ class Q_CORE_EXPORT QAssociativeIterable

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;
Expand Down

0 comments on commit b549758

Please sign in to comment.