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.
Attachments
For Gerrit Dashboard: QTBUG-112464 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
475080,3 | Make QPointer<T> constructible from QPointer<X> | dev | qt/qtbase | Status: MERGED | +2 | 0 |
475556,5 | QPointer: also make conversion to pointer-to-const work | dev | qt/qtbase | Status: MERGED | +2 | 0 |