1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09: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:
Timothy Flynn 2022-12-08 11:00:55 -05:00 committed by Andreas Kling
parent 746364d7c1
commit 174062e0c5
Notes: sideshowbarker 2024-07-17 05:21:12 +09:00
3 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ ImageWidget::ImageWidget(StringView)
REGISTER_BOOL_PROPERTY("auto_resize", auto_resize, set_auto_resize);
REGISTER_BOOL_PROPERTY("should_stretch", should_stretch, set_should_stretch);
REGISTER_STRING_PROPERTY("bitmap", bitmap, load_from_file);
REGISTER_WRITE_ONLY_STRING_PROPERTY("bitmap", load_from_file);
}
void ImageWidget::set_bitmap(Gfx::Bitmap const* bitmap)