From 5befd6770bcb97bf4d5f12a02b64b3c2485ca9cd Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sun, 13 Mar 2016 15:02:11 +0200 Subject: [PATCH] Use new connect syntax everywhere where is possible. --HG-- branch : develop --- src/app/valentina/core/vformulapropertyeditor.cpp | 2 +- .../vpropertyexplorer/plugins/vcolorpropertyeditor.cpp | 2 +- .../vpropertyexplorer/plugins/vfilepropertyeditor.cpp | 2 +- .../plugins/vshortcutpropertyeditor.cpp | 2 +- src/libs/vpropertyexplorer/vpropertyformview.cpp | 10 ++++------ 5 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/app/valentina/core/vformulapropertyeditor.cpp b/src/app/valentina/core/vformulapropertyeditor.cpp index 3b4a6901c..ca671c9c2 100644 --- a/src/app/valentina/core/vformulapropertyeditor.cpp +++ b/src/app/valentina/core/vformulapropertyeditor.cpp @@ -55,7 +55,7 @@ VFormulaPropertyEditor::VFormulaPropertyEditor(QWidget *parent) ToolButton->installEventFilter(this); setFocusProxy(ToolButton); // Make the ToolButton the focus proxy setFocusPolicy(ToolButton->focusPolicy()); - connect(ToolButton, SIGNAL(clicked()), this, SLOT(onToolButtonClicked())); + connect(ToolButton, &QToolButton::clicked, this, &VFormulaPropertyEditor::onToolButtonClicked); // Create the text label TextLabel = new QLabel(this); diff --git a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp index 3bf57e1d8..2f29563e1 100644 --- a/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp +++ b/src/libs/vpropertyexplorer/plugins/vcolorpropertyeditor.cpp @@ -43,7 +43,7 @@ VColorPropertyEditor::VColorPropertyEditor(QWidget *parent) ToolButton->installEventFilter(this); setFocusProxy(ToolButton); // Make the ToolButton the focus proxy setFocusPolicy(ToolButton->focusPolicy()); - connect(ToolButton, SIGNAL(clicked()), this, SLOT(onToolButtonClicked())); + connect(ToolButton, &QToolButton::clicked, this, &VColorPropertyEditor::onToolButtonClicked); // Create the text label TextLabel = new QLabel(this); diff --git a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.cpp b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.cpp index 8479d8faf..741542a1c 100644 --- a/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.cpp +++ b/src/libs/vpropertyexplorer/plugins/vfilepropertyeditor.cpp @@ -41,7 +41,7 @@ VFileEditWidget::VFileEditWidget(QWidget *parent, bool is_directory) ToolButton->installEventFilter(this); setFocusProxy(ToolButton); // Make the ToolButton the focus proxy setFocusPolicy(ToolButton->focusPolicy()); - connect(ToolButton, SIGNAL(clicked()), this, SLOT(onToolButtonClicked())); + connect(ToolButton, &QToolButton::clicked, this, &VFileEditWidget::onToolButtonClicked); // Create the line edit widget FileLineEdit = new QLineEdit(this); diff --git a/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.cpp b/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.cpp index 1baf2d894..03dc13563 100644 --- a/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.cpp +++ b/src/libs/vpropertyexplorer/plugins/vshortcutpropertyeditor.cpp @@ -34,7 +34,7 @@ VShortcutEditWidget::VShortcutEditWidget(QWidget *parent) LineEdit->clear(); LineEdit->installEventFilter(this); setFocusProxy(LineEdit); - connect(LineEdit, SIGNAL(textEdited(QString)), this, SLOT(onTextEdited(QString))); + connect(LineEdit, &QLineEdit::textEdited, this, &VShortcutEditWidget::onTextEdited); // The layout (a horizontal layout) QHBoxLayout* layout = new QHBoxLayout(this); diff --git a/src/libs/vpropertyexplorer/vpropertyformview.cpp b/src/libs/vpropertyexplorer/vpropertyformview.cpp index c87dd5bde..f74d70ab5 100644 --- a/src/libs/vpropertyexplorer/vpropertyformview.cpp +++ b/src/libs/vpropertyexplorer/vpropertyformview.cpp @@ -76,12 +76,10 @@ void VPropertyFormView::setModel(VPropertyModel *model) } // Connect signals // todo: more signals neccesary!!! - connect(model, SIGNAL(destroyed()), this, SLOT(modelDestroyed())); - connect(model, SIGNAL(rowsInserted(const QModelIndex&, int, int)), this, - SLOT(rowsInserted(QModelIndex, int, int))); - connect(model, SIGNAL(modelReset()), this, SLOT(modelReset())); - connect(model, SIGNAL(rowsRemoved(const QModelIndex&, int, int)), this, - SLOT(rowsRemoved(QModelIndex, int, int))); + connect(model, &VPropertyModel::destroyed, this, &VPropertyFormView::modelDestroyed); + connect(model, &VPropertyModel::rowsInserted, this, &VPropertyFormView::rowsInserted); + connect(model, &VPropertyModel::modelReset, this, &VPropertyFormView::modelReset); + connect(model, &VPropertyModel::rowsRemoved, this, &VPropertyFormView::rowsRemoved); } // Build the widget