QmlDesigner: Use core profile for edit view

Change-Id: Ic62ec2cc54d9bf30fa41cccdb5b10e9b75c67290
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2019-10-10 15:59:31 +02:00
parent 1281774c6a
commit b6790e82a4

View File

@@ -74,7 +74,17 @@ static QVariant objectToVariant(QObject *object)
static QObject *createEditView3D(QQmlEngine *engine) static QObject *createEditView3D(QQmlEngine *engine)
{ {
QQmlComponent component(engine, QUrl("qrc:/qtquickplugin/mockfiles/EditView3D.qml")); QQmlComponent component(engine, QUrl("qrc:/qtquickplugin/mockfiles/EditView3D.qml"));
return component.create();
QWindow *window = qobject_cast<QWindow *>(component.create());
//For macOS we have to use the 4.1 core profile
QSurfaceFormat surfaceFormat = window->requestedFormat();
surfaceFormat.setVersion(4, 1);
surfaceFormat.setProfile(QSurfaceFormat::CoreProfile);
window->setFormat(surfaceFormat);
return window;
} }
Qt5InformationNodeInstanceServer::Qt5InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) : Qt5InformationNodeInstanceServer::Qt5InformationNodeInstanceServer(NodeInstanceClientInterface *nodeInstanceClient) :