REMOVE old QT<= 5.14 code

Ubuntu 22.04  use qt 1.15.3.
In the code is still used qt code <5.10.
A cleanup was done by removing qT code version used in ubuntu 18.04.
This commit is contained in:
Andrea
2025-03-01 09:17:30 +01:00
parent ea0f447cfc
commit da66720d3a
47 changed files with 22 additions and 467 deletions

View File

@@ -76,11 +76,7 @@ DlgSettingsEditor::DlgSettingsEditor(QWidget* parent)
setupConnections();
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
ui->textEdit1->setTabStopWidth(40);
#else
ui->textEdit1->setTabStopDistance(40.0);
#endif
d = new DlgSettingsEditorP();
QColor col;
@@ -173,17 +169,10 @@ void DlgSettingsEditor::setupConnections()
this, &DlgSettingsEditor::onDisplayItemsCurrentItemChanged);
connect(ui->colorButton, &ColorButton::changed,
this, &DlgSettingsEditor::onColorButtonChanged);
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
connect(ui->fontFamily, qOverload<const QString&>(&QComboBox::activated),
this, &DlgSettingsEditor::onFontFamilyActivated);
connect(ui->fontSize, qOverload<const QString&>(&PrefSpinBox::valueChanged),
this, &DlgSettingsEditor::onFontSizeValueChanged);
#else
connect(ui->fontFamily, &QComboBox::textActivated,
this, &DlgSettingsEditor::onFontFamilyActivated);
connect(ui->fontSize, &PrefSpinBox::textChanged,
this, &DlgSettingsEditor::onFontSizeValueChanged);
#endif
// clang-format on
}
@@ -213,11 +202,7 @@ void DlgSettingsEditor::setEditorTabWidth(int tabWidth)
{
QFontMetrics metric(font());
int fontSize = QtTools::horizontalAdvance(metric, QLatin1Char('0'));
#if QT_VERSION < QT_VERSION_CHECK(5, 10, 0)
ui->textEdit1->setTabStopWidth(tabWidth * fontSize);
#else
ui->textEdit1->setTabStopDistance(tabWidth * fontSize);
#endif
}
void DlgSettingsEditor::saveSettings()