summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-11-10 08:08:46 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-11-10 08:09:58 +0100
commitd5e47ceb0f9068c6e8560f5fa0f97bf71cb1916e (patch)
treeebfe6fdf4dce2794ae614026af36b714a6f4c15e
parent63de4cb4321d94b29d0deb275f0f15c14df1b545 (diff)
only replace profile directory if not cancelled
-rw-r--r--facetracknoir/ui.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp
index f8b6e120..c30343e0 100644
--- a/facetracknoir/ui.cpp
+++ b/facetracknoir/ui.cpp
@@ -145,6 +145,10 @@ void MainWindow::saveAs()
QString fileName = QFileDialog::getSaveFileName(this, tr("Save file"),
oldFile,
tr("Settings file (*.ini);;All Files (*)"));
+
+ if (fileName.isEmpty())
+ return;
+
(void) QFile::remove(fileName);
{