diff options
author | Grigorii Zimin <gzimin@luxoft.com> | 2020-03-20 14:47:40 +0300 |
---|---|---|
committer | Grigorii Zimin <gzimin@luxoft.com> | 2020-03-30 08:03:46 +0000 |
commit | 920d9f9f290a3915518da05bc5d4b9ee1de904ad (patch) | |
tree | 00dcdffb5c9cda34bd568f158780d684ee560e53 /plugins/systeminfo/systeminfo.cpp | |
parent | 4827a3b617b20658f61a6886d548902ffaaeae8c (diff) |
[sysinfo] introduce another check opengl property
Task-number: AUTOSUITE-1405
Change-Id: I605cf05ad03b82c0b1e2b0e8bc7551b6093ff634
Reviewed-by: Egor Nemtsev <enemtsev@luxoft.com>
Diffstat (limited to 'plugins/systeminfo/systeminfo.cpp')
-rw-r--r-- | plugins/systeminfo/systeminfo.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/systeminfo/systeminfo.cpp b/plugins/systeminfo/systeminfo.cpp index 919409d7..d153259c 100644 --- a/plugins/systeminfo/systeminfo.cpp +++ b/plugins/systeminfo/systeminfo.cpp @@ -150,6 +150,7 @@ bool SystemInfo::allow3dStudioPresentations() { #ifndef QT_NO_OPENGL QOpenGLContext *globalShareContext = QOpenGLContext::globalShareContext(); + if (globalShareContext && globalShareContext->isValid()) { return (globalShareContext->isOpenGLES() && globalShareContext->format().version() >= qMakePair(3,0)) @@ -161,6 +162,16 @@ bool SystemInfo::allow3dStudioPresentations() return false; } +bool SystemInfo::allowOpenGLContent() +{ +#ifndef QT_NO_OPENGL + QOpenGLContext *globalShareContext = QOpenGLContext::globalShareContext(); + return globalShareContext && globalShareContext->isValid(); +#endif + + return false; +} + void SystemInfo::timerEvent(QTimerEvent *event) { Q_UNUSED(event); |