all repos — mgba @ c53e3546dd071f1458144ce3e659ebb851ec7d78

mGBA Game Boy Advance Emulator

Qt: Fix pre-5.5 build
Jeffrey Pfau jeffrey@endrift.com
Sat, 10 Oct 2015 21:04:05 -0700
commit

c53e3546dd071f1458144ce3e659ebb851ec7d78

parent

8284e7ded2596317ff1700c71bdada0f504fb0d2

1 files changed, 2 insertions(+), 2 deletions(-)

jump to
M src/platform/qt/IOViewer.cppsrc/platform/qt/IOViewer.cpp

@@ -26,7 +26,7 @@ const char* reg = GBAIORegisterNames[i];

if (!reg) { continue; } - m_ui.regSelect->addItem(QString::asprintf("0x0400%04X: %s", i << 1, reg), i << 1); + m_ui.regSelect->addItem("0x0400" + QString("%1: %2").arg(i << 1, 4, 16, QChar('0')).toUpper().arg(reg), i << 1); } const QFont font = QFontDatabase::systemFont(QFontDatabase::FixedFont);

@@ -64,7 +64,7 @@ m_value = GBAIORead(m_controller->thread()->gba, m_register);

} m_controller->threadContinue(); - m_ui.regValue->setText(QString::asprintf("0x%04X", m_value)); + m_ui.regValue->setText("0x" + QString("%1").arg(m_value, 4, 16, QChar('0')).toUpper()); bool signalsBlocked; signalsBlocked = m_ui.b0->blockSignals(true); m_ui.b0->setChecked(m_value & 0x0001 ? Qt::Checked : Qt::Unchecked);