mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-06-05 22:55:04 -06:00
Debugger: Implement key-scrolling through threads
This commit is contained in:
parent
cbb1b1f28e
commit
e1744ceab2
@ -281,7 +281,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
case Qt::Key_F1:
|
case Qt::Key_F1:
|
||||||
{
|
{
|
||||||
if (event->isAutoRepeat())
|
if (event->isAutoRepeat())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QDialog* dlg = new QDialog(this);
|
QDialog* dlg = new QDialog(this);
|
||||||
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
@ -322,6 +324,34 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event->modifiers() == Qt::ControlModifier)
|
||||||
|
{
|
||||||
|
switch (const auto key = event->key())
|
||||||
|
{
|
||||||
|
case Qt::Key_PageUp:
|
||||||
|
case Qt::Key_PageDown:
|
||||||
|
{
|
||||||
|
if (event->isAutoRepeat())
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
const int count = m_choice_units->count();
|
||||||
|
const int cur_index = m_choice_units->currentIndex();
|
||||||
|
|
||||||
|
if (count && cur_index >= 0)
|
||||||
|
{
|
||||||
|
// Wrap around
|
||||||
|
// Adding count so the result would not be negative, that would alter the remainder operation
|
||||||
|
m_choice_units->setCurrentIndex((cur_index + count + (key == Qt::Key_PageUp ? -1 : 1)) % count);
|
||||||
|
}
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!cpu)
|
if (!cpu)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@ -333,10 +363,12 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
|
|
||||||
const auto modifiers = event->modifiers();
|
const auto modifiers = event->modifiers();
|
||||||
|
|
||||||
if (modifiers & Qt::ControlModifier)
|
if (modifiers == Qt::ControlModifier)
|
||||||
{
|
{
|
||||||
if (event->isAutoRepeat())
|
if (event->isAutoRepeat())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (event->key())
|
switch (event->key())
|
||||||
{
|
{
|
||||||
@ -360,7 +392,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
case Qt::Key_D:
|
case Qt::Key_D:
|
||||||
{
|
{
|
||||||
if (event->isAutoRepeat())
|
if (event->isAutoRepeat())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
auto get_max_allowed = [&](QString title, QString description, u32 limit) -> u32
|
auto get_max_allowed = [&](QString title, QString description, u32 limit) -> u32
|
||||||
{
|
{
|
||||||
@ -517,7 +551,9 @@ void debugger_frame::keyPressEvent(QKeyEvent* event)
|
|||||||
case Qt::Key_E:
|
case Qt::Key_E:
|
||||||
{
|
{
|
||||||
if (event->isAutoRepeat())
|
if (event->isAutoRepeat())
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (cpu->id_type() == 1 || cpu->id_type() == 2)
|
if (cpu->id_type() == 1 || cpu->id_type() == 2)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -272,6 +272,11 @@ void debugger_list::keyPressEvent(QKeyEvent* event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event->modifiers())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (event->key())
|
switch (event->key())
|
||||||
{
|
{
|
||||||
case Qt::Key_PageUp: scroll(0 - m_item_count); return;
|
case Qt::Key_PageUp: scroll(0 - m_item_count); return;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user