summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-11-05 04:03:08 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-11-05 04:03:08 +0100
commitfa7a186ca4aa694901a9e305a7155181288accc9 (patch)
tree1aeaa71171688c4b979e4f959b26ae1ae920ecda /facetracknoir
parentdb4783e0ecf03eb0ff98bd04f0507a8a4a330ede (diff)
proper saving fix by calling sync() method
Issue: #91
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/ui.cpp5
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);