mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:07:44 +00:00
LibGUI: Add 64-bit signed integer support to GVariant
What was previously the "Int" type is now "Int32" and "Int64".
This commit is contained in:
parent
137a45dff2
commit
6906edee9a
8 changed files with 120 additions and 64 deletions
|
@ -282,7 +282,7 @@ void DirectoryView::update_statusbar()
|
|||
current_view().selection().for_each_index([&](auto& index) {
|
||||
auto& model = *current_view().model();
|
||||
auto size_index = model.sibling(index.row(), GFileSystemModel::Column::Size, model.parent_index(index));
|
||||
auto file_size = model.data(size_index).to_int();
|
||||
auto file_size = model.data(size_index).to_i32();
|
||||
selected_byte_count += file_size;
|
||||
});
|
||||
|
||||
|
|
|
@ -56,5 +56,5 @@ pid_t ProcessTableView::selected_pid() const
|
|||
{
|
||||
if (selection().is_empty())
|
||||
return -1;
|
||||
return model()->data(model()->index(selection().first().row(), ProcessModel::Column::PID), GModel::Role::Sort).as_int();
|
||||
return model()->data(model()->index(selection().first().row(), ProcessModel::Column::PID), GModel::Role::Sort).as_i32();
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ public:
|
|||
virtual void paint(GPainter& painter, const Rect& a_rect, const Palette& palette, const GModel& model, const GModelIndex& index) override
|
||||
{
|
||||
auto rect = a_rect.shrunken(2, 2);
|
||||
auto percentage = model.data(index, GModel::Role::Custom).to_int();
|
||||
auto percentage = model.data(index, GModel::Role::Custom).to_i32();
|
||||
|
||||
auto data = model.data(index, GModel::Role::Display);
|
||||
String text;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue