Normalize signal & slot signatures in connection

Profiling shows Qt Creator spends 2% of its load time normalizing

Change-Id: I1a4bef16be79ced35c47da865153ebe1bee22f9c
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
Thiago Macieira
2014-02-02 14:07:07 -08:00
committed by The Qt Project
parent 6f8ccc88e8
commit e4035bf6d0
15 changed files with 32 additions and 32 deletions

View File

@@ -110,10 +110,10 @@ QDeclarativeCameraCapture::QDeclarativeCameraCapture(QCamera *camera, QObject *p
connect(m_capture, SIGNAL(readyForCaptureChanged(bool)), this, SIGNAL(readyForCaptureChanged(bool))); connect(m_capture, SIGNAL(readyForCaptureChanged(bool)), this, SIGNAL(readyForCaptureChanged(bool)));
connect(m_capture, SIGNAL(imageExposed(int)), this, SIGNAL(imageExposed(int))); connect(m_capture, SIGNAL(imageExposed(int)), this, SIGNAL(imageExposed(int)));
connect(m_capture, SIGNAL(imageCaptured(int,QImage)), this, SLOT(_q_imageCaptured(int, QImage))); connect(m_capture, SIGNAL(imageCaptured(int,QImage)), this, SLOT(_q_imageCaptured(int,QImage)));
connect(m_capture, SIGNAL(imageMetadataAvailable(int,QString,QVariant)), this, connect(m_capture, SIGNAL(imageMetadataAvailable(int,QString,QVariant)), this,
SLOT(_q_imageMetadataAvailable(int,QString,QVariant))); SLOT(_q_imageMetadataAvailable(int,QString,QVariant)));
connect(m_capture, SIGNAL(imageSaved(int,QString)), this, SLOT(_q_imageSaved(int, QString))); connect(m_capture, SIGNAL(imageSaved(int,QString)), this, SLOT(_q_imageSaved(int,QString)));
connect(m_capture, SIGNAL(error(int,QCameraImageCapture::Error,QString)), connect(m_capture, SIGNAL(error(int,QCameraImageCapture::Error,QString)),
this, SLOT(_q_captureFailed(int,QCameraImageCapture::Error,QString))); this, SLOT(_q_captureFailed(int,QCameraImageCapture::Error,QString)));

View File

@@ -114,7 +114,7 @@ QDeclarativeRadio::QDeclarativeRadio(QObject *parent) :
connect(m_radioTuner, SIGNAL(signalStrengthChanged(int)), this, SIGNAL(signalStrengthChanged(int))); connect(m_radioTuner, SIGNAL(signalStrengthChanged(int)), this, SIGNAL(signalStrengthChanged(int)));
connect(m_radioTuner, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int))); connect(m_radioTuner, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int)));
connect(m_radioTuner, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool))); connect(m_radioTuner, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool)));
connect(m_radioTuner, SIGNAL(stationFound(int, QString)), this, SIGNAL(stationFound(int, QString))); connect(m_radioTuner, SIGNAL(stationFound(int,QString)), this, SIGNAL(stationFound(int,QString)));
connect(m_radioTuner, SIGNAL(antennaConnectedChanged(bool)), this, SIGNAL(antennaConnectedChanged(bool))); connect(m_radioTuner, SIGNAL(antennaConnectedChanged(bool)), this, SIGNAL(antennaConnectedChanged(bool)));
connect(m_radioTuner, SIGNAL(availabilityChanged(QMultimedia::AvailabilityStatus)), this, SLOT(_q_availabilityChanged(QMultimedia::AvailabilityStatus))); connect(m_radioTuner, SIGNAL(availabilityChanged(QMultimedia::AvailabilityStatus)), this, SLOT(_q_availabilityChanged(QMultimedia::AvailabilityStatus)));

View File

@@ -266,8 +266,8 @@ bool QCameraImageCapture::setMediaObject(QMediaObject *mediaObject)
this, SIGNAL(imageMetadataAvailable(int,QString,QVariant))); this, SIGNAL(imageMetadataAvailable(int,QString,QVariant)));
connect(d->control, SIGNAL(imageAvailable(int,QVideoFrame)), connect(d->control, SIGNAL(imageAvailable(int,QVideoFrame)),
this, SIGNAL(imageAvailable(int,QVideoFrame))); this, SIGNAL(imageAvailable(int,QVideoFrame)));
connect(d->control, SIGNAL(imageSaved(int, QString)), connect(d->control, SIGNAL(imageSaved(int,QString)),
this, SIGNAL(imageSaved(int, QString))); this, SIGNAL(imageSaved(int,QString)));
connect(d->control, SIGNAL(readyForCaptureChanged(bool)), connect(d->control, SIGNAL(readyForCaptureChanged(bool)),
this, SLOT(_q_readyChanged(bool))); this, SLOT(_q_readyChanged(bool)));
connect(d->control, SIGNAL(error(int,int,QString)), connect(d->control, SIGNAL(error(int,int,QString)),

View File

@@ -396,8 +396,8 @@ void QPlaylistFileParserPrivate::processLine(int startIndex, int length)
Q_ASSERT(m_currentParser); Q_ASSERT(m_currentParser);
connect(m_currentParser, SIGNAL(newItem(QVariant)), q, SIGNAL(newItem(QVariant))); connect(m_currentParser, SIGNAL(newItem(QVariant)), q, SIGNAL(newItem(QVariant)));
connect(m_currentParser, SIGNAL(finished()), q, SLOT(_q_handleParserFinished())); connect(m_currentParser, SIGNAL(finished()), q, SLOT(_q_handleParserFinished()));
connect(m_currentParser, SIGNAL(error(QPlaylistFileParser::ParserError, QString)), connect(m_currentParser, SIGNAL(error(QPlaylistFileParser::ParserError,QString)),
q, SLOT(_q_handleParserError(QPlaylistFileParser::ParserError, QString))); q, SLOT(_q_handleParserError(QPlaylistFileParser::ParserError,QString)));
} }
QString line; QString line;
@@ -583,8 +583,8 @@ void QPlaylistFileParser::stop()
if (d->m_currentParser) { if (d->m_currentParser) {
disconnect(d->m_currentParser, SIGNAL(newItem(QVariant)), this, SIGNAL(newItem(QVariant))); disconnect(d->m_currentParser, SIGNAL(newItem(QVariant)), this, SIGNAL(newItem(QVariant)));
disconnect(d->m_currentParser, SIGNAL(finished()), this, SLOT(_q_handleParserFinished())); disconnect(d->m_currentParser, SIGNAL(finished()), this, SLOT(_q_handleParserFinished()));
disconnect(d->m_currentParser, SIGNAL(error(QPlaylistFileParser::ParserError, QString)), disconnect(d->m_currentParser, SIGNAL(error(QPlaylistFileParser::ParserError,QString)),
this, SLOT(_q_handleParserError(QPlaylistFileParser::ParserError, QString))); this, SLOT(_q_handleParserError(QPlaylistFileParser::ParserError,QString)));
d->m_currentParser->deleteLater(); d->m_currentParser->deleteLater();
d->m_currentParser = 0; d->m_currentParser = 0;
} }

View File

@@ -113,11 +113,11 @@ QMediaNetworkPlaylistProvider::QMediaNetworkPlaylistProvider(QObject *parent)
:QMediaPlaylistProvider(*new QMediaNetworkPlaylistProviderPrivate, parent) :QMediaPlaylistProvider(*new QMediaNetworkPlaylistProviderPrivate, parent)
{ {
d_func()->q_ptr = this; d_func()->q_ptr = this;
connect(&d_func()->parser, SIGNAL(newItem(const QVariant&)), connect(&d_func()->parser, SIGNAL(newItem(QVariant)),
this, SLOT(_q_handleNewItem(const QVariant&))); this, SLOT(_q_handleNewItem(QVariant)));
connect(&d_func()->parser, SIGNAL(finished()), this, SIGNAL(loaded())); connect(&d_func()->parser, SIGNAL(finished()), this, SIGNAL(loaded()));
connect(&d_func()->parser, SIGNAL(error(QPlaylistFileParser::ParserError, const QString &)), connect(&d_func()->parser, SIGNAL(error(QPlaylistFileParser::ParserError,QString)),
this, SLOT(_q_handleParserError(QPlaylistFileParser::ParserError, const QString &))); this, SLOT(_q_handleParserError(QPlaylistFileParser::ParserError,QString)));
} }
QMediaNetworkPlaylistProvider::~QMediaNetworkPlaylistProvider() QMediaNetworkPlaylistProvider::~QMediaNetworkPlaylistProvider()

View File

@@ -63,12 +63,12 @@ QAndroidMediaPlayerControl::QAndroidMediaPlayerControl(QObject *parent)
{ {
connect(mMediaPlayer, SIGNAL(bufferingUpdate(qint32)), connect(mMediaPlayer, SIGNAL(bufferingUpdate(qint32)),
this, SLOT(onBufferChanged(qint32))); this, SLOT(onBufferChanged(qint32)));
connect(mMediaPlayer, SIGNAL(info(qint32, qint32)), connect(mMediaPlayer, SIGNAL(info(qint32,qint32)),
this, SLOT(onInfo(qint32, qint32))); this, SLOT(onInfo(qint32,qint32)));
connect(mMediaPlayer, SIGNAL(error(qint32, qint32)), connect(mMediaPlayer, SIGNAL(error(qint32,qint32)),
this, SLOT(onError(qint32, qint32))); this, SLOT(onError(qint32,qint32)));
connect(mMediaPlayer, SIGNAL(mediaPlayerInfo(qint32, qint32)), connect(mMediaPlayer, SIGNAL(mediaPlayerInfo(qint32,qint32)),
this, SLOT(onMediaPlayerInfo(qint32, qint32))); this, SLOT(onMediaPlayerInfo(qint32,qint32)));
connect(mMediaPlayer, SIGNAL(videoSizeChanged(qint32,qint32)), connect(mMediaPlayer, SIGNAL(videoSizeChanged(qint32,qint32)),
this, SLOT(onVideoSizeChanged(qint32,qint32))); this, SLOT(onVideoSizeChanged(qint32,qint32)));
} }

View File

@@ -49,10 +49,10 @@ DSImageCaptureControl::DSImageCaptureControl(DSCameraSession *session)
:QCameraImageCaptureControl(session), m_session(session), m_ready(false) :QCameraImageCaptureControl(session), m_session(session), m_ready(false)
{ {
connect(m_session, SIGNAL(stateChanged(QCamera::State)), SLOT(updateState())); connect(m_session, SIGNAL(stateChanged(QCamera::State)), SLOT(updateState()));
connect(m_session, SIGNAL(imageCaptured(const int, QImage)), connect(m_session, SIGNAL(imageCaptured(int,QImage)),
this, SIGNAL(imageCaptured(const int, QImage))); this, SIGNAL(imageCaptured(int,QImage)));
connect(m_session, SIGNAL(imageSaved(const int, const QString &)), connect(m_session, SIGNAL(imageSaved(int,QString)),
this, SIGNAL(imageSaved(const int, const QString &))); this, SIGNAL(imageSaved(int,QString)));
connect(m_session, SIGNAL(readyForCaptureChanged(bool)), connect(m_session, SIGNAL(readyForCaptureChanged(bool)),
this, SIGNAL(readyForCaptureChanged(bool))); this, SIGNAL(readyForCaptureChanged(bool)));
} }

View File

@@ -54,8 +54,8 @@ CameraBinLocks::CameraBinLocks(CameraBinSession *session)
m_session(session), m_session(session),
m_focus(m_session->cameraFocusControl()) m_focus(m_session->cameraFocusControl())
{ {
connect(m_focus, SIGNAL(_q_focusStatusChanged(QCamera::LockStatus, QCamera::LockChangeReason)), connect(m_focus, SIGNAL(_q_focusStatusChanged(QCamera::LockStatus,QCamera::LockChangeReason)),
this, SLOT(updateFocusStatus(QCamera::LockStatus, QCamera::LockChangeReason))); this, SLOT(updateFocusStatus(QCamera::LockStatus,QCamera::LockChangeReason)));
} }
CameraBinLocks::~CameraBinLocks() CameraBinLocks::~CameraBinLocks()

View File

@@ -65,7 +65,7 @@ CamerabinResourcePolicy::CamerabinResourcePolicy(QObject *parent) :
m_resource->setAlwaysReply(); m_resource->setAlwaysReply();
m_resource->initAndConnect(); m_resource->initAndConnect();
connect(m_resource, SIGNAL(resourcesGranted(const QList<ResourcePolicy::ResourceType>)), connect(m_resource, SIGNAL(resourcesGranted(QList<ResourcePolicy::ResourceType>)),
SLOT(handleResourcesGranted())); SLOT(handleResourcesGranted()));
connect(m_resource, SIGNAL(resourcesDenied()), SIGNAL(resourcesDenied())); connect(m_resource, SIGNAL(resourcesDenied()), SIGNAL(resourcesDenied()));
connect(m_resource, SIGNAL(lostResources()), SLOT(handleResourcesLost())); connect(m_resource, SIGNAL(lostResources()), SLOT(handleResourcesLost()));

View File

@@ -54,7 +54,7 @@ CameraButtonListener::CameraButtonListener(QObject *parent) :
m_shutterPressed(false) m_shutterPressed(false)
{ {
m_keys = new MeeGo::QmKeys(this); 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))); this, SLOT(handleQmKeyEvent(MeeGo::QmKeys::Key,MeeGo::QmKeys::State)));
} }

View File

@@ -61,7 +61,7 @@ ResourcePolicyImpl::ResourcePolicyImpl(QObject *parent)
m_resourceSet->update(); m_resourceSet->update();
connect(m_resourceSet, SIGNAL(resourcesGranted(const QList<ResourcePolicy::ResourceType>)), connect(m_resourceSet, SIGNAL(resourcesGranted(QList<ResourcePolicy::ResourceType>)),
this, SLOT(handleResourcesGranted())); this, SLOT(handleResourcesGranted()));
connect(m_resourceSet, SIGNAL(resourcesDenied()), connect(m_resourceSet, SIGNAL(resourcesDenied()),
this, SLOT(handleResourcesDenied())); this, SLOT(handleResourcesDenied()));

View File

@@ -58,7 +58,7 @@ MFPlayerControl::MFPlayerControl(MFPlayerSession *session)
QObject::connect(m_session, SIGNAL(audioAvailable()), this, SLOT(handleAudioAvailable())); 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(durationUpdate(qint64)), this, SLOT(handleDurationUpdate(qint64)));
QObject::connect(m_session, SIGNAL(seekableUpdate(bool)), this, SLOT(handleSeekableUpdate(bool))); 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(positionChanged(qint64)), this, SIGNAL(positionChanged(qint64)));
QObject::connect(m_session, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int))); QObject::connect(m_session, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int)));
QObject::connect(m_session, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool))); QObject::connect(m_session, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool)));

View File

@@ -93,7 +93,7 @@ MFPlayerSession::MFPlayerSession(MFPlayerService *playerService)
, m_audioSampleGrabberNode(0) , m_audioSampleGrabberNode(0)
, m_videoProbeMFT(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; m_pendingState = NoPending;
ZeroMemory(&m_state, sizeof(m_state)); ZeroMemory(&m_state, sizeof(m_state));