From ed7f77071dcca996a8c8147fd66344090666e60c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 5 Aug 2016 10:12:12 +0200 Subject: Replace custom type traits with std one's Remove most type traits from qtypetraits.h, but keep the custom implementation of is_signed/is_unsigned. This gets rid of BSD-3 licensed code from Google in a public header (hugh!). The custom implementations for is_signed/is_unsigned are kept because the implementations in gcc's standard headers do not work as we expect for enums - both is_signed and is_unsigned always returns false there - see also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59027 [ChangeLog][QtCore][General] Qt now relies on type traits from the C++ standard library. Change-Id: I3f2188b46949f04ca4482a6ac9afd3482103f0e1 Reviewed-by: Thiago Macieira --- src/widgets/styles/qstyleoption.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/widgets/styles/qstyleoption.h') diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h index 9679411402..0e76d53eea 100644 --- a/src/widgets/styles/qstyleoption.h +++ b/src/widgets/styles/qstyleoption.h @@ -665,7 +665,7 @@ protected: template T qstyleoption_cast(const QStyleOption *opt) { - typedef typename QtPrivate::remove_cv::type>::type Opt; + typedef typename std::remove_cv::type>::type Opt; if (opt && opt->version >= Opt::Version && (opt->type == Opt::Type || int(Opt::Type) == QStyleOption::SO_Default || (int(Opt::Type) == QStyleOption::SO_Complex @@ -677,7 +677,7 @@ T qstyleoption_cast(const QStyleOption *opt) template T qstyleoption_cast(QStyleOption *opt) { - typedef typename QtPrivate::remove_cv::type>::type Opt; + typedef typename std::remove_cv::type>::type Opt; if (opt && opt->version >= Opt::Version && (opt->type == Opt::Type || int(Opt::Type) == QStyleOption::SO_Default || (int(Opt::Type) == QStyleOption::SO_Complex @@ -728,7 +728,7 @@ public: template T qstyleoption_cast(const QStyleHintReturn *hint) { - typedef typename QtPrivate::remove_cv::type>::type Opt; + typedef typename std::remove_cv::type>::type Opt; if (hint && hint->version <= Opt::Version && (hint->type == Opt::Type || int(Opt::Type) == QStyleHintReturn::SH_Default)) return static_cast(hint); @@ -738,7 +738,7 @@ T qstyleoption_cast(const QStyleHintReturn *hint) template T qstyleoption_cast(QStyleHintReturn *hint) { - typedef typename QtPrivate::remove_cv::type>::type Opt; + typedef typename std::remove_cv::type>::type Opt; if (hint && hint->version <= Opt::Version && (hint->type == Opt::Type || int(Opt::Type) == QStyleHintReturn::SH_Default)) return static_cast(hint); -- cgit v1.2.3