This commit is contained in:
Hugo Teso 2017-04-05 11:35:19 +02:00
parent 3333abe127
commit a40cd098a6
6 changed files with 22 additions and 4 deletions

@ -1 +1 @@
Subproject commit e603905db979bda6a95f4dd4b0b18ec2ab626f12
Subproject commit 15d67a7acbbcef3e01acdb0a0986fe4d2468bb1f

View File

@ -824,7 +824,6 @@ void MainWindow::on_backButton_clicked()
this->core->cmd("s-");
QString back_offset = this->core->cmd("s=").split(" > ").last().trimmed();
if (back_offset != "") {
this->add_debug_output(back_offset);
this->seek(back_offset);
}
}

View File

@ -125,6 +125,8 @@ public slots:
void toggleResponsive(bool maybe);
void on_backButton_clicked();
private slots:
void on_actionMem_triggered();
@ -141,8 +143,6 @@ private slots:
void on_actionRefresh_Panels_triggered();
void on_backButton_clicked();
void hideDummyColumns();
void on_actionCalculator_triggered();

View File

@ -137,22 +137,32 @@ MemoryWidget::MemoryWidget(MainWindow *main, QWidget *parent) :
// X to show hexdump
QShortcut* hexdump_shortcut = new QShortcut(QKeySequence(Qt::Key_X), this->main);
connect(hexdump_shortcut, SIGNAL(activated()), this, SLOT(showHexdump()));
//hexdump_shortcut->setContext(Qt::WidgetShortcut);
// Space to switch between disassembly and graph
QShortcut* graph_shortcut = new QShortcut(QKeySequence(Qt::Key_Space), this->main);
connect(graph_shortcut, SIGNAL(activated()), this, SLOT(cycleViews()));
//graph_shortcut->setContext(Qt::WidgetShortcut);
// Semicolon to add comment
QShortcut* comment_shortcut = new QShortcut(QKeySequence(Qt::Key_Semicolon), ui->disasTextEdit_2);
connect(comment_shortcut, SIGNAL(activated()), this, SLOT(on_actionDisasAdd_comment_triggered()));
comment_shortcut->setContext(Qt::WidgetShortcut);
// N to rename function
QShortcut* rename_shortcut = new QShortcut(QKeySequence(Qt::Key_N), ui->disasTextEdit_2);
connect(rename_shortcut, SIGNAL(activated()), this, SLOT(on_actionFunctionsRename_triggered()));
rename_shortcut->setContext(Qt::WidgetShortcut);
// R to show XRefs
QShortcut* xrefs_shortcut = new QShortcut(QKeySequence(Qt::Key_R), ui->disasTextEdit_2);
connect(xrefs_shortcut, SIGNAL(activated()), this, SLOT(on_actionXRefs_triggered()));
xrefs_shortcut->setContext(Qt::WidgetShortcut);
// Esc to seek back
QShortcut* back_shortcut = new QShortcut(QKeySequence(Qt::Key_Escape), ui->disasTextEdit_2);
connect(back_shortcut, SIGNAL(activated()), this, SLOT(seek_back()));
back_shortcut->setContext(Qt::WidgetShortcut);
// Control Disasm and Hex scroll to add more contents
connect(this->disasTextEdit->verticalScrollBar(), SIGNAL(valueChanged(int)), this, SLOT(disasmScrolled()));
@ -1705,3 +1715,8 @@ void MemoryWidget::selectHexPreview() {
ui->hexBitsComboBox_2->setCurrentIndex(ui->hexBitsComboBox_2->findText(bits));
}
}
void MemoryWidget::seek_back() {
//this->main->add_debug_output("Back!");
this->main->on_backButton_clicked();
}

View File

@ -164,6 +164,7 @@ private slots:
void on_simpleGrapgToolButton_clicked();
QString normalizeAddr(QString addr);
void on_opcodeDescButton_clicked();
void seek_back();
};
#endif // MEMORYWIDGET_H

View File

@ -41,6 +41,7 @@ Omnibar::Omnibar(MainWindow *main, QWidget *parent) :
// Esc clears omnibar
QShortcut* clear_shortcut = new QShortcut(QKeySequence(Qt::Key_Escape), this);
connect(clear_shortcut, SIGNAL(activated()), this, SLOT(clearContents()));
clear_shortcut->setContext(Qt::WidgetShortcut);
}
void Omnibar::setupCompleter() {
@ -83,7 +84,9 @@ void Omnibar::showCommands() {
void Omnibar::clearContents() {
this->setText("");
// Necessary hack to make it work properly
this->clearFocus();
this->setFocus();
}
void Omnibar::on_gotoEntry_returnPressed()