forked from qt-creator/qt-creator
Centralize checking for OpenGL
Change-Id: Ic2212c8519f4c771ba3e3c61dd32073b93db7ed9 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -36,8 +36,8 @@
|
||||
|
||||
#include <analyzerbase/analyzermanager.h>
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
|
||||
#include <QOpenGLContext>
|
||||
#include <QtPlugin>
|
||||
|
||||
using namespace Analyzer;
|
||||
@@ -54,10 +54,8 @@ bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorS
|
||||
{
|
||||
Q_UNUSED(arguments)
|
||||
|
||||
if (!QOpenGLContext().create()) {
|
||||
*errorString = tr("Cannot create OpenGL context.");
|
||||
if (!Utils::HostOsInfo::canCreateOpenGLContext(errorString))
|
||||
return false;
|
||||
}
|
||||
|
||||
auto tool = new QmlProfilerTool(this);
|
||||
auto widgetCreator = [tool] { return tool->createWidgets(); };
|
||||
|
||||
Reference in New Issue
Block a user