MainWindow: Use MainWindow variant of tr()
MainWindow derives from QMainWindow, so we can use tr() directly without the qualification.
This commit is contained in:
parent
47b40698bb
commit
89ceef2a8a
|
@ -1379,16 +1379,15 @@ bool MainWindow::NetPlayJoin()
|
||||||
{
|
{
|
||||||
if (Core::IsRunning())
|
if (Core::IsRunning())
|
||||||
{
|
{
|
||||||
ModalMessageBox::critical(
|
ModalMessageBox::critical(nullptr, tr("Error"),
|
||||||
nullptr, QObject::tr("Error"),
|
tr("Can't start a NetPlay Session while a game is still running!"));
|
||||||
QObject::tr("Can't start a NetPlay Session while a game is still running!"));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_netplay_dialog->isVisible())
|
if (m_netplay_dialog->isVisible())
|
||||||
{
|
{
|
||||||
ModalMessageBox::critical(nullptr, QObject::tr("Error"),
|
ModalMessageBox::critical(nullptr, tr("Error"),
|
||||||
QObject::tr("A NetPlay Session is already in progress!"));
|
tr("A NetPlay Session is already in progress!"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1447,16 +1446,15 @@ bool MainWindow::NetPlayHost(const UICommon::GameFile& game)
|
||||||
{
|
{
|
||||||
if (Core::IsRunning())
|
if (Core::IsRunning())
|
||||||
{
|
{
|
||||||
ModalMessageBox::critical(
|
ModalMessageBox::critical(nullptr, tr("Error"),
|
||||||
nullptr, QObject::tr("Error"),
|
tr("Can't start a NetPlay Session while a game is still running!"));
|
||||||
QObject::tr("Can't start a NetPlay Session while a game is still running!"));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_netplay_dialog->isVisible())
|
if (m_netplay_dialog->isVisible())
|
||||||
{
|
{
|
||||||
ModalMessageBox::critical(nullptr, QObject::tr("Error"),
|
ModalMessageBox::critical(nullptr, tr("Error"),
|
||||||
QObject::tr("A NetPlay Session is already in progress!"));
|
tr("A NetPlay Session is already in progress!"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1480,9 +1478,8 @@ bool MainWindow::NetPlayHost(const UICommon::GameFile& game)
|
||||||
if (!Settings::Instance().GetNetPlayServer()->is_connected)
|
if (!Settings::Instance().GetNetPlayServer()->is_connected)
|
||||||
{
|
{
|
||||||
ModalMessageBox::critical(
|
ModalMessageBox::critical(
|
||||||
nullptr, QObject::tr("Failed to open server"),
|
nullptr, tr("Failed to open server"),
|
||||||
QObject::tr(
|
tr("Failed to listen on port %1. Is another instance of the NetPlay server running?")
|
||||||
"Failed to listen on port %1. Is another instance of the NetPlay server running?")
|
|
||||||
.arg(host_port));
|
.arg(host_port));
|
||||||
NetPlayQuit();
|
NetPlayQuit();
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue