From 3b28e3d871e5952873ea59f8a68c48c3ded2c9ed Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 9 May 2018 10:48:43 +0200 Subject: Doc: update connect syntax digitalclock example Task-number: QTBUG-60635 Change-Id: I9d8411b639e5cf74c9cb03de4b5f6081bb549151 Reviewed-by: Venugopal Shivashankar --- examples/widgets/widgets/digitalclock/digitalclock.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/widgets') diff --git a/examples/widgets/widgets/digitalclock/digitalclock.cpp b/examples/widgets/widgets/digitalclock/digitalclock.cpp index 6787c975c5..dec7e64fc3 100644 --- a/examples/widgets/widgets/digitalclock/digitalclock.cpp +++ b/examples/widgets/widgets/digitalclock/digitalclock.cpp @@ -59,7 +59,7 @@ DigitalClock::DigitalClock(QWidget *parent) setSegmentStyle(Filled); QTimer *timer = new QTimer(this); - connect(timer, SIGNAL(timeout()), this, SLOT(showTime())); + connect(timer, &QTimer::timeout, this, &DigitalClock::showTime); timer->start(1000); showTime(); -- cgit v1.2.3 From 57fae860fddcf798c27be033ffeab50f76c842c7 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 18 Apr 2018 14:06:26 +0200 Subject: Doc: Modify connect statements Echoplugin Example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task-number: QTBUG-60635 Change-Id: I4313ff65875d20b768d7ad6e9c8322bd5cf7f1ab Reviewed-by: Paul Wicking Reviewed-by: Topi Reiniƶ --- examples/widgets/tools/echoplugin/echowindow/echowindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/widgets') diff --git a/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp b/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp index 1efc7b9355..64b59d506e 100644 --- a/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp +++ b/examples/widgets/tools/echoplugin/echowindow/echowindow.cpp @@ -83,10 +83,10 @@ void EchoWindow::createGUI() label->setFrameStyle(QFrame::Box | QFrame::Plain); button = new QPushButton(tr("Send Message")); - connect(lineEdit, SIGNAL(editingFinished()), - this, SLOT(sendEcho())); - connect(button, SIGNAL(clicked()), - this, SLOT(sendEcho())); + connect(lineEdit, &QLineEdit::editingFinished, + this, &EchoWindow::sendEcho); + connect(button, &QPushButton::clicked, + this, &EchoWindow::sendEcho); layout = new QGridLayout; layout->addWidget(new QLabel(tr("Message:")), 0, 0); -- cgit v1.2.3 From d9c430cfd98911e9b07066ece25e71e92406b925 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Mon, 9 Apr 2018 10:35:59 +0200 Subject: Doc: Update connect syntax Order Form Example Task-number: QTBUG-60635 Change-Id: Ia474a23db7c32e68cb23ffa6ec14b9c6376cadec Reviewed-by: Paul Wicking Reviewed-by: Venugopal Shivashankar --- examples/widgets/richtext/orderform/detailsdialog.cpp | 4 ++-- examples/widgets/richtext/orderform/mainwindow.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/widgets') diff --git a/examples/widgets/richtext/orderform/detailsdialog.cpp b/examples/widgets/richtext/orderform/detailsdialog.cpp index 3ec13c4c70..9ef9eff73d 100644 --- a/examples/widgets/richtext/orderform/detailsdialog.cpp +++ b/examples/widgets/richtext/orderform/detailsdialog.cpp @@ -71,8 +71,8 @@ DetailsDialog::DetailsDialog(const QString &title, QWidget *parent) buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel); - connect(buttonBox, SIGNAL(accepted()), this, SLOT(verify())); - connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + connect(buttonBox, &QDialogButtonBox::accepted, this, &DetailsDialog::verify); + connect(buttonBox, &QDialogButtonBox::rejected, this, &DetailsDialog::reject); //! [0] //! [1] diff --git a/examples/widgets/richtext/orderform/mainwindow.cpp b/examples/widgets/richtext/orderform/mainwindow.cpp index 030072978e..b207ee4dbc 100644 --- a/examples/widgets/richtext/orderform/mainwindow.cpp +++ b/examples/widgets/richtext/orderform/mainwindow.cpp @@ -75,8 +75,8 @@ MainWindow::MainWindow() letters = new QTabWidget; - connect(newAction, SIGNAL(triggered()), this, SLOT(openDialog())); - connect(quitAction, SIGNAL(triggered()), this, SLOT(close())); + connect(newAction, &QAction::triggered, this, &MainWindow::openDialog); + connect(quitAction, &QAction::triggered, this, &MainWindow::close); setCentralWidget(letters); setWindowTitle(tr("Order Form")); -- cgit v1.2.3