Correct the signature and access rights for the protected constructor

Change-Id: Ic43398a82777f3b1a95a36f60ebc4338d60c29ec
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
Lars Knoll 2014-11-19 12:05:27 +01:00 committed by Jani Heikkinen
parent e86f1ceaed
commit 6dac557fd3
3 changed files with 4 additions and 4 deletions

View File

@ -138,8 +138,8 @@ QOpenGLPaintDevice::QOpenGLPaintDevice(int width, int height)
/*! /*!
\internal \internal
*/ */
QOpenGLPaintDevice::QOpenGLPaintDevice(QOpenGLPaintDevicePrivate *dd) QOpenGLPaintDevice::QOpenGLPaintDevice(QOpenGLPaintDevicePrivate &dd)
: d_ptr(dd) : d_ptr(&dd)
{ {
} }

View File

@ -53,7 +53,6 @@ public:
QOpenGLPaintDevice(); QOpenGLPaintDevice();
explicit QOpenGLPaintDevice(const QSize &size); explicit QOpenGLPaintDevice(const QSize &size);
QOpenGLPaintDevice(int width, int height); QOpenGLPaintDevice(int width, int height);
QOpenGLPaintDevice(QOpenGLPaintDevicePrivate *dd);
virtual ~QOpenGLPaintDevice(); virtual ~QOpenGLPaintDevice();
int devType() const { return QInternal::OpenGL; } int devType() const { return QInternal::OpenGL; }
@ -76,6 +75,7 @@ public:
virtual void ensureActiveTarget(); virtual void ensureActiveTarget();
protected: protected:
QOpenGLPaintDevice(QOpenGLPaintDevicePrivate &dd);
int metric(QPaintDevice::PaintDeviceMetric metric) const; int metric(QPaintDevice::PaintDeviceMetric metric) const;
Q_DISABLE_COPY(QOpenGLPaintDevice) Q_DISABLE_COPY(QOpenGLPaintDevice)

View File

@ -471,7 +471,7 @@ class QOpenGLWidgetPaintDevice : public QOpenGLPaintDevice
{ {
public: public:
QOpenGLWidgetPaintDevice(QOpenGLWidget *widget) QOpenGLWidgetPaintDevice(QOpenGLWidget *widget)
: QOpenGLPaintDevice(new QOpenGLWidgetPaintDevicePrivate(widget)) { } : QOpenGLPaintDevice(*new QOpenGLWidgetPaintDevicePrivate(widget)) { }
void ensureActiveTarget() Q_DECL_OVERRIDE; void ensureActiveTarget() Q_DECL_OVERRIDE;
}; };