mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Code clean up
This changes were proposed by @PiotrNawrot in these PRs: #2967, #2970.
This commit is contained in:
parent
f5b0008158
commit
4a76526417
@ -555,16 +555,13 @@ void AddNewTorrentDialog::displayContentTreeMenu(const QPoint&)
|
||||
}
|
||||
else {
|
||||
int prio = prio::NORMAL;
|
||||
if (act == ui->actionHigh) {
|
||||
if (act == ui->actionHigh)
|
||||
prio = prio::HIGH;
|
||||
}
|
||||
else {
|
||||
if (act == ui->actionMaximum)
|
||||
else if (act == ui->actionMaximum)
|
||||
prio = prio::MAXIMUM;
|
||||
else
|
||||
if (act == ui->actionNot_downloaded)
|
||||
else if (act == ui->actionNot_downloaded)
|
||||
prio = prio::IGNORED;
|
||||
}
|
||||
|
||||
qDebug("Setting files priority");
|
||||
foreach (const QModelIndex &index, selectedRows) {
|
||||
qDebug("Setting priority(%d) for file at row %d", prio, index.row());
|
||||
|
@ -688,19 +688,15 @@ void WebApplication::parsePath()
|
||||
|
||||
// check action for requested path
|
||||
QStringList pathItems = request().path.split('/', QString::SkipEmptyParts);
|
||||
if (!pathItems.empty()) {
|
||||
if (actions_.contains(pathItems.front())) {
|
||||
if (!pathItems.empty() && actions_.contains(pathItems.front())) {
|
||||
scope_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
}
|
||||
|
||||
if (!pathItems.empty()) {
|
||||
if (actions_[scope_].contains(pathItems.front())) {
|
||||
if (!pathItems.empty() && actions_[scope_].contains(pathItems.front())) {
|
||||
action_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
}
|
||||
|
||||
args_ = pathItems;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user