summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-07 14:14:13 +0100
committerLuca Beldi <v.ronin@yahoo.it>2019-01-03 08:30:04 +0000
commita21f3431b861b09a4768801f856d431c6ac44313 (patch)
tree106324f1135965f8d984806a1c838a89708705bd /examples/widgets/tutorials/addressbook/part6/addressbook.cpp
parent8c04aab8966611e96c64f469b7a1c6afe67e3fca (diff)
Cleanup Widgets examples - new signal/slot syntax
Cleanup the Widget examples - use the new signal/slot syntax where possible - tutorials subdirectory Change-Id: I741589f6616578412ad74f8371e0e3c87df783a2 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Diffstat (limited to 'examples/widgets/tutorials/addressbook/part6/addressbook.cpp')
-rw-r--r--examples/widgets/tutorials/addressbook/part6/addressbook.cpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/examples/widgets/tutorials/addressbook/part6/addressbook.cpp b/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
index b2e361a45e..8e740cfffc 100644
--- a/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
+++ b/examples/widgets/tutorials/addressbook/part6/addressbook.cpp
@@ -92,16 +92,26 @@ AddressBook::AddressBook(QWidget *parent)
dialog = new FindDialog(this);
- connect(addButton, SIGNAL(clicked()), this, SLOT(addContact()));
- connect(submitButton, SIGNAL(clicked()), this, SLOT(submitContact()));
- connect(editButton, SIGNAL(clicked()), this, SLOT(editContact()));
- connect(cancelButton, SIGNAL(clicked()), this, SLOT(cancel()));
- connect(removeButton, SIGNAL(clicked()), this, SLOT(removeContact()));
- connect(findButton, SIGNAL(clicked()), this, SLOT(findContact()));
- connect(nextButton, SIGNAL(clicked()), this, SLOT(next()));
- connect(previousButton, SIGNAL(clicked()), this, SLOT(previous()));
- connect(loadButton, SIGNAL(clicked()), this, SLOT(loadFromFile()));
- connect(saveButton, SIGNAL(clicked()), this, SLOT(saveToFile()));
+ connect(addButton, &QPushButton::clicked,
+ this, &AddressBook::addContact);
+ connect(submitButton, &QPushButton::clicked,
+ this, &AddressBook::submitContact);
+ connect(editButton, &QPushButton::clicked,
+ this, &AddressBook::editContact);
+ connect(removeButton, &QPushButton::clicked,
+ this, &AddressBook::removeContact);
+ connect(cancelButton, &QPushButton::clicked,
+ this, &AddressBook::cancel);
+ connect(findButton, &QPushButton::clicked,
+ this, &AddressBook::findContact);
+ connect(nextButton, &QPushButton::clicked,
+ this, &AddressBook::next);
+ connect(previousButton, &QPushButton::clicked,
+ this, &AddressBook::previous);
+ connect(loadButton, &QPushButton::clicked,
+ this, &AddressBook::loadFromFile);
+ connect(saveButton, &QPushButton::clicked,
+ this, &AddressBook::saveToFile);
QVBoxLayout *buttonLayout1 = new QVBoxLayout;
buttonLayout1->addWidget(addButton);