summaryrefslogtreecommitdiff
path: root/src/designer/src/lib/shared/formlayoutmenu.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-06-01 16:46:21 +0200
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2015-07-14 10:58:03 +0000
commitf23befda718870f3dbb8f6e005e12a251fdfd059 (patch)
treee200a5acca465c75475a0ccc731307362af3f489 /src/designer/src/lib/shared/formlayoutmenu.cpp
parent710e94a886a2cd870debd9f01db4b4fb393f4865 (diff)
downloadqttools-f23befda718870f3dbb8f6e005e12a251fdfd059.tar.gz
Port Qt Designer to Qt 5 signals & slot connection syntax.
Use Qt 5 signals & slot connection with exception of private slots and tool classes from the shared directory. Change-Id: I2bf4bfbdff709d15c8ee4ae3de3039bf3d210d6a Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'src/designer/src/lib/shared/formlayoutmenu.cpp')
-rw-r--r--src/designer/src/lib/shared/formlayoutmenu.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/designer/src/lib/shared/formlayoutmenu.cpp b/src/designer/src/lib/shared/formlayoutmenu.cpp
index 5aaf8122a..e859ff6e7 100644
--- a/src/designer/src/lib/shared/formlayoutmenu.cpp
+++ b/src/designer/src/lib/shared/formlayoutmenu.cpp
@@ -138,30 +138,32 @@ FormLayoutRowDialog::FormLayoutRowDialog(QDesignerFormEditorInterface *core,
m_fieldNameEdited(false),
m_buddyClicked(false)
{
+ typedef void (QComboBox::*QComboIntSignal)(int);
+
Q_ASSERT(m_buddyMarkerRegexp.isValid());
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setModal(true);
m_ui.setupUi(this);
- connect(m_ui.labelTextLineEdit, SIGNAL(textEdited(QString)), this, SLOT(labelTextEdited(QString)));
+ connect(m_ui.labelTextLineEdit, &QLineEdit::textEdited, this, &FormLayoutRowDialog::labelTextEdited);
QRegExpValidator *nameValidator = new QRegExpValidator(QRegExp(QStringLiteral("^[a-zA-Z0-9_]+$")), this);
Q_ASSERT(nameValidator->regExp().isValid());
m_ui.labelNameLineEdit->setValidator(nameValidator);
- connect(m_ui.labelNameLineEdit, SIGNAL(textEdited(QString)),
- this, SLOT(labelNameEdited(QString)));
+ connect(m_ui.labelNameLineEdit, &QLineEdit::textEdited,
+ this, &FormLayoutRowDialog::labelNameEdited);
m_ui.fieldNameLineEdit->setValidator(nameValidator);
- connect(m_ui.fieldNameLineEdit, SIGNAL(textEdited(QString)),
- this, SLOT(fieldNameEdited(QString)));
+ connect(m_ui.fieldNameLineEdit, &QLineEdit::textEdited,
+ this, &FormLayoutRowDialog::fieldNameEdited);
- connect(m_ui.buddyCheckBox, SIGNAL(clicked()), this, SLOT(buddyClicked()));
+ connect(m_ui.buddyCheckBox, &QAbstractButton::clicked, this, &FormLayoutRowDialog::buddyClicked);
m_ui.fieldClassComboBox->addItems(fieldWidgetClasses(core));
m_ui.fieldClassComboBox->setCurrentIndex(0);
- connect(m_ui.fieldClassComboBox, SIGNAL(currentIndexChanged(int)),
- this, SLOT(fieldClassChanged(int)));
+ connect(m_ui.fieldClassComboBox, static_cast<QComboIntSignal>(&QComboBox::currentIndexChanged),
+ this, &FormLayoutRowDialog::fieldClassChanged);
updateOkButton();
}
@@ -475,7 +477,7 @@ FormLayoutMenu::FormLayoutMenu(QObject *parent) :
m_separator2(new QAction(this))
{
m_separator1->setSeparator(true);
- connect(m_populateFormAction, SIGNAL(triggered()), this, SLOT(slotAddRow()));
+ connect(m_populateFormAction, &QAction::triggered, this, &FormLayoutMenu::slotAddRow);
m_separator2->setSeparator(true);
}