diff options
author | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-10-13 20:13:29 (GMT) |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@nokia.com> | 2010-10-18 09:38:34 (GMT) |
commit | 28dd8ee71bdb4b69d86ea85ef18afc47cc7f2853 (patch) | |
tree | 8b9f8c3dd71ab1ab0e62d62a09074226881cf94c /src/corelib | |
parent | 572999ce8f6124a9e55fcb876c2db40bc786a851 (diff) | |
download | Qt-28dd8ee71bdb4b69d86ea85ef18afc47cc7f2853.zip Qt-28dd8ee71bdb4b69d86ea85ef18afc47cc7f2853.tar.gz Qt-28dd8ee71bdb4b69d86ea85ef18afc47cc7f2853.tar.bz2 |
Add a few default-constructors to comply with C++'03 [dcl.init] p9
C++'03 [dcl.init] p9 says: "If no initializer is specified for an object, and
the object is of (possibly cv-qualified) non-POD class type (or array thereof),
the object shall be default-initialized; if the object is of const-qualified
type, the underlying class type shall have a user-declared default constructor."
QXmlStreamAttributes and a few classes in the QXmlQuery test were missing them.
Relevant GCC and Clang bugs:
- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42844
- http://llvm.org/bugs/show_bug.cgi?id=6772
Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/xml/qxmlstream.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/xml/qxmlstream.h b/src/corelib/xml/qxmlstream.h index 402afa3..d7143bd 100644 --- a/src/corelib/xml/qxmlstream.h +++ b/src/corelib/xml/qxmlstream.h @@ -169,6 +169,7 @@ Q_DECLARE_TYPEINFO(QXmlStreamAttribute, Q_MOVABLE_TYPE); class Q_XMLSTREAM_EXPORT QXmlStreamAttributes : public QVector<QXmlStreamAttribute> { public: + inline QXmlStreamAttributes() {} QStringRef value(const QString &namespaceUri, const QString &name) const; QStringRef value(const QString &namespaceUri, const QLatin1String &name) const; QStringRef value(const QLatin1String &namespaceUri, const QLatin1String &name) const; |