diff --git a/src/menus/DisassemblyContextMenu.cpp b/src/menus/DisassemblyContextMenu.cpp index 29c466aa..6e938e82 100644 --- a/src/menus/DisassemblyContextMenu.cpp +++ b/src/menus/DisassemblyContextMenu.cpp @@ -41,7 +41,7 @@ DisassemblyContextMenu::DisassemblyContextMenu(QWidget *parent) createAction(&actionDeleteComment, tr("Delete comment"), {}, SLOT(on_actionDeleteComment_triggered())); createAction(&actionDeleteFlag, tr("Delete flag"), {}, SLOT(on_actionDeleteFlag_triggered())); - createAction(&actionDeleteFunction, tr("Delete function"), {}, SLOT(on_actionDeleteFunction_triggered())); + createAction(&actionDeleteFunction, tr("Undefine function"), {}, SLOT(on_actionDeleteFunction_triggered())); setBaseMenu = new QMenu(tr("Set Immediate Base to..."), this); setBaseMenuAction = addMenu(setBaseMenu); diff --git a/src/widgets/DisassemblerGraphView.cpp b/src/widgets/DisassemblerGraphView.cpp index 103d566e..fca70233 100644 --- a/src/widgets/DisassemblerGraphView.cpp +++ b/src/widgets/DisassemblerGraphView.cpp @@ -25,6 +25,7 @@ DisassemblerGraphView::DisassemblerGraphView(QWidget *parent) connect(Core(), SIGNAL(flagsChanged()), this, SLOT(refreshView())); connect(Core(), SIGNAL(varsChanged()), this, SLOT(refreshView())); connect(Core(), SIGNAL(instructionChanged(RVA)), this, SLOT(refreshView())); + connect(Core(), SIGNAL(functionsChanged()), this, SLOT(refreshView())); connect(Config(), SIGNAL(colorsUpdated()), this, SLOT(colorsUpdatedSlot())); connect(Config(), SIGNAL(fontsUpdated()), this, SLOT(fontsUpdatedSlot())); @@ -597,6 +598,7 @@ void DisassemblerGraphView::blockClicked(GraphView::GraphBlock &block, QMouseEve void DisassemblerGraphView::blockDoubleClicked(GraphView::GraphBlock &block, QMouseEvent *event, QPoint pos) { + Q_UNUSED(event); RVA instr = getInstrForMouseEvent(block, &pos); if(instr == RVA_INVALID) { diff --git a/src/widgets/FunctionsWidget.cpp b/src/widgets/FunctionsWidget.cpp index cc41a527..56da363a 100644 --- a/src/widgets/FunctionsWidget.cpp +++ b/src/widgets/FunctionsWidget.cpp @@ -430,7 +430,7 @@ void FunctionsWidget::showFunctionsContextMenu(const QPoint &pt) menu->clear(); menu->addAction(ui->actionDisasAdd_comment); menu->addAction(ui->actionFunctionsRename); - //menu->addAction(ui->actionFunctionsUndefine); + menu->addAction(ui->actionFunctionsUndefine); menu->addSeparator(); menu->addAction(ui->action_References); @@ -492,6 +492,13 @@ void FunctionsWidget::on_actionFunctionsRename_triggered() } } +void FunctionsWidget::on_actionFunctionsUndefine_triggered() +{ + QTreeView *treeView = getCurrentTreeView(); + FunctionDescription function = treeView->selectionModel()->currentIndex().data(FunctionModel::FunctionDescriptionRole).value(); + Core()->delFunction(function.offset); +} + void FunctionsWidget::on_action_References_triggered() { // Get selected item in functions tree view diff --git a/src/widgets/FunctionsWidget.h b/src/widgets/FunctionsWidget.h index ca86be2c..af6c2f43 100644 --- a/src/widgets/FunctionsWidget.h +++ b/src/widgets/FunctionsWidget.h @@ -95,6 +95,7 @@ private slots: void on_actionDisasAdd_comment_triggered(); void on_actionFunctionsRename_triggered(); void on_action_References_triggered(); + void on_actionFunctionsUndefine_triggered(); void on_actionHorizontal_triggered(); void on_actionVertical_triggered();