Bug 350408 - QML FileDialog keeps previous selected files if selectMultiple==true
Summary: QML FileDialog keeps previous selected files if selectMultiple==true
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-frameworkintegration
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-20 11:56 UTC by Markus Heß
Modified: 2022-12-06 05:18 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Heß 2015-07-20 11:56:01 UTC
I have a QML FileDialog where selectedMultiple is set to true. When I select some files for the first time, the selected files are correctly stored in the fileUrls property. After opening the FileDialog again and selection some different files, I would expect that fileUrls contains only the currently selected files, but the list contains also the which where selected before. 

Reproducible: Always

Steps to Reproduce:
1. Create a QML file with a file dialog where selectMultiple is set to true:
FileDialog {
    selectMultiple: true
    onAccepted: {
        console.log(fileUrls);
    }
}

2. Start the sample, open the file dialog and select one ore more files (foo1.txt, bar1.txt) and accept the selection

3. Open the file dialog again and select some other files (foo2.txt, bar2.txt) and accept again

Actual Results:  
fileUrls contains the previous and the last selected files: [ foo1.txt, bar1.txt, foo2.txt, bar2.txt ]

Expected Results:  
fileUrls should contain only the last selected files: [ foo2.txt, bar2.txt ]

The same code is working with the gnome file dialog, so I think the bug is in the frameworksintegration.
Comment 1 Miguel Angel 2017-07-10 08:57:11 UTC
This problem could be the problem in Cura: https://github.com/Ultimaker/Cura/issues/2089#issuecomment-314044314
Comment 2 Justin Zobel 2022-11-06 09:24:45 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-11-21 05:12:13 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-12-06 05:18:45 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!