From fa7a186ca4aa694901a9e305a7155181288accc9 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 5 Nov 2014 04:03:08 +0100 Subject: proper saving fix by calling sync() method Issue: #91 --- facetracknoir/ui.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'facetracknoir/ui.cpp') 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 settings = group::ini_file(); + settings->sync(); #if defined(__unix) || defined(__linux) QByteArray bytes = QFile::encodeName(currentFile); -- cgit v1.2.3