Use local file path instead of url
If the localFile url is used, it creates a folder called `file:` in the home folder. So get filepath from url instead :)
This commit is contained in:
committed by
Tobias Fella
parent
13f05a0995
commit
f50c62ba12
@@ -52,8 +52,8 @@ QString Clipboard::saveImage(QString localPath) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
QDir dir;
|
QDir dir;
|
||||||
if (!dir.exists(localPath)) {
|
if (!dir.exists(QFileInfo(url.fileName()).absoluteFilePath())) {
|
||||||
dir.mkpath(localPath);
|
dir.mkpath(QFileInfo(url.fileName()).absoluteFilePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
image.save(url.toLocalFile());
|
image.save(url.toLocalFile());
|
||||||
|
|||||||
Reference in New Issue
Block a user