diff --git a/src/accountinfo.cpp b/src/accountinfo.cpp --- a/src/accountinfo.cpp +++ b/src/accountinfo.cpp @@ -38,6 +38,7 @@ #include #include #include +#include AccountInfo::AccountInfo(AccountModel* model, QWidget* parent, Qt::WindowFlags f) : QWidget(parent, f) @@ -103,6 +104,18 @@ return; } + if (!m_infoToSave.isEmpty()) { + const QString message = i18n("Save changes to this user?"); + bool wantToSave = KMessageBox::questionYesNo(this, + message, + QString(), + KStandardGuiItem::save(), + KStandardGuiItem::discard()) == KMessageBox::Yes; + if (wantToSave) { + save(); + } + } + m_index = index; m_infoToSave.clear(); loadFromModel();