From b7ef4af988e565ed26e1bff4c7f1749c49fb73c2 Mon Sep 17 00:00:00 2001 From: Skycoder42 Date: Thu, 19 Jul 2018 13:44:23 +0200 Subject: [PATCH] fix for mingw --- mkspecs/features/qsettingstranslator.prf | 2 +- src/mvvmcore/qsettingsaccessor.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mkspecs/features/qsettingstranslator.prf b/mkspecs/features/qsettingstranslator.prf index c4c8d6e..478bc86 100644 --- a/mkspecs/features/qsettingstranslator.prf +++ b/mkspecs/features/qsettingstranslator.prf @@ -22,7 +22,7 @@ QSETTINGSTRANSLATOR_DIR = $$QSETTINGSTRANSLATOR_DIR$$SUFFIX DBL_DOLLAR = $${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR}$${LITERAL_DOLLAR} defineReplace(qmake_escape) { - win32: return($$1) + win32:!mingw: return($$1) else: return($$shell_quote($$1)) } diff --git a/src/mvvmcore/qsettingsaccessor.cpp b/src/mvvmcore/qsettingsaccessor.cpp index f975299..b7de1f4 100644 --- a/src/mvvmcore/qsettingsaccessor.cpp +++ b/src/mvvmcore/qsettingsaccessor.cpp @@ -44,7 +44,12 @@ void QSettingsAccessor::save(const QString &key, const QVariant &value) void QSettingsAccessor::remove(const QString &key) { + d->settings->beginGroup(key); + auto allKeys = d->settings->allKeys(); + d->settings->endGroup(); d->settings->remove(key); + for(const auto &subKey : allKeys) + emit entryRemoved(key + QLatin1Char('/') + subKey); emit entryRemoved(key); }