https://bugs.kde.org/show_bug.cgi?id=357865

            Bug ID: 357865
           Summary: The QPA file dialog does not respect mime type filters
           Product: frameworks-frameworkintegration
           Version: unspecified
          Platform: Archlinux Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: general
          Assignee: kdelibs-b...@kde.org
          Reporter: m...@baloneygeek.com

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

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to