mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
BUGFIX: Fix possible crash when changing the save path in addition dialog
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
* Unreleased - Christophe Dumez <chris@qbittorrent.org> - v2.4.3
|
||||
- BUGFIX: Fix encoding issue in command line parameters processing
|
||||
- BUGFIX: Fix possible crash when changing the save path in addition dialog
|
||||
|
||||
* Sun Sep 26 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.4.2
|
||||
- BUGFIX: Fix display of torrent content in addition dialog
|
||||
|
||||
@@ -120,9 +120,13 @@ void torrentAdditionDialog::saveSettings() {
|
||||
}
|
||||
|
||||
void torrentAdditionDialog::renameTorrentNameInModel(QString file_path) {
|
||||
file_path = file_path.trimmed();
|
||||
if(file_path.isEmpty()) return;
|
||||
file_path = file_path.replace("\\", "/");
|
||||
// Rename in torrent files model too
|
||||
PropListModel->setData(PropListModel->index(0, 0), file_path.split("/", QString::SkipEmptyParts).last());
|
||||
QStringList parts = file_path.split("/", QString::SkipEmptyParts);
|
||||
if(!parts.empty())
|
||||
PropListModel->setData(PropListModel->index(0, 0), parts.last());
|
||||
}
|
||||
|
||||
void torrentAdditionDialog::limitDialogWidth() {
|
||||
|
||||
Reference in New Issue
Block a user