Bug 512321 - Incomplete Extraction
Summary: Incomplete Extraction
Status: REPORTED
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Jpn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-19 02:04 UTC by Jpn
Modified: 2025-12-08 00:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
A video showing the bug (2.65 MB, video/mp4)
2025-11-19 02:04 UTC, Jpn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jpn 2025-11-19 02:04:26 UTC
Created attachment 186939 [details]
A video showing the bug

SUMMARY
Ark file manager fails to extract all selected files from specific archives when using drag-and-drop, despite functioning correctly with menu-based extraction methods.

STEPS TO REPRODUCE
1. Open the Ark file manager.
2. Select all desired files within an archive for extraction.
3. Initiate the extraction process by dragging and dropping the selected files into the target folder or using a custom destination.

OBSERVED RESULT
Some folders or files are missing from the extracted content in the target folder.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.12.48-1-MANJARO (Wayland)
KDE Plasma Version: 6.3.6
KDE Frameworks Version: 6.18.0
Qt Version: 6.9.2
Comment 1 Jpn 2025-11-27 20:21:32 UTC
This appears to be a Qt bug. The method `selectedRows` in the selection model of QTreeView returns an incomplete list, missing some selected items.
Replacing `selectedRows` by `selectedIndexes` solves the problem:
```c++
QModelIndexList Part::getSelectedIndexes()
{
    QModelIndexList list;

    auto selected = m_view->selectionModel()->selectedIndexes();
    for (const QModelIndex &index: selected) {
        if (index.column() == 0) {
            list.append(m_filterModel->mapToSource(index));
        }
    }
    return list;
}
```