summaryrefslogtreecommitdiff
path: root/Userland/Applications/FileManager/FileOperationProgressWidget.cpp
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@gmail.com>2021-06-24 16:28:24 +0100
committerAndreas Kling <kling@serenityos.org>2021-07-22 12:48:44 +0200
commit9ac757647f259c7e38b243d347c573e05fb0bd75 (patch)
treeba961f9c960fa014cad353d5c3d420d23d859698 /Userland/Applications/FileManager/FileOperationProgressWidget.cpp
parent469bca9d3a6c8c400e30808796c4fc5597820f35 (diff)
downloadserenity-9ac757647f259c7e38b243d347c573e05fb0bd75.zip
FileManager: Switch FileOperationProgressWidget::did_error() to SV&
Diffstat (limited to 'Userland/Applications/FileManager/FileOperationProgressWidget.cpp')
-rw-r--r--Userland/Applications/FileManager/FileOperationProgressWidget.cpp8
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();