mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
- Fixed downloadFromUrl() (still have to do some checking with the thread)
This commit is contained in:
parent
aa6f6161c3
commit
524540e63d
4 changed files with 14 additions and 0 deletions
10
src/GUI.cpp
10
src/GUI.cpp
|
@ -130,6 +130,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
|
|||
connect(&BTSession, SIGNAL(trackerAuthenticationRequired(torrent_handle&)), this, SLOT(trackerAuthenticationRequired(torrent_handle&)));
|
||||
connect(&BTSession, SIGNAL(scanDirFoundTorrents(const QStringList&)), this, SLOT(processScannedFiles(const QStringList&)));
|
||||
connect(&BTSession, SIGNAL(newDownloadedTorrent(const QString&, const QString&)), this, SLOT(processDownloadedFiles(const QString&, const QString&)));
|
||||
connect(&BTSession, SIGNAL(aboutToDownloadFromUrl(const QString&)), this, SLOT(displayDownloadingUrlInfos(const QString&)));
|
||||
// creating options
|
||||
options = new options_imp(this);
|
||||
connect(options, SIGNAL(status_changed(const QString&)), this, SLOT(OptionsSaved(const QString&)));
|
||||
|
@ -1812,6 +1813,14 @@ int GUI::getRowFromHash(const QString& hash) const{
|
|||
return -1;
|
||||
}
|
||||
|
||||
void GUI::downloadFromURLList(const QStringList& urls){
|
||||
BTSession.downloadFromURLList(urls);
|
||||
}
|
||||
|
||||
void GUI::displayDownloadingUrlInfos(const QString& url){
|
||||
setInfoBar(tr("Downloading", "Example: Downloading www.example.com/test.torrent")+" '"+url+"', "+tr("Please wait..."), "black");
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
* *
|
||||
* Options *
|
||||
|
@ -1848,4 +1857,5 @@ void GUI::OptionsSaved(const QString& info){
|
|||
// an url
|
||||
void GUI::askForTorrentUrl(){
|
||||
downloadFromURLDialog = new downloadFromURL(this);
|
||||
connect(downloadFromURLDialog, SIGNAL(downloadFinished(QString, QString, int, QString)), &BTSession, SLOT(processDownloadedFile(QString, QString, int, QString)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue