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 <thiago.macieira@intel.com>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
bool DesignerSupport::isAnchoredTo(QQuickItem *fromItem, QQuickItem *toItem)
{
+#ifndef QT_NO_DYNAMIC_CAST
Q_ASSERT(dynamic_cast<QQuickItemPrivate*>(QQuickItemPrivate::get(fromItem)));
+#endif
QQuickItemPrivate *fromItemPrivate = static_cast<QQuickItemPrivate*>(QQuickItemPrivate::get(fromItem));
QQuickAnchors *anchors = fromItemPrivate->anchors();
return anchors->fill() == toItem
sr.setTop(srBottom);
tex->bind();
- QOpenGL2PaintEngineEx *engine = dynamic_cast<QOpenGL2PaintEngineEx *>(p->paintEngine());
- engine->drawTexture(dr, tex->textureId(), tex->textureSize(), sr);
+ if (p->paintEngine()->type() == QPaintEngine::OpenGL2) {
+ QOpenGL2PaintEngineEx *engine = static_cast<QOpenGL2PaintEngineEx *>(p->paintEngine());
+ engine->drawTexture(dr, tex->textureId(), tex->textureSize(), sr);
+ }
}
}
break;