mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 21:03:30 -07:00
Use implicit sharing when getting categories from Session class
This commit is contained in:
parent
865394a59c
commit
e32ef7f5c5
4 changed files with 5 additions and 5 deletions
|
@ -1077,8 +1077,8 @@ void TorrentsController::removeCategoriesAction()
|
|||
void TorrentsController::categoriesAction()
|
||||
{
|
||||
QJsonObject categories;
|
||||
const auto categoriesList = BitTorrent::Session::instance()->categories();
|
||||
for (auto it = categoriesList.cbegin(); it != categoriesList.cend(); ++it) {
|
||||
const QStringMap categoriesMap = BitTorrent::Session::instance()->categories();
|
||||
for (auto it = categoriesMap.cbegin(); it != categoriesMap.cend(); ++it) {
|
||||
const auto &key = it.key();
|
||||
categories[key] = QJsonObject {
|
||||
{"name", key},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue