From 2d0d3d03c6aed01e6926877baf710deb2e986c0a Mon Sep 17 00:00:00 2001 From: Lioncache Date: Sun, 7 Dec 2025 09:08:07 -0500 Subject: [PATCH] Editor: Remove now unnecessary qOverload instances These used to be necessary on older versions of Qt --- .../CharacterEditor/CCharacterEditor.cpp | 8 +-- src/Editor/INodeEditor.cpp | 2 +- src/Editor/ModelEditor/CModelEditorWindow.cpp | 46 +++++++-------- src/Editor/PropertyEdit/CPropertyDelegate.cpp | 57 +++++++++---------- .../ResourceBrowser/CResourceBrowser.cpp | 2 +- src/Editor/TestDialog.cpp | 4 +- src/Editor/Widgets/WVectorEditor.cpp | 6 +- src/Editor/WorldEditor/CLayerEditor.cpp | 2 +- src/Editor/WorldEditor/WCreateTab.cpp | 2 +- src/Editor/WorldEditor/WEditorProperties.cpp | 2 +- 10 files changed, 64 insertions(+), 67 deletions(-) diff --git a/src/Editor/CharacterEditor/CCharacterEditor.cpp b/src/Editor/CharacterEditor/CCharacterEditor.cpp index a539bd26..0567d8bc 100644 --- a/src/Editor/CharacterEditor/CCharacterEditor.cpp +++ b/src/Editor/CharacterEditor/CCharacterEditor.cpp @@ -50,15 +50,15 @@ CCharacterEditor::CCharacterEditor(CAnimSet *pSet, QWidget *parent) connect(ui->ActionFastForward, &QAction::triggered, this, &CCharacterEditor::FastForward); connect(ui->ActionPrevAnim, &QAction::triggered, this, &CCharacterEditor::PrevAnim); connect(ui->ActionNextAnim, &QAction::triggered, this, &CCharacterEditor::NextAnim); - connect(mpCharComboBox, qOverload(&QComboBox::currentIndexChanged), this, &CCharacterEditor::SetActiveCharacterIndex); - connect(mpAnimComboBox, qOverload(&QComboBox::currentIndexChanged), this, &CCharacterEditor::SetActiveAnimation); + connect(mpCharComboBox, &QComboBox::currentIndexChanged, this, &CCharacterEditor::SetActiveCharacterIndex); + connect(mpAnimComboBox, &QComboBox::currentIndexChanged, this, &CCharacterEditor::SetActiveAnimation); - connect(ui->AnimSlider, qOverload(&QSlider::valueChanged), this, qOverload(&CCharacterEditor::SetAnimTime)); + connect(ui->AnimSlider, &QSlider::valueChanged, this, qOverload(&CCharacterEditor::SetAnimTime)); connect(ui->PlayPauseButton, &QPushButton::pressed, this, &CCharacterEditor::TogglePlay); connect(ui->LoopButton, &QPushButton::toggled, this, &CCharacterEditor::ToggleLoop); connect(ui->RewindButton, &QPushButton::pressed, this, &CCharacterEditor::Rewind); connect(ui->FastForwardButton, &QPushButton::pressed, this, &CCharacterEditor::FastForward); - connect(ui->AnimSpeedSpinBox, qOverload(&WDraggableSpinBox::valueChanged), this, &CCharacterEditor::AnimSpeedSpinBoxChanged); + connect(ui->AnimSpeedSpinBox, &WDraggableSpinBox::valueChanged, this, &CCharacterEditor::AnimSpeedSpinBoxChanged); // Init skeleton tree view ui->SkeletonHierarchyTreeView->setModel(&mSkeletonModel); diff --git a/src/Editor/INodeEditor.cpp b/src/Editor/INodeEditor.cpp index 0dae326b..ce6010e3 100644 --- a/src/Editor/INodeEditor.cpp +++ b/src/Editor/INodeEditor.cpp @@ -38,7 +38,7 @@ INodeEditor::INodeEditor(QWidget *pParent) connect(mGizmoActions[1], &QAction::triggered, this, &INodeEditor::OnTranslateTriggered); connect(mGizmoActions[2], &QAction::triggered, this, &INodeEditor::OnRotateTriggered); connect(mGizmoActions[3], &QAction::triggered, this, &INodeEditor::OnScaleTriggered); - connect(mpTransformCombo, qOverload(&QComboBox::currentIndexChanged), this, &INodeEditor::OnTransformSpaceChanged); + connect(mpTransformCombo, &QComboBox::currentIndexChanged, this, &INodeEditor::OnTransformSpaceChanged); connect(mpSelection, &CNodeSelection::Modified, this, &INodeEditor::OnSelectionModified); } diff --git a/src/Editor/ModelEditor/CModelEditorWindow.cpp b/src/Editor/ModelEditor/CModelEditorWindow.cpp index c390dda3..ebbd5fa0 100644 --- a/src/Editor/ModelEditor/CModelEditorWindow.cpp +++ b/src/Editor/ModelEditor/CModelEditorWindow.cpp @@ -97,8 +97,8 @@ CModelEditorWindow::CModelEditorWindow(CModel *pModel, QWidget *pParent) connect(ui->CameraModeButton, &QPushButton::clicked, this, &CModelEditorWindow::ToggleCameraMode); connect(ui->ToggleGridButton, &QPushButton::toggled, this, &CModelEditorWindow::ToggleGrid); - connect(ui->SetSelectionComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateUI)); - connect(ui->MatSelectionComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateUI)); + connect(ui->SetSelectionComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateUI)); + connect(ui->MatSelectionComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateUI)); connect(ui->EnableTransparencyCheck, &QCheckBox::toggled, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->EnablePunchthroughCheck, &QCheckBox::toggled, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->EnableReflectionCheck, &QCheckBox::toggled, this, qOverload(&CModelEditorWindow::UpdateMaterial)); @@ -107,33 +107,33 @@ CModelEditorWindow::CModelEditorWindow(CModel *pModel, QWidget *pParent) connect(ui->EnableOccluderCheck, &QCheckBox::toggled, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->EnableLightmapCheck, &QCheckBox::toggled, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->EnableDynamicLightingCheck, &QCheckBox::toggled, this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->SourceBlendComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->DestBlendComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->SourceBlendComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->DestBlendComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->KonstColorPickerA, &WColorPicker::ColorChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->KonstColorPickerB, &WColorPicker::ColorChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->KonstColorPickerC, &WColorPicker::ColorChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->KonstColorPickerD, &WColorPicker::ColorChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->PassTable, &QTableWidget::cellClicked, this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevKColorSelComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevKAlphaSelComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevRasSelComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TexCoordSrcComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevKColorSelComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevKAlphaSelComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevRasSelComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TexCoordSrcComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); connect(ui->PassTextureResSelector, SIGNAL(ResourceChanged(QString)), this, SLOT(UpdateMaterial(QString))); - connect(ui->TevColor1ComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevColor2ComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevColor3ComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevColor4ComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevColorOutputComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevAlpha1ComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevAlpha2ComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevAlpha3ComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevAlpha4ComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->TevAlphaOutputComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->AnimTypeComboBox, qOverload(&QComboBox::currentIndexChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->AnimParamASpinBox, qOverload(&WDraggableSpinBox::valueChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->AnimParamBSpinBox, qOverload(&WDraggableSpinBox::valueChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->AnimParamCSpinBox, qOverload(&WDraggableSpinBox::valueChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); - connect(ui->AnimParamDSpinBox, qOverload(&WDraggableSpinBox::valueChanged), this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevColor1ComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevColor2ComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevColor3ComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevColor4ComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevColorOutputComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevAlpha1ComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevAlpha2ComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevAlpha3ComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevAlpha4ComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->TevAlphaOutputComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->AnimTypeComboBox, &QComboBox::currentIndexChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->AnimParamASpinBox, &WDraggableSpinBox::valueChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->AnimParamBSpinBox, &WDraggableSpinBox::valueChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->AnimParamCSpinBox, &WDraggableSpinBox::valueChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); + connect(ui->AnimParamDSpinBox, &WDraggableSpinBox::valueChanged, this, qOverload(&CModelEditorWindow::UpdateMaterial)); // That was fun SetActiveModel(pModel); diff --git a/src/Editor/PropertyEdit/CPropertyDelegate.cpp b/src/Editor/PropertyEdit/CPropertyDelegate.cpp index 697c712a..d4910ab5 100644 --- a/src/Editor/PropertyEdit/CPropertyDelegate.cpp +++ b/src/Editor/PropertyEdit/CPropertyDelegate.cpp @@ -57,7 +57,7 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie case EPropertyType::Bool: { - QCheckBox *pCheckBox = new QCheckBox(pParent); + auto* pCheckBox = new QCheckBox(pParent); CONNECT_RELAY(pCheckBox, rkIndex, &QCheckBox::toggled); pOut = pCheckBox; break; @@ -65,39 +65,39 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie case EPropertyType::Short: { - WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent); + auto* pSpinBox = new WIntegralSpinBox(pParent); pSpinBox->setMinimum(INT16_MIN); pSpinBox->setMaximum(INT16_MAX); pSpinBox->setSuffix(TO_QSTRING(pProp->Suffix())); - CONNECT_RELAY(pSpinBox, rkIndex, qOverload(&WIntegralSpinBox::valueChanged)); + CONNECT_RELAY(pSpinBox, rkIndex, &WIntegralSpinBox::valueChanged); pOut = pSpinBox; break; } case EPropertyType::Int: { - WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent); + auto* pSpinBox = new WIntegralSpinBox(pParent); pSpinBox->setMinimum(INT32_MIN); pSpinBox->setMaximum(INT32_MAX); pSpinBox->setSuffix(TO_QSTRING(pProp->Suffix())); - CONNECT_RELAY(pSpinBox, rkIndex, qOverload(&WIntegralSpinBox::valueChanged)); + CONNECT_RELAY(pSpinBox, rkIndex, &WIntegralSpinBox::valueChanged); pOut = pSpinBox; break; } case EPropertyType::Float: { - WDraggableSpinBox *pSpinBox = new WDraggableSpinBox(pParent); + auto* pSpinBox = new WDraggableSpinBox(pParent); pSpinBox->setSingleStep(0.1); pSpinBox->setSuffix(TO_QSTRING(pProp->Suffix())); - CONNECT_RELAY(pSpinBox, rkIndex, qOverload(&WDraggableSpinBox::valueChanged)); + CONNECT_RELAY(pSpinBox, rkIndex, &WDraggableSpinBox::valueChanged); pOut = pSpinBox; break; } case EPropertyType::Color: { - WColorPicker *pColorPicker = new WColorPicker(pParent); + auto* pColorPicker = new WColorPicker(pParent); CONNECT_RELAY(pColorPicker, rkIndex, &WColorPicker::ColorChanged); pOut = pColorPicker; break; @@ -105,17 +105,17 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie case EPropertyType::Sound: { - WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent); + auto* pSpinBox = new WIntegralSpinBox(pParent); pSpinBox->setMinimum(-1); pSpinBox->setMaximum(0xFFFF); - CONNECT_RELAY(pSpinBox, rkIndex, qOverload(&WIntegralSpinBox::valueChanged)); + CONNECT_RELAY(pSpinBox, rkIndex, &WIntegralSpinBox::valueChanged); pOut = pSpinBox; break; } case EPropertyType::String: { - QLineEdit *pLineEdit = new QLineEdit(pParent); + auto* pLineEdit = new QLineEdit(pParent); CONNECT_RELAY(pLineEdit, rkIndex, &QLineEdit::textEdited); pOut = pLineEdit; break; @@ -124,23 +124,23 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie case EPropertyType::Enum: case EPropertyType::Choice: { - QComboBox *pComboBox = new QComboBox(pParent); - CEnumProperty* pEnum = TPropCast(pProp); + auto* pComboBox = new QComboBox(pParent); + auto* pEnum = TPropCast(pProp); for (size_t ValueIdx = 0; ValueIdx < pEnum->NumPossibleValues(); ValueIdx++) pComboBox->addItem(TO_QSTRING(pEnum->ValueName(ValueIdx))); - CONNECT_RELAY(pComboBox, rkIndex, qOverload(&QComboBox::currentIndexChanged)); + CONNECT_RELAY(pComboBox, rkIndex, &QComboBox::currentIndexChanged); pOut = pComboBox; break; } case EPropertyType::Asset: { - CResourceSelector *pSelector = new CResourceSelector(pParent); + auto* pSelector = new CResourceSelector(pParent); pSelector->SetFrameVisible(false); - CAssetProperty *pAsset = TPropCast(pProp); + auto* pAsset = TPropCast(pProp); pSelector->SetTypeFilter(pAsset->GetTypeFilter()); CONNECT_RELAY(pSelector, rkIndex, &CResourceSelector::ResourceChanged); @@ -151,7 +151,7 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie case EPropertyType::Array: { // No relay here, would prefer user to be sure of their change before it's reflected on the UI - WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent); + auto* pSpinBox = new WIntegralSpinBox(pParent); pSpinBox->setMinimum(0); pSpinBox->setMaximum(999); pOut = pSpinBox; @@ -170,12 +170,13 @@ QWidget* CPropertyDelegate::createEditor(QWidget* pParent, const QStyleOptionVie // Handle character if (Type == EPropertyType::AnimationSet) + { pOut = CreateCharacterEditor(pParent, rkIndex); - - // Handle flags + } else if (Type == EPropertyType::Flags) { - QCheckBox *pCheckBox = new QCheckBox(pParent); + // Handle flags + auto* pCheckBox = new QCheckBox(pParent); CONNECT_RELAY(pCheckBox, rkIndex, &QCheckBox::toggled); pOut = pCheckBox; } @@ -565,7 +566,7 @@ QWidget* CPropertyDelegate::CreateCharacterEditor(QWidget *pParent, const QModel // Create widget if (Type == EPropertyType::Asset) { - CResourceSelector* pSelector = new CResourceSelector(pParent); + auto* pSelector = new CResourceSelector(pParent); pSelector->SetFrameVisible(false); if (Params.Version() <= EGame::Echoes) @@ -579,8 +580,8 @@ QWidget* CPropertyDelegate::CreateCharacterEditor(QWidget *pParent, const QModel if (Type == EPropertyType::Enum || Type == EPropertyType::Choice) { - QComboBox* pComboBox = new QComboBox(pParent); - CAnimSet* pAnimSet = Params.AnimSet(); + auto* pComboBox = new QComboBox(pParent); + auto* pAnimSet = Params.AnimSet(); if (pAnimSet) { @@ -588,14 +589,14 @@ QWidget* CPropertyDelegate::CreateCharacterEditor(QWidget *pParent, const QModel pComboBox->addItem(TO_QSTRING(pAnimSet->Character(CharIdx)->Name)); } - CONNECT_RELAY(pComboBox, rkIndex, qOverload(&QComboBox::currentIndexChanged)); + CONNECT_RELAY(pComboBox, rkIndex, &QComboBox::currentIndexChanged); return pComboBox; } if (Type == EPropertyType::Int) { - WIntegralSpinBox *pSpinBox = new WIntegralSpinBox(pParent); - CONNECT_RELAY(pSpinBox, rkIndex, qOverload(&WIntegralSpinBox::valueChanged)); + auto* pSpinBox = new WIntegralSpinBox(pParent); + CONNECT_RELAY(pSpinBox, rkIndex, &WIntegralSpinBox::valueChanged); return pSpinBox; } @@ -612,12 +613,10 @@ void CPropertyDelegate::SetCharacterEditorData(QWidget *pEditor, const QModelInd { static_cast(pEditor)->SetResource(Params.AnimSet()); } - else if (Type == EPropertyType::Enum || Type == EPropertyType::Choice) { static_cast(pEditor)->setCurrentIndex(Params.CharacterIndex()); } - else if (Type == EPropertyType::Int && !pEditor->hasFocus()) { int UnkIndex = (Params.Version() <= EGame::Echoes ? rkIndex.row() - 2 : rkIndex.row() - 1); @@ -637,12 +636,10 @@ void CPropertyDelegate::SetCharacterModelData(QWidget *pEditor, const QModelInde CResourceEntry *pEntry = static_cast(pEditor)->Entry(); Params.SetResource( pEntry ? pEntry->ID() : CAssetID::InvalidID(gpEdApp->CurrentGame()) ); } - else if (Type == EPropertyType::Enum || Type == EPropertyType::Choice) { Params.SetCharIndex( static_cast(pEditor)->currentIndex() ); } - else if (Type == EPropertyType::Int) { int UnkIndex = (Params.Version() <= EGame::Echoes ? rkIndex.row() - 2 : rkIndex.row() - 1); diff --git a/src/Editor/ResourceBrowser/CResourceBrowser.cpp b/src/Editor/ResourceBrowser/CResourceBrowser.cpp index b18b3caa..d5eacce2 100644 --- a/src/Editor/ResourceBrowser/CResourceBrowser.cpp +++ b/src/Editor/ResourceBrowser/CResourceBrowser.cpp @@ -150,7 +150,7 @@ CResourceBrowser::CResourceBrowser(QWidget *pParent) connect(mpUI->SearchBar, &CTimedLineEdit::StoppedTyping, this, &CResourceBrowser::OnSearchStringChanged); connect(mpUI->ResourceTreeButton, &QPushButton::pressed, this, &CResourceBrowser::SetResourceTreeView); connect(mpUI->ResourceListButton, &QPushButton::pressed, this, &CResourceBrowser::SetResourceListView); - connect(mpUI->SortComboBox, qOverload(&QComboBox::currentIndexChanged), this, &CResourceBrowser::OnSortModeChanged); + connect(mpUI->SortComboBox, &QComboBox::currentIndexChanged, this, &CResourceBrowser::OnSortModeChanged); connect(mpUI->ClearButton, &QPushButton::pressed, this, &CResourceBrowser::OnClearButtonPressed); connect(mpUI->DirectoryTreeView, &CVirtualDirectoryTreeView::clicked, this, &CResourceBrowser::OnDirectorySelectionChanged); diff --git a/src/Editor/TestDialog.cpp b/src/Editor/TestDialog.cpp index 6544db6e..73f04dc6 100644 --- a/src/Editor/TestDialog.cpp +++ b/src/Editor/TestDialog.cpp @@ -8,8 +8,8 @@ TestDialog::TestDialog(QWidget *pParent) , ui(std::make_unique()) { ui->setupUi(this); - connect(ui->spinBox, qOverload(&QSpinBox::valueChanged), this, &TestDialog::OnSpinBoxChanged); - connect(ui->spinBox_2, qOverload(&QSpinBox::valueChanged), this, &TestDialog::OnSpinBoxChanged); + connect(ui->spinBox, &QSpinBox::valueChanged, this, &TestDialog::OnSpinBoxChanged); + connect(ui->spinBox_2, &QSpinBox::valueChanged, this, &TestDialog::OnSpinBoxChanged); connect(ui->pushButton, &QPushButton::clicked, this, &TestDialog::OnFind); } diff --git a/src/Editor/Widgets/WVectorEditor.cpp b/src/Editor/Widgets/WVectorEditor.cpp index 0175fc3e..f1f651f3 100644 --- a/src/Editor/Widgets/WVectorEditor.cpp +++ b/src/Editor/Widgets/WVectorEditor.cpp @@ -175,9 +175,9 @@ void WVectorEditor::SetupUI() mpSpinBoxX->setContextMenuPolicy(Qt::NoContextMenu); mpSpinBoxY->setContextMenuPolicy(Qt::NoContextMenu); mpSpinBoxZ->setContextMenuPolicy(Qt::NoContextMenu); - connect(mpSpinBoxX, qOverload(&WDraggableSpinBox::valueChanged), this, &WVectorEditor::SetX); - connect(mpSpinBoxY, qOverload(&WDraggableSpinBox::valueChanged), this, &WVectorEditor::SetY); - connect(mpSpinBoxZ, qOverload(&WDraggableSpinBox::valueChanged), this, &WVectorEditor::SetZ); + connect(mpSpinBoxX, &WDraggableSpinBox::valueChanged, this, &WVectorEditor::SetX); + connect(mpSpinBoxY, &WDraggableSpinBox::valueChanged, this, &WVectorEditor::SetY); + connect(mpSpinBoxZ, &WDraggableSpinBox::valueChanged, this, &WVectorEditor::SetZ); connect(mpSpinBoxX, &WDraggableSpinBox::editingFinished, this, &WVectorEditor::OnSpinBoxEditingDone); connect(mpSpinBoxY, &WDraggableSpinBox::editingFinished, this, &WVectorEditor::OnSpinBoxEditingDone); connect(mpSpinBoxZ, &WDraggableSpinBox::editingFinished, this, &WVectorEditor::OnSpinBoxEditingDone); diff --git a/src/Editor/WorldEditor/CLayerEditor.cpp b/src/Editor/WorldEditor/CLayerEditor.cpp index 790dfe3b..df09731e 100644 --- a/src/Editor/WorldEditor/CLayerEditor.cpp +++ b/src/Editor/WorldEditor/CLayerEditor.cpp @@ -12,7 +12,7 @@ CLayerEditor::CLayerEditor(QWidget *parent) ui->setupUi(this); ui->LayerSelectComboBox->setModel(mpModel); - connect(ui->LayerSelectComboBox, qOverload(&QComboBox::currentIndexChanged), this, &CLayerEditor::SetCurrentIndex); + connect(ui->LayerSelectComboBox, &QComboBox::currentIndexChanged, this, &CLayerEditor::SetCurrentIndex); connect(ui->NameLineEdit, &QLineEdit::textEdited, this, &CLayerEditor::EditLayerName); connect(ui->ActiveCheckBox, &QCheckBox::toggled, this, &CLayerEditor::EditLayerActive); } diff --git a/src/Editor/WorldEditor/WCreateTab.cpp b/src/Editor/WorldEditor/WCreateTab.cpp index a2b669de..9e8d0f9c 100644 --- a/src/Editor/WorldEditor/WCreateTab.cpp +++ b/src/Editor/WorldEditor/WCreateTab.cpp @@ -16,7 +16,7 @@ WCreateTab::WCreateTab(CWorldEditor *pEditor, QWidget *pParent) connect(mpEditor, &CWorldEditor::LayersModified, this, &WCreateTab::OnLayersChanged); connect(gpEdApp, &CEditorApplication::ActiveProjectChanged, this, &WCreateTab::OnActiveProjectChanged); - connect(ui->SpawnLayerComboBox, qOverload(&QComboBox::currentIndexChanged), this, &WCreateTab::OnSpawnLayerChanged); + connect(ui->SpawnLayerComboBox, &QComboBox::currentIndexChanged, this, &WCreateTab::OnSpawnLayerChanged); } WCreateTab::~WCreateTab() = default; diff --git a/src/Editor/WorldEditor/WEditorProperties.cpp b/src/Editor/WorldEditor/WEditorProperties.cpp index 394e4c69..8da4317e 100644 --- a/src/Editor/WorldEditor/WEditorProperties.cpp +++ b/src/Editor/WorldEditor/WEditorProperties.cpp @@ -51,7 +51,7 @@ WEditorProperties::WEditorProperties(QWidget *pParent) connect(mpActiveCheckBox, &QCheckBox::clicked, this, &WEditorProperties::OnActiveChanged); connect(mpInstanceNameLineEdit, &QLineEdit::textEdited, this, &WEditorProperties::OnInstanceNameEdited); connect(mpInstanceNameLineEdit, &QLineEdit::editingFinished, this, &WEditorProperties::OnInstanceNameEditFinished); - connect(mpLayersComboBox, qOverload(&QComboBox::currentIndexChanged), this, &WEditorProperties::OnLayerChanged); + connect(mpLayersComboBox, &QComboBox::currentIndexChanged, this, &WEditorProperties::OnLayerChanged); } void WEditorProperties::SyncToEditor(CWorldEditor *pEditor)