Member-initialize QOpenGLWidgetPrivate
Fix warning about requestedFormat not being initialized in sequence. Change-Id: I7b948cb356b65ea2953424a700eb1a70cd1802f9 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
696114494c
commit
8379de41f6
@ -480,7 +480,7 @@ QT_BEGIN_NAMESPACE
|
|||||||
class QOpenGLWidgetPaintDevicePrivate : public QOpenGLPaintDevicePrivate
|
class QOpenGLWidgetPaintDevicePrivate : public QOpenGLPaintDevicePrivate
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QOpenGLWidgetPaintDevicePrivate(QOpenGLWidget *widget)
|
explicit QOpenGLWidgetPaintDevicePrivate(QOpenGLWidget *widget)
|
||||||
: QOpenGLPaintDevicePrivate(QSize()),
|
: QOpenGLPaintDevicePrivate(QSize()),
|
||||||
w(widget) { }
|
w(widget) { }
|
||||||
|
|
||||||
@ -493,7 +493,7 @@ public:
|
|||||||
class QOpenGLWidgetPaintDevice : public QOpenGLPaintDevice
|
class QOpenGLWidgetPaintDevice : public QOpenGLPaintDevice
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QOpenGLWidgetPaintDevice(QOpenGLWidget *widget)
|
explicit QOpenGLWidgetPaintDevice(QOpenGLWidget *widget)
|
||||||
: QOpenGLPaintDevice(*new QOpenGLWidgetPaintDevicePrivate(widget)) { }
|
: QOpenGLPaintDevice(*new QOpenGLWidgetPaintDevicePrivate(widget)) { }
|
||||||
void ensureActiveTarget() override;
|
void ensureActiveTarget() override;
|
||||||
};
|
};
|
||||||
@ -502,24 +502,7 @@ class QOpenGLWidgetPrivate : public QWidgetPrivate
|
|||||||
{
|
{
|
||||||
Q_DECLARE_PUBLIC(QOpenGLWidget)
|
Q_DECLARE_PUBLIC(QOpenGLWidget)
|
||||||
public:
|
public:
|
||||||
QOpenGLWidgetPrivate()
|
QOpenGLWidgetPrivate() = default;
|
||||||
: context(nullptr),
|
|
||||||
fbo(nullptr),
|
|
||||||
resolvedFbo(nullptr),
|
|
||||||
surface(nullptr),
|
|
||||||
initialized(false),
|
|
||||||
fakeHidden(false),
|
|
||||||
inBackingStorePaint(false),
|
|
||||||
hasBeenComposed(false),
|
|
||||||
flushPending(false),
|
|
||||||
paintDevice(nullptr),
|
|
||||||
updateBehavior(QOpenGLWidget::NoPartialUpdate),
|
|
||||||
requestedSamples(0),
|
|
||||||
inPaintGL(false),
|
|
||||||
textureFormat(0)
|
|
||||||
{
|
|
||||||
requestedFormat = QSurfaceFormat::defaultFormat();
|
|
||||||
}
|
|
||||||
|
|
||||||
void reset();
|
void reset();
|
||||||
void recreateFbo();
|
void recreateFbo();
|
||||||
@ -542,21 +525,21 @@ public:
|
|||||||
void resizeViewportFramebuffer() override;
|
void resizeViewportFramebuffer() override;
|
||||||
void resolveSamples() override;
|
void resolveSamples() override;
|
||||||
|
|
||||||
QOpenGLContext *context;
|
QOpenGLContext *context = nullptr;
|
||||||
QOpenGLFramebufferObject *fbo;
|
QOpenGLFramebufferObject *fbo = nullptr;
|
||||||
QOpenGLFramebufferObject *resolvedFbo;
|
QOpenGLFramebufferObject *resolvedFbo = nullptr;
|
||||||
QOffscreenSurface *surface;
|
QOffscreenSurface *surface = nullptr;
|
||||||
bool initialized;
|
QOpenGLPaintDevice *paintDevice = nullptr;
|
||||||
bool fakeHidden;
|
int requestedSamples = 0;
|
||||||
bool inBackingStorePaint;
|
GLenum textureFormat = 0;
|
||||||
bool hasBeenComposed;
|
QSurfaceFormat requestedFormat = QSurfaceFormat::defaultFormat();
|
||||||
bool flushPending;
|
QOpenGLWidget::UpdateBehavior updateBehavior = QOpenGLWidget::NoPartialUpdate;
|
||||||
QOpenGLPaintDevice *paintDevice;
|
bool initialized = false;
|
||||||
QSurfaceFormat requestedFormat;
|
bool fakeHidden = false;
|
||||||
QOpenGLWidget::UpdateBehavior updateBehavior;
|
bool inBackingStorePaint = false;
|
||||||
int requestedSamples;
|
bool hasBeenComposed = false;
|
||||||
bool inPaintGL;
|
bool flushPending = false;
|
||||||
GLenum textureFormat;
|
bool inPaintGL = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
void QOpenGLWidgetPaintDevicePrivate::beginPaint()
|
void QOpenGLWidgetPaintDevicePrivate::beginPaint()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user