Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
4.6.3
-
None
-
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.