diff options
author | Ulf Hermann <[email protected]> | 2016-12-14 13:40:23 +0100 |
---|---|---|
committer | Ulf Hermann <[email protected]> | 2016-12-15 10:26:41 +0000 |
commit | bba13048176014cd6ff5b66cab388ef677d35aaf (patch) | |
tree | 9bf745ad9e185897f6204c0160718f6417010c4b /src/plugins/qmlprofiler/qmlprofilertraceview.cpp | |
parent | 02dd37d30a73fee1afffb0fd3dd7c183a5700d03 (diff) |
QmlProfiler: Add functions to check if timeline view is usable
We can only use the timeline view if the scene graph is rendered via
OpenGL. This can be checked from Qt 5.8 on by querying the
RendererInterface. Earlier versions of Qt can only render with OpenGL.
Change-Id: I3f77e2a4dee1f9a1df5d6b1946cf7eb05a1bad01
Task-number: QTCREATORBUG-16503
Reviewed-by: Eike Ziller <[email protected]>
Diffstat (limited to 'src/plugins/qmlprofiler/qmlprofilertraceview.cpp')
-rw-r--r-- | src/plugins/qmlprofiler/qmlprofilertraceview.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp index 375181744b1..f8d9734ae14 100644 --- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp +++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp @@ -293,6 +293,16 @@ void QmlProfilerTraceView::showContextMenu(QPoint position) } } +bool QmlProfilerTraceView::isUsable() const +{ +#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) + return d->m_mainView->quickWindow()->rendererInterface()->graphicsApi() + == QSGRendererInterface::OpenGL; +#else + return true; +#endif +} + void QmlProfilerTraceView::changeEvent(QEvent *e) { if (e->type() == QEvent::EnabledChange) { |