sceneGraphBackend() is new in Qt 5.9

This commit is contained in:
Kai Uwe Broulik 2017-09-29 10:48:37 +02:00
parent bb6b170516
commit c1e432065f
2 changed files with 4 additions and 0 deletions

View File

@ -465,9 +465,11 @@ void FrameSvgItem::doUpdate()
//software rendering (at time of writing Qt5.10) doesn't seem to like our tiling/stretching in the 9-tiles.
//also when using QPainter it's arguably faster to create and cache pixmaps of the whole frame, which is what the slow path does
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
if (QQuickWindow::sceneGraphBackend() == QLatin1String("software")) {
m_fastPath = false;
}
#endif
m_textureChanged = true;
update();

View File

@ -621,9 +621,11 @@ void IconItem::loadPixmap()
//don't animate initial setting
bool animated = (m_animated || m_allowNextAnimation) && !m_oldIconPixmap.isNull() && !m_sizeChanged && !m_blockNextAnimation;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 9, 0))
if (QQuickWindow::sceneGraphBackend() == QLatin1String("software")) {
animated = false;
}
#endif
if (animated) {
m_animValue = 0.0;