diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2020-01-25 21:19:47 +0100 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2020-01-26 17:52:01 +0100 |
commit | ae9056587a52d51c7b41b41f631c6cab8097a7c7 (patch) | |
tree | 41c59ee724df93a232e78ed880460559545c3ce2 /src/corelib/doc/snippets/timers/timers.cpp | |
parent | aec4e05e9e8ad9109d7db15dd0fea477e4574c20 (diff) |
Doc/QtCore: use new signal/slot signature in snippets
Use the new signal/slot syntax in the snippets where possible. Also
change some 0 to nullptr.
Change-Id: Ie3da2721d3cec33704f73f4d39c06a767717b095
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
Diffstat (limited to 'src/corelib/doc/snippets/timers/timers.cpp')
-rw-r--r-- | src/corelib/doc/snippets/timers/timers.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/doc/snippets/timers/timers.cpp b/src/corelib/doc/snippets/timers/timers.cpp index 5f95899af2..eb0c82c625 100644 --- a/src/corelib/doc/snippets/timers/timers.cpp +++ b/src/corelib/doc/snippets/timers/timers.cpp @@ -61,13 +61,13 @@ Foo::Foo() //! [0] QTimer *timer = new QTimer(this); //! [0] //! [1] - connect(timer, SIGNAL(timeout()), this, SLOT(updateCaption())); + connect(timer, &QTimer::timeout, this, &Foo::updateCaption); //! [1] //! [2] timer->start(1000); //! [2] //! [3] - QTimer::singleShot(200, this, SLOT(updateCaption())); + QTimer::singleShot(200, this, &Foo::updateCaption); //! [3] { @@ -75,7 +75,7 @@ Foo::Foo() //! [4] QTimer *timer = new QTimer(this); //! [4] //! [5] - connect(timer, SIGNAL(timeout()), this, SLOT(processOneThing())); + connect(timer, &QTimer::timeout, this, &Foo::processOneThing); //! [5] //! [6] timer->start(); //! [6] |