Merge branch 'develop'

Conflicts:
	src/core/Tools.cpp
	src/sshagent/SSHAgent.cpp
This commit is contained in:
Jonathan White 2018-12-30 16:32:57 -05:00
commit 21de6f6163
No known key found for this signature in database
GPG key ID: 440FC65F2E0C6E01
57 changed files with 1296 additions and 395 deletions

View file

@ -829,9 +829,9 @@ bool EditEntryWidget::commitEntry()
auto answer = MessageBox::question(this,
tr("Apply generated password?"),
tr("Do you want to apply the generated password to this entry?"),
QMessageBox::Yes | QMessageBox::No,
QMessageBox::Yes);
if (answer == QMessageBox::Yes) {
MessageBox::Yes | MessageBox::No,
MessageBox::Yes);
if (answer == MessageBox::Yes) {
m_mainUi->passwordGenerator->applyPassword();
}
}
@ -955,13 +955,13 @@ void EditEntryWidget::cancel()
auto result = MessageBox::question(this,
QString(),
tr("Entry has unsaved changes"),
QMessageBox::Cancel | QMessageBox::Save | QMessageBox::Discard,
QMessageBox::Cancel);
if (result == QMessageBox::Cancel) {
MessageBox::Cancel | MessageBox::Save | MessageBox::Discard,
MessageBox::Cancel);
if (result == MessageBox::Cancel) {
m_mainUi->passwordGenerator->reset();
return;
}
if (result == QMessageBox::Save) {
if (result == MessageBox::Save) {
commitEntry();
m_saved = true;
}
@ -1066,11 +1066,14 @@ void EditEntryWidget::removeCurrentAttribute()
QModelIndex index = m_advancedUi->attributesView->currentIndex();
if (index.isValid()) {
if (MessageBox::question(this,
tr("Confirm Remove"),
tr("Are you sure you want to remove this attribute?"),
QMessageBox::Yes | QMessageBox::No)
== QMessageBox::Yes) {
auto result = MessageBox::question(this,
tr("Confirm Removal"),
tr("Are you sure you want to remove this attribute?"),
MessageBox::Remove | MessageBox::Cancel,
MessageBox::Cancel);
if (result == MessageBox::Remove) {
m_entryAttributes->remove(m_attributesModel->keyByIndex(index));
setUnsavedChanges(true);
}