summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-11-04 19:19:38 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-11-04 19:20:17 +0100
commit1ca566b033adc48afdfb964e5140751c8cb14e3c (patch)
tree0947ff6861c5d01fa276a824ea6a714bb137bf02 /facetracknoir
parent1bd781484b6846195a39c09aee81bdadac214ef4 (diff)
delete ini before saving to workaround Qt5 bug
Issue: #91
Diffstat (limited to 'facetracknoir')
-rw-r--r--facetracknoir/ui.cpp5
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();