Deal the wrappers in shared_ptr instead of unique_ptr

Easier to pass around and better for our use case, where we
actual can have shared usage
This commit is contained in:
Sergio Martins
2022-04-04 22:14:19 +01:00
parent c94705593f
commit 55ab08129a
10 changed files with 24 additions and 24 deletions

View File

@@ -224,14 +224,14 @@ bool ViewWrapper_qtwidgets::is(Type t) const
return false;
}
std::unique_ptr<ViewWrapper> ViewWrapper_qtwidgets::window() const
std::shared_ptr<ViewWrapper> ViewWrapper_qtwidgets::window() const
{
return std::unique_ptr<ViewWrapper>(new ViewWrapper_qtwidgets(m_widget->window()));
return std::shared_ptr<ViewWrapper>(new ViewWrapper_qtwidgets(m_widget->window()));
}
std::unique_ptr<ViewWrapper> ViewWrapper_qtwidgets::parentView() const
std::shared_ptr<ViewWrapper> ViewWrapper_qtwidgets::parentView() const
{
return std::unique_ptr<ViewWrapper>(new ViewWrapper_qtwidgets(m_widget->parentWidget()));
return std::shared_ptr<ViewWrapper>(new ViewWrapper_qtwidgets(m_widget->parentWidget()));
}
HANDLE ViewWrapper_qtwidgets::handle() const