diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2017-03-28 15:03:50 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2017-03-29 07:36:33 +0000 |
commit | e7a7931ba1e4fd6d80674c73e6e9e9a8099b9391 (patch) | |
tree | 803b80135b159f28c1b2f684e050c7a9b7189dd1 /src/corelib/global/qglobal.cpp | |
parent | 9349ec29212a2dc36aa2460626851a16820a41b6 (diff) |
QtGlobal: add qssize_t
It replaces Posix' ssize_t in cross-platform code. Most importantly,
it allows QStringView users to refer to QStringView::size_type by
a shorter, less intimidating name.
Change-Id: I2128fefd2ffdd258b0b55cd90802a23c6bc033f6
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qglobal.cpp')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 871810e5a3..4ff27f14a8 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -774,6 +774,21 @@ Q_STATIC_ASSERT_X(QT_POINTER_SIZE == sizeof(void *), "QT_POINTER_SIZE defined in */ /*! + \typedef qssize_t + \relates <QtGlobal> + \since 5.10 + + Integral type providing Posix' \c ssize_t for all platforms. + + This type is guaranteed to be the same size as a \c size_t on all + platforms supported by Qt. + + Note that qssize_t is signed. Use \c size_t for unsigned values. + + \sa qptrdiff +*/ + +/*! \enum QtMsgType \relates <QtGlobal> |