void ChangePasswordDlg::apply() { // sanity check if(ui_.le_pwcur->text().isEmpty() || ui_.le_pwnew->text().isEmpty() || ui_.le_pwver->text().isEmpty()) { QMessageBox::information(this, tr("Error"), tr("You must fill out the fields properly before you can proceed.")); return; } if(ui_.le_pwcur->text() != pa->userAccount().pass) { QMessageBox::information(this, tr("Error"), tr("You entered your old password incorrectly. Try again.")); ui_.le_pwcur->setText(""); ui_.le_pwcur->setFocus(); return; } if(ui_.le_pwnew->text() != ui_.le_pwver->text()) { QMessageBox::information(this, tr("Error"), tr("New password and confirmation do not match. Please enter them again.")); ui_.le_pwnew->setText(""); ui_.le_pwver->setText(""); ui_.le_pwnew->setFocus(); return; } ui_.busy->start(); blockWidgets(); JT_Register *reg = new JT_Register(pa->client()->rootTask()); connect(reg, SIGNAL(finished()), SLOT(finished())); Jid j = pa->userAccount().jid; reg->reg(j.node(), ui_.le_pwnew->text()); reg->go(true); }
void TransportRegistrationManager::unregisterTransport (void) { JT_Register *registrationTask = new JT_Register(_client->rootTask()); connect(registrationTask, SIGNAL(finished()), SLOT(transportUnRegistrationFinished())); registrationTask->unreg(Jid(_transportHost)); registrationTask->go(true); }
void TransportRegistrationManager::registerTransport (const QString &username, const QString &password) { JT_Register *registrationTask = new JT_Register(_client->rootTask()); connect(registrationTask, SIGNAL(finished()), SLOT(transportRegistrationFinished())); registrationTask->reg(Jid(_transportHost), username, password); registrationTask->go(true); _usernamesForTasks[registrationTask] = username; }