Merge branch '2.0'

This commit is contained in:
Felix Geyer 2016-01-29 17:22:37 +01:00
commit 71d4cb781d
30 changed files with 569 additions and 40 deletions

View file

@ -295,6 +295,7 @@ void EditEntryWidget::setForms(const Entry* entry, bool restore)
m_mainUi->expireDatePicker->setReadOnly(m_history);
m_mainUi->notesEdit->setReadOnly(m_history);
m_mainUi->tooglePasswordGeneratorButton->setChecked(false);
m_mainUi->tooglePasswordGeneratorButton->setDisabled(m_history);
m_mainUi->passwordGenerator->reset();
m_advancedUi->addAttachmentButton->setEnabled(!m_history);
updateAttachmentButtonsEnabled(m_advancedUi->attachmentsView->currentIndex());
@ -672,6 +673,14 @@ void EditEntryWidget::openAttachment(const QModelIndex& index)
return;
}
if (!file->flush()) {
MessageBox::warning(this, tr("Error"),
tr("Unable to save the attachment:\n").append(file->errorString()));
return;
}
file->close();
QDesktopServices::openUrl(QUrl::fromLocalFile(file->fileName()));
}