mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 22:47:21 -06:00
Merge pull request #622 from john-peterson/column
Adding "Save path" column
This commit is contained in:
@@ -210,18 +210,7 @@ QTorrentHandle PropertiesWidget::getCurrentTorrent() const {
|
||||
|
||||
void PropertiesWidget::updateSavePath(const QTorrentHandle& _h) {
|
||||
if (h.is_valid() && h == _h) {
|
||||
QString p;
|
||||
if (h.has_metadata() && h.num_files() == 1) {
|
||||
p = h.firstFileSavePath();
|
||||
} else {
|
||||
p = TorrentPersistentData::getSavePath(h.hash());
|
||||
if (p.isEmpty())
|
||||
p = h.save_path();
|
||||
}
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
p.replace("/", "\\");
|
||||
#endif
|
||||
save_path->setText(p);
|
||||
save_path->setText(h.save_path_parsed());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user