mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-21 10:05:32 +00:00
SystemMonitor: West Const to East Const refactor
This commit is contained in:
parent
484b9c1ba3
commit
ac798da642
|
@ -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();
|
||||
}
|
||||
|
||||
int ProcessModel::column_count(const GUI::ModelIndex&) const
|
||||
int ProcessModel::column_count(GUI::ModelIndex const&) const
|
||||
{
|
||||
return Column::__Count;
|
||||
}
|
||||
|
@ -128,7 +128,7 @@ static String pretty_byte_size(size_t size)
|
|||
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));
|
||||
|
||||
|
@ -313,7 +313,7 @@ GUI::Variant ProcessModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol
|
|||
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;
|
||||
|
||||
|
|
|
@ -56,12 +56,12 @@ public:
|
|||
static NonnullRefPtr<ProcessModel> create() { return adopt_ref(*new ProcessModel); }
|
||||
virtual ~ProcessModel() override;
|
||||
|
||||
virtual int row_count(const GUI::ModelIndex&) const override;
|
||||
virtual int column_count(const GUI::ModelIndex&) const override;
|
||||
virtual int row_count(GUI::ModelIndex const&) const override;
|
||||
virtual int column_count(GUI::ModelIndex const&) 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 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; }
|
||||
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;
|
||||
|
||||
const NonnullOwnPtrVector<CpuInfo>& cpus() const { return m_cpus; }
|
||||
NonnullOwnPtrVector<CpuInfo> const& cpus() const { return m_cpus; }
|
||||
|
||||
private:
|
||||
ProcessModel();
|
||||
|
|
Loading…
Reference in a new issue