本文整理汇总了C++中qstringlist::iterator::toLatin1方法的典型用法代码示例。如果您正苦于以下问题:C++ iterator::toLatin1方法的具体用法?C++ iterator::toLatin1怎么用?C++ iterator::toLatin1使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qstringlist::iterator
的用法示例。
在下文中一共展示了iterator::toLatin1方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: cert
LoginTester::LoginTester(QString username,
QString password,
int maxcount,
QWidget *parent) :
QDialog(parent, Qt::FramelessWindowHint),
ui(new Ui::LoginTester)
{
ui->setupUi(this);
ui->button->hide();
// Initialisieren der Variablen
tryCounter = 0;
this->maxTries = maxcount;
this->username = username;
this->password = password;
// Initialisieren des NetworkManagers und der Slots
manager = new QNetworkAccessManager(qApp);
QFile cert(":/certs/l2p");
cert.open(QFile::ReadOnly);
QList<QSslCertificate> newCertificates = QSslCertificate::fromData(cert.readAll(),QSsl::Der);
cert.close();
QSslCertificate newCertificate = newCertificates.first();
QFile cert2(":/certs/utn");
cert2.open(QFile::ReadOnly);
QList<QSslCertificate> newCertificates2 = QSslCertificate::fromData(cert2.readAll(),QSsl::Der);
cert2.close();
QSslCertificate newCertificate2 = newCertificates2.first();
QFile cert3(":/certs/ssl");
cert3.open(QFile::ReadOnly);
QList<QSslCertificate> newCertificates3 = QSslCertificate::fromData(cert3.readAll(),QSsl::Der);
cert3.close();
QSslCertificate newCertificate3 = newCertificates3.first();
QSslConfiguration newSslConfiguration = QSslConfiguration::defaultConfiguration();
newCertificates = newSslConfiguration.caCertificates();
newCertificates.append(newCertificate);
newCertificates.append(newCertificate2);
newCertificates.append(newCertificate3);
newSslConfiguration.setCaCertificates(newCertificates);
QSslConfiguration::setDefaultConfiguration(newSslConfiguration);
QSslConfiguration newSslConfiguration2 = QSslConfiguration::defaultConfiguration();
newCertificates2 = newSslConfiguration2.caCertificates();
foreach (QSslCertificate c, newCertificates2)
{
QStringList list = QStringList(c.subjectInfo(QSslCertificate::CommonName));
for(QStringList::iterator i = list.begin(); i != list.end(); i++){
qDebug(i->toLatin1());
}
}