diff options
author | Marc Mutz <marc.mutz@qt.io> | 2021-11-05 11:24:44 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@qt.io> | 2021-11-06 00:05:15 +0100 |
commit | 570485be95275f8535f65d1de0668c6037e02ee0 (patch) | |
tree | 006d7fb9a75a45487da0543b3cb6417f94caa9bc /src/corelib/global/qoperatingsystemversion.h | |
parent | a07598e47ba4359accd6d0a8060d37f1e03db550 (diff) |
QArrayDataOps: fix QList range ctors with mixed value_type in C++20 builds
The QList<X> range ctor is supposed to accept iterators with
value_types convertible to X, e.g. tst_qitemselectionrange passes
iterator to a container of QModelIndex to the ctor of a
QList<QPersistentModelIndex>. But copyAppend() is not a template, so
trying to pass QModelIndex* when QPersistentModelIndex* is expected
errors out.
Fix by taking the copyAppend() path only if the types match.
Amends 507be11303c8dd9709d903f8e5ec197be66209ce.
Change-Id: I5e3ff84a80dc05dafde5572463b33df9002c8fe0
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'src/corelib/global/qoperatingsystemversion.h')
0 files changed, 0 insertions, 0 deletions