Here's a case description: 1. I obtain a list of mimetypes QStringList mimeTypes = {"image/bmp", "image/png" ...}; 2. I set this on a QFileDialog QFileDialog::setMimeTypeFilters(mimeTypes); 3. Now I explicitly set my selected mimeType to be PNG QFileDialog::selectMimeTypeFilter("image/png"); 4. I select a nonexistent filename (I intend to save file as this name) QFileDialog::selectFile("Something.png"); What is supposed to happen is that the file name field shows "Something.png" and the mimetype field shows "image/png". What does happen is that the filename field shows "Something.bmp" and the mimetype field shows "image/bmp". BMP is the first element in the list of mimetypes. Omitting the call to selectMimeTypeFilter causes the mimetype field stays empty, but the filename still ends in ".bmp" AcceptMode is AcceptSave and FileMode is AnyFile. With the Qt file dialog (QFileDialog::setOption(QFileDialog::DontUseNativeDialog)), the correct behaviour is seen. Reproducible: Always
If I comment out dialog.setOption(QFileDialog::DontUseNativeDialog); in spectacle for the native dialog, I see that the Save As mimetype filter is not set to "image/png", but it's not set to image/bmp like the original report appears to imply. Was the behaviour of this changed at some point without the ticket being mentioned in the commit? Also, arguably this makes this bug quite a bit less severe. The image now properly is a PNG, it's just not filtered for image/png.
Can you still reproduce this issue?
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!
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!