mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 17:17:42 +00:00
SystemMonitor: West Const to East Const refactor
This commit is contained in:
parent
484b9c1ba3
commit
ac798da642
2 changed files with 10 additions and 10 deletions
|
@ -45,12 +45,12 @@ ProcessModel::~ProcessModel()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProcessModel::row_count(const GUI::ModelIndex&) const
|
int ProcessModel::row_count(GUI::ModelIndex const&) const
|
||||||
{
|
{
|
||||||
return m_tids.size();
|
return m_tids.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProcessModel::column_count(const GUI::ModelIndex&) const
|
int ProcessModel::column_count(GUI::ModelIndex const&) const
|
||||||
{
|
{
|
||||||
return Column::__Count;
|
return Column::__Count;
|
||||||
}
|
}
|
||||||
|
@ -128,7 +128,7 @@ static String pretty_byte_size(size_t size)
|
||||||
return String::formatted("{}K", size / 1024);
|
return String::formatted("{}K", size / 1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, GUI::ModelRole role) const
|
GUI::Variant ProcessModel::data(GUI::ModelIndex const& index, GUI::ModelRole role) const
|
||||||
{
|
{
|
||||||
VERIFY(is_within_range(index));
|
VERIFY(is_within_range(index));
|
||||||
|
|
||||||
|
@ -313,7 +313,7 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<GUI::ModelIndex> ProcessModel::matches(const StringView& searching, unsigned flags, const GUI::ModelIndex&)
|
Vector<GUI::ModelIndex> ProcessModel::matches(StringView const& searching, unsigned flags, GUI::ModelIndex const&)
|
||||||
{
|
{
|
||||||
Vector<GUI::ModelIndex> found_indices;
|
Vector<GUI::ModelIndex> found_indices;
|
||||||
|
|
||||||
|
|
|
@ -56,12 +56,12 @@ public:
|
||||||
static NonnullRefPtr<ProcessModel> create() { return adopt_ref(*new ProcessModel); }
|
static NonnullRefPtr<ProcessModel> create() { return adopt_ref(*new ProcessModel); }
|
||||||
virtual ~ProcessModel() override;
|
virtual ~ProcessModel() override;
|
||||||
|
|
||||||
virtual int row_count(const GUI::ModelIndex&) const override;
|
virtual int row_count(GUI::ModelIndex const&) const override;
|
||||||
virtual int column_count(const GUI::ModelIndex&) const override;
|
virtual int column_count(GUI::ModelIndex const&) const override;
|
||||||
virtual String column_name(int column) const override;
|
virtual String column_name(int column) const override;
|
||||||
virtual GUI::Variant data(const GUI::ModelIndex&, GUI::ModelRole) const override;
|
virtual GUI::Variant data(GUI::ModelIndex const&, GUI::ModelRole) const override;
|
||||||
virtual bool is_searchable() const override { return true; }
|
virtual bool is_searchable() const override { return true; }
|
||||||
virtual Vector<GUI::ModelIndex> matches(const StringView&, unsigned = MatchesFlag::AllMatching, const GUI::ModelIndex& = GUI::ModelIndex()) override;
|
virtual Vector<GUI::ModelIndex> matches(StringView const&, unsigned = MatchesFlag::AllMatching, GUI::ModelIndex const& = GUI::ModelIndex()) override;
|
||||||
virtual bool is_column_sortable(int column_index) const override { return column_index != Column::Icon; }
|
virtual bool is_column_sortable(int column_index) const override { return column_index != Column::Icon; }
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
|
@ -76,10 +76,10 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
Function<void(const NonnullOwnPtrVector<CpuInfo>&)> on_cpu_info_change;
|
Function<void(NonnullOwnPtrVector<CpuInfo> const&)> on_cpu_info_change;
|
||||||
Function<void(int process_count, int thread_count)> on_state_update;
|
Function<void(int process_count, int thread_count)> on_state_update;
|
||||||
|
|
||||||
const NonnullOwnPtrVector<CpuInfo>& cpus() const { return m_cpus; }
|
NonnullOwnPtrVector<CpuInfo> const& cpus() const { return m_cpus; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ProcessModel();
|
ProcessModel();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue