diff options
author | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-10-28 11:28:58 (GMT) |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-10-28 11:28:58 (GMT) |
commit | e7b9fb2e87641a36301babf457056b3350f0431c (patch) | |
tree | 3db3d29297d29ac1801a33d50c1273efec97352b /src | |
parent | b36e845dde90313cf98df118ce6ffd88502b943b (diff) | |
parent | 77819edac505823226c40033e76d2dda0e8b363a (diff) | |
download | Qt-e7b9fb2e87641a36301babf457056b3350f0431c.zip Qt-e7b9fb2e87641a36301babf457056b3350f0431c.tar.gz Qt-e7b9fb2e87641a36301babf457056b3350f0431c.tar.bz2 |
Merge remote branch 'scm/qt/master'
Conflicts:
mkspecs/symbian-gcce/qmake.conf
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/phonon/mmf/videowidget.cpp | 2 | ||||
-rw-r--r-- | src/corelib/kernel/qeventdispatcher_glib.cpp | 2 | ||||
-rw-r--r-- | src/corelib/plugin/qelfparser_p.cpp | 6 | ||||
-rw-r--r-- | src/corelib/plugin/qelfparser_p.h | 5 | ||||
-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/itemviews/qabstractproxymodel.cpp | 2 | ||||
-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 | ||||
-rw-r--r-- | src/network/access/qnetworkreplyimpl.cpp | 2 | ||||
-rw-r--r-- | src/network/socket/qnativesocketengine_win.cpp | 2 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 8 |
15 files changed, 67 insertions, 19 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/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp index 8390275..e5136f9 100644 --- a/src/corelib/kernel/qeventdispatcher_glib.cpp +++ b/src/corelib/kernel/qeventdispatcher_glib.cpp @@ -180,6 +180,8 @@ static gboolean timerSourceCheck(GSource *source) static gboolean timerSourceDispatch(GSource *source, GSourceFunc, gpointer) { GTimerSource *timerSource = reinterpret_cast<GTimerSource *>(source); + if (timerSource->processEventsFlags & QEventLoop::X11ExcludeTimers) + return true; timerSource->runWithIdlePriority = true; (void) timerSource->timerList.activateTimers(); return true; // ??? don't remove, right again? diff --git a/src/corelib/plugin/qelfparser_p.cpp b/src/corelib/plugin/qelfparser_p.cpp index 4ae7f85..c60b3d5 100644 --- a/src/corelib/plugin/qelfparser_p.cpp +++ b/src/corelib/plugin/qelfparser_p.cpp @@ -39,8 +39,11 @@ ** ****************************************************************************/ -#include "qlibrary_p.h" #include "qelfparser_p.h" + +#if defined (Q_OF_ELF) && defined(Q_CC_GNU) + +#include "qlibrary_p.h" #include <qdebug.h> QT_BEGIN_NAMESPACE @@ -232,3 +235,4 @@ int QElfParser::parse(const char *dataStart, ulong fdlen, const QString &library QT_END_NAMESPACE +#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU) diff --git a/src/corelib/plugin/qelfparser_p.h b/src/corelib/plugin/qelfparser_p.h index 380d5a1..8087da5 100644 --- a/src/corelib/plugin/qelfparser_p.h +++ b/src/corelib/plugin/qelfparser_p.h @@ -56,6 +56,8 @@ #include <qendian.h> #include <qglobal.h> +#if defined (Q_OF_ELF) && defined(Q_CC_GNU) + QT_BEGIN_NAMESPACE class QString; @@ -99,5 +101,6 @@ public: QT_END_NAMESPACE -#endif // QELFPARSER_P_H +#endif // defined(Q_OF_ELF) && defined(Q_CC_GNU) +#endif // QELFPARSER_P_H 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/itemviews/qabstractproxymodel.cpp b/src/gui/itemviews/qabstractproxymodel.cpp index 12c4c7b..b9574f1 100644 --- a/src/gui/itemviews/qabstractproxymodel.cpp +++ b/src/gui/itemviews/qabstractproxymodel.cpp @@ -362,7 +362,7 @@ QMimeData* QAbstractProxyModel::mimeData(const QModelIndexList &indexes) const QModelIndexList list; foreach(const QModelIndex &index, indexes) list << mapToSource(index); - return d->model->mimeData(indexes); + return d->model->mimeData(list); } /*! 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); diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 4c4815c..010e904 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -64,10 +64,10 @@ inline QNetworkReplyImplPrivate::QNetworkReplyImplPrivate() bytesDownloaded(0), lastBytesDownloaded(-1), bytesUploaded(-1), preMigrationDownloaded(-1), httpStatusCode(0), state(Idle) - , downloadBuffer(0) , downloadBufferReadPosition(0) , downloadBufferCurrentSize(0) , downloadBufferMaximumSize(0) + , downloadBuffer(0) { } diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp index f952cee..91b8b2e 100644 --- a/src/network/socket/qnativesocketengine_win.cpp +++ b/src/network/socket/qnativesocketengine_win.cpp @@ -714,6 +714,8 @@ bool QNativeSocketEnginePrivate::nativeBind(const QHostAddress &a, quint16 port) address = QHostAddress(QHostAddress::Any); } break; + default: + break; } struct sockaddr_in sockAddrIPv4; diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index b8576cb..66c9ba8 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -238,10 +238,10 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height) glVertexAttribPointer(QT_TEXTURE_COORDS_ATTR, 2, GL_FLOAT, GL_FALSE, 0, m_textureCoordinateArray); m_blitProgram->bind(); - QGLContextPrivate* ctx_d = const_cast<QGLContextPrivate *>(ctx->d_func()); - ctx_d->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, true); - ctx_d->setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, true); - ctx_d->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false); + m_blitProgram->enableAttributeArray(int(QT_VERTEX_COORDS_ATTR)); + m_blitProgram->enableAttributeArray(int(QT_TEXTURE_COORDS_ATTR)); + m_blitProgram->disableAttributeArray(int(QT_OPACITY_ATTR)); + blitProgram = m_blitProgram; } else { |