From d58494bf7b136c2c41f0fd219038c316f954f76f Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 14 Sep 2009 11:23:09 -0700 Subject: Fix a bug in surfaceForWidget I had the logic of the assert wrong with the isAncestorOf call. Reviewed-by: Donald Carr --- src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp index ff9f7bd..ccbaf21 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbwindowsurface.cpp @@ -411,7 +411,8 @@ IDirectFBSurface *QDirectFBWindowSurface::surfaceForWidget(const QWidget *widget *rect = QRect(widget->mapTo(win, QPoint(0, 0)), widget->size()); } } - Q_ASSERT(win == widget || widget->isAncestorOf(win)); + + Q_ASSERT(win == widget || win->isAncestorOf(widget)); return dfbSurface; } -- cgit v0.12