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:
parent
746364d7c1
commit
174062e0c5
Notes:
sideshowbarker
2024-07-17 05:21:12 +09:00
Author: https://github.com/trflynn89
Commit: 174062e0c5
Pull-request: https://github.com/SerenityOS/serenity/pull/16384
3 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue