void Credentials::setPassword(QString* password) { if (_password == password) return; _password = password; emit passwordChanged(password); }
void Settings::setPassword(QString password) { if (_password != password) { _password = password; m_settings->setValue("password", _password); emit passwordChanged(); } }
void JabberChangePassword::registerIqReceived(const QXmppRegisterIq ®isterIq) { if (registerIq.id() != m_id) return; if (m_errorService->isErrorIq(registerIq)) { auto conditionString = QString{}; switch (registerIq.error().condition()) { case QXmppStanza::Error::NotAuthorized: conditionString = tr("Current connection is not safe for password change. Use encrypted connection or change password on provider's site."); break; case QXmppStanza::Error::NotAllowed: case QXmppStanza::Error::FeatureNotImplemented: conditionString = tr("Password change is not allowed."); default: break; } emit error(m_errorService->errorMessage(registerIq, conditionString)); } else if (registerIq.type() == QXmppIq::Type::Result) emit passwordChanged(); deleteLater(); }
void LocationDiagnostics::setPassword(const QString &password) { if (m_password == password) return; m_password = password; emit passwordChanged(); }
void LoginRequest::setPassword(const QString &password) { if (d->password != password) { d->password = password; emit passwordChanged(password); } }
// +------------------------------------------------------------------------ // | 设置用户密码 // +------------------------------------------------------------------------ void DcSettings::setPassword( QString strPassword ) { if( m_password == strPassword ) return; m_password = strPassword; writeSetting( DEFAULT_SETTING_PATH, "password", strPassword ); emit passwordChanged(); return; }
void CloudStorageSettings::setPassword(const QString& value) { QSettings s; s.beginGroup(group); s.setValue("password", value); free(prefs.proxy_pass); prefs.proxy_pass = copy_string(qPrintable(value)); emit passwordChanged(value); }
void CredentialDialog::passwordChanged() { qDebug() << Q_FUNC_INFO; if (passwordTextEdit->text().isEmpty()) return; passwordSetByUser = true; disconnect(passwordTextEdit, SIGNAL(textChanged()), this, SLOT(passwordChanged())); }
void RemoteControlDialog::createDialogContent() { rc = GETSTELMODULE(RemoteControl); ui->setupUi(dialog); // Kinetic scrolling kineticScrollingList << ui->aboutTextBrowser; StelGui* gui= dynamic_cast<StelGui*>(StelApp::getInstance().getGui()); if (gui) { enableKineticScrolling(gui->getFlagUseKineticScrolling()); connect(gui, SIGNAL(flagUseKineticScrollingChanged(bool)), this, SLOT(enableKineticScrolling(bool))); } connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate())); connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())); connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint))); // TODO Fill other buttons connectCheckBox(ui->enabledCheckbox,"actionShow_Remote_Control"); connect(ui->enabledCheckbox, SIGNAL(clicked(bool)), this, SLOT(updateIPlabel(bool))); updateIPlabel(ui->enabledCheckbox->isChecked()); ui->activateOnStartCheckBox->setChecked(rc->getFlagAutoStart()); connect(ui->activateOnStartCheckBox, SIGNAL(toggled(bool)), rc, SLOT(setFlagAutoStart(bool))); connect(rc, SIGNAL(flagAutoStartChanged(bool)), ui->activateOnStartCheckBox, SLOT(setChecked(bool))); ui->passwordCheckBox->setChecked(rc->getFlagUsePassword()); connect(ui->passwordCheckBox, SIGNAL(toggled(bool)), rc, SLOT(setFlagUsePassword(bool))); connect(rc, SIGNAL(flagUsePasswordChanged(bool)), ui->passwordCheckBox, SLOT(setChecked(bool))); ui->passwordEdit->setEnabled(rc->getFlagUsePassword()); ui->passwordEdit->setText(rc->getPassword()); connect(rc,SIGNAL(flagUsePasswordChanged(bool)),ui->passwordEdit,SLOT(setEnabled(bool))); connect(ui->passwordEdit, SIGNAL(textChanged(QString)), rc, SLOT(setPassword(QString))); ui->portNumberSpinBox->setValue(rc->getPort()); connect(ui->portNumberSpinBox, SIGNAL(valueChanged(int)), rc, SLOT(setPort(int))); ui->restartPanel->setVisible(false); connect(rc, SIGNAL(flagUsePasswordChanged(bool)), this, SLOT(requiresRestart())); connect(rc, SIGNAL(passwordChanged(QString)), this, SLOT(requiresRestart())); connect(rc, SIGNAL(portChanged(int)), this, SLOT(requiresRestart())); connect(ui->resetButton, SIGNAL(clicked(bool)),this,SLOT(restart())); connect(ui->saveSettingsButton, SIGNAL(clicked()), rc, SLOT(saveSettings())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), rc, SLOT(restoreDefaultSettings())); setAboutHtml(); }
void SmartIODBox::setPassword(const QString &pass) { if( p->password == pass ) return; p->password = pass; foreach( SmartIODBoxSingle *s, p->threads ) QMetaObject::invokeMethod(s, "setPassword", Qt::QueuedConnection, Q_ARG(QString,p->password) ); emit passwordChanged(); }
bool MClient::setPassword(const QString &password){ /* se la password è diversa da quello precedente */ if(m_pass != password){ /* cambio la password */ m_pass = password; /* ed emetto il segnale */ emit passwordChanged(password); /* ritorno true */ return true; } /* altrimenti ritorno false */ return false; }
bool PasswordDialog::retypeChanged(const QString &text) { bool result; if (!passwordChanged(_ui->password->text())) result = false; else if (text != _ui->password->text()) { _ui->status->setText(tr("Passwords do not match.")); result = false; } else result = true; _okAction->setEnabled(result); #ifdef Q_WS_SIMULATOR _button->setEnabled(result); #endif return result; }
PasswordDialog::PasswordDialog(QWidget *parent): QDialog(parent), _ui(new Ui::PasswordDialog), _cancelAction(new QAction(qApp->style()->standardIcon(static_cast<QStyle::StandardPixmap>(SP_CustomToolBarBack)), tr("Cancel"), this)), _okAction(new QAction(qApp->style()->standardIcon(static_cast<QStyle::StandardPixmap>(SP_CustomToolBarDone)), tr("Ok"), this)) { _ui->setupUi(this); addAction(_cancelAction); addAction(_okAction); _cancelAction->setSoftKeyRole(QAction::NegativeSoftKey); _okAction->setSoftKeyRole(QAction::PositiveSoftKey); _okAction->setDisabled(true); connect(_cancelAction, SIGNAL(triggered()), this, SLOT(reject())); connect(_okAction, SIGNAL(triggered()), this, SLOT(accept())); connect(_ui->password, SIGNAL(textEdited(QString)), this, SLOT(passwordChanged(QString))); connect(_ui->retype, SIGNAL(textEdited(QString)), this, SLOT(retypeChanged(QString))); }
MeeTv::MeeTv(QObject *parent) : QObject(parent) { #ifndef QT_SIMULATOR m_settings = new MeeTvSettingsGConf(this); #else m_settings = new MeeTvSettingsHard(this); #endif m_active = false; m_authenticationSettingsChanged = false; m_connecting = false; m_connectionSettingsChanged = false; connect(m_settings, SIGNAL(hostnameChanged()), this, SLOT(_connectionSettingsChanged())); connect(m_settings, SIGNAL(portChanged()), this, SLOT(_connectionSettingsChanged())); connect(this, SIGNAL(activeChanged()), this, SLOT(_connectHtsp())); connect(m_settings, SIGNAL(passwordChanged()), this, SLOT(_authenticationSettingsChanged())); connect(m_settings, SIGNAL(usernameChanged()), this, SLOT(_authenticationSettingsChanged())); m_idleTimer.setSingleShot(true); m_idleTimer.setMinimumInterval(60); m_idleTimer.setMaximumInterval(90); }
void Enigma1ScreenShot::setPassword(const QString &p) { if (p != password()) { m_password = p; emit passwordChanged(); } }
void testQOfonoConnectionManagerContext () { QSignalSpy conadd(m, SIGNAL(contextAdded(QString))); QSignalSpy conrem(m, SIGNAL(contextRemoved(QString))); m->addContext("internet"); QTRY_COMPARE(conadd.count(), 1); QString contextid = conadd.takeFirst().at(0).toString(); QVERIFY(m->contexts().contains(contextid)); QOfonoConnectionContext* context = new QOfonoConnectionContext(this); context->setContextPath(contextid); QSignalSpy active(context, SIGNAL(activeChanged(bool))); QSignalSpy apn(context,SIGNAL(accessPointNameChanged(QString))); QSignalSpy name(context, SIGNAL(nameChanged(QString))); QSignalSpy type (context, SIGNAL(typeChanged(QString))); QSignalSpy uname (context, SIGNAL(usernameChanged(QString))); QSignalSpy pw (context, SIGNAL(passwordChanged(QString))); QSignalSpy proto (context, SIGNAL(protocolChanged(QString))); QSignalSpy sett (context, SIGNAL(settingsChanged(QVariantMap))); QSignalSpy sett6 (context, SIGNAL(IPv6SettingsChanged(QVariantMap))); context->setAccessPointName("hyva"); QTRY_COMPARE(apn.count(), 1); QCOMPARE(apn.takeFirst().at(0).toString(), QString("hyva")); context->setUsername("huomenta"); QTRY_COMPARE(uname.count(), 1); QCOMPARE(uname.takeFirst().at(0).toString(), QString("huomenta")); context->setPassword("HYVA"); QTRY_COMPARE(pw.count(), 1); QCOMPARE(pw.takeFirst().at(0).toString(), QString("HYVA")); context->setName("yota"); QTRY_COMPARE(name.count(), 1); QCOMPARE(name.takeFirst().at(0).toString(), QString("yota")); context->setType("mms"); QTRY_COMPARE(type.count(), 1); QCOMPARE(type.takeFirst().at(0).toString(), QString("mms")); context->setProtocol("ipv6"); QTRY_COMPARE(proto.count(), 1); QCOMPARE(proto.takeFirst().at(0).toString(), QString("ipv6")); context->setActive(true); QTRY_COMPARE(active.count(), 1); QCOMPARE(active.takeFirst().at(0).toBool(), true); QTRY_COMPARE(sett6.count(), 1); QCOMPARE(sett6.takeFirst().at(0).toMap()["Interface"].value<QString>().left(5), QString("dummy")); // "dummy" plus number QVariantMap settings = context->IPv6Settings(); QCOMPARE(settings["Interface"].value<QString>().left(5),QString("dummy")); // "dummy" plus number QTest::qWait(REASONABLE_TIMEOUT); QCOMPARE(apn.count(), 0); QCOMPARE(uname.count(), 0); QCOMPARE(pw.count(), 0); QCOMPARE(name.count(), 0); QCOMPARE(type.count(), 0); QCOMPARE(sett.count(), 0); QCOMPARE(proto.count(), 0); QCOMPARE(active.count(), 0); context->setActive(false); QTRY_COMPARE(active.count(), 1); QCOMPARE(active.takeFirst().at(0).toBool(), false); delete context; m->removeContext(contextid); QTRY_COMPARE(conrem.count(), 1); QCOMPARE(conrem.takeFirst().at(0).toString(), contextid); }
void KaqazSync::password_changed(const QString &password) { p->db->setSyncPassword( password ); emit passwordChanged(); }
void Client::setPassword(const QString &password) { d_func()->password = password; emit passwordChanged(password); }