Merge remote-tracking branch 'origin/3.5'

Change-Id: Icef35a3d74c03c8a26e4794734801cd107cd9e04
This commit is contained in:
Eike Ziller
2015-09-28 09:43:31 +02:00
4 changed files with 20 additions and 4 deletions

View File

@@ -61,6 +61,7 @@
#include <qplugin.h> #include <qplugin.h>
#include <QDebug> #include <QDebug>
#include <QProcessEnvironment> #include <QProcessEnvironment>
#include <QOpenGLContext>
namespace QmlDesigner { namespace QmlDesigner {
@@ -126,8 +127,10 @@ QmlDesignerPlugin::~QmlDesignerPlugin()
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage/* = 0*/) // =0; bool QmlDesignerPlugin::initialize(const QStringList & /*arguments*/, QString *errorMessage/* = 0*/) // =0;
{ {
if (errorMessage) if (!QOpenGLContext().create()) {
errorMessage->clear(); *errorMessage = tr("Cannot create OpenGL context.");
return false;
}
data = new QmlDesignerPluginData; data = new QmlDesignerPluginData;

View File

@@ -37,6 +37,7 @@
#include <analyzerbase/analyzermanager.h> #include <analyzerbase/analyzermanager.h>
#include <extensionsystem/pluginmanager.h> #include <extensionsystem/pluginmanager.h>
#include <QOpenGLContext>
#include <QtPlugin> #include <QtPlugin>
using namespace Analyzer; using namespace Analyzer;
@@ -52,7 +53,11 @@ QmlProfilerPlugin *QmlProfilerPlugin::instance = 0;
bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString) bool QmlProfilerPlugin::initialize(const QStringList &arguments, QString *errorString)
{ {
Q_UNUSED(arguments) Q_UNUSED(arguments)
Q_UNUSED(errorString)
if (!QOpenGLContext().create()) {
*errorString = tr("Cannot create OpenGL context.");
return false;
}
auto tool = new QmlProfilerTool(this); auto tool = new QmlProfilerTool(this);
auto widgetCreator = [tool] { return tool->createWidgets(); }; auto widgetCreator = [tool] { return tool->createWidgets(); };

View File

@@ -659,6 +659,8 @@ QList<Abi> BaseQtVersion::qtAbis() const
bool BaseQtVersion::equals(BaseQtVersion *other) bool BaseQtVersion::equals(BaseQtVersion *other)
{ {
if (m_qmakeCommand != other->m_qmakeCommand)
return false;
if (type() != other->type()) if (type() != other->type())
return false; return false;
if (uniqueId() != other->uniqueId()) if (uniqueId() != other->uniqueId())

View File

@@ -51,6 +51,7 @@
#include <QMessageBox> #include <QMessageBox>
#include <QDir> #include <QDir>
#include <QOpenGLContext>
#include <QQmlPropertyMap> #include <QQmlPropertyMap>
#ifdef USE_QUICK_WIDGET #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; m_welcomeMode = new WelcomeMode;
addAutoReleasedObject(m_welcomeMode); addAutoReleasedObject(m_welcomeMode);