Use QStringList::join(QChar) overload where applicable [examples]
This is an automated change performing the following replacements: join\("(.)"\) -> join('\1') join\(QLatin1String\("(.)"\)\) -> join(QLatin1Char('\1')) join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1')) Change-Id: I1d0c9782cc1522d937b930531720e32d4c8f7ce8 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
e44f1dabe4
commit
6d65b2cc8c
@ -138,7 +138,7 @@ void DnsManager::showResults()
|
||||
QStringList values;
|
||||
foreach (const QByteArray &ba, record.values())
|
||||
values << "\"" + QString::fromLatin1(ba) + "\"";
|
||||
printf("%s\t%i\tIN\tTXT\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(values.join(" ")));
|
||||
printf("%s\t%i\tIN\tTXT\t%s\n", qPrintable(record.name()), record.timeToLive(), qPrintable(values.join(' ')));
|
||||
}
|
||||
|
||||
QCoreApplication::instance()->quit();
|
||||
|
@ -65,8 +65,8 @@ void CertificateInfo::setCertificateChain(const QList<QSslCertificate> &chain)
|
||||
for (int i = 0; i < chain.size(); ++i) {
|
||||
const QSslCertificate &cert = chain.at(i);
|
||||
form->certificationPathView->addItem(tr("%1%2 (%3)").arg(!i ? QString() : tr("Issued by: "))
|
||||
.arg(cert.subjectInfo(QSslCertificate::Organization).join(QLatin1String(" ")))
|
||||
.arg(cert.subjectInfo(QSslCertificate::CommonName).join(QLatin1String(" "))));
|
||||
.arg(cert.subjectInfo(QSslCertificate::Organization).join(QLatin1Char(' ')))
|
||||
.arg(cert.subjectInfo(QSslCertificate::CommonName).join(QLatin1Char(' '))));
|
||||
}
|
||||
|
||||
form->certificationPathView->setCurrentIndex(0);
|
||||
@ -78,19 +78,19 @@ void CertificateInfo::updateCertificateInfo(int index)
|
||||
if (index >= 0 && index < chain.size()) {
|
||||
const QSslCertificate &cert = chain.at(index);
|
||||
QStringList lines;
|
||||
lines << tr("Organization: %1").arg(cert.subjectInfo(QSslCertificate::Organization).join(QLatin1String(" ")))
|
||||
<< tr("Subunit: %1").arg(cert.subjectInfo(QSslCertificate::OrganizationalUnitName).join(QLatin1String(" ")))
|
||||
<< tr("Country: %1").arg(cert.subjectInfo(QSslCertificate::CountryName).join(QLatin1String(" ")))
|
||||
<< tr("Locality: %1").arg(cert.subjectInfo(QSslCertificate::LocalityName).join(QLatin1String(" ")))
|
||||
<< tr("State/Province: %1").arg(cert.subjectInfo(QSslCertificate::StateOrProvinceName).join(QLatin1String(" ")))
|
||||
<< tr("Common Name: %1").arg(cert.subjectInfo(QSslCertificate::CommonName).join(QLatin1String(" ")))
|
||||
lines << tr("Organization: %1").arg(cert.subjectInfo(QSslCertificate::Organization).join(QLatin1Char(' ')))
|
||||
<< tr("Subunit: %1").arg(cert.subjectInfo(QSslCertificate::OrganizationalUnitName).join(QLatin1Char(' ')))
|
||||
<< tr("Country: %1").arg(cert.subjectInfo(QSslCertificate::CountryName).join(QLatin1Char(' ')))
|
||||
<< tr("Locality: %1").arg(cert.subjectInfo(QSslCertificate::LocalityName).join(QLatin1Char(' ')))
|
||||
<< tr("State/Province: %1").arg(cert.subjectInfo(QSslCertificate::StateOrProvinceName).join(QLatin1Char(' ')))
|
||||
<< tr("Common Name: %1").arg(cert.subjectInfo(QSslCertificate::CommonName).join(QLatin1Char(' ')))
|
||||
<< QString()
|
||||
<< tr("Issuer Organization: %1").arg(cert.issuerInfo(QSslCertificate::Organization).join(QLatin1String(" ")))
|
||||
<< tr("Issuer Unit Name: %1").arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName).join(QLatin1String(" ")))
|
||||
<< tr("Issuer Country: %1").arg(cert.issuerInfo(QSslCertificate::CountryName).join(QLatin1String(" ")))
|
||||
<< tr("Issuer Locality: %1").arg(cert.issuerInfo(QSslCertificate::LocalityName).join(QLatin1String(" ")))
|
||||
<< tr("Issuer State/Province: %1").arg(cert.issuerInfo(QSslCertificate::StateOrProvinceName).join(QLatin1String(" ")))
|
||||
<< tr("Issuer Common Name: %1").arg(cert.issuerInfo(QSslCertificate::CommonName).join(QLatin1String(" ")));
|
||||
<< tr("Issuer Organization: %1").arg(cert.issuerInfo(QSslCertificate::Organization).join(QLatin1Char(' ')))
|
||||
<< tr("Issuer Unit Name: %1").arg(cert.issuerInfo(QSslCertificate::OrganizationalUnitName).join(QLatin1Char(' ')))
|
||||
<< tr("Issuer Country: %1").arg(cert.issuerInfo(QSslCertificate::CountryName).join(QLatin1Char(' ')))
|
||||
<< tr("Issuer Locality: %1").arg(cert.issuerInfo(QSslCertificate::LocalityName).join(QLatin1Char(' ')))
|
||||
<< tr("Issuer State/Province: %1").arg(cert.issuerInfo(QSslCertificate::StateOrProvinceName).join(QLatin1Char(' ')))
|
||||
<< tr("Issuer Common Name: %1").arg(cert.issuerInfo(QSslCertificate::CommonName).join(QLatin1Char(' ')));
|
||||
foreach (QString line, lines)
|
||||
form->certificateInfoView->addItem(line);
|
||||
} else {
|
||||
|
@ -84,7 +84,7 @@ void Window::loadImage()
|
||||
formats.append("*." + format);
|
||||
|
||||
QString newPath = QFileDialog::getOpenFileName(this, tr("Open Image"),
|
||||
path, tr("Image files (%1)").arg(formats.join(" ")));
|
||||
path, tr("Image files (%1)").arg(formats.join(' ')));
|
||||
|
||||
if (newPath.isEmpty())
|
||||
return;
|
||||
|
@ -306,7 +306,7 @@ QString VariantDelegate::displayText(const QVariant &value)
|
||||
return QString("(%1,%2)").arg(size.width()).arg(size.height());
|
||||
}
|
||||
case QVariant::StringList:
|
||||
return value.toStringList().join(",");
|
||||
return value.toStringList().join(',');
|
||||
case QVariant::Time:
|
||||
return value.toTime().toString(Qt::ISODate);
|
||||
default:
|
||||
|
@ -162,7 +162,7 @@ void MainWindow::saveFile()
|
||||
pieces.append(model->data(model->index(row, 0, QModelIndex()),
|
||||
Qt::DecorationRole).toString());
|
||||
|
||||
stream << pieces.join(",") << "\n";
|
||||
stream << pieces.join(',') << "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -91,9 +91,9 @@ QVariant DomModel::data(const QModelIndex &index, int role) const
|
||||
attributes << attribute.nodeName() + "=\""
|
||||
+attribute.nodeValue() + "\"";
|
||||
}
|
||||
return attributes.join(" ");
|
||||
return attributes.join(' ');
|
||||
case 2:
|
||||
return node.nodeValue().split("\n").join(" ");
|
||||
return node.nodeValue().split("\n").join(' ');
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
|
@ -427,7 +427,7 @@ void AddressBook::exportAsVCard()
|
||||
out << "N:" << lastName << ";" << firstName << "\n";
|
||||
|
||||
if (!nameList.isEmpty())
|
||||
out << "FN:" << nameList.join(" ") << "\n";
|
||||
out << "FN:" << nameList.join(' ') << "\n";
|
||||
else
|
||||
out << "FN:" << firstName << "\n";
|
||||
//! [export function part3]
|
||||
|
@ -427,7 +427,7 @@ void AddressBook::exportAsVCard()
|
||||
out << "N:" << lastName << ";" << firstName << "\n";
|
||||
|
||||
if (!nameList.isEmpty())
|
||||
out << "FN:" << nameList.join(" ") << "\n";
|
||||
out << "FN:" << nameList.join(' ') << "\n";
|
||||
else
|
||||
out << "FN:" << firstName << "\n";
|
||||
//! [export function part3]
|
||||
|
Loading…
Reference in New Issue
Block a user