mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Use 'auto' to avoid duplicating the type name
This commit is contained in:
@@ -117,7 +117,7 @@ void ArticleListWidget::checkInvariant() const
|
||||
QListWidgetItem *ArticleListWidget::createItem(RSS::Article *article) const
|
||||
{
|
||||
Q_ASSERT(article);
|
||||
QListWidgetItem *item = new QListWidgetItem;
|
||||
auto *item = new QListWidgetItem;
|
||||
|
||||
item->setData(Qt::DisplayRole, article->title());
|
||||
item->setData(Qt::UserRole, reinterpret_cast<quintptr>(article));
|
||||
|
||||
@@ -232,7 +232,7 @@ void FeedListWidget::dropEvent(QDropEvent *event)
|
||||
|
||||
QTreeWidgetItem *FeedListWidget::createItem(RSS::Item *rssItem, QTreeWidgetItem *parentItem)
|
||||
{
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem;
|
||||
auto *item = new QTreeWidgetItem;
|
||||
item->setData(0, Qt::DisplayRole, QString("%1 (%2)").arg(rssItem->name()).arg(rssItem->unreadCount()));
|
||||
item->setData(0, Qt::UserRole, reinterpret_cast<quintptr>(rssItem));
|
||||
m_rssToTreeItemMapping[rssItem] = item;
|
||||
|
||||
Reference in New Issue
Block a user