From e4035bf6d01c2105f64b5d548ccea51c7a48ef8d Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Sun, 2 Feb 2014 14:07:07 -0800 Subject: Normalize signal & slot signatures in connection Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I1a4bef16be79ced35c47da865153ebe1bee22f9c Reviewed-by: Yoann Lopes --- .../android/src/mediaplayer/qandroidmediaplayercontrol.cpp | 12 ++++++------ src/plugins/directshow/camera/dsimagecapturecontrol.cpp | 8 ++++---- src/plugins/gstreamer/camerabin/camerabinlocks.cpp | 4 ++-- src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp | 2 +- .../gstreamer/camerabin/camerabuttonlistener_meego.cpp | 2 +- src/plugins/resourcepolicy/resourcepolicyimpl.cpp | 2 +- src/plugins/wmf/decoder/mfdecoderservice.cpp | 2 +- src/plugins/wmf/decoder/mfdecodersourcereader.cpp | 2 +- src/plugins/wmf/player/mfplayercontrol.cpp | 2 +- src/plugins/wmf/player/mfplayersession.cpp | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src/plugins') diff --git a/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp b/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp index ce73263d3..7b0c58277 100644 --- a/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp +++ b/src/plugins/android/src/mediaplayer/qandroidmediaplayercontrol.cpp @@ -63,12 +63,12 @@ QAndroidMediaPlayerControl::QAndroidMediaPlayerControl(QObject *parent) { connect(mMediaPlayer, SIGNAL(bufferingUpdate(qint32)), this, SLOT(onBufferChanged(qint32))); - connect(mMediaPlayer, SIGNAL(info(qint32, qint32)), - this, SLOT(onInfo(qint32, qint32))); - connect(mMediaPlayer, SIGNAL(error(qint32, qint32)), - this, SLOT(onError(qint32, qint32))); - connect(mMediaPlayer, SIGNAL(mediaPlayerInfo(qint32, qint32)), - this, SLOT(onMediaPlayerInfo(qint32, qint32))); + connect(mMediaPlayer, SIGNAL(info(qint32,qint32)), + this, SLOT(onInfo(qint32,qint32))); + connect(mMediaPlayer, SIGNAL(error(qint32,qint32)), + this, SLOT(onError(qint32,qint32))); + connect(mMediaPlayer, SIGNAL(mediaPlayerInfo(qint32,qint32)), + this, SLOT(onMediaPlayerInfo(qint32,qint32))); connect(mMediaPlayer, SIGNAL(videoSizeChanged(qint32,qint32)), this, SLOT(onVideoSizeChanged(qint32,qint32))); } diff --git a/src/plugins/directshow/camera/dsimagecapturecontrol.cpp b/src/plugins/directshow/camera/dsimagecapturecontrol.cpp index f1332235f..e689b13d1 100644 --- a/src/plugins/directshow/camera/dsimagecapturecontrol.cpp +++ b/src/plugins/directshow/camera/dsimagecapturecontrol.cpp @@ -49,10 +49,10 @@ DSImageCaptureControl::DSImageCaptureControl(DSCameraSession *session) :QCameraImageCaptureControl(session), m_session(session), m_ready(false) { connect(m_session, SIGNAL(stateChanged(QCamera::State)), SLOT(updateState())); - connect(m_session, SIGNAL(imageCaptured(const int, QImage)), - this, SIGNAL(imageCaptured(const int, QImage))); - connect(m_session, SIGNAL(imageSaved(const int, const QString &)), - this, SIGNAL(imageSaved(const int, const QString &))); + connect(m_session, SIGNAL(imageCaptured(int,QImage)), + this, SIGNAL(imageCaptured(int,QImage))); + connect(m_session, SIGNAL(imageSaved(int,QString)), + this, SIGNAL(imageSaved(int,QString))); connect(m_session, SIGNAL(readyForCaptureChanged(bool)), this, SIGNAL(readyForCaptureChanged(bool))); } diff --git a/src/plugins/gstreamer/camerabin/camerabinlocks.cpp b/src/plugins/gstreamer/camerabin/camerabinlocks.cpp index 464fa8043..cf105d482 100644 --- a/src/plugins/gstreamer/camerabin/camerabinlocks.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinlocks.cpp @@ -54,8 +54,8 @@ CameraBinLocks::CameraBinLocks(CameraBinSession *session) m_session(session), m_focus(m_session->cameraFocusControl()) { - connect(m_focus, SIGNAL(_q_focusStatusChanged(QCamera::LockStatus, QCamera::LockChangeReason)), - this, SLOT(updateFocusStatus(QCamera::LockStatus, QCamera::LockChangeReason))); + connect(m_focus, SIGNAL(_q_focusStatusChanged(QCamera::LockStatus,QCamera::LockChangeReason)), + this, SLOT(updateFocusStatus(QCamera::LockStatus,QCamera::LockChangeReason))); } CameraBinLocks::~CameraBinLocks() diff --git a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp index d6df4208e..d8f1616d9 100644 --- a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp +++ b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp @@ -65,7 +65,7 @@ CamerabinResourcePolicy::CamerabinResourcePolicy(QObject *parent) : m_resource->setAlwaysReply(); m_resource->initAndConnect(); - connect(m_resource, SIGNAL(resourcesGranted(const QList)), + connect(m_resource, SIGNAL(resourcesGranted(QList)), SLOT(handleResourcesGranted())); connect(m_resource, SIGNAL(resourcesDenied()), SIGNAL(resourcesDenied())); connect(m_resource, SIGNAL(lostResources()), SLOT(handleResourcesLost())); diff --git a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp b/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp index 2e66360a9..84bcac9fc 100644 --- a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp +++ b/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp @@ -54,7 +54,7 @@ CameraButtonListener::CameraButtonListener(QObject *parent) : m_shutterPressed(false) { m_keys = new MeeGo::QmKeys(this); - connect(m_keys, SIGNAL(keyEvent(MeeGo::QmKeys::Key, MeeGo::QmKeys::State)), + connect(m_keys, SIGNAL(keyEvent(MeeGo::QmKeys::Key,MeeGo::QmKeys::State)), this, SLOT(handleQmKeyEvent(MeeGo::QmKeys::Key,MeeGo::QmKeys::State))); } diff --git a/src/plugins/resourcepolicy/resourcepolicyimpl.cpp b/src/plugins/resourcepolicy/resourcepolicyimpl.cpp index aed9ccb09..0acabc001 100644 --- a/src/plugins/resourcepolicy/resourcepolicyimpl.cpp +++ b/src/plugins/resourcepolicy/resourcepolicyimpl.cpp @@ -61,7 +61,7 @@ ResourcePolicyImpl::ResourcePolicyImpl(QObject *parent) m_resourceSet->update(); - connect(m_resourceSet, SIGNAL(resourcesGranted(const QList)), + connect(m_resourceSet, SIGNAL(resourcesGranted(QList)), this, SLOT(handleResourcesGranted())); connect(m_resourceSet, SIGNAL(resourcesDenied()), this, SLOT(handleResourcesDenied())); diff --git a/src/plugins/wmf/decoder/mfdecoderservice.cpp b/src/plugins/wmf/decoder/mfdecoderservice.cpp index 9a06eed81..7e9175d7a 100644 --- a/src/plugins/wmf/decoder/mfdecoderservice.cpp +++ b/src/plugins/wmf/decoder/mfdecoderservice.cpp @@ -64,4 +64,4 @@ void MFAudioDecoderService::releaseControl(QMediaControl *control) if (control && control->inherits("MFAudioDecoderControl")) { delete control; } -} \ No newline at end of file +} diff --git a/src/plugins/wmf/decoder/mfdecodersourcereader.cpp b/src/plugins/wmf/decoder/mfdecodersourcereader.cpp index 0aa2cafb8..c26e3518f 100644 --- a/src/plugins/wmf/decoder/mfdecodersourcereader.cpp +++ b/src/plugins/wmf/decoder/mfdecodersourcereader.cpp @@ -196,4 +196,4 @@ STDMETHODIMP MFDecoderSourceReader::OnFlush(DWORD) STDMETHODIMP MFDecoderSourceReader::OnEvent(DWORD, IMFMediaEvent*) { return S_OK; -} \ No newline at end of file +} diff --git a/src/plugins/wmf/player/mfplayercontrol.cpp b/src/plugins/wmf/player/mfplayercontrol.cpp index 68ffa7b6f..a50c213c4 100644 --- a/src/plugins/wmf/player/mfplayercontrol.cpp +++ b/src/plugins/wmf/player/mfplayercontrol.cpp @@ -58,7 +58,7 @@ MFPlayerControl::MFPlayerControl(MFPlayerSession *session) QObject::connect(m_session, SIGNAL(audioAvailable()), this, SLOT(handleAudioAvailable())); QObject::connect(m_session, SIGNAL(durationUpdate(qint64)), this, SLOT(handleDurationUpdate(qint64))); QObject::connect(m_session, SIGNAL(seekableUpdate(bool)), this, SLOT(handleSeekableUpdate(bool))); - QObject::connect(m_session, SIGNAL(error(QMediaPlayer::Error, QString, bool)), this, SLOT(handleError(QMediaPlayer::Error, QString, bool))); + QObject::connect(m_session, SIGNAL(error(QMediaPlayer::Error,QString,bool)), this, SLOT(handleError(QMediaPlayer::Error,QString,bool))); QObject::connect(m_session, SIGNAL(positionChanged(qint64)), this, SIGNAL(positionChanged(qint64))); QObject::connect(m_session, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int))); QObject::connect(m_session, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool))); diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp index 04b46ec0d..183f0231d 100644 --- a/src/plugins/wmf/player/mfplayersession.cpp +++ b/src/plugins/wmf/player/mfplayersession.cpp @@ -93,7 +93,7 @@ MFPlayerSession::MFPlayerSession(MFPlayerService *playerService) , m_audioSampleGrabberNode(0) , m_videoProbeMFT(0) { - QObject::connect(this, SIGNAL(sessionEvent(IMFMediaEvent *)), this, SLOT(handleSessionEvent(IMFMediaEvent *))); + QObject::connect(this, SIGNAL(sessionEvent(IMFMediaEvent*)), this, SLOT(handleSessionEvent(IMFMediaEvent*))); m_pendingState = NoPending; ZeroMemory(&m_state, sizeof(m_state)); -- cgit v1.2.3