diff options
author | Liang Qi <liang.qi@qt.io> | 2017-08-15 16:30:10 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-08-15 16:31:48 +0200 |
commit | 106d3b9bf93325ea93c678270290b2c3dda9b764 (patch) | |
tree | 26c56932d60964c83e81d9c33d6f37ebc36d6c56 /src/corelib | |
parent | 79f679da9483c12979500dd48bc096d33af9ca6f (diff) | |
parent | 8bebded9ab02b8eec67c44bfddf802d6bf9cda3c (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
src/plugins/platforms/cocoa/qcocoamenu.h
src/plugins/platforms/cocoa/qcocoamenu.mm
src/plugins/platforms/cocoa/qcocoawindow.mm
src/widgets/styles/qstylehelper_p.h
Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qglobal.cpp | 13 | ||||
-rw-r--r-- | src/corelib/kernel/qsharedmemory.cpp | 3 | ||||
-rw-r--r-- | src/corelib/tools/qvector.h | 37 |
3 files changed, 39 insertions, 14 deletions
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index ab79637323..33d7d58df4 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -94,6 +94,19 @@ #include <sys/sysctl.h> #endif +#if defined(Q_OS_INTEGRITY) +extern "C" { + // Function mmap resides in libshm_client.a. To be able to link with it one needs + // to define symbols 'shm_area_password' and 'shm_area_name', because the library + // is meant to allow the application that links to it to use POSIX shared memory + // without full system POSIX. +# pragma weak shm_area_password +# pragma weak shm_area_name + char *shm_area_password = "dummy"; + char *shm_area_name = "dummy"; +} +#endif + #include "archdetect.cpp" #ifdef qFatal diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp index 7f185ee9dc..c8ba13c90c 100644 --- a/src/corelib/kernel/qsharedmemory.cpp +++ b/src/corelib/kernel/qsharedmemory.cpp @@ -362,6 +362,9 @@ bool QSharedMemory::create(int size, AccessMode mode) Returns the size of the attached shared memory segment. If no shared memory segment is attached, 0 is returned. + \note The size of the segment may be larger than the requested size that was + passed to create(). + \sa create(), attach() */ int QSharedMemory::size() const diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 2d12a95b4b..f00cecbc83 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -311,6 +311,7 @@ private: // will be default-initialized # pragma warning ( push ) # pragma warning ( disable : 4345 ) +# pragma warning(disable : 4127) // conditional expression is constant #endif template <typename T> @@ -325,10 +326,6 @@ void QVector<T>::defaultConstruct(T *from, T *to) } } -#ifdef Q_CC_MSVC -# pragma warning ( pop ) -#endif - template <typename T> void QVector<T>::copyConstruct(const T *srcFrom, const T *srcTo, T *dstFrom) { @@ -340,11 +337,6 @@ void QVector<T>::copyConstruct(const T *srcFrom, const T *srcTo, T *dstFrom) } } -#if defined(Q_CC_MSVC) -#pragma warning( push ) -#pragma warning( disable : 4127 ) // conditional expression is constant -#endif - template <typename T> void QVector<T>::destruct(T *from, T *to) { @@ -355,10 +347,6 @@ void QVector<T>::destruct(T *from, T *to) } } -#if defined(Q_CC_MSVC) -#pragma warning( pop ) -#endif - template <typename T> inline QVector<T>::QVector(const QVector<T> &v) { @@ -380,6 +368,10 @@ inline QVector<T>::QVector(const QVector<T> &v) } } +#if defined(Q_CC_MSVC) +#pragma warning( pop ) +#endif + template <typename T> void QVector<T>::detach() { @@ -507,6 +499,11 @@ QVector<T>::QVector(int asize, const T &t) } #ifdef Q_COMPILER_INITIALIZER_LISTS +# if defined(Q_CC_MSVC) +QT_WARNING_PUSH +QT_WARNING_DISABLE_MSVC(4127) // conditional expression is constant +# endif // Q_CC_MSVC + template <typename T> QVector<T>::QVector(std::initializer_list<T> args) { @@ -521,7 +518,10 @@ QVector<T>::QVector(std::initializer_list<T> args) d = Data::sharedNull(); } } -#endif +# if defined(Q_CC_MSVC) +QT_WARNING_POP +# endif // Q_CC_MSVC +#endif // Q_COMPILER_INITALIZER_LISTS template <typename T> void QVector<T>::freeData(Data *x) @@ -530,6 +530,11 @@ void QVector<T>::freeData(Data *x) Data::deallocate(x); } +#if defined(Q_CC_MSVC) +QT_WARNING_PUSH +QT_WARNING_DISABLE_MSVC(4127) // conditional expression is constant +#endif + template <typename T> void QVector<T>::reallocData(const int asize, const int aalloc, QArrayData::AllocationOptions options) { @@ -621,6 +626,10 @@ void QVector<T>::reallocData(const int asize, const int aalloc, QArrayData::Allo Q_ASSERT(d->size == asize); } +#if defined(Q_CC_MSVC) +QT_WARNING_POP +#endif + template<typename T> Q_OUTOFLINE_TEMPLATE T QVector<T>::value(int i) const { |