summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 1c86e8cf7a..559e4ae43f 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -4284,7 +4284,7 @@ QPoint QWidget::mapFromParent(const QPoint &pos) const
QWidget *QWidget::window() const
{
- QWidget *w = (QWidget *)this;
+ QWidget *w = const_cast<QWidget *>(this);
QWidget *p = w->parentWidget();
while (!w->isWindow() && p) {
w = p;