mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
use QUrl::fromLocalFile (fix #1305)
This commit is contained in:
parent
4852a7efa5
commit
00af059a4f
|
@ -435,7 +435,7 @@ void FileTransferWidget::handleButton(QPushButton *btn)
|
||||||
else if (btn->objectName() == "dir")
|
else if (btn->objectName() == "dir")
|
||||||
{
|
{
|
||||||
QString dirPath = QFileInfo(fileInfo.filePath).dir().path();
|
QString dirPath = QFileInfo(fileInfo.filePath).dir().path();
|
||||||
QDesktopServices::openUrl(QUrl("file://" + dirPath, QUrl::TolerantMode));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(dirPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -519,7 +519,7 @@ void Widget::confirmExecutableOpen(const QFileInfo file)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QDesktopServices::openUrl(QUrl("file://" + file.filePath(), QUrl::TolerantMode));
|
QDesktopServices::openUrl(QUrl::fromLocalFile(file.filePath()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user