mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 07:27:22 -06:00
Replace QList by QVector
This commit is contained in:
@@ -238,9 +238,10 @@ void PluginSelectDialog::setRowColor(const int row, const QString &color)
|
||||
}
|
||||
}
|
||||
|
||||
QList<QTreeWidgetItem*> PluginSelectDialog::findItemsWithUrl(const QString &url)
|
||||
QVector<QTreeWidgetItem*> PluginSelectDialog::findItemsWithUrl(const QString &url)
|
||||
{
|
||||
QList<QTreeWidgetItem*> res;
|
||||
QVector<QTreeWidgetItem*> res;
|
||||
res.reserve(m_ui->pluginsTree->topLevelItemCount());
|
||||
|
||||
for (int i = 0; i < m_ui->pluginsTree->topLevelItemCount(); ++i) {
|
||||
QTreeWidgetItem *item = m_ui->pluginsTree->topLevelItem(i);
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
explicit PluginSelectDialog(SearchPluginManager *pluginManager, QWidget *parent = nullptr);
|
||||
~PluginSelectDialog() override;
|
||||
|
||||
QList<QTreeWidgetItem*> findItemsWithUrl(const QString &url);
|
||||
QVector<QTreeWidgetItem*> findItemsWithUrl(const QString &url);
|
||||
QTreeWidgetItem *findItemWithID(const QString &id);
|
||||
|
||||
protected:
|
||||
|
||||
@@ -506,7 +506,7 @@ void SearchJobWidget::searchFailed()
|
||||
setStatus(Status::Error);
|
||||
}
|
||||
|
||||
void SearchJobWidget::appendSearchResults(const QList<SearchResult> &results)
|
||||
void SearchJobWidget::appendSearchResults(const QVector<SearchResult> &results)
|
||||
{
|
||||
for (const SearchResult &result : results) {
|
||||
// Add item to search result list
|
||||
|
||||
@@ -100,7 +100,7 @@ private:
|
||||
void onItemDoubleClicked(const QModelIndex &index);
|
||||
void searchFinished(bool cancelled);
|
||||
void searchFailed();
|
||||
void appendSearchResults(const QList<SearchResult> &results);
|
||||
void appendSearchResults(const QVector<SearchResult> &results);
|
||||
void updateResultsCount();
|
||||
void setStatus(Status value);
|
||||
void downloadTorrent(const QModelIndex &rowIndex);
|
||||
|
||||
Reference in New Issue
Block a user