summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Playground/main.cpp
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2021-04-04 15:40:34 -0600
committerAndreas Kling <kling@serenityos.org>2021-05-06 08:50:39 +0200
commit3aaffa2c47e39583848cfe9b7b9f846e5119fe1b (patch)
treeeb5a5535bec0952a95b19b9c494d9c6049896107 /Userland/DevTools/Playground/main.cpp
parent6e101adc28c9c682f023386831d632a477768cb8 (diff)
downloadserenity-3aaffa2c47e39583848cfe9b7b9f846e5119fe1b.zip
LibGUI: Move widget registration to LibCore
This also moves Widget::load_from_json into Core::Object as a virtual function in order to allow loading non-widget objects in GML (e.g. BoxLayout). Co-authored-by: Gunnar Beutner <gbeutner@serenityos.org>
Diffstat (limited to 'Userland/DevTools/Playground/main.cpp')
-rw-r--r--Userland/DevTools/Playground/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/Playground/main.cpp b/Userland/DevTools/Playground/main.cpp
index fcd2f15d2c..eb95cddab9 100644
--- a/Userland/DevTools/Playground/main.cpp
+++ b/Userland/DevTools/Playground/main.cpp
@@ -128,7 +128,7 @@ int main(int argc, char** argv)
editor.on_change = [&] {
preview.remove_all_children();
- preview.load_from_gml(editor.text(), [](const String& class_name) -> RefPtr<GUI::Widget> {
+ preview.load_from_gml(editor.text(), [](const String& class_name) -> RefPtr<Core::Object> {
return UnregisteredWidget::construct(class_name);
});
};