Commit 090c6589 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Don't ask twice if we want to overwrite file

parent 12ecfc16
...@@ -243,15 +243,10 @@ void IncidenceAttachment::saveAttachment(QListWidgetItem *item) ...@@ -243,15 +243,10 @@ void IncidenceAttachment::saveAttachment(QListWidgetItem *item)
KCalCore::Attachment::Ptr att = attitem->attachment(); KCalCore::Attachment::Ptr att = attitem->attachment();
// get the saveas file name // get the saveas file name
QString saveAsFile = QFileDialog::getSaveFileName(nullptr, i18nc("@title", "Save Attachment"), const QString saveAsFile = QFileDialog::getSaveFileName(nullptr, i18nc("@title", "Save Attachment"),
att->label()); att->label());
if (saveAsFile.isEmpty() if (saveAsFile.isEmpty()) {
|| (QFileInfo::exists(saveAsFile)
&& (KMessageBox::warningYesNo(
nullptr,
i18nc("@info", "%1 already exists. Do you want to overwrite it?",
saveAsFile)) == KMessageBox::No))) {
return; return;
} }
......
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