From 0a37bcf24547101595299572533e5e3a98e04e1d Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Sat, 8 Sep 2012 19:08:53 +0200 Subject: Mark (non-public API's) ctor's as explicit Make C++ class constructors that can be used with only one required argument 'explicit' to minimize wrong use of the class. Change-Id: I12ad5b6eb1794108c6b7464a2573e84068733b03 Reviewed-by: Sergio Ahumada Reviewed-by: Thiago Macieira --- src/opengl/qgl_p.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/opengl/qgl_p.h') diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index b03214aed8..0cea09f82a 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -238,7 +238,7 @@ public: class QGLTemporaryContextPrivate; class QGLTemporaryContext { public: - QGLTemporaryContext(bool directRendering = true, QWidget *parent = 0); + explicit QGLTemporaryContext(bool directRendering = true, QWidget *parent = 0); ~QGLTemporaryContext(); private: @@ -416,7 +416,7 @@ Q_SIGNALS: class QGLTexture { public: - QGLTexture(QGLContext *ctx = 0, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D, + explicit QGLTexture(QGLContext *ctx = 0, GLuint tx_id = 0, GLenum tx_target = GL_TEXTURE_2D, QGLContext::BindOptions opt = QGLContext::DefaultBindOption) : context(ctx), id(tx_id), -- cgit v1.2.3