Skip to content

Commit

Permalink
QtXml: Use Q_NULLPTR instead of 0 in all public headers
Browse files Browse the repository at this point in the history
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: Id65c5a13d66e08937e6115e8c5b37923c8489f1a
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
marc-kdab committed Jul 4, 2015
1 parent 160f419 commit c3addac
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/xml/dom/qdom.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,14 @@ class Q_XML_EXPORT QDomDocument : public QDomNode
inline QDomNode::NodeType nodeType() const { return DocumentNode; }

// Qt extensions
bool setContent(const QByteArray& text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
bool setContent(const QString& text, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
bool setContent(QIODevice* dev, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
bool setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
bool setContent(const QByteArray& text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
bool setContent(const QString& text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
bool setContent(QIODevice* dev, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
bool setContent(QXmlInputSource *source, QXmlReader *reader, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0 );
bool setContent(const QByteArray& text, bool namespaceProcessing, QString *errorMsg=Q_NULLPTR, int *errorLine=Q_NULLPTR, int *errorColumn=Q_NULLPTR );
bool setContent(const QString& text, bool namespaceProcessing, QString *errorMsg=Q_NULLPTR, int *errorLine=Q_NULLPTR, int *errorColumn=Q_NULLPTR );
bool setContent(QIODevice* dev, bool namespaceProcessing, QString *errorMsg=Q_NULLPTR, int *errorLine=Q_NULLPTR, int *errorColumn=Q_NULLPTR );
bool setContent(QXmlInputSource *source, bool namespaceProcessing, QString *errorMsg=Q_NULLPTR, int *errorLine=Q_NULLPTR, int *errorColumn=Q_NULLPTR );
bool setContent(const QByteArray& text, QString *errorMsg=Q_NULLPTR, int *errorLine=Q_NULLPTR, int *errorColumn=Q_NULLPTR );
bool setContent(const QString& text, QString *errorMsg=Q_NULLPTR, int *errorLine=Q_NULLPTR, int *errorColumn=Q_NULLPTR );
bool setContent(QIODevice* dev, QString *errorMsg=Q_NULLPTR, int *errorLine=Q_NULLPTR, int *errorColumn=Q_NULLPTR );
bool setContent(QXmlInputSource *source, QXmlReader *reader, QString *errorMsg=Q_NULLPTR, int *errorLine=Q_NULLPTR, int *errorColumn=Q_NULLPTR );

// Qt extensions
QString toString(int = 1) const;
Expand Down
8 changes: 4 additions & 4 deletions src/xml/sax/qxml.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,10 +201,10 @@ class Q_XML_EXPORT QXmlReader
{
public:
virtual ~QXmlReader() {}
virtual bool feature(const QString& name, bool *ok = 0) const = 0;
virtual bool feature(const QString& name, bool *ok = Q_NULLPTR) const = 0;
virtual void setFeature(const QString& name, bool value) = 0;
virtual bool hasFeature(const QString& name) const = 0;
virtual void* property(const QString& name, bool *ok = 0) const = 0;
virtual void* property(const QString& name, bool *ok = Q_NULLPTR) const = 0;
virtual void setProperty(const QString& name, void* value) = 0;
virtual bool hasProperty(const QString& name) const = 0;
virtual void setEntityResolver(QXmlEntityResolver* handler) = 0;
Expand All @@ -229,11 +229,11 @@ class Q_XML_EXPORT QXmlSimpleReader : public QXmlReader
QXmlSimpleReader();
virtual ~QXmlSimpleReader();

bool feature(const QString& name, bool *ok = 0) const Q_DECL_OVERRIDE;
bool feature(const QString& name, bool *ok = Q_NULLPTR) const Q_DECL_OVERRIDE;
void setFeature(const QString& name, bool value) Q_DECL_OVERRIDE;
bool hasFeature(const QString& name) const Q_DECL_OVERRIDE;

void* property(const QString& name, bool *ok = 0) const Q_DECL_OVERRIDE;
void* property(const QString& name, bool *ok = Q_NULLPTR) const Q_DECL_OVERRIDE;
void setProperty(const QString& name, void* value) Q_DECL_OVERRIDE;
bool hasProperty(const QString& name) const Q_DECL_OVERRIDE;

Expand Down

0 comments on commit c3addac

Please sign in to comment.