summaryrefslogtreecommitdiff
path: root/DevTools/Profiler/main.cpp
diff options
context:
space:
mode:
authorTom <tomut@yahoo.com>2020-07-15 20:45:11 -0600
committerAndreas Kling <kling@serenityos.org>2020-07-16 16:10:21 +0200
commit27bd2eab2288c79206f3571bc2c46a20fc9a4254 (patch)
tree2391eb84dc9fc1a7be2bf1391daf13020b1e0076 /DevTools/Profiler/main.cpp
parent6568765e8f89563fa76407ce5e369ec1eb09c125 (diff)
downloadserenity-27bd2eab2288c79206f3571bc2c46a20fc9a4254.zip
LibWeb: Require parent window argument for MessageBox
Since the vast majority of message boxes should be modal, require the parent window to be passed in, which can be nullptr for the rare case that they don't. By it being the first argument, the default arguments also don't need to be explicitly stated in most cases, and it encourages passing in a parent window handle. Fix up several message boxes that should have been modal.
Diffstat (limited to 'DevTools/Profiler/main.cpp')
-rw-r--r--DevTools/Profiler/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/DevTools/Profiler/main.cpp b/DevTools/Profiler/main.cpp
index 2b0be42a15..a04a0d50f4 100644
--- a/DevTools/Profiler/main.cpp
+++ b/DevTools/Profiler/main.cpp
@@ -162,7 +162,7 @@ bool generate_profile(pid_t pid)
if (profiling_enable(pid) < 0) {
int saved_errno = errno;
- GUI::MessageBox::show(String::format("Unable to profile PID %d: %s", pid, strerror(saved_errno)), "Profiler", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK);
+ GUI::MessageBox::show(nullptr, String::format("Unable to profile PID %d: %s", pid, strerror(saved_errno)), "Profiler", GUI::MessageBox::Type::Error);
return false;
}