diff options
author | Sergio Ahumada <sergio.ahumada@nokia.com> | 2012-09-08 19:08:53 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-09-14 15:23:15 +0200 |
commit | 0a37bcf24547101595299572533e5e3a98e04e1d (patch) | |
tree | 015338f188df67ebdfe4a5ab7c2fd8fc84251be7 /src/tools | |
parent | 26b6cce44bc4fb81b09420bdaf56fc6036d1eece (diff) |
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 <sergio.ahumada@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/qdoc/qmlparser/qqmljsast_p.h | 2 | ||||
-rw-r--r-- | src/tools/qdoc/qmlparser/qqmljsastfwd_p.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/qdoc/qmlparser/qqmljsast_p.h b/src/tools/qdoc/qmlparser/qqmljsast_p.h index f85eb4ca5f..5de94d2ee2 100644 --- a/src/tools/qdoc/qmlparser/qqmljsast_p.h +++ b/src/tools/qdoc/qmlparser/qqmljsast_p.h @@ -1642,7 +1642,7 @@ class QML_PARSER_EXPORT CaseBlock: public Node public: QQMLJS_DECLARE_AST_NODE(CaseBlock) - CaseBlock(CaseClauses *c, DefaultClause *d = 0, CaseClauses *r = 0): + explicit CaseBlock(CaseClauses *c, DefaultClause *d = 0, CaseClauses *r = 0): clauses (c), defaultClause (d), moreClauses (r) { kind = K; } diff --git a/src/tools/qdoc/qmlparser/qqmljsastfwd_p.h b/src/tools/qdoc/qmlparser/qqmljsastfwd_p.h index 23e7592d11..602cbeb6cd 100644 --- a/src/tools/qdoc/qmlparser/qqmljsastfwd_p.h +++ b/src/tools/qdoc/qmlparser/qqmljsastfwd_p.h @@ -64,7 +64,7 @@ namespace QQmlJS { namespace AST { class SourceLocation { public: - SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0) + explicit SourceLocation(quint32 offset = 0, quint32 length = 0, quint32 line = 0, quint32 column = 0) : offset(offset), length(length), startLine(line), startColumn(column) { } |