diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-05-25 12:50:21 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-25 21:42:14 +0200 |
commit | 57f243594e83708f2daa8147901cbea965e5c295 (patch) | |
tree | 035adc2734192023a043c108db6fddf2d9c27159 /examples/opengl/hellowindow/hellowindow.h | |
parent | 7381328bcc37283be97eedddc24c46be1e38490e (diff) |
OpenGL/HelloWindow example: Fix resource leaks.
Change-Id: Icf776b5581b3a632e8cef19af1059503146c158c
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'examples/opengl/hellowindow/hellowindow.h')
-rw-r--r-- | examples/opengl/hellowindow/hellowindow.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h index 8f294b5ae3..0a88a0d75e 100644 --- a/examples/opengl/hellowindow/hellowindow.h +++ b/examples/opengl/hellowindow/hellowindow.h @@ -45,6 +45,7 @@ #include <QColor> #include <QTime> +#include <QSharedPointer> QT_BEGIN_NAMESPACE class QOpenGLContext; @@ -88,7 +89,7 @@ class HelloWindow : public QWindow { Q_OBJECT public: - HelloWindow(Renderer *renderer); + explicit HelloWindow(const QSharedPointer<Renderer> &renderer); void updateColor(); @@ -105,5 +106,5 @@ private: int m_colorIndex; QColor m_color; - Renderer *m_renderer; + const QSharedPointer<Renderer> m_renderer; }; |