diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-10-14 09:29:57 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-10-14 11:40:07 +0200 |
commit | 9a5fce0d7d66e0635678eb129f765b39ea11e600 (patch) | |
tree | c66a1a97767bd9ff7ab151b68c64e95a9321764b /src/gui/kernel/qwidget.cpp | |
parent | ba321e277e392c276c1ff8b32f8fca7d26ed0fbe (diff) | |
download | qt4-tools-9a5fce0d7d66e0635678eb129f765b39ea11e600.tar.gz |
Fix some autotest failures and get rid of some compiler warnings
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
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; |