diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/phonon/mmf/videowidget.cpp | 2 | ||||
-rw-r--r-- | src/declarative/debugger/qdeclarativedebugclient.cpp | 2 | ||||
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeloader.cpp | 3 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejs.g | 4 | ||||
-rw-r--r-- | src/declarative/qml/parser/qdeclarativejsparser.cpp | 4 | ||||
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 40 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_p.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_s60.cpp | 3 |
8 files changed, 48 insertions, 11 deletions
diff --git a/src/3rdparty/phonon/mmf/videowidget.cpp b/src/3rdparty/phonon/mmf/videowidget.cpp index 122094e..d59e82a 100644 --- a/src/3rdparty/phonon/mmf/videowidget.cpp +++ b/src/3rdparty/phonon/mmf/videowidget.cpp @@ -65,6 +65,8 @@ MMF::VideoWidget::VideoWidget(QWidget *parent) TRACE_CONTEXT(VideoWidget::VideoWidget, EVideoApi); TRACE_ENTRY_0(); + parent->setProperty("_q_DummyWindowSurface", true); + TRACE_EXIT_0(); } diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp index 977e58e..f5c5751 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/declarative/debugger/qdeclarativedebugclient.cpp @@ -93,7 +93,7 @@ QDeclarativeDebugConnectionPrivate::QDeclarativeDebugConnectionPrivate(QDeclarat void QDeclarativeDebugConnectionPrivate::advertisePlugins() { - if (!q->isConnected() || !gotHello) + if (!q->isConnected()) return; QPacket pack; diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index 5647b14..7777567 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -216,7 +216,8 @@ QDeclarativeLoader::~QDeclarativeLoader() cannot load non-visual components. To unload the currently loaded item, set this property to an empty string, - or set \l sourceComponent to \c undefined. + or set \l sourceComponent to \c undefined. Setting \c source to a + new URL will also cause the item created by the previous URL to be unloaded. \sa sourceComponent, status, progress */ diff --git a/src/declarative/qml/parser/qdeclarativejs.g b/src/declarative/qml/parser/qdeclarativejs.g index 1b66ba0..c84f0b3 100644 --- a/src/declarative/qml/parser/qdeclarativejs.g +++ b/src/declarative/qml/parser/qdeclarativejs.g @@ -1254,7 +1254,7 @@ case $rule_number: { else node = makeAstNode<AST::ObjectLiteral> (driver->nodePool()); node->lbraceToken = loc(1); - node->lbraceToken = loc(3); + node->rbraceToken = loc(3); sym(1).Node = node; } break; ./ @@ -1265,7 +1265,7 @@ case $rule_number: { AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); - node->lbraceToken = loc(4); + node->rbraceToken = loc(4); sym(1).Node = node; } break; ./ diff --git a/src/declarative/qml/parser/qdeclarativejsparser.cpp b/src/declarative/qml/parser/qdeclarativejsparser.cpp index 8afb93d..28ef17d 100644 --- a/src/declarative/qml/parser/qdeclarativejsparser.cpp +++ b/src/declarative/qml/parser/qdeclarativejsparser.cpp @@ -679,7 +679,7 @@ case 85: { else node = makeAstNode<AST::ObjectLiteral> (driver->nodePool()); node->lbraceToken = loc(1); - node->lbraceToken = loc(3); + node->rbraceToken = loc(3); sym(1).Node = node; } break; @@ -687,7 +687,7 @@ case 86: { AST::ObjectLiteral *node = makeAstNode<AST::ObjectLiteral> (driver->nodePool(), sym(2).PropertyNameAndValueList->finish ()); node->lbraceToken = loc(1); - node->lbraceToken = loc(4); + node->rbraceToken = loc(4); sym(1).Node = node; } break; diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index d89eedc..b05f0d02 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -236,6 +236,17 @@ void QWidgetBackingStoreTracker::unregisterWidget(QWidget *w) } } +/*! + \internal + Recursively remove widget and all of its descendents. + */ +void QWidgetBackingStoreTracker::unregisterWidgetSubtree(QWidget *widget) +{ + unregisterWidget(widget); + foreach (QObject *child, widget->children()) + if (QWidget *childWidget = qobject_cast<QWidget *>(child)) + unregisterWidgetSubtree(childWidget); +} QWidgetPrivate::QWidgetPrivate(int version) : QObjectPrivate(version) @@ -329,15 +340,27 @@ QWidgetPrivate::~QWidgetPrivate() #endif //QT_NO_GRAPHICSEFFECT } +class QDummyWindowSurface : public QWindowSurface +{ +public: + QDummyWindowSurface(QWidget *window) : QWindowSurface(window) {} + QPaintDevice *paintDevice() { return window(); } + void flush(QWidget *, const QRegion &, const QPoint &) {} +}; + QWindowSurface *QWidgetPrivate::createDefaultWindowSurface() { Q_Q(QWidget); QWindowSurface *surface; - if (QApplicationPrivate::graphicsSystem()) - surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q); - else - surface = createDefaultWindowSurface_sys(); + if (q->property("_q_DummyWindowSurface").toBool()) { + surface = new QDummyWindowSurface(q); + } else { + if (QApplicationPrivate::graphicsSystem()) + surface = QApplicationPrivate::graphicsSystem()->createWindowSurface(q); + else + surface = createDefaultWindowSurface_sys(); + } return surface; } @@ -10049,7 +10072,16 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f) if (newParent && isAncestorOf(focusWidget())) focusWidget()->clearFocus(); + QTLWExtra *oldTopExtra = window()->d_func()->maybeTopData(); + QWidgetBackingStoreTracker *oldBsTracker = oldTopExtra ? &oldTopExtra->backingStore : 0; + d->setParent_sys(parent, f); + + QTLWExtra *topExtra = window()->d_func()->maybeTopData(); + QWidgetBackingStoreTracker *bsTracker = topExtra ? &topExtra->backingStore : 0; + if (oldBsTracker && oldBsTracker != bsTracker) + oldBsTracker->unregisterWidgetSubtree(this); + if (desktopWidget) parent = 0; diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h index ee3ca59..2d0bd85 100644 --- a/src/gui/kernel/qwidget_p.h +++ b/src/gui/kernel/qwidget_p.h @@ -122,6 +122,7 @@ public: void registerWidget(QWidget *w); void unregisterWidget(QWidget *w); + void unregisterWidgetSubtree(QWidget *w); inline QWidgetBackingStore* data() { diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 9ceb197..636b306 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -713,7 +713,8 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) // old_winid may not have received a 'not visible' visibility // changed event before being destroyed; make sure that it is // removed from the backing store's list of visible windows. - S60->controlVisibilityChanged(old_winid, false); + if (old_winid) + S60->controlVisibilityChanged(old_winid, false); setWinId(0); |