mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 12:19:03 +03:00
Replace prefixing of paths with file:// by QUrl::fromLocalFile()
Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
This commit is contained in:
parent
749070a29c
commit
0f620acc1f
2 changed files with 2 additions and 8 deletions
|
@ -96,8 +96,7 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
|
|||
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()) {
|
||||
|
|
|
@ -420,12 +420,7 @@ void User::openLocalFolder()
|
|||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue