mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
Add xref shortcut to Strings Widget (#858)
This commit is contained in:
parent
26d985c9dc
commit
33d16dda3e
@ -146,7 +146,7 @@ StringsWidget::StringsWidget(MainWindow *main, QAction *action) :
|
|||||||
|
|
||||||
// Shift-F12 to toggle strings window
|
// Shift-F12 to toggle strings window
|
||||||
QShortcut *toggle_shortcut = new QShortcut(widgetShortcuts["StringsWidget"], main);
|
QShortcut *toggle_shortcut = new QShortcut(widgetShortcuts["StringsWidget"], main);
|
||||||
connect(toggle_shortcut, &QShortcut::activated, this, [=] (){
|
connect(toggle_shortcut, &QShortcut::activated, this, [ = ] () {
|
||||||
toggleDockWidget(true);
|
toggleDockWidget(true);
|
||||||
main->updateDockActionChecked(action);
|
main->updateDockActionChecked(action);
|
||||||
} );
|
} );
|
||||||
@ -166,6 +166,11 @@ StringsWidget::StringsWidget(MainWindow *main, QAction *action) :
|
|||||||
ui->stringsTreeView->setModel(proxyModel);
|
ui->stringsTreeView->setModel(proxyModel);
|
||||||
ui->stringsTreeView->sortByColumn(StringsModel::OffsetColumn, Qt::AscendingOrder);
|
ui->stringsTreeView->sortByColumn(StringsModel::OffsetColumn, Qt::AscendingOrder);
|
||||||
|
|
||||||
|
auto xRefShortcut = new QShortcut(QKeySequence{Qt::CTRL + Qt::Key_X}, this);
|
||||||
|
xRefShortcut->setContext(Qt::WidgetWithChildrenShortcut);
|
||||||
|
ui->actionX_refs->setShortcut(Qt::CTRL + Qt::Key_X);
|
||||||
|
connect(xRefShortcut, SIGNAL(activated()), this, SLOT(on_actionX_refs_triggered()));
|
||||||
|
|
||||||
connect(ui->quickFilterView, SIGNAL(filterTextChanged(const QString &)), proxyModel,
|
connect(ui->quickFilterView, SIGNAL(filterTextChanged(const QString &)), proxyModel,
|
||||||
SLOT(setFilterWildcard(const QString &)));
|
SLOT(setFilterWildcard(const QString &)));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user