17 QFile file(contentUri);
18 const QString savePath = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
20 QDir dirPath = savePath;
22 QString filename = file.fileName();
23 if (dirPath.exists(filename)) {
25 dirPath.remove(filename);
28 bool copyResult = file.copy(savePath +
"/" + filename);
30 qWarning() <<
"Failed to copy file from content uri" << contentUri <<
"to" << savePath +
"/" + filename;
31 qWarning() <<
" " <<
ppVar(file.error()) <<
ppVar(file.errorString());
34 return savePath +
"/" + filename;