diff options
| author | Kevin Funk <kfunk@kde.org> | 2017-03-31 10:42:14 +0200 |
|---|---|---|
| committer | jryannel <juergen@ryannel.org> | 2017-03-31 10:42:14 +0200 |
| commit | 7e116e10bf9ee1ef19c12e7c3d24f7ba3b8e9800 (patch) | |
| tree | df47182f92872be35d681f39356b8731a40b39c3 | |
| parent | 0c0613f8b5719e396d6a053201c32482f95bdb7f (diff) | |
Use nullptr instead of literal 0 in generated code (#30)
Fixes:
```
climatemodule.h:20:35: error: zero as null pointer constant [-Werror=zero-as-null-pointer-constant]
```
| -rw-r--r-- | qface/builtin/qtcpp/templates/abstractinterface.h | 2 | ||||
| -rw-r--r-- | qface/builtin/qtcpp/templates/interface.h | 2 | ||||
| -rw-r--r-- | qface/builtin/qtcpp/templates/module.h | 2 | ||||
| -rw-r--r-- | qface/builtin/qtcpp/templates/structmodel.h | 2 | ||||
| -rw-r--r-- | qface/builtin/qtcpp/templates/variantmodel.h | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/qface/builtin/qtcpp/templates/abstractinterface.h b/qface/builtin/qtcpp/templates/abstractinterface.h index 09a21a6..5335632 100644 --- a/qface/builtin/qtcpp/templates/abstractinterface.h +++ b/qface/builtin/qtcpp/templates/abstractinterface.h @@ -20,7 +20,7 @@ WRITE set{{property|upperfirst}} {% endif %}NOTIFY {{property}}Changed) {% endfor %} public: - {{class}}(QObject *parent=0); + {{class}}(QObject *parent = nullptr); ~{{class}}(); public Q_SLOTS: diff --git a/qface/builtin/qtcpp/templates/interface.h b/qface/builtin/qtcpp/templates/interface.h index cc05be2..6ada967 100644 --- a/qface/builtin/qtcpp/templates/interface.h +++ b/qface/builtin/qtcpp/templates/interface.h @@ -17,7 +17,7 @@ class {{class}} : public QmlAbstract{{interface}} { Q_OBJECT public: - {{class}}(QObject *parent=0); + {{class}}(QObject *parent = nullptr); virtual ~{{class}}(); static void registerQmlTypes(const QString& uri, int majorVersion=1, int minorVersion=0); diff --git a/qface/builtin/qtcpp/templates/module.h b/qface/builtin/qtcpp/templates/module.h index 39b5026..5e9ff6f 100644 --- a/qface/builtin/qtcpp/templates/module.h +++ b/qface/builtin/qtcpp/templates/module.h @@ -18,7 +18,7 @@ class {{class}} : public QObject { Q_OBJECT public: - {{class}}(QObject *parent=0); + {{class}}(QObject *parent = nullptr); {% for enum in module.enums %} {% set comma = joiner(",") %} diff --git a/qface/builtin/qtcpp/templates/structmodel.h b/qface/builtin/qtcpp/templates/structmodel.h index 96597be..ab02b25 100644 --- a/qface/builtin/qtcpp/templates/structmodel.h +++ b/qface/builtin/qtcpp/templates/structmodel.h @@ -17,7 +17,7 @@ class {{class}} : public QAbstractListModel Q_PROPERTY(int count READ count NOTIFY countChanged) public: enum Roles { {{struct.fields|map('upperfirst')|join(', ')}} }; - {{class}}(QObject *parent=0); + {{class}}(QObject *parent = nullptr); Q_INVOKABLE Qml{{struct}} get(int index); int count() const; void insert(int row, const Qml{{struct}} &{{struct|lower}}); diff --git a/qface/builtin/qtcpp/templates/variantmodel.h b/qface/builtin/qtcpp/templates/variantmodel.h index 67be224..3f1bbd3 100644 --- a/qface/builtin/qtcpp/templates/variantmodel.h +++ b/qface/builtin/qtcpp/templates/variantmodel.h @@ -15,7 +15,7 @@ class {{class}} : public QAbstractListModel Q_PROPERTY(int count READ count NOTIFY countChanged) public: enum Roles { ModelData = Qt::UserRole }; - {{class}}(QObject *parent=0); + {{class}}(QObject *parent = nullptr); Q_INVOKABLE QVariant get(int index); int count() const; void insert(int row, const QVariant &entry); |
