QmlDesigner: Port 3D edit view to Qt6

Task-number: QDS-2899
Change-Id: Iedbe5e8561e5ab71ef32922e69da43cd3cc57e90
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2020-10-08 10:50:15 +03:00
parent 49a8266d58
commit 6b8d8e414a
35 changed files with 742 additions and 182 deletions
@@ -31,8 +31,11 @@
#include <iostream>
#include <qt5nodeinstanceclientproxy.h>
#include <stdio.h>
#include <stdlib.h>
#include "iconrenderer/iconrenderer.h"
#include <qt5nodeinstanceclientproxy.h>
#include <QQmlComponent>
#include <QQmlEngine>
@@ -46,6 +49,54 @@
#endif
namespace {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
void myMessageOutput(QtMsgType type, const QMessageLogContext &context, const QString &msg)
{
QByteArray localMsg = msg.toLocal8Bit();
switch (type) {
case QtDebugMsg:
fprintf(stderr,
"Debug: %s (%s:%u, %s)\n",
localMsg.constData(),
context.file,
context.line,
context.function);
break;
case QtInfoMsg:
fprintf(stderr,
"Info: %s (%s:%u, %s)\n",
localMsg.constData(),
context.file,
context.line,
context.function);
break;
case QtWarningMsg:
fprintf(stderr,
"Warning: %s (%s:%u, %s)\n",
localMsg.constData(),
context.file,
context.line,
context.function);
break;
case QtCriticalMsg:
fprintf(stderr,
"Critical: %s (%s:%u, %s)\n",
localMsg.constData(),
context.file,
context.line,
context.function);
break;
case QtFatalMsg:
fprintf(stderr,
"Fatal: %s (%s:%u, %s)\n",
localMsg.constData(),
context.file,
context.line,
context.function);
abort();
}
}
#endif
int internalMain(QGuiApplication *application)
{
@@ -144,6 +195,9 @@ int internalMain(QGuiApplication *application)
int main(int argc, char *argv[])
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
qInstallMessageHandler(myMessageOutput);
#endif
// Since we always render text into an FBO, we need to globally disable
// subpixel antialiasing and instead use gray.
qputenv("QSG_DISTANCEFIELD_ANTIALIASING", "gray");