mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
- Removed code that is no longer needed
This commit is contained in:
parent
1499138b9b
commit
2e5330e54b
@ -901,7 +901,7 @@ void GUI::processDownloadedFiles(QString path, QString url) {
|
|||||||
bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
|
bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
|
||||||
if(useTorrentAdditionDialog) {
|
if(useTorrentAdditionDialog) {
|
||||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
|
||||||
dialog->showLoad(path, false, url);
|
dialog->showLoad(path, url);
|
||||||
}else{
|
}else{
|
||||||
BTSession->addTorrent(path, false, url);
|
BTSession->addTorrent(path, false, url);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,6 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
|
|||||||
QString fileName;
|
QString fileName;
|
||||||
QString hash;
|
QString hash;
|
||||||
QString filePath;
|
QString filePath;
|
||||||
bool fromScanDir;
|
|
||||||
QString from_url;
|
QString from_url;
|
||||||
QStandardItemModel *PropListModel;
|
QStandardItemModel *PropListModel;
|
||||||
PropListDelegate *PropDelegate;
|
PropListDelegate *PropDelegate;
|
||||||
@ -99,13 +98,12 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
|
|||||||
delete PropListModel;
|
delete PropListModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
void showLoad(QString filePath, bool fromScanDir=false, QString from_url=QString::null){
|
void showLoad(QString filePath, QString from_url=QString::null){
|
||||||
if(!QFile::exists(filePath)) {
|
if(!QFile::exists(filePath)) {
|
||||||
close();
|
close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this->filePath = filePath;
|
this->filePath = filePath;
|
||||||
this->fromScanDir = fromScanDir;
|
|
||||||
this->from_url = from_url;
|
this->from_url = from_url;
|
||||||
// Getting torrent file informations
|
// Getting torrent file informations
|
||||||
boost::intrusive_ptr<torrent_info> t;
|
boost::intrusive_ptr<torrent_info> t;
|
||||||
@ -433,7 +431,7 @@ class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
|
|||||||
// save filtered files
|
// save filtered files
|
||||||
savePiecesPriorities();
|
savePiecesPriorities();
|
||||||
// Add to download list
|
// Add to download list
|
||||||
BTSession->addTorrent(filePath, fromScanDir, from_url);
|
BTSession->addTorrent(filePath, false, from_url);
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user