diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-08-26 13:58:58 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2021-08-26 16:38:18 +0000 |
commit | 491bd18d1fbc99d695ef5ca9f6e357de0fb32d4a (patch) | |
tree | 7593b3796bc20a9ed9a8cd4c60870dd6d865f312 /src/plugins/qmlprofiler | |
parent | 30827fe4016cbbc62d4eb0291d4af7c5dc54d007 (diff) |
Update scenegraph API check in isUsable
Do not test for OpenGL-through-QRhi, but rather for
anything-through-QRhi. The implementation of the profiler
views is not tied to OpenGL anymore. That said, QQuickWidget
implies using OpenGL as of now, so in practice we will always
have OpenGL at best, but update the tests now to be better
prepared for the future.
Change-Id: Ic43eac1c5cf0e2ce2ef35cdd8a29b475884a5af8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Diffstat (limited to 'src/plugins/qmlprofiler')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertraceview.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp index 3ceae1d712b..4e40644c6f2 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp @@ -296,8 +296,12 @@ void QmlProfilerTraceView::showContextMenu(QPoint position) bool QmlProfilerTraceView::isUsable() const { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) return d->m_mainView->quickWindow()->rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL; +#else + return QSGRendererInterface::isApiRhiBased(d->m_mainView->quickWindow()->rendererInterface()->graphicsApi()); +#endif } bool QmlProfilerTraceView::isSuspended() const |