mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 02:28:12 +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
|
@ -34,7 +34,7 @@ Label::Label(DeprecatedString text)
|
|||
|
||||
REGISTER_STRING_PROPERTY("text", text, set_text);
|
||||
REGISTER_BOOL_PROPERTY("autosize", is_autosize, set_autosize);
|
||||
REGISTER_STRING_PROPERTY("icon", icon, set_icon_from_path);
|
||||
REGISTER_WRITE_ONLY_STRING_PROPERTY("icon", set_icon_from_path);
|
||||
}
|
||||
|
||||
void Label::set_autosize(bool autosize, size_t padding)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue