Details
-
Suggestion
-
Resolution: Fixed
-
P3: Somewhat important
-
None
-
None
-
5
-
5f28d367d (dev), d026fad3d (dev)
-
Foundations Sprint 79, Foundations Sprint 80, Foundation Sprint 81, Foundation Sprint 82
Description
static_assert(std::is_convertible_v<QPointer<QWidget>, QPointer<QObject>>, "is not covertable");
raises an error.
After adding:
template<typename Up, typename = std::enable_if_t<std::is_convertible_v<Up *, T *>>>
QPointer(const QPointer<Up> &p) noexcept
: QPointer{p.data()}
{}
the code passes.
It would be quite handy if QPointer could be convertable.