From 0990a1103c7eafd099e3ef9650f542eb34a6a818 Mon Sep 17 00:00:00 2001 From: Stiepen22 Date: Fri, 6 Sep 2013 23:01:40 +0200 Subject: [PATCH] Made Offline user name default to 'Offline' if the textbox is left empty --- gui/mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 75996c5d..7d1e1510 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -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); }