summaryrefslogtreecommitdiff
path: root/MenuApplets/Clock/main.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-03-04 09:46:23 +0100
committerAndreas Kling <kling@serenityos.org>2020-03-04 14:26:16 +0100
commit0f3e57a6fb037f6a8133e8ec2be8f0889ff9bc19 (patch)
tree3fc1f6f91d7e00783792e98bd23f226e591d99a3 /MenuApplets/Clock/main.cpp
parent4697195645a4c66930761c85685f5752dc777bba (diff)
downloadserenity-0f3e57a6fb037f6a8133e8ec2be8f0889ff9bc19.zip
LibGUI: Use GUI::Window::set_main_widget<WidgetType>() in clients
Diffstat (limited to 'MenuApplets/Clock/main.cpp')
-rw-r--r--MenuApplets/Clock/main.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/MenuApplets/Clock/main.cpp b/MenuApplets/Clock/main.cpp
index e27f11215e..4ef3e65ec0 100644
--- a/MenuApplets/Clock/main.cpp
+++ b/MenuApplets/Clock/main.cpp
@@ -106,10 +106,8 @@ int main(int argc, char** argv)
window->set_title("Clock");
window->set_window_type(GUI::WindowType::MenuApplet);
- auto widget = ClockWidget::construct();
-
- window->resize(widget->get_width(), 16);
- window->set_main_widget(widget);
+ auto& widget = window->set_main_widget<ClockWidget>();
+ window->resize(widget.get_width(), 16);
window->show();
if (unveil("/res", "r") < 0) {