コード例 #1
0
ファイル: quetzalaccount.cpp プロジェクト: akahan/qutim
void QuetzalAccount::onPasswordRejected()
{
	PasswordDialog *dialog = qobject_cast<PasswordDialog *>(sender());
	QuetzalAccountPasswordInfo info = dialog->property("info").value<QuetzalAccountPasswordInfo>();
	info.cancelCb(info.userData, info.fields);
	purple_request_fields_destroy(info.fields);
	dialog->deleteLater();
}
コード例 #2
0
ファイル: quetzalaccount.cpp プロジェクト: akahan/qutim
void QuetzalAccount::onPasswordEntered(const QString &password, bool remember)
{
	PasswordDialog *dialog = qobject_cast<PasswordDialog *>(sender());
	QuetzalAccountPasswordInfo info = dialog->property("info").value<QuetzalAccountPasswordInfo>();
	PurpleRequestField *passwordField = purple_request_fields_get_field(info.fields, "password");
	PurpleRequestField *rememberField = purple_request_fields_get_field(info.fields, "remember");
	purple_request_field_string_set_value(passwordField, password.toUtf8().constData());
	purple_request_field_bool_set_value(rememberField, remember);
	info.okCb(info.userData, info.fields);
	purple_request_fields_destroy(info.fields);
	dialog->deleteLater();
//	if (remember) {
//		purple_account_set_password(password);
//	}
//		config("general").setValue("passwd", password, Config::Crypted);
}