mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:07:34 +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
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