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

QFileDialog::getSaveFileName crashes with empty selectedFilter string

    XMLWordPrintable

Details

    • fb47a99e1d0020e8dcc4cc4f9c188ccd2fd5ee3e

    Description

      On Mac (10.6) QFileDialog::getSaveFileName crashes when empty selectedFilter is passed to the function.

      Here is the code that causes the crash:

      QString filtersList;
      filtersList += "My File Type(*.mft);;";
      filtersList += "All Files (.);;";
      QString defaultFile( "mypath/new_file.mft");
      QString selectedFilter;

      selectedFile = QFileDialog::getSaveFileName(
      this,
      "Save File Dialog",
      defaultFile,
      filtersList,
      &selectedFilter);

      The same code works ok on Windows and Linux. In such case selectedFilter returns the filter selected by the user from the file dialog.

      Attachments

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

        Activity

          People

            pullatti Prasanth Ullattil
            kalos Calogero
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes