mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Clean up code
This commit is contained in:
parent
4edb608777
commit
af89e823c6
|
@ -429,13 +429,12 @@ void FileTransferWidget::handleButton(QPushButton *btn)
|
|||
|
||||
if(btn->objectName() == "ok")
|
||||
{
|
||||
QDesktopServices::openUrl(QUrl("file:///" + fileInfo.filePath, QUrl::TolerantMode));
|
||||
QDesktopServices::openUrl(QUrl("file://" + fileInfo.filePath, QUrl::TolerantMode));
|
||||
}
|
||||
else if (btn->objectName() == "dir")
|
||||
{
|
||||
QString dirName = fileInfo.filePath;
|
||||
dirName.chop(fileInfo.fileName.length());
|
||||
QDesktopServices::openUrl(QUrl("file:///" + dirName, QUrl::TolerantMode));
|
||||
QString dirPath = QDir(QFileInfo(fileInfo.filePath).dir()).path();
|
||||
QDesktopServices::openUrl(QUrl("file://" + dirPath, QUrl::TolerantMode));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user