diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2016-11-03 16:08:55 +0000 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2017-01-12 22:16:06 +0000 |
commit | 6255cb893d411b055758f2e64e94fde0bce91ea8 (patch) | |
tree | d8e445c85d6cd386c2228776001b372d01fbbef7 /src/corelib/io/qurl.h | |
parent | a4c25c020554527aa9ff9b533afabffef46be131 (diff) |
Remove qtypetraits.h's contents altogether
So that QFlags can use an (un)signed int matching the
underlying type as identified by the compiler and not by us.
Requires fixing a few warnings about sign conversion due to
QFlags misusages in qtbase that were either plain wrong, or
were relying on the enum being backed by an (un)signed int
when it wasn't.
Keep qtypetraits.h in the source tree in order to prevent
source breaks if some downstream #includes it (note however
that it did not contain any public API).
Change-Id: Ib3a92b98db7031e793a088fb2a3b306eff4d7a3c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/io/qurl.h')
-rw-r--r-- | src/corelib/io/qurl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/io/qurl.h b/src/corelib/io/qurl.h index a554a3b07e..c16825a033 100644 --- a/src/corelib/io/qurl.h +++ b/src/corelib/io/qurl.h @@ -69,8 +69,8 @@ public: Q_DECL_CONSTEXPR inline QUrlTwoFlags(E1 f) : i(f) {} Q_DECL_CONSTEXPR inline QUrlTwoFlags(E2 f) : i(f) {} Q_DECL_CONSTEXPR inline QUrlTwoFlags(QFlag f) : i(f) {} - Q_DECL_CONSTEXPR inline QUrlTwoFlags(QFlags<E1> f) : i(f.operator int()) {} - Q_DECL_CONSTEXPR inline QUrlTwoFlags(QFlags<E2> f) : i(f.operator int()) {} + Q_DECL_CONSTEXPR inline QUrlTwoFlags(QFlags<E1> f) : i(f.operator typename QFlags<E1>::Int()) {} + Q_DECL_CONSTEXPR inline QUrlTwoFlags(QFlags<E2> f) : i(f.operator typename QFlags<E2>::Int()) {} Q_DECL_CONSTEXPR inline QUrlTwoFlags(Zero = 0) : i(0) {} inline QUrlTwoFlags &operator&=(int mask) { i &= mask; return *this; } |