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/code/src_corelib_tools_qtimeline.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/code/src_corelib_tools_qtimeline.cpp')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp b/src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp index 004a810fce..80859d5ba5 100644 --- a/src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_tools_qtimeline.cpp @@ -56,10 +56,10 @@ progressBar->setRange(0, 100); // Construct a 1-second timeline with a frame range of 0 - 100 QTimeLine *timeLine = new QTimeLine(1000, this); timeLine->setFrameRange(0, 100); -connect(timeLine, SIGNAL(frameChanged(int)), progressBar, SLOT(setValue(int))); +connect(timeLine, &QTimeLine::frameChanged, progressBar, &QProgressBar::setValue); // Clicking the push button will start the progress bar animation pushButton = new QPushButton(tr("Start animation"), this); -connect(pushButton, SIGNAL(clicked()), timeLine, SLOT(start())); +connect(pushButton, &QPushButton::clicked, timeLine, &QTimeLine::start); ... //! [0] |