Commit 721e9825 authored by Ingo Klöcker's avatar Ingo Klöcker Committed by Ingo Klöcker
Browse files

Reset OpenPGP keyserver to default on empty value

GnuPG-bug-id: 5711
parent 96928c1e
Pipeline #104882 passed with stage
in 2 minutes and 50 seconds
......@@ -352,9 +352,13 @@ void DirectoryServicesConfigurationPage::save()
}
if (mOpenPGPServiceEntry) {
const auto keyserver = mOpenPGPKeyserverEdit->text();
const auto keyserverUrl = keyserver.contains(QLatin1String{"://"}) ? keyserver : (QLatin1String{"hkps://"} + keyserver);
mOpenPGPServiceEntry->setStringValue(keyserverUrl);
const auto keyserver = mOpenPGPKeyserverEdit->text().trimmed();
if (keyserver.isEmpty()) {
mOpenPGPServiceEntry->resetToDefault();
} else {
const auto keyserverUrl = keyserver.contains(QLatin1String{"://"}) ? keyserver : (QLatin1String{"hkps://"} + keyserver);
mOpenPGPServiceEntry->setStringValue(keyserverUrl);
}
}
const QTime time{mTimeout->time()};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment