Made Offline user name default to 'Offline' if the textbox is left empty

This commit is contained in:
Stiepen22 2013-09-06 23:01:40 +02:00
parent f897a200e2
commit 0990a1103c

View File

@ -492,7 +492,10 @@ void MainWindow::doLogin(const QString& errorMsg)
}
else
{
m_activeLogin = {loginDlg->getUsername(), QString("Offline"), qint64(-1)};
QString user = loginDlg->getUsername();
if (user.length() == 0)
user = QString("Offline");
m_activeLogin = {user, QString("Offline"), qint64(-1)};
m_activeInst = m_selectedInstance;
launchInstance(m_activeInst, m_activeLogin);
}