R2PluginsDialog: Sort plugins by name in ascending order (#1431)

This commit is contained in:
Paul I 2019-04-06 13:45:15 +03:00 committed by GitHub
parent fe762b53a9
commit 5477054d5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,7 @@ R2PluginsDialog::R2PluginsDialog(QWidget *parent) :
item->setText(3, plugin.type); item->setText(3, plugin.type);
ui->RBinTreeWidget->addTopLevelItem(item); ui->RBinTreeWidget->addTopLevelItem(item);
} }
ui->RBinTreeWidget->sortByColumn(0, Qt::AscendingOrder);
qhelpers::adjustColumns(ui->RBinTreeWidget, 0); qhelpers::adjustColumns(ui->RBinTreeWidget, 0);
for (const auto &plugin : Core()->getRIOPluginDescriptions()) { for (const auto &plugin : Core()->getRIOPluginDescriptions()) {
@ -29,6 +30,7 @@ R2PluginsDialog::R2PluginsDialog(QWidget *parent) :
item->setText(3, plugin.permissions); item->setText(3, plugin.permissions);
ui->RIOTreeWidget->addTopLevelItem(item); ui->RIOTreeWidget->addTopLevelItem(item);
} }
ui->RIOTreeWidget->sortByColumn(0, Qt::AscendingOrder);
qhelpers::adjustColumns(ui->RIOTreeWidget, 0); qhelpers::adjustColumns(ui->RIOTreeWidget, 0);
for (const auto &plugin : Core()->getRCorePluginDescriptions()) { for (const auto &plugin : Core()->getRCorePluginDescriptions()) {
@ -37,6 +39,7 @@ R2PluginsDialog::R2PluginsDialog(QWidget *parent) :
item->setText(1, plugin.description); item->setText(1, plugin.description);
ui->RCoreTreeWidget->addTopLevelItem(item); ui->RCoreTreeWidget->addTopLevelItem(item);
} }
ui->RCoreTreeWidget->sortByColumn(0, Qt::AscendingOrder);
qhelpers::adjustColumns(ui->RCoreTreeWidget, 0); qhelpers::adjustColumns(ui->RCoreTreeWidget, 0);
for (const auto &plugin : Core()->getRAsmPluginDescriptions()) { for (const auto &plugin : Core()->getRAsmPluginDescriptions()) {
@ -50,6 +53,7 @@ R2PluginsDialog::R2PluginsDialog(QWidget *parent) :
item->setText(6, plugin.author); item->setText(6, plugin.author);
ui->RAsmTreeWidget->addTopLevelItem(item); ui->RAsmTreeWidget->addTopLevelItem(item);
} }
ui->RAsmTreeWidget->sortByColumn(0, Qt::AscendingOrder);
qhelpers::adjustColumns(ui->RAsmTreeWidget, 0); qhelpers::adjustColumns(ui->RAsmTreeWidget, 0);
} }