2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2014-02-26 14:21:18 +00:00
|
|
|
|
|
|
|
#include "widget.h"
|
|
|
|
#include "renderwindow.h"
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
#include <QComboBox>
|
|
|
|
#include <QGroupBox>
|
|
|
|
#include <QRadioButton>
|
|
|
|
#include <QCheckBox>
|
|
|
|
#include <QHBoxLayout>
|
|
|
|
#include <QLabel>
|
2022-02-08 14:55:11 +00:00
|
|
|
#include <QList>
|
|
|
|
#include <QByteArray>
|
2014-02-26 14:21:18 +00:00
|
|
|
#include <QPushButton>
|
|
|
|
#include <QTextEdit>
|
|
|
|
#include <QSplitter>
|
2016-04-20 07:27:18 +00:00
|
|
|
#include <QGuiApplication>
|
2014-02-26 14:21:18 +00:00
|
|
|
#include <QSurfaceFormat>
|
|
|
|
#include <QOpenGLContext>
|
|
|
|
#include <QOpenGLFunctions>
|
|
|
|
#include <QDebug>
|
2016-04-20 07:27:18 +00:00
|
|
|
#include <QTextStream>
|
2014-02-26 14:21:18 +00:00
|
|
|
|
|
|
|
struct Version {
|
|
|
|
const char *str;
|
|
|
|
int major;
|
|
|
|
int minor;
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct Version versions[] = {
|
|
|
|
{ "1.0", 1, 0 },
|
|
|
|
{ "1.1", 1, 1 },
|
|
|
|
{ "1.2", 1, 2 },
|
|
|
|
{ "1.3", 1, 3 },
|
|
|
|
{ "1.4", 1, 4 },
|
|
|
|
{ "1.5", 1, 5 },
|
|
|
|
{ "2.0", 2, 0 },
|
|
|
|
{ "2.1", 2, 1 },
|
|
|
|
{ "3.0", 3, 0 },
|
|
|
|
{ "3.1", 3, 1 },
|
|
|
|
{ "3.2", 3, 2 },
|
|
|
|
{ "3.3", 3, 3 },
|
|
|
|
{ "4.0", 4, 0 },
|
|
|
|
{ "4.1", 4, 1 },
|
|
|
|
{ "4.2", 4, 2 },
|
|
|
|
{ "4.3", 4, 3 },
|
2015-03-19 20:03:39 +00:00
|
|
|
{ "4.4", 4, 4 },
|
|
|
|
{ "4.5", 4, 5 }
|
2014-02-26 14:21:18 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Profile {
|
|
|
|
const char *str;
|
|
|
|
QSurfaceFormat::OpenGLContextProfile profile;
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct Profile profiles[] = {
|
|
|
|
{ "none", QSurfaceFormat::NoProfile },
|
|
|
|
{ "core", QSurfaceFormat::CoreProfile },
|
|
|
|
{ "compatibility", QSurfaceFormat::CompatibilityProfile }
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Option {
|
|
|
|
const char *str;
|
|
|
|
QSurfaceFormat::FormatOption option;
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct Option options[] = {
|
|
|
|
{ "deprecated functions (not forward compatible)", QSurfaceFormat::DeprecatedFunctions },
|
|
|
|
{ "debug context", QSurfaceFormat::DebugContext },
|
|
|
|
{ "stereo buffers", QSurfaceFormat::StereoBuffers },
|
|
|
|
// This is not a QSurfaceFormat option but is helpful to determine if the driver
|
|
|
|
// allows compiling old-style shaders with core profile.
|
|
|
|
{ "force version 110 shaders", QSurfaceFormat::FormatOption(0) }
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Renderable {
|
|
|
|
const char *str;
|
|
|
|
QSurfaceFormat::RenderableType renderable;
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct Renderable renderables[] = {
|
|
|
|
{ "default", QSurfaceFormat::DefaultRenderableType },
|
2022-12-07 13:58:57 +00:00
|
|
|
#ifndef Q_OS_ANDROID
|
2014-02-26 14:21:18 +00:00
|
|
|
{ "OpenGL", QSurfaceFormat::OpenGL },
|
2022-12-07 13:58:57 +00:00
|
|
|
#endif
|
2014-02-26 14:21:18 +00:00
|
|
|
{ "OpenGL ES", QSurfaceFormat::OpenGLES }
|
|
|
|
};
|
|
|
|
|
|
|
|
void Widget::addVersions(QLayout *layout)
|
|
|
|
{
|
|
|
|
QHBoxLayout *hbox = new QHBoxLayout;
|
|
|
|
hbox->setSpacing(20);
|
|
|
|
QLabel *label = new QLabel(tr("Context &version: "));
|
|
|
|
hbox->addWidget(label);
|
|
|
|
m_version = new QComboBox;
|
|
|
|
m_version->setMinimumWidth(60);
|
|
|
|
label->setBuddy(m_version);
|
|
|
|
hbox->addWidget(m_version);
|
|
|
|
for (size_t i = 0; i < sizeof(versions) / sizeof(Version); ++i) {
|
|
|
|
m_version->addItem(QString::fromLatin1(versions[i].str));
|
|
|
|
if (versions[i].major == 2 && versions[i].minor == 0)
|
|
|
|
m_version->setCurrentIndex(m_version->count() - 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
QPushButton *btn = new QPushButton(tr("Create context"));
|
|
|
|
connect(btn, &QPushButton::clicked, this, &Widget::start);
|
|
|
|
btn->setMinimumSize(120, 40);
|
|
|
|
hbox->addWidget(btn);
|
|
|
|
|
|
|
|
layout->addItem(hbox);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Widget::addProfiles(QLayout *layout)
|
|
|
|
{
|
|
|
|
QGroupBox *groupBox = new QGroupBox(tr("Profile"));
|
|
|
|
QVBoxLayout *vbox = new QVBoxLayout;
|
|
|
|
for (size_t i = 0; i < sizeof(profiles) / sizeof(Profile); ++i)
|
|
|
|
vbox->addWidget(new QRadioButton(QString::fromLatin1(profiles[i].str)));
|
|
|
|
static_cast<QRadioButton *>(vbox->itemAt(0)->widget())->setChecked(true);
|
|
|
|
groupBox->setLayout(vbox);
|
|
|
|
layout->addWidget(groupBox);
|
|
|
|
m_profiles = vbox;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Widget::addOptions(QLayout *layout)
|
|
|
|
{
|
|
|
|
QGroupBox *groupBox = new QGroupBox(tr("Options"));
|
|
|
|
QVBoxLayout *vbox = new QVBoxLayout;
|
|
|
|
for (size_t i = 0; i < sizeof(options) / sizeof(Option); ++i)
|
|
|
|
vbox->addWidget(new QCheckBox(QString::fromLatin1(options[i].str)));
|
|
|
|
groupBox->setLayout(vbox);
|
|
|
|
layout->addWidget(groupBox);
|
|
|
|
m_options = vbox;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Widget::addRenderableTypes(QLayout *layout)
|
|
|
|
{
|
|
|
|
QGroupBox *groupBox = new QGroupBox(tr("Renderable type"));
|
|
|
|
QVBoxLayout *vbox = new QVBoxLayout;
|
|
|
|
for (size_t i = 0; i < sizeof(renderables) / sizeof(Renderable); ++i)
|
|
|
|
vbox->addWidget(new QRadioButton(QString::fromLatin1(renderables[i].str)));
|
|
|
|
static_cast<QRadioButton *>(vbox->itemAt(0)->widget())->setChecked(true);
|
|
|
|
groupBox->setLayout(vbox);
|
|
|
|
layout->addWidget(groupBox);
|
|
|
|
m_renderables = vbox;
|
|
|
|
}
|
|
|
|
|
|
|
|
void Widget::addRenderWindow()
|
|
|
|
{
|
|
|
|
m_renderWindowLayout->addWidget(m_renderWindowContainer);
|
|
|
|
}
|
|
|
|
|
|
|
|
static QWidget *widgetWithLayout(QLayout *layout)
|
|
|
|
{
|
|
|
|
QWidget *w = new QWidget;
|
|
|
|
w->setLayout(layout);
|
|
|
|
return w;
|
|
|
|
}
|
|
|
|
|
|
|
|
Widget::Widget(QWidget *parent)
|
|
|
|
: QWidget(parent)
|
|
|
|
{
|
|
|
|
QVBoxLayout *layout = new QVBoxLayout;
|
|
|
|
QSplitter *vsplit = new QSplitter(Qt::Vertical);
|
|
|
|
layout->addWidget(vsplit);
|
|
|
|
|
|
|
|
QSplitter *hsplit = new QSplitter;
|
|
|
|
|
|
|
|
QVBoxLayout *settingsLayout = new QVBoxLayout;
|
|
|
|
addVersions(settingsLayout);
|
|
|
|
addProfiles(settingsLayout);
|
|
|
|
addOptions(settingsLayout);
|
|
|
|
addRenderableTypes(settingsLayout);
|
|
|
|
hsplit->addWidget(widgetWithLayout(settingsLayout));
|
|
|
|
|
|
|
|
QVBoxLayout *outputLayout = new QVBoxLayout;
|
|
|
|
m_output = new QTextEdit;
|
|
|
|
m_output->setReadOnly(true);
|
|
|
|
outputLayout->addWidget(m_output);
|
|
|
|
m_extensions = new QTextEdit;
|
|
|
|
m_extensions->setReadOnly(true);
|
|
|
|
outputLayout->addWidget(m_extensions);
|
|
|
|
hsplit->addWidget(widgetWithLayout(outputLayout));
|
|
|
|
|
|
|
|
hsplit->setStretchFactor(0, 4);
|
|
|
|
hsplit->setStretchFactor(1, 6);
|
|
|
|
vsplit->addWidget(hsplit);
|
|
|
|
|
|
|
|
m_renderWindowLayout = new QVBoxLayout;
|
|
|
|
vsplit->addWidget(widgetWithLayout(m_renderWindowLayout));
|
|
|
|
vsplit->setStretchFactor(1, 5);
|
|
|
|
|
|
|
|
m_renderWindowContainer = new QWidget;
|
|
|
|
addRenderWindow();
|
|
|
|
|
2016-04-20 07:27:18 +00:00
|
|
|
QString description;
|
|
|
|
QTextStream str(&description);
|
|
|
|
str << "Qt " << QT_VERSION_STR << ' ' << QGuiApplication::platformName();
|
|
|
|
const char *openGlVariables[] =
|
|
|
|
{"QT_ANGLE_PLATFORM", "QT_OPENGL", "QT_OPENGL_BUGLIST", "QT_OPENGL_DLL"};
|
|
|
|
const size_t variableCount = sizeof(openGlVariables) / sizeof(openGlVariables[0]);
|
|
|
|
for (size_t v = 0; v < variableCount; ++v) {
|
|
|
|
if (qEnvironmentVariableIsSet(openGlVariables[v]))
|
|
|
|
str << ' ' << openGlVariables[v] << '=' << qgetenv(openGlVariables[v]);
|
|
|
|
}
|
|
|
|
if (QCoreApplication::testAttribute(Qt::AA_UseOpenGLES))
|
|
|
|
str << " Qt::AA_UseOpenGLES";
|
|
|
|
if (QCoreApplication::testAttribute(Qt::AA_UseSoftwareOpenGL))
|
|
|
|
str << " Qt::AA_UseSoftwareOpenGL";
|
|
|
|
if (QCoreApplication::testAttribute(Qt::AA_UseDesktopOpenGL))
|
2018-06-12 15:04:40 +00:00
|
|
|
str << " Qt::AA_UseDesktopOpenGL";
|
2016-04-20 07:27:18 +00:00
|
|
|
layout->addWidget(new QLabel(description));
|
|
|
|
|
2014-02-26 14:21:18 +00:00
|
|
|
setLayout(layout);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Widget::start()
|
|
|
|
{
|
|
|
|
QSurfaceFormat fmt;
|
|
|
|
|
|
|
|
int idx = m_version->currentIndex();
|
|
|
|
if (idx < 0)
|
|
|
|
return;
|
|
|
|
fmt.setVersion(versions[idx].major, versions[idx].minor);
|
|
|
|
|
|
|
|
for (size_t i = 0; i < sizeof(profiles) / sizeof(Profile); ++i)
|
|
|
|
if (static_cast<QRadioButton *>(m_profiles->itemAt(int(i))->widget())->isChecked()) {
|
|
|
|
fmt.setProfile(profiles[i].profile);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool forceGLSL110 = false;
|
|
|
|
for (size_t i = 0; i < sizeof(options) / sizeof(Option); ++i)
|
|
|
|
if (static_cast<QCheckBox *>(m_options->itemAt(int(i))->widget())->isChecked()) {
|
|
|
|
if (options[i].option)
|
|
|
|
fmt.setOption(options[i].option);
|
|
|
|
else if (i == 3)
|
|
|
|
forceGLSL110 = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (size_t i = 0; i < sizeof(renderables) / sizeof(Renderable); ++i)
|
|
|
|
if (static_cast<QRadioButton *>(m_renderables->itemAt(int(i))->widget())->isChecked()) {
|
|
|
|
fmt.setRenderableType(renderables[i].renderable);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The example rendering will need a depth buffer.
|
|
|
|
fmt.setDepthBufferSize(16);
|
|
|
|
|
|
|
|
m_output->clear();
|
|
|
|
m_extensions->clear();
|
|
|
|
qDebug() << "Requesting surface format" << fmt;
|
|
|
|
|
|
|
|
m_renderWindowLayout->removeWidget(m_renderWindowContainer);
|
|
|
|
delete m_renderWindowContainer;
|
|
|
|
|
|
|
|
RenderWindow *renderWindow = new RenderWindow(fmt);
|
|
|
|
if (!renderWindow->context()) {
|
|
|
|
m_output->append(tr("Failed to create context"));
|
|
|
|
delete renderWindow;
|
|
|
|
m_renderWindowContainer = new QWidget;
|
|
|
|
addRenderWindow();
|
|
|
|
return;
|
|
|
|
}
|
2014-03-07 11:49:44 +00:00
|
|
|
m_surface = renderWindow;
|
2014-02-26 14:21:18 +00:00
|
|
|
|
|
|
|
renderWindow->setForceGLSL110(forceGLSL110);
|
|
|
|
connect(renderWindow, &RenderWindow::ready, this, &Widget::renderWindowReady);
|
|
|
|
connect(renderWindow, &RenderWindow::error, this, &Widget::renderWindowError);
|
|
|
|
|
|
|
|
m_renderWindowContainer = QWidget::createWindowContainer(renderWindow);
|
|
|
|
addRenderWindow();
|
|
|
|
}
|
|
|
|
|
2014-03-07 11:49:44 +00:00
|
|
|
void Widget::printFormat(const QSurfaceFormat &format)
|
2014-02-26 14:21:18 +00:00
|
|
|
{
|
|
|
|
m_output->append(tr("OpenGL version: %1.%2").arg(format.majorVersion()).arg(format.minorVersion()));
|
|
|
|
|
|
|
|
for (size_t i = 0; i < sizeof(profiles) / sizeof(Profile); ++i)
|
|
|
|
if (profiles[i].profile == format.profile()) {
|
|
|
|
m_output->append(tr("Profile: %1").arg(QString::fromLatin1(profiles[i].str)));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString opts;
|
|
|
|
for (size_t i = 0; i < sizeof(options) / sizeof(Option); ++i)
|
|
|
|
if (format.testOption(options[i].option))
|
2015-10-13 07:06:58 +00:00
|
|
|
opts += QString::fromLatin1(options[i].str) + QLatin1Char(' ');
|
2014-02-26 14:21:18 +00:00
|
|
|
m_output->append(tr("Options: %1").arg(opts));
|
|
|
|
|
|
|
|
for (size_t i = 0; i < sizeof(renderables) / sizeof(Renderable); ++i)
|
|
|
|
if (renderables[i].renderable == format.renderableType()) {
|
|
|
|
m_output->append(tr("Renderable type: %1").arg(QString::fromLatin1(renderables[i].str)));
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2014-03-07 11:49:44 +00:00
|
|
|
m_output->append(tr("Depth buffer size: %1").arg(QString::number(format.depthBufferSize())));
|
|
|
|
m_output->append(tr("Stencil buffer size: %1").arg(QString::number(format.stencilBufferSize())));
|
|
|
|
m_output->append(tr("Samples: %1").arg(QString::number(format.samples())));
|
|
|
|
m_output->append(tr("Red buffer size: %1").arg(QString::number(format.redBufferSize())));
|
|
|
|
m_output->append(tr("Green buffer size: %1").arg(QString::number(format.greenBufferSize())));
|
|
|
|
m_output->append(tr("Blue buffer size: %1").arg(QString::number(format.blueBufferSize())));
|
|
|
|
m_output->append(tr("Alpha buffer size: %1").arg(QString::number(format.alphaBufferSize())));
|
|
|
|
m_output->append(tr("Swap interval: %1").arg(QString::number(format.swapInterval())));
|
|
|
|
}
|
|
|
|
|
|
|
|
void Widget::renderWindowReady()
|
|
|
|
{
|
|
|
|
QOpenGLContext *context = QOpenGLContext::currentContext();
|
|
|
|
Q_ASSERT(context);
|
|
|
|
|
2014-02-26 14:21:18 +00:00
|
|
|
QString vendor, renderer, version, glslVersion;
|
|
|
|
const GLubyte *p;
|
2014-03-03 13:47:27 +00:00
|
|
|
QOpenGLFunctions *f = context->functions();
|
|
|
|
if ((p = f->glGetString(GL_VENDOR)))
|
2014-02-26 14:21:18 +00:00
|
|
|
vendor = QString::fromLatin1(reinterpret_cast<const char *>(p));
|
2014-03-03 13:47:27 +00:00
|
|
|
if ((p = f->glGetString(GL_RENDERER)))
|
2014-02-26 14:21:18 +00:00
|
|
|
renderer = QString::fromLatin1(reinterpret_cast<const char *>(p));
|
2014-03-03 13:47:27 +00:00
|
|
|
if ((p = f->glGetString(GL_VERSION)))
|
2014-02-26 14:21:18 +00:00
|
|
|
version = QString::fromLatin1(reinterpret_cast<const char *>(p));
|
2014-03-03 13:47:27 +00:00
|
|
|
if ((p = f->glGetString(GL_SHADING_LANGUAGE_VERSION)))
|
2014-02-26 14:21:18 +00:00
|
|
|
glslVersion = QString::fromLatin1(reinterpret_cast<const char *>(p));
|
|
|
|
|
2014-03-07 11:49:44 +00:00
|
|
|
m_output->append(tr("*** Context information ***"));
|
|
|
|
m_output->append(tr("Vendor: %1").arg(vendor));
|
2014-02-26 14:21:18 +00:00
|
|
|
m_output->append(tr("Renderer: %1").arg(renderer));
|
|
|
|
m_output->append(tr("OpenGL version: %1").arg(version));
|
|
|
|
m_output->append(tr("GLSL version: %1").arg(glslVersion));
|
|
|
|
|
2014-03-07 11:49:44 +00:00
|
|
|
m_output->append(tr("\n*** QSurfaceFormat from context ***"));
|
|
|
|
printFormat(context->format());
|
|
|
|
|
|
|
|
m_output->append(tr("\n*** QSurfaceFormat from window surface ***"));
|
|
|
|
printFormat(m_surface->format());
|
2014-02-26 14:21:18 +00:00
|
|
|
|
2014-03-07 11:49:44 +00:00
|
|
|
m_output->append(tr("\n*** Qt build information ***"));
|
2014-02-26 14:21:18 +00:00
|
|
|
const char *gltype[] = { "Desktop", "GLES 2", "GLES 1" };
|
2014-03-07 11:49:44 +00:00
|
|
|
m_output->append(tr("Qt OpenGL configuration: %1")
|
2014-02-28 16:03:57 +00:00
|
|
|
.arg(QString::fromLatin1(gltype[QOpenGLContext::openGLModuleType()])));
|
Introduce platform API abstraction for QOpenGLContext
The API is available by including qopenglcontext.h as usual,
but scoped in the QPlatformInterface namespace. The namespace
exposes platform specific type-safe interfaces that provide:
a) Factory functions for adopting native contexts, e.g.
QCocoaGLContext::fromNative(nsContext, shareContext);
b) Access to underlying native handles, e.g.
openGLContext->platformInterface<QCocoaGLContext>->nativeContext()
c) Platform specific functionality, e.g.
static QWGLContext::openGLModuleHandle()
openGLContext->platformInterface<QEGLContext>->doSomething();
The platform interfaces live close to the classes they extend,
removing the need for complex indirection and plumbing, and
avoids kitchen-sink modules and APIs such as the extras modules,
QPlatformFunctions, or QPlatformNativeInterface.
In the case of QOpenGLContext these platform APIs are backed
by the platform plugin, so dynamic_cast is used to ensure the
platform plugin supports the requested interface, but this is
and implementation detail. The interface APIs are agnostic
to where the implementation lives, while still being available
to the user as part of the APIs they extend/augment.
The documentation will be restored when the dust settles.
Task-number: QTBUG-80233
Change-Id: Iac612403383991c4b24064332542a6e4bcbb3293
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-08 18:00:36 +00:00
|
|
|
#if defined(Q_OS_WIN)
|
2020-10-07 10:11:46 +00:00
|
|
|
using namespace QNativeInterface;
|
2014-02-26 14:21:18 +00:00
|
|
|
m_output->append(tr("Qt OpenGL library handle: %1")
|
Introduce platform API abstraction for QOpenGLContext
The API is available by including qopenglcontext.h as usual,
but scoped in the QPlatformInterface namespace. The namespace
exposes platform specific type-safe interfaces that provide:
a) Factory functions for adopting native contexts, e.g.
QCocoaGLContext::fromNative(nsContext, shareContext);
b) Access to underlying native handles, e.g.
openGLContext->platformInterface<QCocoaGLContext>->nativeContext()
c) Platform specific functionality, e.g.
static QWGLContext::openGLModuleHandle()
openGLContext->platformInterface<QEGLContext>->doSomething();
The platform interfaces live close to the classes they extend,
removing the need for complex indirection and plumbing, and
avoids kitchen-sink modules and APIs such as the extras modules,
QPlatformFunctions, or QPlatformNativeInterface.
In the case of QOpenGLContext these platform APIs are backed
by the platform plugin, so dynamic_cast is used to ensure the
platform plugin supports the requested interface, but this is
and implementation detail. The interface APIs are agnostic
to where the implementation lives, while still being available
to the user as part of the APIs they extend/augment.
The documentation will be restored when the dust settles.
Task-number: QTBUG-80233
Change-Id: Iac612403383991c4b24064332542a6e4bcbb3293
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-06-08 18:00:36 +00:00
|
|
|
.arg(QString::number(qintptr(QWGLContext::openGLModuleHandle()), 16)));
|
|
|
|
#endif
|
2014-02-26 14:21:18 +00:00
|
|
|
|
2019-05-06 12:00:53 +00:00
|
|
|
QList<QByteArray> extensionList = context->extensions().values();
|
2014-02-26 14:21:18 +00:00
|
|
|
std::sort(extensionList.begin(), extensionList.end());
|
|
|
|
m_extensions->append(tr("Found %1 extensions:").arg(extensionList.count()));
|
2022-10-06 09:08:21 +00:00
|
|
|
for (const QByteArray &ext : std::as_const(extensionList))
|
2014-02-26 14:21:18 +00:00
|
|
|
m_extensions->append(QString::fromLatin1(ext));
|
|
|
|
|
|
|
|
m_output->moveCursor(QTextCursor::Start);
|
|
|
|
m_extensions->moveCursor(QTextCursor::Start);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Widget::renderWindowError(const QString &msg)
|
|
|
|
{
|
|
|
|
m_output->append(tr("An error has occurred:\n%1").arg(msg));
|
|
|
|
}
|