diff options
author | Stiepen22 <stiepen22@gmx.de> | 2013-09-06 23:01:40 +0200 |
---|---|---|
committer | Stiepen22 <stiepen22@gmx.de> | 2013-09-06 23:01:40 +0200 |
commit | 0990a1103c7eafd099e3ef9650f542eb34a6a818 (patch) | |
tree | 43d3f8d755554eacfcbfb6505f1e6f8d21422dc1 | |
parent | f897a200e2607fd99116a3ab4bb9ba757a52139b (diff) | |
download | MultiMC-0990a1103c7eafd099e3ef9650f542eb34a6a818.tar MultiMC-0990a1103c7eafd099e3ef9650f542eb34a6a818.tar.gz MultiMC-0990a1103c7eafd099e3ef9650f542eb34a6a818.tar.lz MultiMC-0990a1103c7eafd099e3ef9650f542eb34a6a818.tar.xz MultiMC-0990a1103c7eafd099e3ef9650f542eb34a6a818.zip |
Made Offline user name default to 'Offline' if the textbox is left empty
-rw-r--r-- | gui/mainwindow.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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); } |