diff options
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index c145c46f78..da69628d2b 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -139,10 +139,12 @@ Q_CORE_EXPORT void *qMemSet(void *dest, int c, size_t n); // in. The idea here is to error or warn if otherwise implicit Qt // assumptions are not fulfilled on new hardware or compilers // (if this list becomes too long, consider factoring into a separate file) -Q_STATIC_ASSERT_X(sizeof(int) == 4, "Qt assumes that int is 32 bits"); Q_STATIC_ASSERT_X(UCHAR_MAX == 255, "Qt assumes that char is 8 bits"); +Q_STATIC_ASSERT_X(sizeof(int) == 4, "Qt assumes that int is 32 bits"); Q_STATIC_ASSERT_X(QT_POINTER_SIZE == sizeof(void *), "QT_POINTER_SIZE defined incorrectly"); Q_STATIC_ASSERT_X(sizeof(float) == 4, "Qt assumes that float is 32 bits"); +Q_STATIC_ASSERT_X(sizeof(char16_t) == 2, "Qt assumes that char16_t is 16 bits"); +Q_STATIC_ASSERT_X(sizeof(char32_t) == 4, "Qt assumes that char32_t is 32 bits"); // While we'd like to check for __STDC_IEC_559__, as per ISO/IEC 9899:2011 // Annex F (C11, normative for C++11), there are a few corner cases regarding @@ -250,7 +252,7 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value)); Qt::Alignment type is simply a typedef for QFlags<Qt::AlignmentFlag>. QLabel::setAlignment() takes a Qt::Alignment parameter, which means that any combination of - Qt::AlignmentFlag values, or 0, is legal: + Qt::AlignmentFlag values, or \c{{ }}, is legal: \snippet code/src_corelib_global_qglobal.cpp 0 @@ -318,10 +320,20 @@ Q_STATIC_ASSERT((std::is_same<qsizetype, qptrdiff>::value)); */ /*! + \fn template <typename Enum> QFlags<Enum>::QFlags() + \since 5.15 + + Constructs a QFlags object with no flags set. +*/ + +/*! \fn template <typename Enum> QFlags<Enum>::QFlags(Zero) + \deprecated Constructs a QFlags object with no flags set. The parameter must be a literal 0 value. + + Deprecated, use default constructor instead. */ /*! @@ -4770,9 +4782,11 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) /*! \macro qMove(x) \relates <QtGlobal> + \obsolete - It expands to "std::move" if your compiler supports that C++11 function, or to nothing - otherwise. + Use \c std::move instead. + + It expands to "std::move". qMove takes an rvalue reference to its parameter \a x, and converts it to an xvalue. */ @@ -4873,6 +4887,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) /*! \macro Q_DECL_OVERRIDE \since 5.0 + \obsolete \relates <QtGlobal> This macro can be used to declare an overriding virtual @@ -4880,8 +4895,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) an error if the overriding virtual function does not in fact override anything. - It expands to "override" if your compiler supports that C++11 - contextual keyword, or to nothing otherwise. + It expands to "override". The macro goes at the end of the function, usually after the \c{const}, if any: @@ -4893,6 +4907,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) /*! \macro Q_DECL_FINAL \since 5.0 + \obsolete \relates <QtGlobal> This macro can be used to declare an overriding virtual or a class @@ -4900,10 +4915,7 @@ bool QInternal::activateCallbacks(Callback cb, void **parameters) no longer override this virtual function, or inherit from this class, respectively. - It expands to "final" if your compiler supports that C++11 - contextual keyword, or something non-standard if your compiler - supports something close enough to the C++11 semantics, or to - nothing otherwise. + It expands to "final". The macro goes at the end of the function, usually after the \c{const}, if any: |