diff --git a/src/chatlog/content/filetransferwidget.cpp b/src/chatlog/content/filetransferwidget.cpp index 3a11d6c09..cf8cd441a 100644 --- a/src/chatlog/content/filetransferwidget.cpp +++ b/src/chatlog/content/filetransferwidget.cpp @@ -435,7 +435,7 @@ void FileTransferWidget::handleButton(QPushButton *btn) else if (btn->objectName() == "dir") { QString dirPath = QFileInfo(fileInfo.filePath).dir().path(); - QDesktopServices::openUrl(QUrl("file://" + dirPath, QUrl::TolerantMode)); + QDesktopServices::openUrl(QUrl::fromLocalFile(dirPath)); } } diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index e7aadbeb2..9aaf8eb01 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -519,7 +519,7 @@ void Widget::confirmExecutableOpen(const QFileInfo file) } else { - QDesktopServices::openUrl(QUrl("file://" + file.filePath(), QUrl::TolerantMode)); + QDesktopServices::openUrl(QUrl::fromLocalFile(file.filePath())); } }