mirror of
https://github.com/rizinorg/cutter.git
synced 2024-11-23 04:49:49 +00:00
Set XrefsDialog Parent (#4)
This commit is contained in:
parent
a80221641e
commit
b6ec01a7b0
@ -8,7 +8,7 @@
|
||||
|
||||
#include <QJsonArray>
|
||||
|
||||
XrefsDialog::XrefsDialog(MainWindow *main, QWidget *parent, bool hideXrefFrom) :
|
||||
XrefsDialog::XrefsDialog(MainWindow *parent, bool hideXrefFrom) :
|
||||
QDialog(parent),
|
||||
addr(0),
|
||||
toModel(this),
|
||||
@ -18,8 +18,8 @@ XrefsDialog::XrefsDialog(MainWindow *main, QWidget *parent, bool hideXrefFrom) :
|
||||
ui->setupUi(this);
|
||||
setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
|
||||
ui->toTreeWidget->setMainWindow(main);
|
||||
ui->fromTreeWidget->setMainWindow(main);
|
||||
ui->toTreeWidget->setMainWindow(parent);
|
||||
ui->fromTreeWidget->setMainWindow(parent);
|
||||
|
||||
ui->toTreeWidget->setModel(&toModel);
|
||||
ui->fromTreeWidget->setModel(&fromModel);
|
||||
|
@ -44,7 +44,7 @@ class XrefsDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit XrefsDialog(MainWindow *main, QWidget *parent, bool hideXrefFrom=false);
|
||||
explicit XrefsDialog(MainWindow *parent, bool hideXrefFrom=false);
|
||||
~XrefsDialog();
|
||||
|
||||
void fillRefsForAddress(RVA addr, QString name, bool whole_function);
|
||||
|
@ -85,7 +85,7 @@ void AddressableItemContextMenu::onActionCopyAddress()
|
||||
void AddressableItemContextMenu::onActionShowXrefs()
|
||||
{
|
||||
emit xrefsTriggered();
|
||||
XrefsDialog dialog(mainWindow, nullptr, true);
|
||||
XrefsDialog dialog(mainWindow, true);
|
||||
QString tmpName = name;
|
||||
if (name.isEmpty()) {
|
||||
name = RAddressString(offset);
|
||||
|
@ -469,7 +469,7 @@ void DecompilerContextMenu::actionXRefsTriggered()
|
||||
if (!isReference()) {
|
||||
return;
|
||||
}
|
||||
XrefsDialog dialog(mainWindow, nullptr);
|
||||
XrefsDialog dialog(mainWindow);
|
||||
QString displayString = (annotationHere->type == RZ_CODE_ANNOTATION_TYPE_FUNCTION_NAME) ? QString(
|
||||
annotationHere->reference.name) : RAddressString(annotationHere->reference.offset);
|
||||
dialog.fillRefsForAddress(annotationHere->reference.offset, displayString, false);
|
||||
|
@ -875,7 +875,7 @@ void DisassemblyContextMenu::on_actionSetFunctionVarTypes_triggered()
|
||||
|
||||
void DisassemblyContextMenu::on_actionXRefs_triggered()
|
||||
{
|
||||
XrefsDialog dialog(mainWindow, nullptr);
|
||||
XrefsDialog dialog(mainWindow);
|
||||
dialog.fillRefsForAddress(offset, RAddressString(offset), false);
|
||||
dialog.exec();
|
||||
}
|
||||
@ -883,7 +883,7 @@ void DisassemblyContextMenu::on_actionXRefs_triggered()
|
||||
void DisassemblyContextMenu::on_actionXRefsForVariables_triggered()
|
||||
{
|
||||
if (isHighlightedWordLocalVar()) {
|
||||
XrefsDialog dialog(mainWindow, nullptr);
|
||||
XrefsDialog dialog(mainWindow);
|
||||
dialog.fillRefsForVariable(curHighlightedWord, offset);
|
||||
dialog.exec();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user