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") 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") else if (btn->objectName() == "dir")
{ {
QString dirName = fileInfo.filePath; QString dirPath = QDir(QFileInfo(fileInfo.filePath).dir()).path();
dirName.chop(fileInfo.fileName.length()); QDesktopServices::openUrl(QUrl("file://" + dirPath, QUrl::TolerantMode));
QDesktopServices::openUrl(QUrl("file:///" + dirName, QUrl::TolerantMode));
} }
} }