Commit 842578f3 authored by Eike Ziller's avatar Eike Ziller

Merge remote-tracking branch 'origin/3.5'

Change-Id: Icef35a3d74c03c8a26e4794734801cd107cd9e04
parents d47e790d b534b2b0
......@@ -61,6 +61,7 @@
#include <qplugin.h>
#include <QDebug>
#include <QProcessEnvironment>
#include <QOpenGLContext>
namespace QmlDesigner {
......@@ -126,8 +127,10 @@ QmlDesignerPlugin::~QmlDesignerPlugin()
////////////////////////////////////////////////////
bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage/* = 0*/) // =0;
{
if (errorMessage)
errorMessage->clear();
if (!QOpenGLContext().create()) {
*errorMessage = tr("Cannot create OpenGL context.");
return false;
}
data = new QmlDesignerPluginData;
......
......@@ -37,6 +37,7 @@
#include <analyzerbase/analyzermanager.h>
#include <extensionsystem/pluginmanager.h>
#include <QOpenGLContext>
#include <QtPlugin>
using namespace Analyzer;
......@@ -52,7 +53,11 @@ QmlProfilerPlugin *QmlProfilerPlugin::instance = 0;
bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString)
{
Q_UNUSED(arguments)
Q_UNUSED(errorString)
if (!QOpenGLContext().create()) {
*errorString = tr("Cannot create OpenGL context.");
return false;
}
auto tool = new QmlProfilerTool(this);
auto widgetCreator = [tool] { return tool->createWidgets(); };
......
......@@ -659,6 +659,8 @@ QList<Abi> BaseQtVersion::qtAbis() const
bool BaseQtVersion::equals(BaseQtVersion *other)
{
if (m_qmakeCommand != other->m_qmakeCommand)
return false;
if (type() != other->type())
return false;
if (uniqueId() != other->uniqueId())
......
......@@ -51,6 +51,7 @@
#include <QMessageBox>
#include <QDir>
#include <QOpenGLContext>
#include <QQmlPropertyMap>
#ifdef USE_QUICK_WIDGET
......@@ -286,8 +287,13 @@ WelcomePlugin::WelcomePlugin()
{
}
bool WelcomePlugin::initialize(const QStringList & /* arguments */, QString * /* errorMessage */)
bool WelcomePlugin::initialize(const QStringList & /* arguments */, QString *errorMessage)
{
if (!QOpenGLContext().create()) {
*errorMessage = tr("Cannot create OpenGL context.");
return false;
}
m_welcomeMode = new WelcomeMode;
addAutoReleasedObject(m_welcomeMode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment