Added disabling of restore windows offer after three skips.

This commit is contained in:
23rd
2026-08-19 07:08:21 +03:00
parent aa7217d372
commit de957d69ca
3 changed files with 32 additions and 0 deletions

View File

@@ -1347,6 +1347,23 @@ void Settings::writePrefImpl<bool>(std::string_view key, bool value) {
writePrefGeneric(key, value ? "\x1"_q : QByteArray());
}
template <>
std::optional<int> Settings::readPrefImpl<int>(std::string_view key) {
if (const auto data = readPrefGeneric(key)) {
auto ok = false;
const auto result = data->toInt(&ok);
if (ok) {
return result;
}
}
return {};
}
template <>
void Settings::writePrefImpl<int>(std::string_view key, int value) {
writePrefGeneric(key, QByteArray::number(value));
}
template <>
std::optional<QByteArray> Settings::readPrefImpl<QByteArray>(
std::string_view key) {