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