mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 19:59:17 +00:00
TextEditor: Fix passing null parent to AboutDialog
Refactors menubar creation to avoid passing a null parent window to AboutDialog during construction. Fixes #5177 in part
This commit is contained in:
parent
2481dbcc41
commit
1723eac40f
Notes:
sideshowbarker
2024-07-18 21:55:14 +09:00
Author: https://github.com/thankyouverycool
Commit: 1723eac40f
Pull-request: https://github.com/SerenityOS/serenity/pull/5532
Issue: https://github.com/SerenityOS/serenity/issues/5177
3 changed files with 39 additions and 31 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "TextEditorWidget.h"
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibGUI/MenuBar.h>
|
||||
#include <LibGfx/Bitmap.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -86,6 +87,10 @@ int main(int argc, char** argv)
|
|||
else
|
||||
text_widget.update_title();
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
text_widget.initialize_menubar(menubar);
|
||||
app->set_menubar(menubar);
|
||||
|
||||
window->show();
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue