diff options
author | Liang Qi <liang.qi@qt.io> | 2016-05-12 07:31:50 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-05-12 08:33:08 +0200 |
commit | 990969655c5fb4d03682e96df9b12101f5ee9815 (patch) | |
tree | b8fb5c50285105c8bc5a938fb50f93ff9f24889d /src/corelib/global | |
parent | a213011a53f12f101d08a04afc8fdacd2d54a232 (diff) | |
parent | e64b2234e829cc47872225debcf80d6c06db18f0 (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
config_help.txt
configure
src/corelib/io/qprocess_wince.cpp
src/plugins/platforms/windows/qwindowstheme.cpp
src/plugins/platforms/xcb/qxcbbackingstore.cpp
tests/auto/corelib/tools/qtimezone/BLACKLIST
tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
Change-Id: I26644d1cb3b78412c8ff285e2a55bea1bd641c01
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 27 | ||||
-rw-r--r-- | src/corelib/global/qglobal.cpp | 4 | ||||
-rw-r--r-- | src/corelib/global/qglobal.h | 6 | ||||
-rw-r--r-- | src/corelib/global/qglobalstatic.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qlogging.cpp | 9 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.h | 1 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 3 | ||||
-rw-r--r-- | src/corelib/global/qprocessordetection.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qversiontagging.h | 4 |
9 files changed, 45 insertions, 13 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 9a61efd1b2..04f2084591 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -105,6 +105,12 @@ # endif # define Q_DECL_EXPORT __declspec(dllexport) # define Q_DECL_IMPORT __declspec(dllimport) +# if _MSC_VER >= 1800 +# define QT_MAKE_UNCHECKED_ARRAY_ITERATOR(x) stdext::make_unchecked_array_iterator(x) +# endif +# if _MSC_VER >= 1500 +# define QT_MAKE_CHECKED_ARRAY_ITERATOR(x, N) stdext::make_checked_array_iterator(x, size_t(N)) +# endif /* Intel C++ disguising as Visual C++: the `using' keyword avoids warnings */ # if defined(__INTEL_COMPILER) # define Q_DECL_VARIABLE_DEPRECATED @@ -1017,9 +1023,15 @@ // Also disable <atomic>, since it's clearly not there # undef Q_COMPILER_ATOMICS # endif -# if defined(_LIBCPP_VERSION) +# if defined(Q_CC_CLANG) && defined(Q_CC_INTEL) && Q_CC_INTEL >= 1500 +// ICC 15.x and 16.0 have their own implementation of std::atomic, which is activated when in Clang mode +// (probably because libc++'s <atomic> on OS X failed to compile), but they're missing some +// critical definitions. (Reported as Intel Issue ID 6000117277) +# define __USE_CONSTEXPR 1 +# define __USE_NOEXCEPT 1 +# elif defined(_LIBCPP_VERSION) // libc++ uses __has_feature(cxx_atomic), so disable the feature if the compiler -// doesn't support it. That's required for the Intel compiler on OS X, for example. +// doesn't support it. That's required for the Intel compiler 14.x or earlier on OS X, for example. # if !__has_feature(cxx_atomic) # undef Q_COMPILER_ATOMICS # endif @@ -1108,6 +1120,11 @@ # define Q_ALIGNOF(x) alignof(x) #endif +#if defined(Q_COMPILER_ALIGNAS) +# undef Q_DECL_ALIGN +# define Q_DECL_ALIGN(n) alignas(n) +#endif + /* * Fallback macros to certain compiler features */ @@ -1176,6 +1193,12 @@ #ifndef Q_DECL_CONST_FUNCTION # define Q_DECL_CONST_FUNCTION Q_DECL_PURE_FUNCTION #endif +#ifndef QT_MAKE_UNCHECKED_ARRAY_ITERATOR +# define QT_MAKE_UNCHECKED_ARRAY_ITERATOR(x) (x) +#endif +#ifndef QT_MAKE_CHECKED_ARRAY_ITERATOR +# define QT_MAKE_CHECKED_ARRAY_ITERATOR(x, N) (x) +#endif /* * SG10's SD-6 feature detection and some useful extensions from Clang and GCC diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp index 7e4e09c6c7..dd357e4b15 100644 --- a/src/corelib/global/qglobal.cpp +++ b/src/corelib/global/qglobal.cpp @@ -1998,6 +1998,7 @@ static inline OSVERSIONINFOEX determineWinOsVersion() #define pGetModuleHandle GetModuleHandleW #endif +#ifndef Q_OS_WINCE HMODULE ntdll = pGetModuleHandle(L"ntdll.dll"); if (Q_UNLIKELY(!ntdll)) return result; @@ -2017,6 +2018,9 @@ static inline OSVERSIONINFOEX determineWinOsVersion() // GetVersionEx() has been deprecated in Windows 8.1 and will return // only Windows 8 from that version on, so use the kernel API function. pRtlGetVersion((LPOSVERSIONINFO) &result); // always returns STATUS_SUCCESS +#else // !Q_OS_WINCE + GetVersionEx(&result); +#endif return result; } diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 0d83bc04fe..808f433278 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -573,10 +573,6 @@ Q_DECL_CONSTEXPR inline const T &qBound(const T &min, const T &val, const T &max # define QT_OSX_DEPLOYMENT_TARGET_BELOW(osx) \ QT_MAC_DEPLOYMENT_TARGET_BELOW(osx, __IPHONE_NA) -QT_END_NAMESPACE -Q_FORWARD_DECLARE_OBJC_CLASS(NSAutoreleasePool); -QT_BEGIN_NAMESPACE - // Implemented in qcore_mac_objc.mm class Q_CORE_EXPORT QMacAutoReleasePool { @@ -585,7 +581,7 @@ public: ~QMacAutoReleasePool(); private: Q_DISABLE_COPY(QMacAutoReleasePool) - NSAutoreleasePool *pool; + void *pool; }; #endif // Q_OS_MAC diff --git a/src/corelib/global/qglobalstatic.h b/src/corelib/global/qglobalstatic.h index 4fb3c4f91f..7a6dea9b92 100644 --- a/src/corelib/global/qglobalstatic.h +++ b/src/corelib/global/qglobalstatic.h @@ -116,7 +116,7 @@ QT_BEGIN_NAMESPACE guard.store(QtGlobalStatic::Destroyed); \ } \ } cleanup; \ - guard.store(QtGlobalStatic::Initialized); \ + guard.storeRelease(QtGlobalStatic::Initialized); \ } \ } \ return d; \ diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index 295de9485a..6dc453009b 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -988,15 +988,18 @@ struct QMessagePattern { #endif #ifdef QLOGGING_HAVE_BACKTRACE struct BacktraceParams { - QString backtraceSeparator; - int backtraceDepth; + QString backtraceSeparator; + int backtraceDepth; }; - QList<BacktraceParams> backtraceArgs; // backtrace argumens in sequence of %{backtrace + QVector<BacktraceParams> backtraceArgs; // backtrace argumens in sequence of %{backtrace #endif bool fromEnvironment; static QBasicMutex mutex; }; +#ifdef QLOGGING_HAVE_BACKTRACE +Q_DECLARE_TYPEINFO(QMessagePattern::BacktraceParams, Q_MOVABLE_TYPE); +#endif QBasicMutex QMessagePattern::mutex; diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index c8699c15fe..06b0f824f6 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1336,6 +1336,7 @@ public: ImTextAfterCursor = 0x1000, ImEnterKeyType = 0x2000, ImAnchorRectangle = 0x4000, + ImInputItemClipRectangle = 0x8000, ImPlatformData = 0x80000000, ImQueryInput = ImCursorRectangle | ImCursorPosition | ImSurroundingText | diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 13e2b55e2a..9878ce046a 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2582,6 +2582,9 @@ \value ImEnterKeyType The Enter key type. \value ImAnchorRectangle The bounding rectangle of the selection anchor. This value has been added in Qt 5.7. + \value ImInputItemClipRectangle The actual exposed input item rectangle. Parts of the input item might be + clipped. This value will take clipping into consideration and return the actual painted + item rectangle. The rectangle is in widget coordinates. Masks: diff --git a/src/corelib/global/qprocessordetection.h b/src/corelib/global/qprocessordetection.h index 8c1e041a17..ee94720e7a 100644 --- a/src/corelib/global/qprocessordetection.h +++ b/src/corelib/global/qprocessordetection.h @@ -141,6 +141,8 @@ # endif # if Q_PROCESSOR_ARM >= 5 # define Q_PROCESSOR_ARM_V5 +# else +# error "ARM architecture too old" # endif # if defined(__ARMEL__) # define Q_BYTE_ORDER Q_LITTLE_ENDIAN diff --git a/src/corelib/global/qversiontagging.h b/src/corelib/global/qversiontagging.h index ef3da7c658..1e276dc3e0 100644 --- a/src/corelib/global/qversiontagging.h +++ b/src/corelib/global/qversiontagging.h @@ -64,9 +64,9 @@ QT_BEGIN_NAMESPACE // don't make tags in QtCore, bootstrapped systems or if the user asked not to #elif defined(Q_CC_GNU) && !defined(Q_OS_ANDROID) # if defined(Q_PROCESSOR_X86) && (defined(Q_OS_LINUX) || defined(Q_OS_FREEBSD_KERNEL)) -# if defined(Q_PROCESSOR_X86_64) // x86-64 or x32 +# if defined(Q_PROCESSOR_X86_64) && QT_POINTER_SIZE == 8 // x86-64 64-bit # define QT_VERSION_TAG_RELOC(sym) ".quad " QT_STRINGIFY(QT_MANGLE_NAMESPACE(sym)) "@GOT\n" -# else // x86 +# else // x86 or x86-64 32-bit (x32) # define QT_VERSION_TAG_RELOC(sym) ".long " QT_STRINGIFY(QT_MANGLE_NAMESPACE(sym)) "@GOT\n" # endif # define QT_VERSION_TAG(sym) \ |