summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-06-30 22:11:15 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-07-06 11:33:05 +0000
commit283f19924d427dc4a3841199c06aefde8b41ad2d (patch)
treea70870cc5be7c818aa1cd017d634ecef69d3fa83 /src/widgets/kernel/qwidget.h
parent3e2953e05a672a173b65c67fdeec44fb4f30693d (diff)
QtWidgets: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar) to the headers check. Task-number: QTBUG-45291 Change-Id: Ie67d235151ca8d4ef5e721c9cf4a6fd32bd167a0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets/kernel/qwidget.h')
-rw-r--r--src/widgets/kernel/qwidget.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index 9370e20086..a56f6e1133 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -734,12 +734,12 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QWidget::RenderFlags)
#ifndef Q_QDOC
template <> inline QWidget *qobject_cast<QWidget*>(QObject *o)
{
- if (!o || !o->isWidgetType()) return 0;
+ if (!o || !o->isWidgetType()) return Q_NULLPTR;
return static_cast<QWidget*>(o);
}
template <> inline const QWidget *qobject_cast<const QWidget*>(const QObject *o)
{
- if (!o || !o->isWidgetType()) return 0;
+ if (!o || !o->isWidgetType()) return Q_NULLPTR;
return static_cast<const QWidget*>(o);
}
#endif // !Q_QDOC