QGtk3FileDialogHelper: respect QFileDialogOptions::ReadOnly
Change-Id: I982dd10632760fe91b89ade30d79f97f27d17dcd Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
59c3670b63
commit
2f7e940e83
@ -420,6 +420,9 @@ void QGtk3FileDialogHelper::applyOptions()
|
||||
const bool confirmOverwrite = !opts->testOption(QFileDialogOptions::DontConfirmOverwrite);
|
||||
gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(gtkDialog), confirmOverwrite);
|
||||
|
||||
const bool readOnly = opts->testOption(QFileDialogOptions::ReadOnly);
|
||||
gtk_file_chooser_set_create_folders(GTK_FILE_CHOOSER(gtkDialog), !readOnly);
|
||||
|
||||
const QStringList nameFilters = opts->nameFilters();
|
||||
if (!nameFilters.isEmpty())
|
||||
setNameFilters(nameFilters);
|
||||
|
Loading…
Reference in New Issue
Block a user