mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-22 14:23:35 -07:00
Update categoryfiltermodel.cpp
This commit is contained in:
parent
871ba0866e
commit
fb349f0d78
1 changed files with 7 additions and 3 deletions
|
@ -25,7 +25,7 @@
|
|||
* but you are not obligated to do so. If you do not wish to do so, delete this
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include "categoryfiltermodel.h"
|
||||
|
||||
#include <QHash>
|
||||
|
@ -333,8 +333,12 @@ void CategoryFilterModel::categoryAdded(const QString &categoryName)
|
|||
|
||||
const int row = parent->childCount();
|
||||
beginInsertRows(index(parent), row, row);
|
||||
new CategoryModelItem(
|
||||
parent, m_isSubcategoriesEnabled ? shortName(categoryName) : categoryName);
|
||||
std::unique_ptr<CategoryModelItem> newItem = std::make_unique<CategoryModelItem>(
|
||||
parent, m_isSubcategoriesEnabled ? shortName(categoryName) : categoryName
|
||||
);
|
||||
|
||||
parent->addChild(std::move(newItem));
|
||||
|
||||
endInsertRows();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue