Example #1
0
int QtSettingsProvider::getSetting(const Setting<int>& setting) {
    QVariant variant = settings_.value(setting.getKey().c_str());
    return variant.isNull() ? setting.getDefaultValue() : variant.toInt();
}
Example #2
0
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());
}