QTfrontend/hwform.cpp
changeset 8364 fbc9bcc6c39d
parent 8357 d7bef04c99d4
child 8380 0b375a3ceaa0
equal deleted inserted replaced
8362:89a6b7cc6f95 8364:fbc9bcc6c39d
  1338 
  1338 
  1339         while (nickname.isEmpty() || (hash.isEmpty() && temphash.isEmpty())) //while a nickname, or both hashes are missing
  1339         while (nickname.isEmpty() || (hash.isEmpty() && temphash.isEmpty())) //while a nickname, or both hashes are missing
  1340         {
  1340         {
  1341         //open dialog
  1341         //open dialog
  1342             HWPasswordDialog * pwDialog = new HWPasswordDialog(this);
  1342             HWPasswordDialog * pwDialog = new HWPasswordDialog(this);
       
  1343             // make the "new account" button dialog open a browser with the registration page
       
  1344             connect(pwDialog->pbNewAccount, SIGNAL(clicked()), this, SLOT(openRegistrationPage()));
  1343             pwDialog->cbSave->setChecked(config->value("net/savepassword", true).toBool());
  1345             pwDialog->cbSave->setChecked(config->value("net/savepassword", true).toBool());
  1344 
  1346 
  1345         //if nickname is present, put it into the field
  1347         //if nickname is present, put it into the field
  1346         if (!nickname.isEmpty()) {
  1348         if (!nickname.isEmpty()) {
  1347             pwDialog->leNickname->setText(nickname);
  1349             pwDialog->leNickname->setText(nickname);
  1925     }
  1927     }
  1926     else
  1928     else
  1927         ShowErrorMessage(QMessageBox::tr("File association failed."));
  1929         ShowErrorMessage(QMessageBox::tr("File association failed."));
  1928 }
  1930 }
  1929 
  1931 
       
  1932 void HWForm::openRegistrationPage() 
       
  1933 {
       
  1934     QDesktopServices::openUrl(QUrl("http://www.hedgewars.org/user/register"));
       
  1935 }    
       
  1936 
  1930 void HWForm::saveDemoWithCustomName()
  1937 void HWForm::saveDemoWithCustomName()
  1931 {
  1938 {
  1932     if(!m_lastDemo.isEmpty())
  1939     if(!m_lastDemo.isEmpty())
  1933     {
  1940     {
  1934         QString fileName;
  1941         QString fileName;