Use KEMailSettings for default values on New Key

Noticed that class while adding the GenCardKeyDialog and it
seems very useful here, too.
parent 1f01ecdd
......@@ -83,6 +83,7 @@
#include <cassert>
#include <KSharedConfig>
#include <KEMailSettings>
#include <QLocale>
using namespace Kleo;
......@@ -1436,6 +1437,14 @@ void EnterDetailsPage::updateForm()
widgets.push_back(ui.addEmailToDnCB);
widgets.push_back(ui.advancedPB);
const KEMailSettings e;
if (ui.nameLE->text().isEmpty()) {
ui.nameLE->setText(e.getSetting(KEMailSettings::RealName));
}
if (ui.emailLE->text().isEmpty()) {
ui.emailLE->setText(e.getSetting(KEMailSettings::EmailAddress));
}
set_tab_order(widgets);
}
......
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