diff options
author | Sam Atkins <atkinssj@gmail.com> | 2021-06-24 16:28:24 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-22 12:48:44 +0200 |
commit | 9ac757647f259c7e38b243d347c573e05fb0bd75 (patch) | |
tree | ba961f9c960fa014cad353d5c3d420d23d859698 /Userland/Applications/FileManager/FileOperationProgressWidget.cpp | |
parent | 469bca9d3a6c8c400e30808796c4fc5597820f35 (diff) | |
download | serenity-9ac757647f259c7e38b243d347c573e05fb0bd75.zip |
FileManager: Switch FileOperationProgressWidget::did_error() to SV&
Diffstat (limited to 'Userland/Applications/FileManager/FileOperationProgressWidget.cpp')
-rw-r--r-- | Userland/Applications/FileManager/FileOperationProgressWidget.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Applications/FileManager/FileOperationProgressWidget.cpp b/Userland/Applications/FileManager/FileOperationProgressWidget.cpp index f88b09440e..84f5a2c861 100644 --- a/Userland/Applications/FileManager/FileOperationProgressWidget.cpp +++ b/Userland/Applications/FileManager/FileOperationProgressWidget.cpp @@ -66,7 +66,7 @@ FileOperationProgressWidget::FileOperationProgressWidget(FileOperation operation m_notifier->on_ready_to_read = [this] { auto line = m_helper_pipe->read_line(); if (line.is_null()) { - did_error("Read from pipe returned null."); + did_error("Read from pipe returned null."sv); return; } @@ -74,12 +74,12 @@ FileOperationProgressWidget::FileOperationProgressWidget(FileOperation operation VERIFY(!parts.is_empty()); if (parts[0] == "ERROR"sv) { - did_error(line.substring(6)); + did_error(line.substring_view(6)); return; } if (parts[0] == "WARN"sv) { - did_error(line.substring(5)); + did_error(line.substring_view(5)); return; } @@ -115,7 +115,7 @@ void FileOperationProgressWidget::did_finish() window()->close(); } -void FileOperationProgressWidget::did_error(String const message) +void FileOperationProgressWidget::did_error(StringView const& message) { // FIXME: Communicate more with the user about errors. close_pipe(); |