mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Code clean up
This commit is contained in:
parent
a9fbef62b6
commit
5696944c6f
7 changed files with 57 additions and 69 deletions
|
@ -139,11 +139,7 @@ TorrentModel* TransferListWidget::getSourceModel() const {
|
|||
}
|
||||
|
||||
void TransferListWidget::previewFile(QString filePath) {
|
||||
#ifdef Q_WS_WIN
|
||||
QDesktopServices::openUrl(QUrl(QString("file:///")+filePath));
|
||||
#else
|
||||
QDesktopServices::openUrl(QUrl(QString("file://")+filePath));
|
||||
#endif
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(filePath));
|
||||
}
|
||||
|
||||
void TransferListWidget::setRefreshInterval(int t) {
|
||||
|
@ -201,11 +197,7 @@ void TransferListWidget::torrentDoubleClicked(const QModelIndex& index) {
|
|||
}
|
||||
break;
|
||||
case OPEN_DEST:
|
||||
#ifdef Q_WS_WIN
|
||||
QDesktopServices::openUrl(QUrl("file:///" + h.save_path()));
|
||||
#else
|
||||
QDesktopServices::openUrl(QUrl("file://" + h.save_path()));
|
||||
#endif
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(h.save_path()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -413,11 +405,7 @@ void TransferListWidget::openSelectedTorrentsFolder() const {
|
|||
qDebug("Opening path at %s", qPrintable(savePath));
|
||||
if(!pathsList.contains(savePath)) {
|
||||
pathsList.append(savePath);
|
||||
#ifdef Q_WS_WIN
|
||||
QDesktopServices::openUrl(QUrl(QString("file:///")+savePath));
|
||||
#else
|
||||
QDesktopServices::openUrl(QUrl(QString("file://")+savePath));
|
||||
#endif
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(savePath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue