diff options
author | Dyami Caliri <dyami@dragonframe.com> | 2016-09-07 11:05:51 -0700 |
---|---|---|
committer | Dyami Caliri <dyami@dragonframe.com> | 2016-09-13 04:00:52 +0000 |
commit | 7529c39ba350c3fe9a2b4a96d3300481e3ea419f (patch) | |
tree | 0351b535d01137ac34d16c121248aef54a3b88f0 /src/widgets/styles | |
parent | 3370ab9119df09ca14f7d4641c555e60c1b3f478 (diff) |
QStyleOption: return Q_NULLPTR from qstyleoption_cast instead of 0
qstyleoption_cast should use Q_NULLPTR to represent a null pointer.
Task-number: QTBUG-45291
Change-Id: I85078ceb435b310daf63db2ed771be2f36cf3e4f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/widgets/styles')
-rw-r--r-- | src/widgets/styles/qstyleoption.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h index 9fd693d033..74dd35cc4a 100644 --- a/src/widgets/styles/qstyleoption.h +++ b/src/widgets/styles/qstyleoption.h @@ -664,7 +664,7 @@ T qstyleoption_cast(const QStyleOption *opt) || (int(Opt::Type) == QStyleOption::SO_Complex && opt->type > QStyleOption::SO_Complex))) return static_cast<T>(opt); - return 0; + return Q_NULLPTR; } template <typename T> @@ -676,7 +676,7 @@ T qstyleoption_cast(QStyleOption *opt) || (int(Opt::Type) == QStyleOption::SO_Complex && opt->type > QStyleOption::SO_Complex))) return static_cast<T>(opt); - return 0; + return Q_NULLPTR; } // -------------------------- QStyleHintReturn ------------------------------- @@ -725,7 +725,7 @@ T qstyleoption_cast(const QStyleHintReturn *hint) if (hint && hint->version <= Opt::Version && (hint->type == Opt::Type || int(Opt::Type) == QStyleHintReturn::SH_Default)) return static_cast<T>(hint); - return 0; + return Q_NULLPTR; } template <typename T> @@ -735,7 +735,7 @@ T qstyleoption_cast(QStyleHintReturn *hint) if (hint && hint->version <= Opt::Version && (hint->type == Opt::Type || int(Opt::Type) == QStyleHintReturn::SH_Default)) return static_cast<T>(hint); - return 0; + return Q_NULLPTR; } #if !defined(QT_NO_DEBUG_STREAM) |