Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
relPath.prepend(folder->remotePath());
list = FolderMan::instance()->findFileInLocalFolders(relPath, ast->account());
if (list.count() > 0) {
- QString path = "file:///" + QString(list.at(0));
- return QUrl(path);
+ return QUrl::fromLocalFile(list.at(0));
}
// File does not exist anymore? Let's try to open its path
if (QFileInfo(relPath).exists()) {
const auto folder = getFolder();
if (folder != nullptr) {
-#ifdef Q_OS_WIN
- QString path = "file:///" + folder->path();
-#else
- QString path = "file://" + folder->path();
-#endif
- QDesktopServices::openUrl(path);
+ QDesktopServices::openUrl(QUrl::fromLocalFile(folder->path()));
}
}