summaryrefslogtreecommitdiffstats
path: root/examples/widgets/tools/customcompleter
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2018-12-07 14:17:38 +0100
committerLuca Beldi <v.ronin@yahoo.it>2019-01-03 08:29:56 +0000
commit8c04aab8966611e96c64f469b7a1c6afe67e3fca (patch)
tree40fe2bc3f4d945a65828d49586292ea6c72440a1 /examples/widgets/tools/customcompleter
parent451ebdff824cad329b40aad9a10cec5e5cb464cc (diff)
Cleanup Widgets examples - new signal/slot syntax
Cleanup the Widget examples - use the new signal/slot syntax where possible - layout, statemachine, tools and touch subdirectory Change-Id: I466b309b643ef7ffc27be7591fa10f4c75cfd3f8 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/widgets/tools/customcompleter')
-rw-r--r--examples/widgets/tools/customcompleter/mainwindow.cpp6
-rw-r--r--examples/widgets/tools/customcompleter/textedit.cpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/examples/widgets/tools/customcompleter/mainwindow.cpp b/examples/widgets/tools/customcompleter/mainwindow.cpp
index 7b9db708b9..39f5f39617 100644
--- a/examples/widgets/tools/customcompleter/mainwindow.cpp
+++ b/examples/widgets/tools/customcompleter/mainwindow.cpp
@@ -79,9 +79,9 @@ void MainWindow::createMenu()
QAction *aboutAct = new QAction(tr("About"), this);
QAction *aboutQtAct = new QAction(tr("About Qt"), this);
- connect(exitAction, SIGNAL(triggered()), qApp, SLOT(quit()));
- connect(aboutAct, SIGNAL(triggered()), this, SLOT(about()));
- connect(aboutQtAct, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+ connect(exitAction, &QAction::triggered, qApp, &QApplication::quit);
+ connect(aboutAct, &QAction::triggered, this, &MainWindow::about);
+ connect(aboutQtAct, &QAction::triggered, qApp, &QApplication::aboutQt);
QMenu* fileMenu = menuBar()->addMenu(tr("File"));
fileMenu->addAction(exitAction);
diff --git a/examples/widgets/tools/customcompleter/textedit.cpp b/examples/widgets/tools/customcompleter/textedit.cpp
index 5512e72843..d42f7b38bb 100644
--- a/examples/widgets/tools/customcompleter/textedit.cpp
+++ b/examples/widgets/tools/customcompleter/textedit.cpp
@@ -88,8 +88,8 @@ void TextEdit::setCompleter(QCompleter *completer)
c->setWidget(this);
c->setCompletionMode(QCompleter::PopupCompletion);
c->setCaseSensitivity(Qt::CaseInsensitive);
- QObject::connect(c, SIGNAL(activated(QString)),
- this, SLOT(insertCompletion(QString)));
+ QObject::connect(c, QOverload<const QString &>::of(&QCompleter::activated),
+ this, &TextEdit::insertCompletion);
}
//! [2]