mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Code clean up
This changes were proposed by @PiotrNawrot in these PRs: #2967, #2970.
This commit is contained in:
@@ -688,18 +688,14 @@ void WebApplication::parsePath()
|
||||
|
||||
// check action for requested path
|
||||
QStringList pathItems = request().path.split('/', QString::SkipEmptyParts);
|
||||
if (!pathItems.empty()) {
|
||||
if (actions_.contains(pathItems.front())) {
|
||||
scope_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
if (!pathItems.empty() && actions_.contains(pathItems.front())) {
|
||||
scope_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
|
||||
if (!pathItems.empty()) {
|
||||
if (actions_[scope_].contains(pathItems.front())) {
|
||||
action_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
if (!pathItems.empty() && actions_[scope_].contains(pathItems.front())) {
|
||||
action_ = pathItems.front();
|
||||
pathItems.pop_front();
|
||||
}
|
||||
|
||||
args_ = pathItems;
|
||||
|
||||
Reference in New Issue
Block a user