Commit f06402fb authored by Wolfgang Bauer's avatar Wolfgang Bauer

Fix importing several links at once

QUrl::path() returns a path, assigning this to a QUrl results in an
invalid QUrl due to the implicit conversion from QString.
Use setPath() instead to update the variable's path.

This broke the downloads when more than one link was selected in the
"Import Links" dialog.
parent ed694ff5
......@@ -234,7 +234,7 @@ QUrl UrlChecker::destUrl(const QUrl &destOrFolder, const QUrl &source, const QSt
if (usedFileName.isEmpty()) {
usedFileName = QUrl::toPercentEncoding(source.toString(), "/");
}
dest = dest.adjusted(QUrl::RemoveFilename).path() + usedFileName;
dest.setPath(dest.adjusted(QUrl::RemoveFilename).path() + usedFileName);
} else if (!fileName.isEmpty()) {
dest.setPath(dest.adjusted(QUrl::RemoveFilename).path() + fileName);
}
......
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