Make it possible to "save as" attachment after opening them

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This commit is contained in:
Carl Schwan
2022-11-17 00:44:54 +01:00
committed by Tobias Fella
parent 236c6a2d04
commit edaf1005d4
3 changed files with 31 additions and 7 deletions

View File

@@ -3,6 +3,7 @@
#include "urlhelper.h"
#include <QFile>
#include <QtGlobal>
#ifdef Q_OS_ANDROID
@@ -22,3 +23,9 @@ void UrlHelper::openUrl(const QUrl &url)
job->start();
#endif
}
void UrlHelper::copyTo(const QUrl &origin, const QUrl &destination)
{
QFile originFile(origin.toLocalFile());
originFile.copy(destination.toLocalFile());
}