diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-08-08 02:21:21 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2020-08-24 00:17:03 +0200 |
commit | 5282545589244c1a3e01442e3586d5666213f76d (patch) | |
tree | b37801eed2714c93dfe1c34a97a0c4ee642fa0fa /src/widgets/kernel/qwidget.cpp | |
parent | be448666268362700d6d66f803eed62b6712e081 (diff) |
QWidget: drop an unncessary const_cast
Thanks to the newly introduced indexOf overload.
Change-Id: I00377591dba4104f1dfd34816cc74efcf5220a4d
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 29080dc863..f21d148c00 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -7480,7 +7480,7 @@ QMargins QWidgetPrivate::safeAreaMargins() const if (layout->geometry().isNull()) continue; // Layout hasn't been activated yet - if (layout->indexOf(const_cast<QWidget *>(w)) < 0) + if (layout->indexOf(w) < 0) continue; // Widget is not in layout assumedSafeWidget = w; |