mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 10:56:11 +00:00
Fix CutterCore::getBinPluginDescriptions() args (#2777)
This commit is contained in:
parent
01dc1c2337
commit
9ddc19fcc6
@ -2731,28 +2731,32 @@ QStringList CutterCore::getAnalysisPluginNames()
|
||||
return ret;
|
||||
}
|
||||
|
||||
QList<RzBinPluginDescription> CutterCore::getRBinPluginDescriptions(const QString &type)
|
||||
QList<RzBinPluginDescription> CutterCore::getBinPluginDescriptions(bool bin, bool xtr)
|
||||
{
|
||||
CORE_LOCK();
|
||||
QList<RzBinPluginDescription> ret;
|
||||
RzListIter *it;
|
||||
RzBinPlugin *bp;
|
||||
CutterRzListForeach (core->bin->plugins, it, RzBinPlugin, bp) {
|
||||
RzBinPluginDescription desc;
|
||||
desc.name = bp->name ? bp->name : "";
|
||||
desc.description = bp->desc ? bp->desc : "";
|
||||
desc.license = bp->license ? bp->license : "";
|
||||
desc.type = "bin";
|
||||
ret.append(desc);
|
||||
if (bin) {
|
||||
RzBinPlugin *bp;
|
||||
CutterRzListForeach (core->bin->plugins, it, RzBinPlugin, bp) {
|
||||
RzBinPluginDescription desc;
|
||||
desc.name = bp->name ? bp->name : "";
|
||||
desc.description = bp->desc ? bp->desc : "";
|
||||
desc.license = bp->license ? bp->license : "";
|
||||
desc.type = "bin";
|
||||
ret.append(desc);
|
||||
}
|
||||
}
|
||||
RzBinXtrPlugin *bx;
|
||||
CutterRzListForeach (core->bin->binxtrs, it, RzBinXtrPlugin, bx) {
|
||||
RzBinPluginDescription desc;
|
||||
desc.name = bx->name ? bx->name : "";
|
||||
desc.description = bx->desc ? bx->desc : "";
|
||||
desc.license = bx->license ? bx->license : "";
|
||||
desc.type = "xtr";
|
||||
ret.append(desc);
|
||||
if (xtr) {
|
||||
RzBinXtrPlugin *bx;
|
||||
CutterRzListForeach (core->bin->binxtrs, it, RzBinXtrPlugin, bx) {
|
||||
RzBinPluginDescription desc;
|
||||
desc.name = bx->name ? bx->name : "";
|
||||
desc.description = bx->desc ? bx->desc : "";
|
||||
desc.license = bx->license ? bx->license : "";
|
||||
desc.type = "xtr";
|
||||
ret.append(desc);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -534,7 +534,7 @@ public:
|
||||
QStringList getAnalysisPluginNames();
|
||||
|
||||
/* Widgets */
|
||||
QList<RzBinPluginDescription> getRBinPluginDescriptions(const QString &type = QString());
|
||||
QList<RzBinPluginDescription> getBinPluginDescriptions(bool bin = true, bool xtr = true);
|
||||
QList<RzIOPluginDescription> getRIOPluginDescriptions();
|
||||
QList<RzCorePluginDescription> getRCorePluginDescriptions();
|
||||
QList<RzAsmPluginDescription> getRAsmPluginDescriptions();
|
||||
|
@ -47,7 +47,7 @@ InitialOptionsDialog::InitialOptionsDialog(MainWindow *main)
|
||||
setTooltipWithConfigHelp(ui->kernelComboBox, "asm.os");
|
||||
setTooltipWithConfigHelp(ui->bitsComboBox, "asm.bits");
|
||||
|
||||
for (const auto &plugin : core->getRBinPluginDescriptions("bin")) {
|
||||
for (const auto &plugin : core->getBinPluginDescriptions(true, false)) {
|
||||
ui->formatComboBox->addItem(plugin.name, QVariant::fromValue(plugin));
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ RizinPluginsDialog::RizinPluginsDialog(QWidget *parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
for (const auto &plugin : Core()->getRBinPluginDescriptions()) {
|
||||
for (const auto &plugin : Core()->getBinPluginDescriptions()) {
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem();
|
||||
item->setText(0, plugin.name);
|
||||
item->setText(1, plugin.description);
|
||||
|
Loading…
Reference in New Issue
Block a user