diff options
Diffstat (limited to 'src/gui/kernel/qoffscreensurface.cpp')
-rw-r--r-- | src/gui/kernel/qoffscreensurface.cpp | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/gui/kernel/qoffscreensurface.cpp b/src/gui/kernel/qoffscreensurface.cpp index 4d79db8ab2..ae027af627 100644 --- a/src/gui/kernel/qoffscreensurface.cpp +++ b/src/gui/kernel/qoffscreensurface.cpp @@ -121,14 +121,16 @@ public: /*! - Creates an offscreen surface for the \a targetScreen. + \since 5.10 + + Creates an offscreen surface for the \a targetScreen with the given \a parent. The underlying platform surface is not created until create() is called. \sa setScreen(), create() */ -QOffscreenSurface::QOffscreenSurface(QScreen *targetScreen) - : QObject(*new QOffscreenSurfacePrivate(), 0) +QOffscreenSurface::QOffscreenSurface(QScreen *targetScreen, QObject *parent) + : QObject(*new QOffscreenSurfacePrivate(), parent) , QSurface(Offscreen) { Q_D(QOffscreenSurface); @@ -143,6 +145,18 @@ QOffscreenSurface::QOffscreenSurface(QScreen *targetScreen) connect(d->screen, SIGNAL(destroyed(QObject*)), this, SLOT(screenDestroyed(QObject*))); } +/*! + Creates an offscreen surface for the \a targetScreen. + + The underlying platform surface is not created until create() is called. + + \sa setScreen(), create() +*/ +QOffscreenSurface::QOffscreenSurface(QScreen *targetScreen) + : QOffscreenSurface(targetScreen, nullptr) +{ +} + /*! Destroys the offscreen surface. |