From f2fcac1929a178eaa6ac2d8514d9138e3bbe113f Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 3 Jul 2012 14:10:20 +0200 Subject: Compile without RTTI support We need to be able to compile without RTTI support. Fortunately QPaintEngine has built-in type info. No RTTI support is the default configuration on Windows with MSVC2010, so this is required to fix the build there. Change-Id: I89b1ed4879fd0e8e0d61ef12d77f6961fd0b07e5 Reviewed-by: Thiago Macieira Reviewed-by: Yunqiao Yin --- src/quick/designer/designersupport.cpp | 2 ++ src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src/quick') diff --git a/src/quick/designer/designersupport.cpp b/src/quick/designer/designersupport.cpp index d389190642..006843a097 100644 --- a/src/quick/designer/designersupport.cpp +++ b/src/quick/designer/designersupport.cpp @@ -199,7 +199,9 @@ bool isValidAnchorName(const QString &name) bool DesignerSupport::isAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem) { +#ifndef QT_NO_DYNAMIC_CAST Q_ASSERT(dynamic_cast(QQuickItemPrivate::get(fromItem))); +#endif QQuickItemPrivate *fromItemPrivate = static_cast(QQuickItemPrivate::get(fromItem)); QQuickAnchors *anchors = fromItemPrivate->anchors(); return anchors->fill() == toItem diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp index d231609151..196981d971 100644 --- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp +++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp @@ -465,8 +465,10 @@ void QQuickContext2DCommandBuffer::replay(QPainter* p, QQuickContext2D::State& s sr.setTop(srBottom); tex->bind(); - QOpenGL2PaintEngineEx *engine = dynamic_cast(p->paintEngine()); - engine->drawTexture(dr, tex->textureId(), tex->textureSize(), sr); + if (p->paintEngine()->type() == QPaintEngine::OpenGL2) { + QOpenGL2PaintEngineEx *engine = static_cast(p->paintEngine()); + engine->drawTexture(dr, tex->textureId(), tex->textureSize(), sr); + } } } break; -- cgit v1.2.3