From 5282545589244c1a3e01442e3586d5666213f76d Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 8 Aug 2020 02:21:21 +0200 Subject: QWidget: drop an unncessary const_cast Thanks to the newly introduced indexOf overload. Change-Id: I00377591dba4104f1dfd34816cc74efcf5220a4d Reviewed-by: David Faure --- src/widgets/kernel/qwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/kernel/qwidget.cpp') 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(w)) < 0) + if (layout->indexOf(w) < 0) continue; // Widget is not in layout assumedSafeWidget = w; -- cgit v1.2.3