From da2bfd24575e151ebb0690e258867600070a55a3 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Wed, 26 Jun 2019 11:54:44 +0800 Subject: [PATCH] Replace QList by QVector --- src/gui/search/searchwidget.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/search/searchwidget.cpp b/src/gui/search/searchwidget.cpp index 15af96484..de3b29947 100644 --- a/src/gui/search/searchwidget.cpp +++ b/src/gui/search/searchwidget.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #include "base/global.h" #include "base/search/searchpluginmanager.h" @@ -146,7 +147,7 @@ void SearchWidget::fillCatCombobox() m_ui->comboCategory->addItem(SearchPluginManager::categoryFullName("all"), QVariant("all")); using QStrPair = QPair; - QList tmpList; + QVector tmpList; for (const QString &cat : asConst(SearchPluginManager::instance()->getPluginCategories(selectedPlugin()))) tmpList << qMakePair(SearchPluginManager::categoryFullName(cat), cat); std::sort(tmpList.begin(), tmpList.end(), [](const QStrPair &l, const QStrPair &r) { return (QString::localeAwareCompare(l.first, r.first) < 0); }); @@ -168,7 +169,7 @@ void SearchWidget::fillPluginComboBox() m_ui->selectPlugin->addItem(tr("Select..."), QVariant("multi")); using QStrPair = QPair; - QList tmpList; + QVector tmpList; for (const QString &name : asConst(SearchPluginManager::instance()->enabledPlugins())) tmpList << qMakePair(SearchPluginManager::instance()->pluginFullName(name), name); std::sort(tmpList.begin(), tmpList.end(), [](const QStrPair &l, const QStrPair &r) { return (l.first < r.first); } );