summaryrefslogtreecommitdiff
path: root/Userland/Applications
diff options
context:
space:
mode:
authorKarol Kosek <krkk@serenityos.org>2023-05-14 19:02:08 +0200
committerAndreas Kling <kling@serenityos.org>2023-05-15 06:42:10 +0200
commit945f05ed76b23e8b201ce0a758d5318723440d36 (patch)
tree288f5a88e2f5583cb06bf1033ed411877c1e1c4c /Userland/Applications
parent741f07dedf92bf2b64774784585684acb16f642b (diff)
downloadserenity-945f05ed76b23e8b201ce0a758d5318723440d36.zip
Userland: Port `Model::column_name()` to String
Diffstat (limited to 'Userland/Applications')
-rw-r--r--Userland/Applications/Browser/CookiesModel.cpp14
-rw-r--r--Userland/Applications/Browser/CookiesModel.h2
-rw-r--r--Userland/Applications/Browser/History/HistoryModel.cpp6
-rw-r--r--Userland/Applications/Browser/History/HistoryModel.h2
-rw-r--r--Userland/Applications/Browser/StorageModel.cpp6
-rw-r--r--Userland/Applications/Browser/StorageModel.h2
-rw-r--r--Userland/Applications/Calendar/AddEventDialog.cpp8
-rw-r--r--Userland/Applications/Calendar/AddEventDialog.h4
-rw-r--r--Userland/Applications/CertificateSettings/CertificateStoreWidget.cpp8
-rw-r--r--Userland/Applications/CertificateSettings/CertificateStoreWidget.h2
-rw-r--r--Userland/Applications/HexEditor/SearchResultsModel.h6
-rw-r--r--Userland/Applications/HexEditor/ValueInspectorModel.h6
-rw-r--r--Userland/Applications/Mail/InboxModel.cpp6
-rw-r--r--Userland/Applications/Mail/InboxModel.h2
-rw-r--r--Userland/Applications/MouseSettings/ThemeWidget.cpp4
-rw-r--r--Userland/Applications/MouseSettings/ThemeWidget.h2
-rw-r--r--Userland/Applications/PDFViewer/PDFViewerWidget.cpp6
-rw-r--r--Userland/Applications/PartitionEditor/PartitionModel.cpp12
-rw-r--r--Userland/Applications/PartitionEditor/PartitionModel.h2
-rw-r--r--Userland/Applications/SoundPlayer/PlaylistWidget.cpp14
-rw-r--r--Userland/Applications/SoundPlayer/PlaylistWidget.h2
-rw-r--r--Userland/Applications/Spreadsheet/ImportDialog.cpp6
-rw-r--r--Userland/Applications/Spreadsheet/SpreadsheetModel.cpp4
-rw-r--r--Userland/Applications/Spreadsheet/SpreadsheetModel.h2
-rw-r--r--Userland/Applications/SystemMonitor/ProcessModel.cpp64
-rw-r--r--Userland/Applications/SystemMonitor/ProcessModel.h2
-rw-r--r--Userland/Applications/SystemMonitor/ThreadStackWidget.cpp8
27 files changed, 102 insertions, 100 deletions
diff --git a/Userland/Applications/Browser/CookiesModel.cpp b/Userland/Applications/Browser/CookiesModel.cpp
index 2d16901bd5..fc2c99bb64 100644
--- a/Userland/Applications/Browser/CookiesModel.cpp
+++ b/Userland/Applications/Browser/CookiesModel.cpp
@@ -34,21 +34,21 @@ int CookiesModel::row_count(GUI::ModelIndex const& index) const
return 0;
}
-DeprecatedString CookiesModel::column_name(int column) const
+String CookiesModel::column_name(int column) const
{
switch (column) {
case Column::Domain:
- return "Domain";
+ return "Domain"_short_string;
case Column::Path:
- return "Path";
+ return "Path"_short_string;
case Column::Name:
- return "Name";
+ return "Name"_short_string;
case Column::Value:
- return "Value";
+ return "Value"_short_string;
case Column::ExpiryTime:
- return "Expiry time";
+ return "Expiry time"_string.release_value_but_fixme_should_propagate_errors();
case Column::SameSite:
- return "SameSite";
+ return "SameSite"_string.release_value_but_fixme_should_propagate_errors();
case Column::__Count:
return {};
}
diff --git a/Userland/Applications/Browser/CookiesModel.h b/Userland/Applications/Browser/CookiesModel.h
index 8b66b78856..22f6a9964a 100644
--- a/Userland/Applications/Browser/CookiesModel.h
+++ b/Userland/Applications/Browser/CookiesModel.h
@@ -30,7 +30,7 @@ public:
void clear_items();
virtual int row_count(GUI::ModelIndex const&) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
- virtual DeprecatedString column_name(int column) const override;
+ virtual String column_name(int column) const override;
virtual GUI::ModelIndex index(int row, int column = 0, GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role = GUI::ModelRole::Display) const override;
virtual TriState data_matches(GUI::ModelIndex const& index, GUI::Variant const& term) const override;
diff --git a/Userland/Applications/Browser/History/HistoryModel.cpp b/Userland/Applications/Browser/History/HistoryModel.cpp
index d40f34bae1..17b8c2f533 100644
--- a/Userland/Applications/Browser/History/HistoryModel.cpp
+++ b/Userland/Applications/Browser/History/HistoryModel.cpp
@@ -34,13 +34,13 @@ int HistoryModel::row_count(GUI::ModelIndex const& index) const
return 0;
}
-DeprecatedString HistoryModel::column_name(int column) const
+String HistoryModel::column_name(int column) const
{
switch (column) {
case Column::Title:
- return "Title";
+ return "Title"_short_string;
case Column::URL:
- return "URL";
+ return "URL"_short_string;
default:
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/Browser/History/HistoryModel.h b/Userland/Applications/Browser/History/HistoryModel.h
index 6162b28db0..dc18d8dd2e 100644
--- a/Userland/Applications/Browser/History/HistoryModel.h
+++ b/Userland/Applications/Browser/History/HistoryModel.h
@@ -25,7 +25,7 @@ public:
void clear_items();
virtual int row_count(GUI::ModelIndex const&) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
- virtual DeprecatedString column_name(int column) const override;
+ virtual String column_name(int column) const override;
virtual GUI::ModelIndex index(int row, int column = 0, GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role = GUI::ModelRole::Display) const override;
virtual TriState data_matches(GUI::ModelIndex const& index, GUI::Variant const& term) const override;
diff --git a/Userland/Applications/Browser/StorageModel.cpp b/Userland/Applications/Browser/StorageModel.cpp
index 4d68b3ee32..4dc22696a0 100644
--- a/Userland/Applications/Browser/StorageModel.cpp
+++ b/Userland/Applications/Browser/StorageModel.cpp
@@ -35,13 +35,13 @@ int StorageModel::row_count(GUI::ModelIndex const& index) const
return 0;
}
-DeprecatedString StorageModel::column_name(int column) const
+String StorageModel::column_name(int column) const
{
switch (column) {
case Column::Key:
- return "Key";
+ return "Key"_short_string;
case Column::Value:
- return "Value";
+ return "Value"_short_string;
case Column::__Count:
return {};
}
diff --git a/Userland/Applications/Browser/StorageModel.h b/Userland/Applications/Browser/StorageModel.h
index 6b8735e00f..c1177c8738 100644
--- a/Userland/Applications/Browser/StorageModel.h
+++ b/Userland/Applications/Browser/StorageModel.h
@@ -22,7 +22,7 @@ public:
void clear_items();
virtual int row_count(GUI::ModelIndex const&) const override;
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
- virtual DeprecatedString column_name(int column) const override;
+ virtual String column_name(int column) const override;
virtual GUI::ModelIndex index(int row, int column = 0, GUI::ModelIndex const& = GUI::ModelIndex()) const override;
virtual GUI::Variant data(GUI::ModelIndex const& index, GUI::ModelRole role = GUI::ModelRole::Display) const override;
virtual TriState data_matches(GUI::ModelIndex const& index, GUI::Variant const& term) const override;
diff --git a/Userland/Applications/Calendar/AddEventDialog.cpp b/Userland/Applications/Calendar/AddEventDialog.cpp
index 72466ef258..09ff89df3c 100644
--- a/Userland/Applications/Calendar/AddEventDialog.cpp
+++ b/Userland/Applications/Calendar/AddEventDialog.cpp
@@ -120,21 +120,21 @@ int AddEventDialog::MeridiemListModel::row_count(const GUI::ModelIndex&) const
return 2;
}
-DeprecatedString AddEventDialog::MonthListModel::column_name(int column) const
+String AddEventDialog::MonthListModel::column_name(int column) const
{
switch (column) {
case Column::Month:
- return "Month";
+ return "Month"_short_string;
default:
VERIFY_NOT_REACHED();
}
}
-DeprecatedString AddEventDialog::MeridiemListModel::column_name(int column) const
+String AddEventDialog::MeridiemListModel::column_name(int column) const
{
switch (column) {
case Column::Meridiem:
- return "Meridiem";
+ return "Meridiem"_string.release_value_but_fixme_should_propagate_errors();
default:
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/Calendar/AddEventDialog.h b/Userland/Applications/Calendar/AddEventDialog.h
index fab9abbef0..4f0aa162e8 100644
--- a/Userland/Applications/Calendar/AddEventDialog.h
+++ b/Userland/Applications/Calendar/AddEventDialog.h
@@ -38,7 +38,7 @@ private:
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return Column::__Count; }
- virtual DeprecatedString column_name(int) const override;
+ virtual String column_name(int) const override;
virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
private:
@@ -57,7 +57,7 @@ private:
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return Column::__Count; }
- virtual DeprecatedString column_name(int) const override;
+ virtual String column_name(int) const override;
virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
private:
diff --git a/Userland/Applications/CertificateSettings/CertificateStoreWidget.cpp b/Userland/Applications/CertificateSettings/CertificateStoreWidget.cpp
index 200aea5965..fe1997f015 100644
--- a/Userland/Applications/CertificateSettings/CertificateStoreWidget.cpp
+++ b/Userland/Applications/CertificateSettings/CertificateStoreWidget.cpp
@@ -34,15 +34,15 @@ ErrorOr<void> CertificateStoreModel::load()
return {};
}
-DeprecatedString CertificateStoreModel::column_name(int column) const
+String CertificateStoreModel::column_name(int column) const
{
switch (column) {
case Column::IssuedTo:
- return "Issued To";
+ return "Issued To"_string.release_value_but_fixme_should_propagate_errors();
case Column::IssuedBy:
- return "Issued By";
+ return "Issued By"_string.release_value_but_fixme_should_propagate_errors();
case Column::Expire:
- return "Expiration Date";
+ return "Expiration Date"_string.release_value_but_fixme_should_propagate_errors();
default:
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/CertificateSettings/CertificateStoreWidget.h b/Userland/Applications/CertificateSettings/CertificateStoreWidget.h
index 412276d0ef..107305fe68 100644
--- a/Userland/Applications/CertificateSettings/CertificateStoreWidget.h
+++ b/Userland/Applications/CertificateSettings/CertificateStoreWidget.h
@@ -44,7 +44,7 @@ public:
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return m_certificates.size(); }
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
- virtual DeprecatedString column_name(int) const override;
+ virtual String column_name(int) const override;
virtual GUI::Variant data(GUI::ModelIndex const&, GUI::ModelRole) const override;
virtual ErrorOr<void> load();
virtual ErrorOr<size_t> add(Vector<Certificate> const&);
diff --git a/Userland/Applications/HexEditor/SearchResultsModel.h b/Userland/Applications/HexEditor/SearchResultsModel.h
index c5adfca7a5..927459990b 100644
--- a/Userland/Applications/HexEditor/SearchResultsModel.h
+++ b/Userland/Applications/HexEditor/SearchResultsModel.h
@@ -40,13 +40,13 @@ public:
return 2;
}
- DeprecatedString column_name(int column) const override
+ String column_name(int column) const override
{
switch (column) {
case Column::Offset:
- return "Offset";
+ return "Offset"_short_string;
case Column::Value:
- return "Value";
+ return "Value"_short_string;
}
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/HexEditor/ValueInspectorModel.h b/Userland/Applications/HexEditor/ValueInspectorModel.h
index 27f22f853b..79d931ada1 100644
--- a/Userland/Applications/HexEditor/ValueInspectorModel.h
+++ b/Userland/Applications/HexEditor/ValueInspectorModel.h
@@ -63,13 +63,13 @@ public:
return 2;
}
- DeprecatedString column_name(int column) const override
+ String column_name(int column) const override
{
switch (column) {
case Column::Type:
- return "Type";
+ return "Type"_short_string;
case Column::Value:
- return m_is_little_endian ? "Value (Little Endian)" : "Value (Big Endian)";
+ return m_is_little_endian ? "Value (Little Endian)"_string.release_value_but_fixme_should_propagate_errors() : "Value (Big Endian)"_string.release_value_but_fixme_should_propagate_errors();
}
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/Mail/InboxModel.cpp b/Userland/Applications/Mail/InboxModel.cpp
index 9f62c7a8d4..5eee5f0e1f 100644
--- a/Userland/Applications/Mail/InboxModel.cpp
+++ b/Userland/Applications/Mail/InboxModel.cpp
@@ -17,13 +17,13 @@ int InboxModel::row_count(GUI::ModelIndex const&) const
return m_entries.size();
}
-DeprecatedString InboxModel::column_name(int column_index) const
+String InboxModel::column_name(int column_index) const
{
switch (column_index) {
case Column::From:
- return "From";
+ return "From"_short_string;
case Subject:
- return "Subject";
+ return "Subject"_short_string;
default:
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/Mail/InboxModel.h b/Userland/Applications/Mail/InboxModel.h
index 113f739c05..ab63595130 100644
--- a/Userland/Applications/Mail/InboxModel.h
+++ b/Userland/Applications/Mail/InboxModel.h
@@ -32,7 +32,7 @@ public:
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override;
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return Column::__Count; }
- virtual DeprecatedString column_name(int) const override;
+ virtual String column_name(int) const override;
virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
private:
diff --git a/Userland/Applications/MouseSettings/ThemeWidget.cpp b/Userland/Applications/MouseSettings/ThemeWidget.cpp
index 9e0a73bddd..39d708a138 100644
--- a/Userland/Applications/MouseSettings/ThemeWidget.cpp
+++ b/Userland/Applications/MouseSettings/ThemeWidget.cpp
@@ -15,13 +15,13 @@
#include <LibGUI/SortingProxyModel.h>
#include <LibGUI/TableView.h>
-DeprecatedString MouseCursorModel::column_name(int column_index) const
+String MouseCursorModel::column_name(int column_index) const
{
switch (column_index) {
case Column::Bitmap:
return {};
case Column::Name:
- return "Name";
+ return "Name"_short_string;
}
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/MouseSettings/ThemeWidget.h b/Userland/Applications/MouseSettings/ThemeWidget.h
index 4b4deac025..6868df4364 100644
--- a/Userland/Applications/MouseSettings/ThemeWidget.h
+++ b/Userland/Applications/MouseSettings/ThemeWidget.h
@@ -25,7 +25,7 @@ public:
virtual int row_count(const GUI::ModelIndex&) const override { return m_cursors.size(); }
virtual int column_count(const GUI::ModelIndex&) const override { return Column::__Count; }
- virtual DeprecatedString column_name(int column_index) const override;
+ virtual String column_name(int column_index) const override;
virtual GUI::Variant data(const GUI::ModelIndex& index, GUI::ModelRole role) const override;
virtual void invalidate() override;
diff --git a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
index b3d0a5ea49..a7f3b789b2 100644
--- a/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
+++ b/Userland/Applications/PDFViewer/PDFViewerWidget.cpp
@@ -64,13 +64,13 @@ public:
return Columns::Page;
}
- DeprecatedString column_name(int index) const override
+ String column_name(int index) const override
{
switch (index) {
case 0:
- return "Page";
+ return "Page"_short_string;
case 1:
- return "Message";
+ return "Message"_short_string;
default:
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/PartitionEditor/PartitionModel.cpp b/Userland/Applications/PartitionEditor/PartitionModel.cpp
index 90859254e4..98d2f8a937 100644
--- a/Userland/Applications/PartitionEditor/PartitionModel.cpp
+++ b/Userland/Applications/PartitionEditor/PartitionModel.cpp
@@ -18,19 +18,19 @@ NonnullRefPtr<PartitionModel> PartitionModel::create()
return adopt_ref(*new PartitionModel);
}
-DeprecatedString PartitionModel::column_name(int column) const
+String PartitionModel::column_name(int column) const
{
switch (column) {
case Column::Partition:
- return "Partition";
+ return "Partition"_string.release_value_but_fixme_should_propagate_errors();
case Column::StartBlock:
- return "Start Block";
+ return "Start Block"_string.release_value_but_fixme_should_propagate_errors();
case Column::EndBlock:
- return "End Block";
+ return "End Block"_string.release_value_but_fixme_should_propagate_errors();
case Column::TotalBlocks:
- return "Total Blocks";
+ return "Total Blocks"_string.release_value_but_fixme_should_propagate_errors();
case Column::Size:
- return "Size";
+ return "Size"_short_string;
default:
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/PartitionEditor/PartitionModel.h b/Userland/Applications/PartitionEditor/PartitionModel.h
index e7ce742a2b..7cbdde0793 100644
--- a/Userland/Applications/PartitionEditor/PartitionModel.h
+++ b/Userland/Applications/PartitionEditor/PartitionModel.h
@@ -27,7 +27,7 @@ public:
virtual int row_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return m_partition_table->partitions_count(); }
virtual int column_count(GUI::ModelIndex const& = GUI::ModelIndex()) const override { return Column::__Count; }
- virtual DeprecatedString column_name(int) const override;
+ virtual String column_name(int) const override;
virtual GUI::Variant data(GUI::ModelIndex const&, GUI::ModelRole) const override;
ErrorOr<void> set_device_path(DeprecatedString const&);
diff --git a/Userland/Applications/SoundPlayer/PlaylistWidget.cpp b/Userland/Applications/SoundPlayer/PlaylistWidget.cpp
index 8ef466c6f9..61bd75e6e1 100644
--- a/Userland/Applications/SoundPlayer/PlaylistWidget.cpp
+++ b/Userland/Applications/SoundPlayer/PlaylistWidget.cpp
@@ -73,21 +73,21 @@ DeprecatedString PlaylistModel::format_duration(u32 duration_in_seconds)
return DeprecatedString::formatted("{:02}:{:02}:{:02}", duration_in_seconds / 3600, duration_in_seconds / 60, duration_in_seconds % 60);
}
-DeprecatedString PlaylistModel::column_name(int column) const
+String PlaylistModel::column_name(int column) const
{
switch (column) {
case 0:
- return "Title";
+ return "Title"_short_string;
case 1:
- return "Duration";
+ return "Duration"_string.release_value_but_fixme_should_propagate_errors();
case 2:
- return "Group";
+ return "Group"_short_string;
case 3:
- return "Album";
+ return "Album"_short_string;
case 4:
- return "Artist";
+ return "Artist"_short_string;
case 5:
- return "Filesize";
+ return "Filesize"_string.release_value_but_fixme_should_propagate_errors();
}
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/SoundPlayer/PlaylistWidget.h b/Userland/Applications/SoundPlayer/PlaylistWidget.h
index cc033fc5b8..fcf67bbcd8 100644
--- a/Userland/Applications/SoundPlayer/PlaylistWidget.h
+++ b/Userland/Applications/SoundPlayer/PlaylistWidget.h
@@ -24,7 +24,7 @@ public:
int row_count(const GUI::ModelIndex&) const override { return m_playlist_items.size(); }
int column_count(const GUI::ModelIndex&) const override { return 6; }
GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
- DeprecatedString column_name(int column) const override;
+ String column_name(int column) const override;
Vector<M3UEntry>& items() { return m_playlist_items; }
private:
diff --git a/Userland/Applications/Spreadsheet/ImportDialog.cpp b/Userland/Applications/Spreadsheet/ImportDialog.cpp
index 7b07765403..849206fcc6 100644
--- a/Userland/Applications/Spreadsheet/ImportDialog.cpp
+++ b/Userland/Applications/Spreadsheet/ImportDialog.cpp
@@ -166,10 +166,12 @@ void CSVImportDialogPage::update_preview()
return;
}
- auto headers = reader.headers();
+ Vector<String> headers;
+ for (auto const& header : reader.headers())
+ headers.append(String::from_deprecated_string(header).release_value_but_fixme_should_propagate_errors());
m_data_preview_table_view->set_model(
- GUI::ItemListModel<Reader::XSV::Row, Reader::XSV, Vector<DeprecatedString>>::create(reader, headers, min(8ul, reader.size())));
+ GUI::ItemListModel<Reader::XSV::Row, Reader::XSV, Vector<String>>::create(reader, headers, min(8ul, reader.size())));
m_data_preview_widget->set_active_widget(m_data_preview_table_view);
m_data_preview_table_view->update();
}
diff --git a/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp b/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
index 9693de25f4..f1ca5fdf9e 100644
--- a/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
+++ b/Userland/Applications/Spreadsheet/SpreadsheetModel.cpp
@@ -162,12 +162,12 @@ RefPtr<Core::MimeData> SheetModel::mime_data(const GUI::ModelSelection& selectio
return mime_data;
}
-DeprecatedString SheetModel::column_name(int index) const
+String SheetModel::column_name(int index) const
{
if (index < 0)
return {};
- return m_sheet->column(index);
+ return String::from_deprecated_string(m_sheet->column(index)).release_value_but_fixme_should_propagate_errors();
}
bool SheetModel::is_editable(const GUI::ModelIndex& index) const
diff --git a/Userland/Applications/Spreadsheet/SpreadsheetModel.h b/Userland/Applications/Spreadsheet/SpreadsheetModel.h
index 4227e401e5..15bd933ad7 100644
--- a/Userland/Applications/Spreadsheet/SpreadsheetModel.h
+++ b/Userland/Applications/Spreadsheet/SpreadsheetModel.h
@@ -23,7 +23,7 @@ public:
virtual int row_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return m_sheet->row_count(); }
virtual int column_count(const GUI::ModelIndex& = GUI::ModelIndex()) const override { return m_sheet->column_count(); }
- virtual DeprecatedString column_name(int) const override;
+ virtual String column_name(int) const override;
virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
virtual RefPtr<Core::MimeData> mime_data(const GUI::ModelSelection&) const override;
virtual bool is_editable(const GUI::ModelIndex&) const override;
diff --git a/Userland/Applications/SystemMonitor/ProcessModel.cpp b/Userland/Applications/SystemMonitor/ProcessModel.cpp
index b576de6a92..a26add41ca 100644
--- a/Userland/Applications/SystemMonitor/ProcessModel.cpp
+++ b/Userland/Applications/SystemMonitor/ProcessModel.cpp
@@ -71,71 +71,71 @@ int ProcessModel::column_count(GUI::ModelIndex const&) const
return Column::__Count;
}
-DeprecatedString ProcessModel::column_name(int column) const
+String ProcessModel::column_name(int column) const
{
switch (column) {
case Column::Icon:
- return "";
+ return {};
case Column::PID:
- return "PID";
+ return "PID"_short_string;
case Column::TID:
- return "TID";
+ return "TID"_short_string;
case Column::PPID:
- return "PPID";
+ return "PPID"_short_string;
case Column::PGID:
- return "PGID";
+ return "PGID"_short_string;
case Column::SID:
- return "SID";
+ return "SID"_short_string;
case Column::State:
- return "State";
+ return "State"_short_string;
case Column::User:
- return "User";
+ return "User"_short_string;
case Column::Priority:
- return "Pr";
+ return "Pr"_short_string;
case Column::Virtual:
- return "Virtual";
+ return "Virtual"_short_string;
case Column::Physical:
- return "Physical";
+ return "Physical"_string.release_value_but_fixme_should_propagate_errors();
case Column::DirtyPrivate:
- return "Private";
+ return "Private"_short_string;
case Column::CleanInode:
- return "CleanI";
+ return "CleanI"_short_string;
case Column::PurgeableVolatile:
- return "Purg:V";
+ return "Purg:V"_short_string;
case Column::PurgeableNonvolatile:
- return "Purg:N";
+ return "Purg:N"_short_string;
case Column::CPU:
- return "CPU";
+ return "CPU"_short_string;
case Column::Processor:
- return "Processor";
+ return "Processor"_string.release_value_but_fixme_should_propagate_errors();
case Column::Name:
- return "Name";
+ return "Name"_short_string;
case Column::Syscalls:
- return "Syscalls";
+ return "Syscalls"_string.release_value_but_fixme_should_propagate_errors();
case Column::InodeFaults:
- return "F:Inode";
+ return "F:Inode"_short_string;
case Column::ZeroFaults:
- return "F:Zero";
+ return "F:Zero"_short_string;
case Column::CowFaults:
- return "F:CoW";
+ return "F:CoW"_short_string;
case Column::IPv4SocketReadBytes:
- return "IPv4 In";
+ return "IPv4 In"_short_string;
case Column::IPv4SocketWriteBytes:
- return "IPv4 Out";
+ return "IPv4 Out"_string.release_value_but_fixme_should_propagate_errors();
case Column::UnixSocketReadBytes:
- return "Unix In";
+ return "Unix In"_short_string;
case Column::UnixSocketWriteBytes:
- return "Unix Out";
+ return "Unix Out"_string.release_value_but_fixme_should_propagate_errors();
case Column::FileReadBytes:
- return "File In";
+ return "File In"_short_string;
case Column::FileWriteBytes:
- return "File Out";
+ return "File Out"_string.release_value_but_fixme_should_propagate_errors();
case Column::Pledge:
- return "Pledge";
+ return "Pledge"_short_string;
case Column::Veil:
- return "Veil";
+ return "Veil"_short_string;
case Column::Command:
- return "Command";
+ return "Command"_short_string;
default:
VERIFY_NOT_REACHED();
}
diff --git a/Userland/Applications/SystemMonitor/ProcessModel.h b/Userland/Applications/SystemMonitor/ProcessModel.h
index 40bda1286d..f1db941ca2 100644
--- a/Userland/Applications/SystemMonitor/ProcessModel.h
+++ b/Userland/Applications/SystemMonitor/ProcessModel.h
@@ -63,7 +63,7 @@ public:
virtual int tree_column() const override { return Column::Name; }
virtual int row_count(GUI::ModelIndex const&) const override;
virtual int column_count(GUI::ModelIndex const&) const override;
- virtual DeprecatedString column_name(int column) const override;
+ virtual String column_name(int column) const override;
virtual GUI::Variant data(GUI::ModelIndex const&, GUI::ModelRole) const override;
virtual GUI::ModelIndex index(int row, int column, GUI::ModelIndex const& parent = {}) const override;
virtual GUI::ModelIndex parent_index(GUI::ModelIndex const&) const override;
diff --git a/Userland/Applications/SystemMonitor/ThreadStackWidget.cpp b/Userland/Applications/SystemMonitor/ThreadStackWidget.cpp
index 4bb4ef6ae5..e45fb648e9 100644
--- a/Userland/Applications/SystemMonitor/ThreadStackWidget.cpp
+++ b/Userland/Applications/SystemMonitor/ThreadStackWidget.cpp
@@ -30,15 +30,15 @@ public:
int row_count(GUI::ModelIndex const&) const override { return m_symbols.size(); };
bool is_column_sortable(int) const override { return false; }
- DeprecatedString column_name(int column) const override
+ String column_name(int column) const override
{
switch (column) {
case Column::Address:
- return "Address";
+ return "Address"_short_string;
case Column::Object:
- return "Object";
+ return "Object"_short_string;
case Column::Symbol:
- return "Symbol";
+ return "Symbol"_short_string;
default:
VERIFY_NOT_REACHED();
}