Fix cancel operation for example "Application"
On the save dialog the cancel option is detected now from exec() method. Change-Id: I977626b83fe770ddc148b57551becd04e5fd9dd5 Task-number: QTBUG-41020 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
This commit is contained in:
parent
b462314520
commit
1fb43025f2
@ -121,10 +121,10 @@ bool MainWindow::saveAs()
|
||||
QFileDialog dialog(this);
|
||||
dialog.setWindowModality(Qt::WindowModal);
|
||||
dialog.setAcceptMode(QFileDialog::AcceptSave);
|
||||
dialog.exec();
|
||||
QStringList files = dialog.selectedFiles();
|
||||
|
||||
if (files.isEmpty())
|
||||
QStringList files;
|
||||
if (dialog.exec())
|
||||
files = dialog.selectedFiles();
|
||||
else
|
||||
return false;
|
||||
|
||||
return saveFile(files.at(0));
|
||||
|
Loading…
Reference in New Issue
Block a user