1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

- Fixed another memory leak in torrent addition dialog

This commit is contained in:
Christophe Dumez 2008-12-23 15:51:32 +00:00
parent 3c17a1410b
commit c41d17043c

View File

@ -96,6 +96,7 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
~torrentAdditionDialog() { ~torrentAdditionDialog() {
delete PropDelegate; delete PropDelegate;
delete PropListModel;
} }
void showLoad(QString filePath, bool fromScanDir=false, QString from_url=QString::null){ void showLoad(QString filePath, bool fromScanDir=false, QString from_url=QString::null){
@ -157,10 +158,11 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
// TODO: row Color? // TODO: row Color?
// Add the child to the tree // Add the child to the tree
parent->appendRow(child); parent->appendRow(child);
// Add childs // Add children
torrent_file *childFile; QList<torrent_file*> children = root->getChildren();
foreach(childFile, root->getChildren()) { unsigned int nbChildren = children.size();
addFilesToTree(childFile, first); for(unsigned int i=0; i < nbChildren; ++i) {
addFilesToTree(children.at(i), first);
} }
} }