Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-30185

QFileDialog::getSaveFileName returns messed up filename using multiple filters

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.0.2
    • 5.0.1
    • None
    • Windows 8 x64, Qt 5.0.1 x64 VS 2012
    • 426f2ccafc8fc8336193dbdd67a949e790d7fa7e

    Description

      According to the documentation multiple filters should be indicated using (*.png *.jpg *.bmp)

      However, if I used the attached project of QTBUG-29902 and add as a last line

       
      QMessageBox::information(0, QString(), QFileDialog::getSaveFileName( 0,
                                                    app.tr("Please, select export file name"),
                                                    QString("justPressEnter"),
                                                    app.tr("Images (*.png *.xpm *.jpg);;All files (.*)") ));
      

      Moreover adding #includes to QMessageBox and QString, of course. When I enter in the file dialog "test" without any extension and press save, then I get:

       c:/Data/test.png *xpm *.jpg

      The same in 4.8 didn't append the other extensions to the filename, which is really not expected. As I minor note I want to point out, that the filepath shows slashes instead of backslashes (windows style)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            kleint Friedemann Kleint
            danielkaneider Daniel Kaneider
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes