Use new connect syntax everywhere where is possible.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-03-13 15:02:11 +02:00
parent 55400c5a73
commit 5befd6770b
5 changed files with 8 additions and 10 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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