diff options
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsintegration.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsintegration.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp index 397b988e61..fc60e91aa1 100644 --- a/src/plugins/platforms/windows/qwindowsintegration.cpp +++ b/src/plugins/platforms/windows/qwindowsintegration.cpp @@ -92,6 +92,8 @@ #include "qwindowsopengltester.h" +#include <memory> + static inline void initOpenGlBlacklistResources() { Q_INIT_RESOURCE(openglblacklists); @@ -466,9 +468,9 @@ QPlatformOpenGLContext *QWindowsIntegration::createPlatformOpenGLContext(QOpenGL { qCDebug(lcQpaGl) << __FUNCTION__ << context->format(); if (QWindowsStaticOpenGLContext *staticOpenGLContext = QWindowsIntegration::staticOpenGLContext()) { - QScopedPointer<QWindowsOpenGLContext> result(staticOpenGLContext->createContext(context)); + std::unique_ptr<QWindowsOpenGLContext> result(staticOpenGLContext->createContext(context)); if (result->isValid()) - return result.take(); + return result.release(); } return nullptr; } @@ -498,12 +500,12 @@ QOpenGLContext *QWindowsIntegration::createOpenGLContext(HGLRC ctx, HWND window, return nullptr; if (QWindowsStaticOpenGLContext *staticOpenGLContext = QWindowsIntegration::staticOpenGLContext()) { - QScopedPointer<QWindowsOpenGLContext> result(staticOpenGLContext->createContext(ctx, window)); + std::unique_ptr<QWindowsOpenGLContext> result(staticOpenGLContext->createContext(ctx, window)); if (result->isValid()) { auto *context = new QOpenGLContext; context->setShareContext(shareContext); auto *contextPrivate = QOpenGLContextPrivate::get(context); - contextPrivate->adopt(result.take()); + contextPrivate->adopt(result.release()); return context; } } |