Fix: "Missing emit keyword on signal call"

[-Wclazy-incorrect-emit]

Change-Id: I32cf5db522dcb14bbe5151914624979929eeb52e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
bb10
Alessandro Portale 2019-02-06 07:54:33 +01:00
parent e1d42a40a2
commit 5993bea032
8 changed files with 23 additions and 23 deletions

View File

@ -480,13 +480,13 @@ void QIdentityProxyModelPrivate::_q_sourceDataChanged(const QModelIndex &topLeft
Q_ASSERT(topLeft.isValid() ? topLeft.model() == model : true);
Q_ASSERT(bottomRight.isValid() ? bottomRight.model() == model : true);
Q_Q(QIdentityProxyModel);
q->dataChanged(q->mapFromSource(topLeft), q->mapFromSource(bottomRight), roles);
emit q->dataChanged(q->mapFromSource(topLeft), q->mapFromSource(bottomRight), roles);
}
void QIdentityProxyModelPrivate::_q_sourceHeaderDataChanged(Qt::Orientation orientation, int first, int last)
{
Q_Q(QIdentityProxyModel);
q->headerDataChanged(orientation, first, last);
emit q->headerDataChanged(orientation, first, last);
}
void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint)
@ -505,7 +505,7 @@ void QIdentityProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPe
parents << mappedParent;
}
q->layoutAboutToBeChanged(parents, hint);
emit q->layoutAboutToBeChanged(parents, hint);
const auto proxyPersistentIndexes = q->persistentIndexList();
for (const QPersistentModelIndex &proxyPersistentIndex : proxyPersistentIndexes) {
@ -540,7 +540,7 @@ void QIdentityProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersistentM
parents << mappedParent;
}
q->layoutChanged(parents, hint);
emit q->layoutChanged(parents, hint);
}
void QIdentityProxyModelPrivate::_q_sourceModelAboutToBeReset()

View File

@ -81,7 +81,7 @@ void QTransposeProxyModelPrivate::onLayoutChanged(const QList<QPersistentModelIn
proxyHint = QAbstractItemModel::HorizontalSortHint;
else if (hint == QAbstractItemModel::HorizontalSortHint)
proxyHint = QAbstractItemModel::VerticalSortHint;
q->layoutChanged(proxyParents, proxyHint);
emit q->layoutChanged(proxyParents, proxyHint);
}
void QTransposeProxyModelPrivate::onLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &parents, QAbstractItemModel::LayoutChangeHint hint)
@ -108,19 +108,19 @@ void QTransposeProxyModelPrivate::onLayoutAboutToBeChanged(const QList<QPersiste
proxyHint = QAbstractItemModel::HorizontalSortHint;
else if (hint == QAbstractItemModel::HorizontalSortHint)
proxyHint = QAbstractItemModel::VerticalSortHint;
q->layoutAboutToBeChanged(proxyParents, proxyHint);
emit q->layoutAboutToBeChanged(proxyParents, proxyHint);
}
void QTransposeProxyModelPrivate::onDataChanged(const QModelIndex& topLeft, const QModelIndex& bottomRight, const QVector<int>& roles)
{
Q_Q(QTransposeProxyModel);
q->dataChanged(q->mapFromSource(topLeft), q->mapFromSource(bottomRight), roles);
emit q->dataChanged(q->mapFromSource(topLeft), q->mapFromSource(bottomRight), roles);
}
void QTransposeProxyModelPrivate::onHeaderDataChanged(Qt::Orientation orientation, int first, int last)
{
Q_Q(QTransposeProxyModel);
q->headerDataChanged(orientation == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal, first, last);
emit q->headerDataChanged(orientation == Qt::Horizontal ? Qt::Vertical : Qt::Horizontal, first, last);
}
void QTransposeProxyModelPrivate::onColumnsAboutToBeInserted(const QModelIndex &parent, int first, int last)

View File

@ -479,7 +479,7 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event)
emit q->progressValueChanged(event->index1);
if (!event->text.isNull()) // ###
q->progressTextChanged(event->text);
emit q->progressTextChanged(event->text);
break;
case QFutureCallOutEvent::ProgressRange:
emit q->progressRangeChanged(event->index1, event->index2);

View File

@ -2427,9 +2427,9 @@ void QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePr
window->d_func()->resizeEventPending = false;
if (actualGeometry.width() != lastReportedGeometry.width())
window->widthChanged(actualGeometry.width());
emit window->widthChanged(actualGeometry.width());
if (actualGeometry.height() != lastReportedGeometry.height())
window->heightChanged(actualGeometry.height());
emit window->heightChanged(actualGeometry.height());
}
if (isMove) {
@ -2438,9 +2438,9 @@ void QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePr
QGuiApplication::sendSpontaneousEvent(window, &e);
if (actualGeometry.x() != lastReportedGeometry.x())
window->xChanged(actualGeometry.x());
emit window->xChanged(actualGeometry.x());
if (actualGeometry.y() != lastReportedGeometry.y())
window->yChanged(actualGeometry.y());
emit window->yChanged(actualGeometry.y());
}
}

View File

@ -275,7 +275,7 @@ void QTextDocumentPrivate::clear()
init();
cursors = oldCursors;
inContentsChange = true;
q->contentsChange(0, len, 0);
emit q->contentsChange(0, len, 0);
inContentsChange = false;
if (lout)
lout->documentChanged(0, len, 0);

View File

@ -65,21 +65,21 @@ void QNetworkFile::open()
if (fi.isDir()) {
QString msg = QCoreApplication::translate("QNetworkAccessFileBackend",
"Cannot open %1: Path is a directory").arg(fileName());
error(QNetworkReply::ContentOperationNotPermittedError, msg);
emit error(QNetworkReply::ContentOperationNotPermittedError, msg);
} else {
headerRead(QNetworkRequest::LastModifiedHeader, QVariant::fromValue(fi.lastModified()));
headerRead(QNetworkRequest::ContentLengthHeader, QVariant::fromValue(fi.size()));
emit headerRead(QNetworkRequest::LastModifiedHeader, QVariant::fromValue(fi.lastModified()));
emit headerRead(QNetworkRequest::ContentLengthHeader, QVariant::fromValue(fi.size()));
opened = QFile::open(QIODevice::ReadOnly | QIODevice::Unbuffered);
if (!opened) {
QString msg = QCoreApplication::translate("QNetworkAccessFileBackend",
"Error opening %1: %2").arg(fileName(), errorString());
if (exists())
error(QNetworkReply::ContentAccessDenied, msg);
emit error(QNetworkReply::ContentAccessDenied, msg);
else
error(QNetworkReply::ContentNotFoundError, msg);
emit error(QNetworkReply::ContentNotFoundError, msg);
}
}
finished(opened);
emit finished(opened);
}
void QNetworkFile::close()

View File

@ -83,7 +83,7 @@ public:
#ifndef QT_NO_NETWORKPROXY
inline void proxyAuthenticationRequired(const QNetworkProxy &proxy, QAuthenticator *authenticator) override {
Q_Q(QAbstractSocket);
q->proxyAuthenticationRequired(proxy, authenticator);
emit q->proxyAuthenticationRequired(proxy, authenticator);
}
#endif

View File

@ -87,9 +87,9 @@ void QLocalSocketPrivate::_q_winError(ulong windowsError, const QString &functio
}
if (currentState != state) {
q->emit stateChanged(state);
emit q->stateChanged(state);
if (state == QLocalSocket::UnconnectedState && currentState != QLocalSocket::ConnectingState)
q->emit disconnected();
emit q->disconnected();
}
emit q->error(error);
}