summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2019-05-14 20:42:01 +0200
committerMarc Mutz <marc.mutz@kdab.com>2019-05-15 11:03:52 +0200
commit4715d6db808301e986c2399785c24ec70f68f200 (patch)
treea211470f96d66ded019e208a43445ce6cbdce53c /examples
parentbc6ffcd0c583919b91cd0e41e1f29ff188fc617a (diff)
ThreadedOpenGL example: use std::unique_ptr instead of QScopedPointer
There's talk that QScopedPointer may be deprecated. Don't use it in examples anymore. Change-Id: I05a486c2a86fcc7015a9c21ed0ce9682b0c24034 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/opengl/threadedqopenglwidget/main.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/opengl/threadedqopenglwidget/main.cpp b/examples/opengl/threadedqopenglwidget/main.cpp
index b9e491040f..983f608543 100644
--- a/examples/opengl/threadedqopenglwidget/main.cpp
+++ b/examples/opengl/threadedqopenglwidget/main.cpp
@@ -58,6 +58,8 @@
#include "mainwindow.h"
#include "glwidget.h"
+#include <memory>
+
static QString getGlString(QOpenGLFunctions *functions, GLenum name)
{
if (const GLubyte *p = functions->glGetString(name))
@@ -104,8 +106,8 @@ int main( int argc, char ** argv )
const QString toolTip = supportsThreading ? glInfo : glInfo + QStringLiteral("\ndoes not support threaded OpenGL.");
topLevelGlWidget.setToolTip(toolTip);
- QScopedPointer<MainWindow> mw1;
- QScopedPointer<MainWindow> mw2;
+ std::unique_ptr<MainWindow> mw1;
+ std::unique_ptr<MainWindow> mw2;
if (!parser.isSet(singleOption)) {
if (supportsThreading) {
pos += QPoint(100, 100);