diff --git a/src/base/settingvalue.h b/src/base/settingvalue.h index 5ce8f3d8a..e3ff237c1 100644 --- a/src/base/settingvalue.h +++ b/src/base/settingvalue.h @@ -29,7 +29,6 @@ #ifndef SETTINGVALUE_H #define SETTINGVALUE_H -#include #include #include @@ -41,8 +40,6 @@ template class CachedSettingValue { - using ProxyFunc = std::function; - public: explicit CachedSettingValue(const char *keyName, const T &defaultValue = T()) : m_keyName(QLatin1String(keyName)) @@ -50,8 +47,11 @@ public: { } + // The signature of the ProxyFunc should be equivalent to the following: + // T proxyFunc(const T &a); + template explicit CachedSettingValue(const char *keyName, const T &defaultValue - , const ProxyFunc &proxyFunc) + , ProxyFunc proxyFunc) : m_keyName(QLatin1String(keyName)) , m_value(proxyFunc(loadValue(defaultValue))) {