mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Update: Compilation fix for Qt 6.6, update of RELEASES.txt
This commit is contained in:
@ -43,26 +43,26 @@ PDFCreateCertificateDialog::PDFCreateCertificateDialog(QWidget *parent) :
|
||||
ui->keyLengthCombo->setCurrentIndex(ui->keyLengthCombo->findData(2048));
|
||||
|
||||
QList<QLocale> locales = QLocale::matchingLocales(QLocale::AnyLanguage, QLocale::AnyScript, QLocale::AnyCountry);
|
||||
std::sort(locales.begin(), locales.end(), [](const QLocale& left, const QLocale& right) { return QString::compare(left.nativeCountryName(), right.nativeCountryName(), Qt::CaseInsensitive) < 0; });
|
||||
std::sort(locales.begin(), locales.end(), [](const QLocale& left, const QLocale& right) { return QString::compare(left.nativeTerritoryName(), right.nativeTerritoryName(), Qt::CaseInsensitive) < 0; });
|
||||
|
||||
int currentIndex = 0;
|
||||
QLocale currentLocale = QLocale::system();
|
||||
|
||||
for (const QLocale& locale : locales)
|
||||
{
|
||||
if (locale.country() == QLocale::AnyCountry)
|
||||
if (locale.territory() == QLocale::AnyTerritory)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (locale.nativeCountryName().isEmpty())
|
||||
if (locale.nativeTerritoryName().isEmpty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
QString localeName = locale.name();
|
||||
QString countryCode = localeName.split(QChar('_')).back();
|
||||
QString text = QString("%1 | %2").arg(countryCode, locale.nativeCountryName());
|
||||
QString text = QString("%1 | %2").arg(countryCode, locale.nativeTerritoryName());
|
||||
|
||||
if (ui->countryCombo->findText(text) >= 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user