Skip to content

Commit

Permalink
Fix build on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Oct 14, 2020
1 parent d2ae2cf commit 914df12
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions ui/ui_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,6 @@ class AttachmentOwner : public QObject {

} // namespace details

template <typename Value>
inline not_null<details::AttachmentOwner<std::decay_t<Value>>*> WrapAsQObject(
not_null<QObject*> parent,
Value &&value) {
return CreateChild<details::AttachmentOwner<std::decay_t<Value>>>(
parent.get(),
std::forward<Value>(value));
}

template <typename Widget, typename ...Args>
inline base::unique_qptr<Widget> CreateObject(Args &&...args) {
return base::make_unique_q<Widget>(
Expand All @@ -75,6 +66,15 @@ inline Value *CreateChild(
}
}

template <typename Value>
inline not_null<details::AttachmentOwner<std::decay_t<Value>>*> WrapAsQObject(
not_null<QObject*> parent,
Value &&value) {
return CreateChild<details::AttachmentOwner<std::decay_t<Value>>>(
parent.get(),
std::forward<Value>(value));
}

inline void DestroyChild(QWidget *child) {
delete child;
}
Expand Down

0 comments on commit 914df12

Please sign in to comment.