summaryrefslogtreecommitdiff
path: root/Applications/TextEditor
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-09-21 20:32:31 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-09-21 20:32:31 +0200
commit31b38ed88f3db123c498379f4615d2dce1ded406 (patch)
treea64bc5a935482193470d443c5cdcd70ad96472d6 /Applications/TextEditor
parentdefafd72bc771034d615d56fe3fc5f71a7f707e5 (diff)
downloadserenity-31b38ed88f3db123c498379f4615d2dce1ded406.zip
LibGUI: Don't create GMessageBox and GInputBox on the stack
We need to get rid of all instances of widgets-on-the-stack since that will no longer work in the ref-counting world.
Diffstat (limited to 'Applications/TextEditor')
-rw-r--r--Applications/TextEditor/TextEditorWidget.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp
index 7d7dca43a9..c149b36c06 100644
--- a/Applications/TextEditor/TextEditorWidget.cpp
+++ b/Applications/TextEditor/TextEditorWidget.cpp
@@ -285,7 +285,6 @@ bool TextEditorWidget::request_close()
{
if (!m_document_dirty)
return true;
- GMessageBox box("The document has been modified. Quit without saving?", "Quit without saving?", GMessageBox::Type::Warning, GMessageBox::InputType::OKCancel, window());
- auto result = box.exec();
+ auto result = GMessageBox::show("The document has been modified. Quit without saving?", "Quit without saving?", GMessageBox::Type::Warning, GMessageBox::InputType::OKCancel, window());
return result == GMessageBox::ExecOK;
}