From 9a5fce0d7d66e0635678eb129f765b39ea11e600 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Wed, 14 Oct 2009 09:29:57 +0200 Subject: Fix some autotest failures and get rid of some compiler warnings --- src/gui/kernel/qwidget.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/gui/kernel/qwidget.cpp') diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 3217222b31..1abbd9fa1c 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1444,7 +1444,7 @@ QWidget::~QWidget() } } -#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) +#if defined(Q_WS_WIN) || defined(Q_WS_X11) || defined (Q_WS_QWS) //### LITE else if (!internalWinId() && isVisible()) { qApp->d_func()->sendSyntheticEnterLeave(this); #ifdef Q_WS_QWS @@ -2319,7 +2319,10 @@ WId QWidget::effectiveWinId() const return id; QWidget *realParent = nativeParentWidget(); Q_ASSERT(realParent); +#ifndef Q_WS_LITE + //### we really need to implement winId functionality Q_ASSERT(realParent->internalWinId()); +#endif return realParent->internalWinId(); } @@ -4004,6 +4007,9 @@ QWidget *QWidget::window() const */ QWidget *QWidget::nativeParentWidget() const { +#ifdef Q_WS_LITE + return window(); //### we don't have native child widgets yet +#endif QWidget *parent = parentWidget(); while (parent && !parent->internalWinId()) parent = parent->parentWidget(); @@ -10145,6 +10151,11 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on) Q_ASSERT_X(sizeof(d->high_attributes)*8 >= (Qt::WA_AttributeCount - sizeof(uint)*8), "QWidget::setAttribute(WidgetAttribute, bool)", "QWidgetPrivate::high_attributes[] too small to contain all attributes in WidgetAttribute"); +#ifdef Q_WS_LITE + //### we don't have native child widgets, and WinId isn't really there yet + if (attribute == Qt::WA_NativeWindow) + return; +#endif #ifdef Q_WS_WIN // ### Don't use PaintOnScreen+paintEngine() to do native painting in 5.0 @@ -11454,7 +11465,7 @@ QWidget *QWidgetPrivate::widgetInNavigationDirection(Direction direction) QWidget *targetWidget = 0; int shortestDistance = INT_MAX; foreach(QWidget *targetCandidate, QApplication::allWidgets()) { - + if (targetCandidate->focusProxy()) //skip if focus proxy set continue; -- cgit v1.2.1