From 2f4ce3b7782bb5a42506f731b7e45a93a1e5ace0 Mon Sep 17 00:00:00 2001 From: Fredrik de Vibe Date: Mon, 11 Apr 2016 14:35:00 +0200 Subject: Removed needless null check. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pointer 'receiver' has already been checked and dereferenced at this point, so a static_cast will not turn it into a null pointer, hence the check is not needed. This was caught by Coverity, CID 159389. Change-Id: I1772110e968c2216dc71d406ddb157b1ae930cb0 Reviewed-by: Edward Welbourne Reviewed-by: Jędrzej Nowacki Reviewed-by: Frederik Gladhorn --- src/widgets/kernel/qapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index d070907977..b87dc17778 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -3575,7 +3575,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) // We may get here if the widget is subscribed to a gesture, // but has not accepted TouchBegin. Propagate touch events // only if TouchBegin has been accepted. - if (widget && widget->testAttribute(Qt::WA_WState_AcceptedTouchBeginEvent)) + if (widget->testAttribute(Qt::WA_WState_AcceptedTouchBeginEvent)) res = d->notify_helper(widget, e); break; } -- cgit v1.2.3