mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
DolphinQt: Replace usages of QLatin1Literal with QStringLiteral
This literal was deprecated in 5.14.0. Not to mention it wasn't documented as part of the API either: see the 5.14.0 changelog here: https://code.qt.io/cgit/qt/qtbase.git/tree/dist/changes-5.14.0?h=v5.14.0 On Qt 6.0 this define is removed entirely. To stay forward compatible, we can make use of QStringLiteral instead.
This commit is contained in:
parent
7fdd4afd9c
commit
f647ca4620
@ -40,9 +40,9 @@ QTableWidgetItem* GetSocketDomain(s32 host_fd)
|
||||
switch (sa.sa_family)
|
||||
{
|
||||
case 2:
|
||||
return new QTableWidgetItem(QLatin1Literal("AF_INET"));
|
||||
return new QTableWidgetItem(QStringLiteral("AF_INET"));
|
||||
case 23:
|
||||
return new QTableWidgetItem(QLatin1Literal("AF_INET6"));
|
||||
return new QTableWidgetItem(QStringLiteral("AF_INET6"));
|
||||
default:
|
||||
return new QTableWidgetItem(QString::number(sa.sa_family));
|
||||
}
|
||||
@ -63,9 +63,9 @@ QTableWidgetItem* GetSocketType(s32 host_fd)
|
||||
switch (so_type)
|
||||
{
|
||||
case 1:
|
||||
return new QTableWidgetItem(QLatin1Literal("SOCK_STREAM"));
|
||||
return new QTableWidgetItem(QStringLiteral("SOCK_STREAM"));
|
||||
case 2:
|
||||
return new QTableWidgetItem(QLatin1Literal("SOCK_DGRAM"));
|
||||
return new QTableWidgetItem(QStringLiteral("SOCK_DGRAM"));
|
||||
default:
|
||||
return new QTableWidgetItem(QString::number(so_type));
|
||||
}
|
||||
|
@ -131,10 +131,10 @@ void ThreadWidget::ShowContextMenu(QTableWidget* table)
|
||||
|
||||
QLineEdit* ThreadWidget::CreateLineEdit() const
|
||||
{
|
||||
QLineEdit* line_edit = new QLineEdit(QLatin1Literal("00000000"));
|
||||
QLineEdit* line_edit = new QLineEdit(QStringLiteral("00000000"));
|
||||
line_edit->setReadOnly(true);
|
||||
line_edit->setFixedWidth(
|
||||
line_edit->fontMetrics().boundingRect(QLatin1Literal(" 00000000 ")).width());
|
||||
line_edit->fontMetrics().boundingRect(QStringLiteral(" 00000000 ")).width());
|
||||
return line_edit;
|
||||
}
|
||||
|
||||
@ -374,39 +374,39 @@ void ThreadWidget::UpdateThreadContext(const Common::Debug::PartialContext& cont
|
||||
switch (i)
|
||||
{
|
||||
case 8:
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QLatin1Literal("CR")));
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QStringLiteral("CR")));
|
||||
m_context_table->setItem(i, 7, new QTableWidgetItem(format_hex(context.cr)));
|
||||
break;
|
||||
case 9:
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QLatin1Literal("LR")));
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QStringLiteral("LR")));
|
||||
m_context_table->setItem(i, 7, new QTableWidgetItem(format_hex(context.lr)));
|
||||
break;
|
||||
case 10:
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QLatin1Literal("CTR")));
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QStringLiteral("CTR")));
|
||||
m_context_table->setItem(i, 7, new QTableWidgetItem(format_hex(context.ctr)));
|
||||
break;
|
||||
case 11:
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QLatin1Literal("XER")));
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QStringLiteral("XER")));
|
||||
m_context_table->setItem(i, 7, new QTableWidgetItem(format_hex(context.xer)));
|
||||
break;
|
||||
case 12:
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QLatin1Literal("FPSCR")));
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QStringLiteral("FPSCR")));
|
||||
m_context_table->setItem(i, 7, new QTableWidgetItem(format_hex(context.fpscr)));
|
||||
break;
|
||||
case 13:
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QLatin1Literal("SRR0")));
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QStringLiteral("SRR0")));
|
||||
m_context_table->setItem(i, 7, new QTableWidgetItem(format_hex(context.srr0)));
|
||||
break;
|
||||
case 14:
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QLatin1Literal("SRR1")));
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QStringLiteral("SRR1")));
|
||||
m_context_table->setItem(i, 7, new QTableWidgetItem(format_hex(context.srr1)));
|
||||
break;
|
||||
case 15:
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QLatin1Literal("DUMMY")));
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QStringLiteral("DUMMY")));
|
||||
m_context_table->setItem(i, 7, new QTableWidgetItem(format_hex(context.dummy)));
|
||||
break;
|
||||
case 16:
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QLatin1Literal("STATE")));
|
||||
m_context_table->setItem(i, 6, new QTableWidgetItem(QStringLiteral("STATE")));
|
||||
m_context_table->setItem(i, 7, new QTableWidgetItem(format_hex(context.state)));
|
||||
break;
|
||||
default:
|
||||
@ -454,7 +454,7 @@ void ThreadWidget::UpdateThreadCallstack(const Common::Debug::PartialContext& co
|
||||
}
|
||||
else
|
||||
{
|
||||
m_callstack_table->setItem(i, 2, new QTableWidgetItem(QLatin1Literal("--------")));
|
||||
m_callstack_table->setItem(i, 2, new QTableWidgetItem(QStringLiteral("--------")));
|
||||
}
|
||||
sp = PowerPC::HostRead_U32(sp);
|
||||
m_callstack_table->setItem(i, 1, new QTableWidgetItem(format_hex(sp)));
|
||||
|
Loading…
Reference in New Issue
Block a user