summaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellowindow/hellowindow.h
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2012-11-05 13:51:54 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-05 15:16:06 +0100
commit227accf0a3d1e177ece05d988196510f29240f58 (patch)
tree835dc839eb2a163bb26bccbb7a185c0db93b084b /examples/opengl/hellowindow/hellowindow.h
parentcbf476242608a575595651a2eb8c40588a4631a4 (diff)
Fix hellowindow example generating excess timers
The example was creating a new timer on every expose event, which quickly leads into massive excess of timeout signals. Fixed by only creating one timer. Task-number: QTBUG-27836 Change-Id: Ia6ed1bd9575e296f4c6c5b12509095e4d5c016dd Reviewed-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'examples/opengl/hellowindow/hellowindow.h')
-rw-r--r--examples/opengl/hellowindow/hellowindow.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/examples/opengl/hellowindow/hellowindow.h b/examples/opengl/hellowindow/hellowindow.h
index a3e9fc5f96..adb85c1a6e 100644
--- a/examples/opengl/hellowindow/hellowindow.h
+++ b/examples/opengl/hellowindow/hellowindow.h
@@ -49,6 +49,7 @@
QT_BEGIN_NAMESPACE
class QOpenGLContext;
+class QTimer;
QT_END_NAMESPACE
class Renderer : public QObject
@@ -107,4 +108,5 @@ private:
int m_colorIndex;
QColor m_color;
const QSharedPointer<Renderer> m_renderer;
+ QTimer *m_timer;
};