diff options
author | Andre Hartmann <aha_1980@gmx.de> | 2018-03-11 10:49:52 +0100 |
---|---|---|
committer | André Hartmann <aha_1980@gmx.de> | 2018-03-27 10:50:04 +0000 |
commit | b8af54a93ffdd2c7e9b781ffbd117558d1b805d1 (patch) | |
tree | 9b388d58019588e1b037b3b3075b0742b6ec9fd8 /src/multimedia/doc/snippets | |
parent | 58d83703d7d5435a74d59bdb906ca6a76b54f78f (diff) | |
download | qtmultimedia-b8af54a93ffdd2c7e9b781ffbd117558d1b805d1.tar.gz |
QSound(Effect): Convert to functor-style connect
Change-Id: Ie58ee30b1ace836c620812b8063246c0d01d7214
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
Diffstat (limited to 'src/multimedia/doc/snippets')
-rw-r--r-- | src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp b/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp index 6f1bd7229..fbc849c2e 100644 --- a/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp @@ -48,7 +48,7 @@ ** ****************************************************************************/ -#include "qobject.h" +#include "qpushbutton.h" #include "qsound.h" #include "qsoundeffect.h" @@ -74,7 +74,7 @@ void qsoundeffectsnippet() { //! [2] } -QObject *clickSource; +QPushButton *clickSource; class MyGame : public QObject { Q_OBJECT @@ -87,7 +87,7 @@ public: m_explosion.setVolume(0.25f); // Set up click handling etc. - connect(clickSource, SIGNAL(clicked()), &m_explosion, SLOT(play())); + connect(clickSource, &QPushButton::clicked, &m_explosion, &QSoundEffect::play); } private: QSoundEffect m_explosion; |