diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-05 04:03:08 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-11-05 04:03:08 +0100 |
commit | fa7a186ca4aa694901a9e305a7155181288accc9 (patch) | |
tree | 1aeaa71171688c4b979e4f959b26ae1ae920ecda /facetracknoir/ui.cpp | |
parent | db4783e0ecf03eb0ff98bd04f0507a8a4a330ede (diff) |
proper saving fix by calling sync() method
Issue: #91
Diffstat (limited to 'facetracknoir/ui.cpp')
-rw-r--r-- | facetracknoir/ui.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/facetracknoir/ui.cpp b/facetracknoir/ui.cpp index a9fcbbc7..4d5935c6 100644 --- a/facetracknoir/ui.cpp +++ b/facetracknoir/ui.cpp @@ -123,11 +123,10 @@ void MainWindow::save_mappings() { void MainWindow::save() { const QString currentFile = group::ini_pathname(); - // Qt5 refuses writing to empty file - (void) QFile::remove(currentFile); - b->save(); save_mappings(); + mem<QSettings> settings = group::ini_file(); + settings->sync(); #if defined(__unix) || defined(__linux) QByteArray bytes = QFile::encodeName(currentFile); |