Skip to content

Commit

Permalink
Fix QgsSettings::enumValue resolution when used with a non-default se…
Browse files Browse the repository at this point in the history
…ction

(cherry picked from commit 10c686b)
  • Loading branch information
nyalldawson committed Jun 3, 2019
1 parent 7229a7d commit 768a8da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgssettings.h
Expand Up @@ -248,7 +248,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 )
Expand Down

0 comments on commit 768a8da

Please sign in to comment.