From 8a56f39c1ee4e04975eeac4e11368cece91e38b5 Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 23 Mar 2009 14:58:31 -0700 Subject: Make QDirectFBPaintDevice() protected. This class should never be instantiated without being subclassed so a protected constructor is the clean thing to do. Reviewed-by: Tom Cooksey --- src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h index e19f183..23fa5d6 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintdevice.h @@ -54,11 +54,6 @@ QT_MODULE(Gui) class QDirectFBPaintDevice : public QCustomRasterPaintDevice { public: - QDirectFBPaintDevice(QDirectFBScreen *scr = QDirectFBScreen::instance()) - : QCustomRasterPaintDevice(0), - dfbSurface(0), - lockedImage(0), - screen(scr) {} ~QDirectFBPaintDevice(); IDirectFBSurface *directFbSurface() const; @@ -74,6 +69,13 @@ public: int metric(QPaintDevice::PaintDeviceMetric metric) const; protected: + // Shouldn't create QDirectFBPaintDevice by itself but only sub-class it: + QDirectFBPaintDevice(QDirectFBScreen *scr = QDirectFBScreen::instance()) + : QCustomRasterPaintDevice(0), + dfbSurface(0), + lockedImage(0), + screen(scr) {} + IDirectFBSurface *dfbSurface; QImage *lockedImage; QDirectFBScreen *screen; -- cgit v0.12