Commit bb4b8922 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Allow to override files

parent 29186a5d
......@@ -73,7 +73,7 @@ bool CsvXXPort::exportContacts(const ContactList &contacts, VCardExportSelection
exportToFile(&tmpFile, contacts.addressList());
tmpFile.flush();
auto job = KIO::file_copy(QUrl::fromLocalFile(tmpFile.fileName()), url);
auto job = KIO::file_copy(QUrl::fromLocalFile(tmpFile.fileName()), url, -1, KIO::Overwrite);
KJobWidgets::setWindow(job, parentWidget());
return job->exec();
} else {
......
......@@ -379,7 +379,7 @@ bool GMXXXPort::exportContacts(const ContactList &list, VCardExportSelectionWidg
doExport(&tmpFile, list.addressList());
tmpFile.flush();
auto job = KIO::file_copy(QUrl::fromLocalFile(tmpFile.fileName()), url);
auto job = KIO::file_copy(QUrl::fromLocalFile(tmpFile.fileName()), url, -1, KIO::Overwrite);
KJobWidgets::setWindow(job, parentWidget());
return job->exec();
} else {
......
......@@ -112,7 +112,7 @@ bool LDIFXXPort::exportContacts(const ContactList &list, VCardExportSelectionWid
doExport(&tmpFile, list);
tmpFile.flush();
auto job = KIO::file_copy(QUrl::fromLocalFile(tmpFile.fileName()), url);
auto job = KIO::file_copy(QUrl::fromLocalFile(tmpFile.fileName()), url, -1, KIO::Overwrite);
KJobWidgets::setWindow(job, parentWidget());
return job->exec();
......
......@@ -248,7 +248,7 @@ bool VCardXXPort::doExport(const QUrl &url, const QByteArray &data) const
tmpFile.write(data);
tmpFile.flush();
auto job = KIO::file_copy(QUrl::fromLocalFile(tmpFile.fileName()), newUrl);
auto job = KIO::file_copy(QUrl::fromLocalFile(tmpFile.fileName()), newUrl, -1, KIO::Overwrite);
KJobWidgets::setWindow(job, parentWidget());
return job->exec();
}
......
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