mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-20 03:24:59 +00:00
Fixed string generation to fit better within codebase as suggested by TryTwo
This commit is contained in:
parent
9bbd152ed4
commit
c0d2295d4e
1 changed files with 3 additions and 7 deletions
|
@ -831,14 +831,12 @@ void CodeViewWidget::OnCopyWholeLine()
|
|||
{
|
||||
const u32 addr = GetContextAddress();
|
||||
|
||||
const QString textAddress = QStringLiteral("%1").arg(addr, 8, 16, QLatin1Char('0'));
|
||||
|
||||
const std::string textCode = [this, addr] {
|
||||
Core::CPUThreadGuard guard(m_system);
|
||||
return m_system.GetPowerPC().GetDebugInterface().Disassemble(&guard, addr);
|
||||
}();
|
||||
|
||||
QString textTarget = QStringLiteral("");
|
||||
std::string wholeLineText = std::format("{:08x} {}", addr, textCode);
|
||||
|
||||
if (IsInstructionLoadStore(textCode))
|
||||
{
|
||||
|
@ -847,13 +845,11 @@ void CodeViewWidget::OnCopyWholeLine()
|
|||
|
||||
if (target_addr)
|
||||
{
|
||||
textTarget = QStringLiteral(" targetting ") +
|
||||
QStringLiteral("%1").arg(*target_addr, 8, 16, QLatin1Char('0'));
|
||||
wholeLineText += std::format(" targetting {:08x}", *target_addr);
|
||||
}
|
||||
}
|
||||
|
||||
QApplication::clipboard()->setText(textAddress + QString::fromStdString(std::string(" ")) +
|
||||
QString::fromStdString(textCode) + textTarget);
|
||||
QApplication::clipboard()->setText(QString::fromStdString(wholeLineText));
|
||||
}
|
||||
|
||||
void CodeViewWidget::OnCopyFunction()
|
||||
|
|
Loading…
Add table
Reference in a new issue