mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:58:13 +00:00
LibGUI: Remove Widget::try_set_layout<T>()
And fall back to the infallible set_layout<T>(). Work towards #20557.
This commit is contained in:
parent
341626e2ea
commit
8322b31b97
52 changed files with 127 additions and 135 deletions
|
@ -80,14 +80,6 @@ public:
|
|||
Layout const* layout() const { return m_layout.ptr(); }
|
||||
void set_layout(NonnullRefPtr<Layout>);
|
||||
|
||||
template<class T, class... Args>
|
||||
ErrorOr<void> try_set_layout(Args&&... args)
|
||||
{
|
||||
auto layout = TRY(T::try_create(forward<Args>(args)...));
|
||||
set_layout(*layout);
|
||||
return {};
|
||||
}
|
||||
|
||||
template<class T, class... Args>
|
||||
inline void set_layout(Args&&... args)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue