Merge pull request #19921 from mosfet80/QT_CLEAN

REMOVE old QT<= 5.14 code
This commit is contained in:
Chris Hennes
2025-03-11 20:54:59 +00:00
committed by GitHub
57 changed files with 41 additions and 532 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()

View File

@@ -421,11 +421,8 @@ QStringList DlgSettingsWorkbenchesImp::getEnabledWorkbenches()
hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Workbenches");
wbs_ordered = QString::fromStdString(hGrp->GetASCII("Ordered", ""));
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
wbs_ordered_list = wbs_ordered.split(QLatin1String(","), Qt::SkipEmptyParts);
#else
wbs_ordered_list = wbs_ordered.split(QLatin1String(","), QString::SkipEmptyParts);
#endif
QStringList workbenches = Application::Instance->workbenches();
workbenches.sort();
@@ -458,11 +455,8 @@ QStringList DlgSettingsWorkbenchesImp::getDisabledWorkbenches()
hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Workbenches");
disabled_wbs = QString::fromStdString(hGrp->GetASCII("Disabled", "NoneWorkbench,TestWorkbench"));
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
unfiltered_disabled_wbs_list = disabled_wbs.split(QLatin1String(","), Qt::SkipEmptyParts);
#else
unfiltered_disabled_wbs_list = disabled_wbs.split(QLatin1String(","), QString::SkipEmptyParts);
#endif
QStringList workbenches = Application::Instance->workbenches();