Browse Source

fix for mingw

pull/2/head
Skycoder42 6 years ago
parent
commit
b7ef4af988
No known key found for this signature in database GPG Key ID: 8E01AD9EF0578D2B
  1. 2
      mkspecs/features/qsettingstranslator.prf
  2. 5
      src/mvvmcore/qsettingsaccessor.cpp

2
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))
}

5
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);
}

Loading…
Cancel
Save