mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-31 03:50:20 -07:00
Code clean up
This commit is contained in:
parent
4c5dd66b0f
commit
ce6348bc32
10 changed files with 36 additions and 39 deletions
|
@ -222,7 +222,7 @@ void PropertiesWidget::updateSavePath(const QTorrentHandle& _h) {
|
|||
p = h.save_path();
|
||||
}
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
p = p.replace("/", "\\");
|
||||
p.replace("/", "\\");
|
||||
#endif
|
||||
save_path->setText(p);
|
||||
}
|
||||
|
@ -524,8 +524,7 @@ void PropertiesWidget::renameSelectedFile() {
|
|||
// File renaming
|
||||
const int file_index = PropListModel->getFileIndex(index);
|
||||
if(!h.is_valid() || !h.has_metadata()) return;
|
||||
QString old_name = h.filepath_at(file_index);
|
||||
old_name = old_name.replace("\\", "/");
|
||||
QString old_name = h.filepath_at(file_index).replace("\\", "/");
|
||||
if(old_name.endsWith(".!qB") && !new_name_last.endsWith(".!qB")) {
|
||||
new_name_last += ".!qB";
|
||||
}
|
||||
|
@ -713,7 +712,7 @@ void PropertiesWidget::on_changeSavePathButton_clicked() {
|
|||
display_path = savePath.absolutePath();
|
||||
}
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
display_path = display_path.replace("/", "\\");
|
||||
display_path.replace("/", "\\");
|
||||
#endif
|
||||
save_path->setText(display_path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue