Display paths with '\' separator on Win32

This commit is contained in:
Christophe Dumez
2010-06-03 20:56:54 +00:00
parent 45c068f0f7
commit e3e9461901
5 changed files with 95 additions and 24 deletions

View File

@@ -211,6 +211,9 @@ void PropertiesWidget::updateSavePath(QTorrentHandle& _h) {
QString p = TorrentPersistentData::getSavePath(h.hash());
if(p.isEmpty())
p = h.save_path();
#ifdef Q_WS_WIN
p = p.replace("/", "\\");
#endif
save_path->setText(p);
}
}
@@ -229,6 +232,9 @@ void PropertiesWidget::loadTorrentInfos(QTorrentHandle &_h) {
QString p = TorrentPersistentData::getSavePath(h.hash());
if(p.isEmpty())
p = h.save_path();
#ifdef Q_WS_WIN
p = p.replace("/", "\\");
#endif
save_path->setText(p);
// Creation date
lbl_creationDate->setText(h.creation_date());
@@ -743,7 +749,11 @@ void PropertiesWidget::renameSelectedFile() {
if(!BTSession->useTemporaryFolder() || h.is_seed())
h.move_storage(savePath.absolutePath());
// Update save_path in dialog
save_path->setText(savePath.absolutePath());
QString display_path = savePath.absolutePath();
#ifdef Q_WS_WIN
display_path = display_path.replace("/", "\\");
#endif
save_path->setText(display_path);
}
}