Explorar o código

Guard raster SG backend by version

Liz Carr %!s(int64=8) %!d(string=hai) anos
pai
achega
56101ea8ce
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/main.cpp

+ 4 - 0
src/main.cpp

@@ -62,7 +62,11 @@ int main(int argc, char *argv[])
     QSettings settings;
 
     if (settings.value("raster", false).toBool()) {
+#if QT_VERSION < QT_VERSION_CHECK(5, 8, 0)
+        qDebug() << "Trying to use the SG software backend prior to Qt 5.8";
+#else
         QQuickWindow::setSceneGraphBackend(QSGRendererInterface::Software);
+#endif
     } else {
         if (settings.value("force32bpp", true).toBool()) {
             QSurfaceFormat format = QSurfaceFormat::defaultFormat();