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
*/
QOpenGLPaintDevice::QOpenGLPaintDevice(QOpenGLPaintDevicePrivate *dd)
: d_ptr(dd)
QOpenGLPaintDevice::QOpenGLPaintDevice(QOpenGLPaintDevicePrivate &dd)
: d_ptr(&dd)
{
}

View File

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

View File

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