mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
LibGUI: Register GUI icon path setters as write-only
The getters passed to REGISTER_STRING_PROPERTY are never invoked. But if they were, they would errantly incur an implicit pointer-to-boolean cast when their return type (Gfx::Bitmap*) is used to construct a JsonValue.
This commit is contained in:
parent
746364d7c1
commit
174062e0c5
3 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ Button::Button(DeprecatedString text)
|
|||
{ Gfx::ButtonStyle::Normal, "Normal" },
|
||||
{ Gfx::ButtonStyle::Coolbar, "Coolbar" });
|
||||
|
||||
REGISTER_STRING_PROPERTY("icon", icon, set_icon_from_path);
|
||||
REGISTER_WRITE_ONLY_STRING_PROPERTY("icon", set_icon_from_path);
|
||||
REGISTER_BOOL_PROPERTY("default", is_default, set_default);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue