1
0
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:
TheLastProject 2015-02-18 00:30:50 +01:00
parent 4edb608777
commit af89e823c6

View File

@ -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));
}
}