diff options
| author | Marc Mutz <[email protected]> | 2025-06-24 21:05:17 +0200 |
|---|---|---|
| committer | Marc Mutz <[email protected]> | 2025-06-25 03:43:40 +0200 |
| commit | d3beee248fe0197fb3cf533c6a55353b292c71f6 (patch) | |
| tree | 073290614655c9ab805476d4fb5c0d0d88a4dfa6 /src | |
| parent | 7d1e46509865f5e9dbf8190ef6b21aeb3b311c1b (diff) | |
QRangeModel: fix build with QT_NO_SCOPED_POINTER
Need to #ifdef it out of is_any_unique_ptr.
Alternatively, we could leave the QScopedPointer template
forward-declared in qscopedpointer.h, but what with the default
template arguments, I'd prefer not to.
Amends 424d6ebf13d594a5d27d98b577a5c3d316c91bbb.
Pick-to: 6.10
Change-Id: Ic15a333292189c0b10547982f2c2c7bc805884a2
Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/corelib/itemmodels/qrangemodel_impl.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/corelib/itemmodels/qrangemodel_impl.h b/src/corelib/itemmodels/qrangemodel_impl.h index d94a5944614..9e5a5e173f2 100644 --- a/src/corelib/itemmodels/qrangemodel_impl.h +++ b/src/corelib/itemmodels/qrangemodel_impl.h @@ -67,7 +67,12 @@ namespace QRangeModelDetails // TODO: shouldn't we check is_smart_ptr && !is_copy_constructible && !is_copy_assignable // to support users-specific ptrs? template <typename T> - using is_any_unique_ptr = is_any_of<T, std::unique_ptr, QScopedPointer>; + using is_any_unique_ptr = is_any_of<T, +#ifndef QT_NO_SCOPED_POINTER + QScopedPointer, +#endif + std::unique_ptr + >; template <typename T> using is_any_shared_ptr = is_any_of<T, std::shared_ptr, QSharedPointer, |
