Drop Qt5: ModelingLib: Get rid of QOverload

Change-Id: If7b6c4daf3c092eb844eb279049cac2f510dbc47
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-07-20 07:56:59 +02:00
parent a98b185e90
commit f078319feb

View File

@@ -580,7 +580,7 @@ void PropertiesView::MView::visitMDependency(const MDependency *dependency)
m_directionSelector = new QComboBox(m_topWidget); m_directionSelector = new QComboBox(m_topWidget);
m_directionSelector->addItems(QStringList({ "->", "<-", "<->" })); m_directionSelector->addItems(QStringList({ "->", "<-", "<->" }));
addRow(tr("Direction:"), m_directionSelector, "direction"); addRow(tr("Direction:"), m_directionSelector, "direction");
connect(m_directionSelector, QOverload<int>::of(&QComboBox::activated), connect(m_directionSelector, &QComboBox::activated,
this, &PropertiesView::MView::onDependencyDirectionChanged); this, &PropertiesView::MView::onDependencyDirectionChanged);
} }
if (isSingleSelection) { if (isSingleSelection) {
@@ -664,7 +664,7 @@ void PropertiesView::MView::visitMAssociation(const MAssociation *association)
m_endAKind = new QComboBox(m_topWidget); m_endAKind = new QComboBox(m_topWidget);
m_endAKind->addItems({ tr("Association"), tr("Aggregation"), tr("Composition") }); m_endAKind->addItems({ tr("Association"), tr("Aggregation"), tr("Composition") });
addRow(tr("Relationship:"), m_endAKind, "relationship a"); addRow(tr("Relationship:"), m_endAKind, "relationship a");
connect(m_endAKind, QOverload<int>::of(&QComboBox::activated), connect(m_endAKind, &QComboBox::activated,
this, &PropertiesView::MView::onAssociationEndAKindChanged); this, &PropertiesView::MView::onAssociationEndAKindChanged);
} }
if (isSingleSelection) { if (isSingleSelection) {
@@ -729,7 +729,7 @@ void PropertiesView::MView::visitMAssociation(const MAssociation *association)
m_endBKind = new QComboBox(m_topWidget); m_endBKind = new QComboBox(m_topWidget);
m_endBKind->addItems({ tr("Association"), tr("Aggregation"), tr("Composition") }); m_endBKind->addItems({ tr("Association"), tr("Aggregation"), tr("Composition") });
addRow(tr("Relationship:"), m_endBKind, "relationship b"); addRow(tr("Relationship:"), m_endBKind, "relationship b");
connect(m_endBKind, QOverload<int>::of(&QComboBox::activated), connect(m_endBKind, &QComboBox::activated,
this, &PropertiesView::MView::onAssociationEndBKindChanged); this, &PropertiesView::MView::onAssociationEndBKindChanged);
} }
if (isSingleSelection) { if (isSingleSelection) {
@@ -930,7 +930,7 @@ void PropertiesView::MView::visitDObject(const DObject *object)
m_visualSecondaryRoleSelector->addItems({ tr("Normal"), tr("Lighter"), tr("Darker"), m_visualSecondaryRoleSelector->addItems({ tr("Normal"), tr("Lighter"), tr("Darker"),
tr("Soften"), tr("Outline"), tr("Flat") }); tr("Soften"), tr("Outline"), tr("Flat") });
addRow(tr("Role:"), m_visualSecondaryRoleSelector, "role"); addRow(tr("Role:"), m_visualSecondaryRoleSelector, "role");
connect(m_visualSecondaryRoleSelector, QOverload<int>::of(&QComboBox::activated), connect(m_visualSecondaryRoleSelector, &QComboBox::activated,
this, &PropertiesView::MView::onVisualSecondaryRoleChanged); this, &PropertiesView::MView::onVisualSecondaryRoleChanged);
} }
if (!m_visualSecondaryRoleSelector->hasFocus()) { if (!m_visualSecondaryRoleSelector->hasFocus()) {
@@ -958,7 +958,7 @@ void PropertiesView::MView::visitDObject(const DObject *object)
m_stereotypeDisplaySelector->addItems({ tr("Smart"), tr("None"), tr("Label"), m_stereotypeDisplaySelector->addItems({ tr("Smart"), tr("None"), tr("Label"),
tr("Decoration"), tr("Icon") }); tr("Decoration"), tr("Icon") });
addRow(tr("Stereotype display:"), m_stereotypeDisplaySelector, "stereotype display"); addRow(tr("Stereotype display:"), m_stereotypeDisplaySelector, "stereotype display");
connect(m_stereotypeDisplaySelector, QOverload<int>::of(&QComboBox::activated), connect(m_stereotypeDisplaySelector, &QComboBox::activated,
this, &PropertiesView::MView::onStereotypeDisplayChanged); this, &PropertiesView::MView::onStereotypeDisplayChanged);
} }
if (!m_stereotypeDisplaySelector->hasFocus()) { if (!m_stereotypeDisplaySelector->hasFocus()) {
@@ -995,7 +995,7 @@ void PropertiesView::MView::visitDClass(const DClass *klass)
m_templateDisplaySelector = new QComboBox(m_topWidget); m_templateDisplaySelector = new QComboBox(m_topWidget);
m_templateDisplaySelector->addItems({ tr("Smart"), tr("Box"), tr("Angle Brackets") }); m_templateDisplaySelector->addItems({ tr("Smart"), tr("Box"), tr("Angle Brackets") });
addRow(tr("Template display:"), m_templateDisplaySelector, "template display"); addRow(tr("Template display:"), m_templateDisplaySelector, "template display");
connect(m_templateDisplaySelector, QOverload<int>::of(&QComboBox::activated), connect(m_templateDisplaySelector, &QComboBox::activated,
this, &PropertiesView::MView::onTemplateDisplayChanged); this, &PropertiesView::MView::onTemplateDisplayChanged);
} }
if (!m_templateDisplaySelector->hasFocus()) { if (!m_templateDisplaySelector->hasFocus()) {
@@ -1141,7 +1141,7 @@ void PropertiesView::MView::visitDAnnotation(const DAnnotation *annotation)
tr("Subtitle"), tr("Emphasized"), tr("Subtitle"), tr("Emphasized"),
tr("Soften"), tr("Footnote") })); tr("Soften"), tr("Footnote") }));
addRow(tr("Role:"), m_annotationVisualRoleSelector, "visual role"); addRow(tr("Role:"), m_annotationVisualRoleSelector, "visual role");
connect(m_annotationVisualRoleSelector, QOverload<int>::of(&QComboBox::activated), connect(m_annotationVisualRoleSelector, &QComboBox::activated,
this, &PropertiesView::MView::onAnnotationVisualRoleChanged); this, &PropertiesView::MView::onAnnotationVisualRoleChanged);
} }
if (!m_annotationVisualRoleSelector->hasFocus()) { if (!m_annotationVisualRoleSelector->hasFocus()) {