Update: Compilation fix for Qt 6.6, update of RELEASES.txt

This commit is contained in:
Jakub Melka 2023-11-19 15:41:42 +01:00
parent 65fd88aa71
commit ed79aa0334
11 changed files with 27 additions and 16 deletions

View File

@ -22,7 +22,8 @@
int main(int argc, char *argv[])
{
qSetGlobalQHashSeed(0);
QHashSeed::globalSeed().setDeterministicGlobalSeed();
QApplication a(argc, argv);
GeneratorMainWindow w;
w.show();

View File

@ -132,7 +132,7 @@ void SettingsDockWidget::onEditColorChanged()
auto saveColor = [&isChanged](QComboBox* comboBox, QColor& color)
{
QColor oldColor = color;
color.setNamedColor(comboBox->currentText());
color.fromString(comboBox->currentText());
isChanged = isChanged || oldColor != color;
};

View File

@ -110,7 +110,7 @@ void PageItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& opti
}
QColor color;
color.setNamedColor(splitted.front());
color.fromString(splitted.front());
QRect bubbleRect = pdf::PDFPainterHelper::drawBubble(painter, tagPoint, color, splitted.back(), Qt::AlignLeft | Qt::AlignBottom);
tagPoint.ry() += bubbleRect.height() + verticalSpacing;
}

View File

@ -1261,7 +1261,7 @@ cmsHTRANSFORM PDFLittleCMS::getTransformBetweenColorSpaces(const PDFCMS::ColorSp
QString getInfoFromProfile(cmsHPROFILE profile, cmsInfoType infoType)
{
QLocale locale;
QString country = QLocale::countryToString(locale.country());
QString country = QLocale::territoryToString(locale.territory());
QString language = QLocale::languageToString(locale.language());
char countryCode[3] = { };

View File

@ -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)
{

View File

@ -124,7 +124,7 @@ void PDFTextToSpeech::setSettings(const PDFViewerSettings* viewerSettings)
m_speechLocaleComboBox->clear();
for (const QLocale& locale : locales)
{
m_speechLocaleComboBox->addItem(QString("%1 (%2)").arg(locale.nativeLanguageName(), locale.nativeCountryName()), locale.name());
m_speechLocaleComboBox->addItem(QString("%1 (%2)").arg(locale.nativeLanguageName(), locale.nativeTerritoryName()), locale.name());
}
m_speechLocaleComboBox->setUpdatesEnabled(true);

View File

@ -601,7 +601,7 @@ void PDFViewerSettingsDialog::saveData()
}
else if (sender == ui->foregroundColorEdit)
{
m_cmsSettings.foregroundColor.setNamedColor(ui->foregroundColorEdit->text());
m_cmsSettings.foregroundColor.fromString(ui->foregroundColorEdit->text());
if (!m_cmsSettings.foregroundColor.isValid())
{
pdf::PDFColorConvertor colorConvertor;
@ -610,7 +610,7 @@ void PDFViewerSettingsDialog::saveData()
}
else if (sender == ui->backgroundColorEdit)
{
m_cmsSettings.backgroundColor.setNamedColor(ui->backgroundColorEdit->text());
m_cmsSettings.backgroundColor.fromString(ui->backgroundColorEdit->text());
if (!m_cmsSettings.backgroundColor.isValid())
{
pdf::PDFColorConvertor colorConvertor;
@ -856,7 +856,7 @@ void PDFViewerSettingsDialog::setSpeechEngine(const QString& engine, const QStri
ui->speechLocaleComboBox->clear();
for (const QLocale& currentLocale : locales)
{
ui->speechLocaleComboBox->addItem(QString("%1 (%2)").arg(currentLocale.nativeLanguageName(), currentLocale.nativeCountryName()), currentLocale.name());
ui->speechLocaleComboBox->addItem(QString("%1 (%2)").arg(currentLocale.nativeLanguageName(), currentLocale.nativeTerritoryName()), currentLocale.name());
}
ui->speechLocaleComboBox->setUpdatesEnabled(true);
}

View File

@ -57,7 +57,7 @@ QColor CreateRedactedDocumentDialog::getRedactColor() const
if (ui->fillRedactedAreaCheckBox->isChecked())
{
color.setNamedColor(ui->fillRedactedAreaColorEdit->text());
color.fromString(ui->fillRedactedAreaColorEdit->text());
}
return color;
@ -107,7 +107,7 @@ void CreateRedactedDocumentDialog::accept()
if (ui->fillRedactedAreaCheckBox->isChecked())
{
QColor color;
color.setNamedColor(ui->fillRedactedAreaColorEdit->text());
color.fromString(ui->fillRedactedAreaColorEdit->text());
if (!color.isValid())
{
QMessageBox::critical(this, tr("Error"), tr("Cannot convert '%1' to color value.").arg(ui->fillRedactedAreaColorEdit->text()));

View File

@ -55,7 +55,7 @@ void SettingsDialog::accept()
{
m_settings.proofingIntent = static_cast<pdf::RenderingIntent>(ui->cmsProofingIntentComboBox->currentData().toInt());
m_settings.softProofingProfile = ui->cmsProofingColorProfileComboBox->currentData().toString();
m_settings.outOfGamutColor.setNamedColor(ui->outOfGamutColorEdit->text());
m_settings.outOfGamutColor.fromString(ui->outOfGamutColorEdit->text());
if (!m_settings.outOfGamutColor.isValid())
{
m_settings.outOfGamutColor = Qt::red;

View File

@ -256,7 +256,7 @@ int PDFToolAudioBookBase::showVoiceList(const PDFToolOptions& options)
formatter.writeTableColumn("language", voice.getLanguage(), Qt::AlignLeft);
formatter.writeTableColumn("locale", locale.name(), Qt::AlignLeft);
formatter.writeTableColumn("language", locale.nativeLanguageName(), Qt::AlignLeft);
formatter.writeTableColumn("country", locale.nativeCountryName(), Qt::AlignLeft);
formatter.writeTableColumn("country", locale.nativeTerritoryName(), Qt::AlignLeft);
formatter.writeTableColumn("vendor", voice.getVendor(), Qt::AlignLeft);
formatter.writeTableColumn("version", voice.getVersion(), Qt::AlignLeft);
formatter.endTableRow();

View File

@ -1,5 +1,15 @@
CURRENT:
- Issue #109: No text, font. Parts missing
- Issue #108: Add accessibility options in pdf reader
- Issue #107: Create document with converted bitonic images
- Issue #106: Warning - Hardware acceleration is not supported on this device
- Issue #103: Bookmark sidebar greyed out if a bookmark is not already present
- Issue #100: Highlight rectangle
- Issue #97: Add drag and drop capability to DocPage Organizer, Context menu + layout items on window size changed
- Issue #94: New directory structure
- Issue #83: Is it possible to specify a default font for a pdf when the font is not load or recognize?
- Issue #76: Outline editing
- Issue #58: PDF Doc with rotated type3 fonts
V: 1.3.5 3.8.2023
- Issue #65: Text2Speech doesn't work on Linux