diff options
author | Fredrik de Vibe <fredrik.devibe@theqtcompany.com> | 2016-04-11 14:35:00 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@qt.io> | 2016-06-30 19:35:39 +0000 |
commit | 2f4ce3b7782bb5a42506f731b7e45a93a1e5ace0 (patch) | |
tree | 65c0bb17ec29002eced51c52f7f160777890b952 /src/widgets | |
parent | 6bdc549abebc8ca71be047c50f890f42e6ef347a (diff) |
Removed needless null check.
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 <edward.welbourne@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qapplication.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |