aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-06-10 07:46:00 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-06-10 12:51:53 +0200
commitabaf9bded38ff6aac562718366590ed7c1106ad6 (patch)
treee6714631dbc5ddde9907dc388f680db1559541fe /tools
parent1ca74842e8427eb21d37697b3c130eed56b7091f (diff)
Remove openGLContextCreated signal
No reason to have this in the API in 6.0, and it's already not emitted at all in dev (because the direct OpenGL code path is now gone from the render loops) Some simple GL string printing has been removed from qml/qmlscene. This opt-in feature has not been useful in practice anyway since QSG_INFO=1 prints the same things. [ChangeLog][Qt Quick][QQuickWindow] The openGLContextCreated signal has been removed from QQuickWindow. Change-Id: Ifb647bbd1e828ebad2b775e8ce5c38723a0cda13 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tools')
-rw-r--r--tools/qml/main.cpp30
-rw-r--r--tools/qmlscene/main.cpp36
2 files changed, 1 insertions, 65 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index a38a3d599f..71bd104596 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -35,8 +35,6 @@
#include <QGuiApplication>
#include <QWindow>
#include <QFileOpenEvent>
-#include <QOpenGLContext>
-#include <QOpenGLFunctions>
#include <QSurfaceFormat>
#ifdef QT_WIDGETS_LIB
#include <QApplication>
@@ -258,10 +256,6 @@ public Q_SLOTS:
returnCode = retCode;
}
-#if defined(QT_GUI_LIB) && QT_CONFIG(opengl)
- void onOpenGlContextCreated(QOpenGLContext *context);
-#endif
-
private:
void contain(QObject *o, const QUrl &containPath);
void checkForWindow(QObject *o);
@@ -289,35 +283,13 @@ void LoadWatcher::contain(QObject *o, const QUrl &containPath)
void LoadWatcher::checkForWindow(QObject *o)
{
#if defined(QT_GUI_LIB) && QT_CONFIG(opengl)
- if (o->isWindowType() && o->inherits("QQuickWindow")) {
+ if (o->isWindowType() && o->inherits("QQuickWindow"))
haveWindow = true;
- if (verboseMode)
- connect(o, SIGNAL(openglContextCreated(QOpenGLContext*)),
- this, SLOT(onOpenGlContextCreated(QOpenGLContext*)));
- }
#else
Q_UNUSED(o)
#endif // QT_GUI_LIB && !QT_NO_OPENGL
}
-#if defined(QT_GUI_LIB) && QT_CONFIG(opengl)
-void LoadWatcher::onOpenGlContextCreated(QOpenGLContext *context)
-{
- context->makeCurrent(qobject_cast<QWindow *>(sender()));
- QOpenGLFunctions functions(context);
- QByteArray output = "Vendor : ";
- output += reinterpret_cast<const char *>(functions.glGetString(GL_VENDOR));
- output += "\nRenderer: ";
- output += reinterpret_cast<const char *>(functions.glGetString(GL_RENDERER));
- output += "\nVersion : ";
- output += reinterpret_cast<const char *>(functions.glGetString(GL_VERSION));
- output += "\nLanguage: ";
- output += reinterpret_cast<const char *>(functions.glGetString(GL_SHADING_LANGUAGE_VERSION));
- puts(output.constData());
- context->doneCurrent();
-}
-#endif // QT_GUI_LIB && !QT_NO_OPENGL
-
void quietMessageHandler(QtMsgType type, const QMessageLogContext &ctxt, const QString &msg)
{
Q_UNUSED(ctxt);
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index b0635a7e87..cc48fb7b0b 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -36,7 +36,6 @@
#include <QtCore/qregularexpression.h>
#include <QtGui/QGuiApplication>
-#include <QOpenGLFunctions>
#include <QtQml/qqml.h>
#include <QtQml/qqmlengine.h>
@@ -378,37 +377,6 @@ static void usage()
puts(" ");
exit(1);
}
-#if QT_CONFIG(opengl)
-// Listen on GL context creation of the QQuickWindow in order to print diagnostic output.
-class DiagnosticGlContextCreationListener : public QObject {
- Q_OBJECT
-public:
- explicit DiagnosticGlContextCreationListener(QQuickWindow *window) : QObject(window)
- {
- connect(window, &QQuickWindow::openglContextCreated,
- this, &DiagnosticGlContextCreationListener::onOpenGlContextCreated);
- }
-
-private slots:
- void onOpenGlContextCreated(QOpenGLContext *context)
- {
- context->makeCurrent(qobject_cast<QQuickWindow *>(parent()));
- QOpenGLFunctions functions(context);
- QByteArray output = "Vendor : ";
- output += reinterpret_cast<const char *>(functions.glGetString(GL_VENDOR));
- output += "\nRenderer: ";
- output += reinterpret_cast<const char *>(functions.glGetString(GL_RENDERER));
- output += "\nVersion : ";
- output += reinterpret_cast<const char *>(functions.glGetString(GL_VERSION));
- output += "\nLanguage: ";
- output += reinterpret_cast<const char *>(functions.glGetString(GL_SHADING_LANGUAGE_VERSION));
- puts(output.constData());
- context->doneCurrent();
- deleteLater();
- }
-
-};
-#endif
static void setWindowTitle(bool verbose, const QObject *topLevel, QWindow *window)
{
@@ -680,10 +648,6 @@ int main(int argc, char ** argv)
if (window) {
setWindowTitle(options.verbose, topLevel, window.data());
-#if QT_CONFIG(opengl)
- if (options.verbose)
- new DiagnosticGlContextCreationListener(window.data());
-#endif
if (options.transparent) {
window->setClearBeforeRendering(true);
window->setColor(QColor(Qt::transparent));