From a72c33858573bef00189aff1a1f8f757464b31b2 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 3 Jul 2020 08:12:53 -0400 Subject: [PATCH] WEditorProperties: Make use of Qt 5 signals and slots --- src/Editor/WorldEditor/WEditorProperties.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Editor/WorldEditor/WEditorProperties.cpp b/src/Editor/WorldEditor/WEditorProperties.cpp index 8c0c01c7..a5e30f32 100644 --- a/src/Editor/WorldEditor/WEditorProperties.cpp +++ b/src/Editor/WorldEditor/WEditorProperties.cpp @@ -48,22 +48,22 @@ WEditorProperties::WEditorProperties(QWidget *pParent) ComboFont.setPointSize(10); mpLayersComboBox->setFont(ComboFont); - connect(mpActiveCheckBox, SIGNAL(clicked()), this, SLOT(OnActiveChanged())); - connect(mpInstanceNameLineEdit, SIGNAL(textEdited(QString)), this, SLOT(OnInstanceNameEdited())); - connect(mpInstanceNameLineEdit, SIGNAL(editingFinished()), this, SLOT(OnInstanceNameEditFinished())); - connect(mpLayersComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(OnLayerChanged())); + 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); } void WEditorProperties::SyncToEditor(CWorldEditor *pEditor) { if (mpEditor) - disconnect(mpEditor, 0, this, 0); + disconnect(mpEditor, nullptr, this, nullptr); mpEditor = pEditor; - connect(mpEditor, SIGNAL(SelectionModified()), this, SLOT(OnSelectionModified())); - connect(mpEditor, SIGNAL(LayersModified()), this, SLOT(OnLayersModified())); - connect(mpEditor, SIGNAL(InstancesLayerChanged(QList)), this, SLOT(OnInstancesLayerChanged(QList))); - connect(mpEditor, SIGNAL(PropertyModified(IProperty*,CScriptObject*)), this, SLOT(OnPropertyModified(IProperty*,CScriptObject*))); + connect(mpEditor, &CWorldEditor::SelectionModified, this, &WEditorProperties::OnSelectionModified); + connect(mpEditor, &CWorldEditor::LayersModified, this, &WEditorProperties::OnLayersModified); + connect(mpEditor, &CWorldEditor::InstancesLayerChanged, this, &WEditorProperties::OnInstancesLayerChanged); + connect(mpEditor, &CWorldEditor::PropertyModified, this, &WEditorProperties::OnPropertyModified); OnLayersModified(); }