diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/webkit/VERSION | 2 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/ChangeLog | 13 | ||||
-rw-r--r-- | src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp | 2 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsproxywidget.cpp | 2 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicswidget.cpp | 4 | ||||
-rw-r--r-- | src/gui/image/qimagewriter.cpp | 1 | ||||
-rw-r--r-- | src/gui/itemviews/qtableview.cpp | 9 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 2 | ||||
-rw-r--r-- | src/opengl/gl2paintengineex/qtriangulatingstroker.cpp | 16 | ||||
-rw-r--r-- | src/script/api/qscriptengine.cpp | 8 | ||||
-rw-r--r-- | src/script/api/qscriptvalue.cpp | 13 |
11 files changed, 53 insertions, 19 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index 45608c5..7c9ea04 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -8,4 +8,4 @@ The commit imported was from the and has the sha1 checksum - e3dc4ef2b801d91e115c54f833fa7766d392ceda + 14feb62c96ffe2c37e3e2fdac4e370fdbc76ef62 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index a2bd5c3..b7e46c7 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,16 @@ +2010-04-09 David Leong <david.leong@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Symbian apps crash on exit due to a bad qObject_cast. + + https://bugs.webkit.org/show_bug.cgi?id=37303 + + Added check for NULL to avoid the crash. + + * plugins/symbian/PluginViewSymbian.cpp: + (WebCore::PluginView::platformDestroy): + 2009-11-15 Dave Tapuska <dtapuska@rim.com> Reviewed by George Staikos. diff --git a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp index 86f5f6c..0cce1fd 100644 --- a/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/symbian/PluginViewSymbian.cpp @@ -453,7 +453,7 @@ bool PluginView::platformStart() void PluginView::platformDestroy() { QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient(); - if (QGraphicsWebView *webView = qobject_cast<QGraphicsWebView*>(client->pluginParent())) + if (client && qobject_cast<QGraphicsWebView*>(client->pluginParent())) delete static_cast<PluginContainerSymbian*>(platformPluginWidget())->proxy(); else delete platformPluginWidget(); diff --git a/src/gui/graphicsview/qgraphicsproxywidget.cpp b/src/gui/graphicsview/qgraphicsproxywidget.cpp index 483eb62..2132526 100644 --- a/src/gui/graphicsview/qgraphicsproxywidget.cpp +++ b/src/gui/graphicsview/qgraphicsproxywidget.cpp @@ -1435,7 +1435,7 @@ void QGraphicsProxyWidget::paint(QPainter *painter, const QStyleOptionGraphicsIt return; // Filter out repaints on the window frame. - const QRect exposedWidgetRect = (option->exposedRect & rect()).toRect(); + const QRect exposedWidgetRect = (option->exposedRect & rect()).toAlignedRect(); if (exposedWidgetRect.isEmpty()) return; diff --git a/src/gui/graphicsview/qgraphicswidget.cpp b/src/gui/graphicsview/qgraphicswidget.cpp index 4c5cffa..8b80bc8 100644 --- a/src/gui/graphicsview/qgraphicswidget.cpp +++ b/src/gui/graphicsview/qgraphicswidget.cpp @@ -1067,13 +1067,13 @@ QVariant QGraphicsWidget::itemChange(GraphicsItemChange change, const QVariant & QApplication::sendEvent(this, &event); break; } - case ItemCursorChange: { + case ItemCursorHasChanged: { // Deliver CursorChange. QEvent event(QEvent::CursorChange); QApplication::sendEvent(this, &event); break; } - case ItemToolTipChange: { + case ItemToolTipHasChanged: { // Deliver ToolTipChange. QEvent event(QEvent::ToolTipChange); QApplication::sendEvent(this, &event); diff --git a/src/gui/image/qimagewriter.cpp b/src/gui/image/qimagewriter.cpp index a5f7b31..503a1b2 100644 --- a/src/gui/image/qimagewriter.cpp +++ b/src/gui/image/qimagewriter.cpp @@ -197,6 +197,7 @@ static QImageIOHandler *createWriteHandlerHelper(QIODevice *device, for (int i = 0; i < keys.size(); ++i) { QImageIOPlugin *plugin = qobject_cast<QImageIOPlugin *>(l->instance(keys.at(i))); if (plugin && (plugin->capabilities(device, testFormat) & QImageIOPlugin::CanWrite)) { + delete handler; handler = plugin->create(device, testFormat); break; } diff --git a/src/gui/itemviews/qtableview.cpp b/src/gui/itemviews/qtableview.cpp index c824a8a..c4d1317 100644 --- a/src/gui/itemviews/qtableview.cpp +++ b/src/gui/itemviews/qtableview.cpp @@ -114,15 +114,14 @@ void QSpanCollection::updateSpan(QSpanCollection::Span *span, int old_height) } } else if (old_height > span->height()) { //remove the span from all the subspans lists that intersect the columns not covered anymore - Index::iterator it_y = index.lowerBound(-span->bottom()); - if (it_y == index.end()) - it_y = index.find(-span->top()); // This is the only span remaining and we are deleting it. + Index::iterator it_y = index.lowerBound(-qMax(span->bottom(), span->top())); //qMax usefull if height is 0 Q_ASSERT(it_y != index.end()); //it_y must exist since the span is in the list while (-it_y.key() <= span->top() + old_height -1) { if (-it_y.key() > span->bottom()) { - (*it_y).remove(-span->left()); + int removed = (*it_y).remove(-span->left()); + Q_ASSERT(removed == 1); Q_UNUSED(removed); if (it_y->isEmpty()) { - it_y = index.erase(it_y) - 1; + it_y = index.erase(it_y); } } if(it_y == index.begin()) diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 2b8e097..828849d 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -184,7 +184,7 @@ void QGL2PaintEngineExPrivate::updateBrushTexture() QImage texImage = qt_imageForBrush(style, false); glActiveTexture(GL_TEXTURE0 + QT_BRUSH_TEXTURE_UNIT); - ctx->d_func()->bindTexture(texImage, GL_TEXTURE_2D, GL_RGBA, true, QGLContext::InternalBindOption); + ctx->d_func()->bindTexture(texImage, GL_TEXTURE_2D, GL_RGBA, QGLContext::InternalBindOption); updateTextureFilter(GL_TEXTURE_2D, GL_REPEAT, q->state()->renderHints & QPainter::SmoothPixmapTransform); } else if (style >= Qt::LinearGradientPattern && style <= Qt::ConicalGradientPattern) { diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp index 5229d3f..eaa3d57 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp @@ -144,11 +144,17 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen) m_cos_theta = qFastCos(Q_PI / m_roundness); const qreal *endPts = pts + (count<<1); - const qreal *startPts; + const qreal *startPts = 0; Qt::PenCapStyle cap = m_cap_style; if (!types) { + // skip duplicate points + while((pts + 2) < endPts && pts[0] == pts[2] && pts[1] == pts[3]) + pts += 2; + if ((pts + 2) == endPts) + return; + startPts = pts; bool endsAtStart = startPts[0] == *(endPts-2) && startPts[1] == *(endPts-1); @@ -161,15 +167,17 @@ void QTriangulatingStroker::process(const QVectorPath &path, const QPen &pen) lineTo(pts); pts += 2; while (pts < endPts) { - join(pts); - lineTo(pts); + if (m_cx != pts[0] || m_cy != pts[1]) { + join(pts); + lineTo(pts); + } pts += 2; } endCapOrJoinClosed(startPts, pts-2, path.hasImplicitClose(), endsAtStart); } else { - bool endsAtStart; + bool endsAtStart = false; while (pts < endPts) { switch (*types) { case QPainterPath::MoveToElement: { diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index d6d1367..2422108 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -1007,11 +1007,15 @@ void QScriptEnginePrivate::setGlobalObject(JSC::JSObject *object) if (object == globalObject()) return; QScript::GlobalObject *glob = static_cast<QScript::GlobalObject*>(originalGlobalObject()); - if (object == originalGlobalObjectProxy) + if (object == originalGlobalObjectProxy) { glob->customGlobalObject = 0; - else { + // Sync the internal prototype, since JSObject::prototype() is not virtual. + glob->setPrototype(originalGlobalObjectProxy->prototype()); + } else { Q_ASSERT(object != originalGlobalObject()); glob->customGlobalObject = object; + // Sync the internal prototype, since JSObject::prototype() is not virtual. + glob->setPrototype(object->prototype()); } } diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp index 8cf01e7..79d5dcb 100644 --- a/src/script/api/qscriptvalue.cpp +++ b/src/script/api/qscriptvalue.cpp @@ -792,19 +792,28 @@ void QScriptValue::setPrototype(const QScriptValue &prototype) "a different engine"); return; } + JSC::JSObject *thisObject = JSC::asObject(d->jscValue); JSC::JSValue other = d->engine->scriptValueToJSCValue(prototype); // check for cycle JSC::JSValue nextPrototypeValue = other; while (nextPrototypeValue && nextPrototypeValue.isObject()) { JSC::JSObject *nextPrototype = JSC::asObject(nextPrototypeValue); - if (nextPrototype == JSC::asObject(d->jscValue)) { + if (nextPrototype == thisObject) { qWarning("QScriptValue::setPrototype() failed: cyclic prototype value"); return; } nextPrototypeValue = nextPrototype->prototype(); } - JSC::asObject(d->jscValue)->setPrototype(other); + + thisObject->setPrototype(other); + + // Sync the internal Global Object prototype if appropriate. + if (((thisObject == d->engine->originalGlobalObjectProxy) + && !d->engine->customGlobalObject()) + || (thisObject == d->engine->customGlobalObject())) { + d->engine->originalGlobalObject()->setPrototype(other); + } } /*! |