Fix QgsSettings::enumValue resolution when used with a non-default section

This commit is contained in:
Nyall Dawson 2019-05-28 09:45:19 +10:00
parent dfa6aa1ed1
commit 10c686ba32

View File

@ -257,7 +257,7 @@ class CORE_EXPORT QgsSettings : public QObject
if ( metaEnum.isValid() )
{
// read as string
QByteArray ba = value( key, metaEnum.valueToKey( defaultValue ) ).toString().toUtf8();
QByteArray ba = value( key, metaEnum.valueToKey( defaultValue ), section ).toString().toUtf8();
const char *vs = ba.data();
v = static_cast<T>( metaEnum.keyToValue( vs, &ok ) );
if ( ok )