mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 22:55:06 +00:00
GDirectoryModel: Allow retrieving an item's full path via Role::Custom
This commit is contained in:
parent
1cb661ae69
commit
13ca1ee8dc
1 changed files with 4 additions and 0 deletions
|
@ -238,6 +238,10 @@ GVariant GDirectoryModel::data(const GModelIndex& index, Role role) const
|
|||
{
|
||||
ASSERT(is_valid(index));
|
||||
auto& entry = this->entry(index.row());
|
||||
if (role == Role::Custom) {
|
||||
ASSERT(index.column() == Column::Name);
|
||||
return entry.full_path(*this);
|
||||
}
|
||||
if (role == Role::Sort) {
|
||||
switch (index.column()) {
|
||||
case Column::Icon:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue