int QtSettingsProvider::getSetting(const Setting<int>& setting) { QVariant variant = settings_.value(setting.getKey().c_str()); return variant.isNull() ? setting.getDefaultValue() : variant.toInt(); }
std::string QtSettingsProvider::getSetting(const Setting<std::string>& setting) { QVariant variant = settings_.value(setting.getKey().c_str()); return variant.isNull() ? setting.getDefaultValue() : std::string(variant.toString().toUtf8()); }