diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-04 19:19:38 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-04 19:20:17 +0100 |
commit | 1ca566b033adc48afdfb964e5140751c8cb14e3c (patch) | |
tree | 0947ff6861c5d01fa276a824ea6a714bb137bf02 /facetracknoir | |
parent | 1bd781484b6846195a39c09aee81bdadac214ef4 (diff) |
delete ini before saving to workaround Qt5 bug
Issue: #91
Diffstat (limited to 'facetracknoir')
-rw-r--r-- | facetracknoir/ui.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp index 8142e20a..5d3bc591 100644 --- a/facetracknoir/ui.cpp +++ b/facetracknoir/ui.cpp @@ -122,11 +122,14 @@ void MainWindow::save_mappings() { #endif void MainWindow::save() { + const QString currentFile = group::ini_pathname(); + // Qt5 refuses writing to empty file + (void) QFile::remove(currentFile); + b->save(); save_mappings(); #if defined(__unix) || defined(__linux) - const QString currentFile = group::ini_pathname(); QByteArray bytes = QFile::encodeName(currentFile); const char* filename_as_asciiz = bytes.constData(); |