mirror of https://github.com/PCSX2/pcsx2.git
Debugger: Flip the `Enabled` breakpoint column
This commit is contained in:
parent
93776707a9
commit
9eb1731516
|
@ -53,6 +53,8 @@ QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
|||
{
|
||||
switch (index.column())
|
||||
{
|
||||
case BreakpointColumns::ENABLED:
|
||||
return "";
|
||||
case BreakpointColumns::TYPE:
|
||||
return tr("Execute");
|
||||
case BreakpointColumns::OFFSET:
|
||||
|
@ -66,14 +68,14 @@ QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
|||
return bp->hasCond ? QString::fromLocal8Bit(bp->cond.expressionString) : "";
|
||||
case BreakpointColumns::HITS:
|
||||
return tr("--");
|
||||
case BreakpointColumns::ENABLED:
|
||||
return bp->enabled ? tr("Enabled") : tr("Disabled");
|
||||
}
|
||||
}
|
||||
else if (const auto* mc = std::get_if<MemCheck>(&bp_mc))
|
||||
{
|
||||
switch (index.column())
|
||||
{
|
||||
case BreakpointColumns::ENABLED:
|
||||
return (mc->result & MEMCHECK_BREAK) ? tr("Enabled") : tr("Disabled");
|
||||
case BreakpointColumns::TYPE:
|
||||
{
|
||||
QString type("");
|
||||
|
@ -93,8 +95,6 @@ QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
|||
return tr("--"); // No condition on memchecks
|
||||
case BreakpointColumns::HITS:
|
||||
return QString::number(mc->numHits);
|
||||
case BreakpointColumns::ENABLED:
|
||||
return (mc->result & MEMCHECK_BREAK) ? tr("Enabled") : tr("Disabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -106,6 +106,8 @@ QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
|||
{
|
||||
switch (index.column())
|
||||
{
|
||||
case BreakpointColumns::ENABLED:
|
||||
return static_cast<int>(bp->enabled);
|
||||
case BreakpointColumns::TYPE:
|
||||
return MEMCHECK_INVALID;
|
||||
case BreakpointColumns::OFFSET:
|
||||
|
@ -119,14 +121,14 @@ QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
|||
return bp->hasCond ? QString::fromLocal8Bit(bp->cond.expressionString) : tr("");
|
||||
case BreakpointColumns::HITS:
|
||||
return 0;
|
||||
case BreakpointColumns::ENABLED:
|
||||
return static_cast<int>(bp->enabled);
|
||||
}
|
||||
}
|
||||
else if (const auto* mc = std::get_if<MemCheck>(&bp_mc))
|
||||
{
|
||||
switch (index.column())
|
||||
{
|
||||
case BreakpointColumns::ENABLED:
|
||||
return (mc->result & MEMCHECK_BREAK);
|
||||
case BreakpointColumns::TYPE:
|
||||
return mc->cond;
|
||||
case BreakpointColumns::OFFSET:
|
||||
|
@ -139,8 +141,6 @@ QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
|||
return "";
|
||||
case BreakpointColumns::HITS:
|
||||
return mc->numHits;
|
||||
case BreakpointColumns::ENABLED:
|
||||
return (mc->result & MEMCHECK_BREAK);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -152,6 +152,8 @@ QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
|||
{
|
||||
switch (index.column())
|
||||
{
|
||||
case BreakpointColumns::ENABLED:
|
||||
return static_cast<int>(bp->enabled);
|
||||
case BreakpointColumns::TYPE:
|
||||
return MEMCHECK_INVALID;
|
||||
case BreakpointColumns::OFFSET:
|
||||
|
@ -165,8 +167,6 @@ QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
|||
return bp->hasCond ? QString::fromLocal8Bit(bp->cond.expressionString) : tr("");
|
||||
case BreakpointColumns::HITS:
|
||||
return 0;
|
||||
case BreakpointColumns::ENABLED:
|
||||
return static_cast<int>(bp->enabled);
|
||||
}
|
||||
}
|
||||
else if (const auto* mc = std::get_if<MemCheck>(&bp_mc))
|
||||
|
@ -192,7 +192,7 @@ QVariant BreakpointModel::data(const QModelIndex& index, int role) const
|
|||
}
|
||||
else if (role == Qt::CheckStateRole)
|
||||
{
|
||||
if (index.column() == 6)
|
||||
if (index.column() == 0)
|
||||
{
|
||||
auto bp_mc = m_breakpoints.at(index.row());
|
||||
|
||||
|
|
|
@ -30,13 +30,13 @@ class BreakpointModel : public QAbstractTableModel
|
|||
public:
|
||||
enum BreakpointColumns : int
|
||||
{
|
||||
TYPE = 0,
|
||||
ENABLED = 0,
|
||||
TYPE,
|
||||
OFFSET,
|
||||
SIZE_LABEL,
|
||||
OPCODE,
|
||||
CONDITION,
|
||||
HITS,
|
||||
ENABLED,
|
||||
COLUMN_COUNT
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue