mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-02-06 03:44:29 +00:00
Minor clean up
This commit is contained in:
parent
ef6c3f5a64
commit
810a9710d7
@ -888,7 +888,7 @@ void MainWindow::dropEvent(QDropEvent *event) {
|
|||||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
||||||
if (file.startsWith("file:", Qt::CaseInsensitive))
|
if (file.startsWith("file:", Qt::CaseInsensitive))
|
||||||
file = QUrl(file).toLocalFile();
|
file = QUrl(file).toLocalFile();
|
||||||
dialog->showLoad(file);
|
dialog->showLoadTorrent(file);
|
||||||
}else{
|
}else{
|
||||||
QBtSession::instance()->addTorrent(file);
|
QBtSession::instance()->addTorrent(file);
|
||||||
}
|
}
|
||||||
@ -927,7 +927,7 @@ void MainWindow::on_actionOpen_triggered() {
|
|||||||
for (uint i=0; i<listSize; ++i) {
|
for (uint i=0; i<listSize; ++i) {
|
||||||
if (useTorrentAdditionDialog) {
|
if (useTorrentAdditionDialog) {
|
||||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
||||||
dialog->showLoad(pathsList.at(i));
|
dialog->showLoadTorrent(pathsList.at(i));
|
||||||
}else{
|
}else{
|
||||||
QBtSession::instance()->addTorrent(pathsList.at(i));
|
QBtSession::instance()->addTorrent(pathsList.at(i));
|
||||||
}
|
}
|
||||||
@ -969,7 +969,7 @@ void MainWindow::processParams(const QStringList& params) {
|
|||||||
} else {
|
} else {
|
||||||
if (useTorrentAdditionDialog) {
|
if (useTorrentAdditionDialog) {
|
||||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
||||||
dialog->showLoad(param);
|
dialog->showLoadTorrent(param);
|
||||||
}else{
|
}else{
|
||||||
QBtSession::instance()->addTorrent(param);
|
QBtSession::instance()->addTorrent(param);
|
||||||
}
|
}
|
||||||
@ -987,7 +987,7 @@ void MainWindow::processDownloadedFiles(QString path, QString url) {
|
|||||||
const bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
|
const bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
|
||||||
if (useTorrentAdditionDialog) {
|
if (useTorrentAdditionDialog) {
|
||||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
torrentAdditionDialog *dialog = new torrentAdditionDialog(this);
|
||||||
dialog->showLoad(path, url);
|
dialog->showLoadTorrent(path, url);
|
||||||
}else{
|
}else{
|
||||||
QBtSession::instance()->addTorrent(path, false, url);
|
QBtSession::instance()->addTorrent(path, false, url);
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ void torrentAdditionDialog::showLoadMagnetURI(const QString& magnet_uri) {
|
|||||||
show();
|
show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void torrentAdditionDialog::showLoad(const QString& filePath, const QString& from_url) {
|
void torrentAdditionDialog::showLoadTorrent(const QString& filePath, const QString& from_url) {
|
||||||
m_isMagnet = false;
|
m_isMagnet = false;
|
||||||
|
|
||||||
// This is an URL to a local file, switch to local path
|
// This is an URL to a local file, switch to local path
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
torrentAdditionDialog(QWidget *parent);
|
torrentAdditionDialog(QWidget *parent);
|
||||||
~torrentAdditionDialog();
|
~torrentAdditionDialog();
|
||||||
void showLoadMagnetURI(const QString& magnet_uri);
|
void showLoadMagnetURI(const QString& magnet_uri);
|
||||||
void showLoad(const QString& m_filePath, const QString& m_fromUrl = QString());
|
void showLoadTorrent(const QString& filePath, const QString& fromUrl = QString());
|
||||||
QString getCurrentTruncatedSavePath(QString* root_folder_or_file_name = 0) const;
|
QString getCurrentTruncatedSavePath(QString* root_folder_or_file_name = 0) const;
|
||||||
QString getTruncatedSavePath(QString save_path, QString* root_folder_or_file_name = 0) const;
|
QString getTruncatedSavePath(QString save_path, QString* root_folder_or_file_name = 0) const;
|
||||||
bool allFiltered() const;
|
bool allFiltered() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user