mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:17:36 +00:00
LibGUI+HackStudio+PixelPaint: Port Widget title to the new String
I had to add a set_title(String) helper function for ImageEditor because TabWidget requires it. This is a temporary fix and will be handled in subsequent commit.
This commit is contained in:
parent
858e55b653
commit
3805e4e3a9
7 changed files with 15 additions and 13 deletions
|
@ -59,7 +59,7 @@ public:
|
|||
ErrorOr<NonnullRefPtr<T>> try_add_tab(DeprecatedString title, Args&&... args)
|
||||
{
|
||||
auto t = TRY(T::try_create(forward<Args>(args)...));
|
||||
t->set_title(move(title));
|
||||
t->set_title(TRY(String::from_deprecated_string(title)));
|
||||
TRY(try_add_widget(*t));
|
||||
return *t;
|
||||
}
|
||||
|
@ -68,14 +68,14 @@ public:
|
|||
T& add_tab(DeprecatedString title, Args&&... args)
|
||||
{
|
||||
auto t = T::construct(forward<Args>(args)...);
|
||||
t->set_title(move(title));
|
||||
t->set_title(String::from_deprecated_string(title).release_value_but_fixme_should_propagate_errors());
|
||||
add_widget(*t);
|
||||
return *t;
|
||||
}
|
||||
|
||||
ErrorOr<void> add_tab(NonnullRefPtr<Widget> const& tab, DeprecatedString title)
|
||||
{
|
||||
tab->set_title(move(title));
|
||||
tab->set_title(TRY(String::from_deprecated_string(title)));
|
||||
TRY(try_add_widget(*tab));
|
||||
return {};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue