mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-02 17:28:48 +00:00
LibGUI: GTableModel::data() should take a GModelIndex instead of int,int.
This commit is contained in:
parent
dc4e6dd7bc
commit
7df1121e1c
Notes:
sideshowbarker
2024-07-19 15:09:46 +09:00
Author: https://github.com/awesomekling
Commit: 7df1121e1c
6 changed files with 12 additions and 12 deletions
|
@ -80,12 +80,12 @@ static String pretty_byte_size(size_t size)
|
|||
return String::format("%uK", size / 1024);
|
||||
}
|
||||
|
||||
GVariant ProcessTableModel::data(int row, int column) const
|
||||
GVariant ProcessTableModel::data(const GModelIndex& index) const
|
||||
{
|
||||
ASSERT(is_valid({ row, column }));
|
||||
auto it = m_processes.find(m_pids[row]);
|
||||
ASSERT(is_valid(index));
|
||||
auto it = m_processes.find(m_pids[index.row()]);
|
||||
auto& process = *(*it).value;
|
||||
switch (column) {
|
||||
switch (index.column()) {
|
||||
case Column::Icon: return *m_generic_process_icon;
|
||||
case Column::PID: return process.current_state.pid;
|
||||
case Column::State: return process.current_state.state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue