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.h | |
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.h')
-rw-r--r-- | src/corelib/global/qglobal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 12220e10b5..3dfbf2fb2d 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -451,6 +451,7 @@ typedef QIntegerForSize<Q_PROCESSOR_WORDSIZE>::Unsigned qregisteruint; typedef QIntegerForSizeof<void*>::Unsigned quintptr; typedef QIntegerForSizeof<void*>::Signed qptrdiff; typedef qptrdiff qintptr; +using qssize_t = QIntegerForSizeof<std::size_t>::Signed; /* moc compats (signals/slots) */ #ifndef QT_MOC_COMPAT |