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 {
|
else {
|
||||||
int prio = prio::NORMAL;
|
int prio = prio::NORMAL;
|
||||||
if (act == ui->actionHigh) {
|
if (act == ui->actionHigh)
|
||||||
prio = prio::HIGH;
|
prio = prio::HIGH;
|
||||||
}
|
else if (act == ui->actionMaximum)
|
||||||
else {
|
prio = prio::MAXIMUM;
|
||||||
if (act == ui->actionMaximum)
|
else if (act == ui->actionNot_downloaded)
|
||||||
prio = prio::MAXIMUM;
|
prio = prio::IGNORED;
|
||||||
else
|
|
||||||
if (act == ui->actionNot_downloaded)
|
|
||||||
prio = prio::IGNORED;
|
|
||||||
}
|
|
||||||
qDebug("Setting files priority");
|
qDebug("Setting files priority");
|
||||||
foreach (const QModelIndex &index, selectedRows) {
|
foreach (const QModelIndex &index, selectedRows) {
|
||||||
qDebug("Setting priority(%d) for file at row %d", prio, index.row());
|
qDebug("Setting priority(%d) for file at row %d", prio, index.row());
|
||||||
|
@ -688,18 +688,14 @@ void WebApplication::parsePath()
|
|||||||
|
|
||||||
// check action for requested path
|
// check action for requested path
|
||||||
QStringList pathItems = request().path.split('/', QString::SkipEmptyParts);
|
QStringList pathItems = request().path.split('/', QString::SkipEmptyParts);
|
||||||
if (!pathItems.empty()) {
|
if (!pathItems.empty() && actions_.contains(pathItems.front())) {
|
||||||
if (actions_.contains(pathItems.front())) {
|
scope_ = pathItems.front();
|
||||||
scope_ = pathItems.front();
|
pathItems.pop_front();
|
||||||
pathItems.pop_front();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pathItems.empty()) {
|
if (!pathItems.empty() && actions_[scope_].contains(pathItems.front())) {
|
||||||
if (actions_[scope_].contains(pathItems.front())) {
|
action_ = pathItems.front();
|
||||||
action_ = pathItems.front();
|
pathItems.pop_front();
|
||||||
pathItems.pop_front();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
args_ = pathItems;
|
args_ = pathItems;
|
||||||
|
Loading…
Reference in New Issue
Block a user