diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-04 19:19:13 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-04 19:20:17 +0100 |
commit | 1bd781484b6846195a39c09aee81bdadac214ef4 (patch) | |
tree | f5386616183d8ec276160d5fe37b955cca8ee8cd /facetracknoir | |
parent | 4c71c6cf336b4891fede0e300f4ab20a5d0a19b4 (diff) |
nix nonsensical "save as" logic
Diffstat (limited to 'facetracknoir')
-rw-r--r-- | facetracknoir/ui.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp index e89fbc73..8142e20a 100644 --- a/facetracknoir/ui.cpp +++ b/facetracknoir/ui.cpp @@ -143,27 +143,14 @@ void MainWindow::saveAs() QString fileName = QFileDialog::getSaveFileName(this, tr("Save file"), oldFile, tr("Settings file (*.ini);;All Files (*)")); - if (!fileName.isEmpty()) { + (void) QFile::remove(fileName); - QFileInfo newFileInfo ( fileName ); - if ((newFileInfo.exists()) && (oldFile != fileName)) { - QFile newFileFile ( fileName ); - newFileFile.remove(); - } - - QFileInfo oldFileInfo ( oldFile ); - if (oldFileInfo.exists()) { - QFile oldFileFile ( oldFile ); - oldFileFile.copy( fileName ); - } - - { - QSettings settings(group::org); - settings.setValue (group::filename_key, fileName); - } - save(); + { + QSettings settings(group::org); + settings.setValue (group::filename_key, fileName); } + save(); fill_profile_combobox(); } |