LibGUI: Remove Widget::try_set_layout<T>()

And fall back to the infallible set_layout<T>().

Work towards #20557.
This commit is contained in:
Andreas Kling 2023-08-13 14:52:36 +02:00
commit 8322b31b97
Notes: sideshowbarker 2024-07-17 00:37:23 +09:00
52 changed files with 127 additions and 135 deletions

View file

@ -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)
{