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);
|
QFileDialog dialog(this);
|
||||||
dialog.setWindowModality(Qt::WindowModal);
|
dialog.setWindowModality(Qt::WindowModal);
|
||||||
dialog.setAcceptMode(QFileDialog::AcceptSave);
|
dialog.setAcceptMode(QFileDialog::AcceptSave);
|
||||||
dialog.exec();
|
QStringList files;
|
||||||
QStringList files = dialog.selectedFiles();
|
if (dialog.exec())
|
||||||
|
files = dialog.selectedFiles();
|
||||||
if (files.isEmpty())
|
else
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return saveFile(files.at(0));
|
return saveFile(files.at(0));
|
||||||
|
Loading…
Reference in New Issue
Block a user