Merge pull request #6689 from container1234/qt-minor-fixes

Qt: Minor changes
This commit is contained in:
Mat M 2018-04-28 13:41:59 -04:00 committed by GitHub
commit 6b8da197e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 9 deletions

View File

@ -390,9 +390,9 @@ bool CheatsManager::MatchesSearch(u32 addr) const
case DataType::Int: case DataType::Int:
return Compare(PowerPC::HostRead_U32(addr), text.toUInt(nullptr, base), op); return Compare(PowerPC::HostRead_U32(addr), text.toUInt(nullptr, base), op);
case DataType::Float: case DataType::Float:
return Compare(PowerPC::Read_F32(addr), text.toFloat(), op); return Compare(PowerPC::HostRead_F32(addr), text.toFloat(), op);
case DataType::Double: case DataType::Double:
return Compare(PowerPC::Read_F64(addr), text.toDouble(), op); return Compare(PowerPC::HostRead_F64(addr), text.toDouble(), op);
case DataType::String: case DataType::String:
{ {
bool is_equal = std::equal(text.toUtf8().cbegin(), text.toUtf8().cend(), bool is_equal = std::equal(text.toUtf8().cbegin(), text.toUtf8().cend(),
@ -516,10 +516,10 @@ void CheatsManager::Update()
16, QLatin1Char('0'))); 16, QLatin1Char('0')));
break; break;
case DataType::Float: case DataType::Float:
value_item->setText(QString::number(PowerPC::Read_F32(m_results[i].address))); value_item->setText(QString::number(PowerPC::HostRead_F32(m_results[i].address)));
break; break;
case DataType::Double: case DataType::Double:
value_item->setText(QString::number(PowerPC::Read_F64(m_results[i].address))); value_item->setText(QString::number(PowerPC::HostRead_F64(m_results[i].address)));
break; break;
case DataType::String: case DataType::String:
value_item->setText(tr("String Match")); value_item->setText(tr("String Match"));
@ -575,10 +575,10 @@ void CheatsManager::Update()
16, QLatin1Char('0'))); 16, QLatin1Char('0')));
break; break;
case DataType::Float: case DataType::Float:
value_item->setText(QString::number(PowerPC::Read_F32(m_watch[i].address))); value_item->setText(QString::number(PowerPC::HostRead_F32(m_watch[i].address)));
break; break;
case DataType::Double: case DataType::Double:
value_item->setText(QString::number(PowerPC::Read_F64(m_watch[i].address))); value_item->setText(QString::number(PowerPC::HostRead_F64(m_watch[i].address)));
break; break;
case DataType::String: case DataType::String:
value_item->setText(tr("String Match")); value_item->setText(tr("String Match"));

View File

@ -143,11 +143,11 @@ void CodeViewWidget::Update()
item->setData(Qt::UserRole, addr); item->setData(Qt::UserRole, addr);
if (color != 0xFFFFFF) if (color != 0xFFFFFF)
item->setBackground(QColor(color).darker(200)); item->setBackground(QColor(color).darker(110));
if (addr == pc && item != bp_item) if (addr == pc && item != bp_item)
{ {
item->setBackground(Qt::darkGreen); item->setBackground(QColor(Qt::green).darker(110));
} }
} }

View File

@ -170,7 +170,7 @@ void MemoryViewWidget::Update()
}); });
break; break;
case Type::Float32: case Type::Float32:
update_values([](u32 address) { return QString::number(PowerPC::Read_F32(address)); }); update_values([](u32 address) { return QString::number(PowerPC::HostRead_F32(address)); });
break; break;
} }
} }

View File

@ -72,6 +72,7 @@ void RegisterWidget::CreateWidgets()
m_table->setColumnCount(9); m_table->setColumnCount(9);
m_table->verticalHeader()->setVisible(false); m_table->verticalHeader()->setVisible(false);
m_table->verticalHeader()->setDefaultSectionSize(24);
m_table->setContextMenuPolicy(Qt::CustomContextMenu); m_table->setContextMenuPolicy(Qt::CustomContextMenu);
m_table->setSelectionMode(QAbstractItemView::SingleSelection); m_table->setSelectionMode(QAbstractItemView::SingleSelection);