diff options
author | Liang Qi <liang.qi@qt.io> | 2016-09-05 18:47:27 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-09-05 18:47:27 +0200 |
commit | d892e6f721b0163dfb2f2ecf79d80ba62304a542 (patch) | |
tree | ccc1de7ece77bca11b20b3335126c337720d5e54 /src/corelib | |
parent | 2997a60e1eaf0efbeb22516ae184fa93f278fec5 (diff) | |
parent | 657c2bfbeceda3faa2c7a76b4ccec6a65a3445a2 (diff) |
Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
mkspecs/features/qt_common.prf
src/plugins/platforms/windows/qwindowsdialoghelpers.cpp
Change-Id: I03b92b6b89ecc5a8db7c95f04ebb92ed198098a8
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 4 | ||||
-rw-r--r-- | src/corelib/tools/qbytearray.cpp | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h index 085e3063b4..a48548bc90 100644 --- a/src/corelib/global/qcompilerdetection.h +++ b/src/corelib/global/qcompilerdetection.h @@ -942,7 +942,8 @@ # endif /* VC 11 */ # if _MSC_VER >= 1800 /* C++11 features in VC12 = VC2013 */ -# define Q_COMPILER_DEFAULT_MEMBERS +/* Implemented, but can't be used on move special members */ +/* # define Q_COMPILER_DEFAULT_MEMBERS */ # define Q_COMPILER_DELETE_MEMBERS # define Q_COMPILER_DELEGATING_CONSTRUCTORS # define Q_COMPILER_EXPLICIT_CONVERSIONS @@ -960,6 +961,7 @@ # endif /* VC 12 SP 2 RC */ # if _MSC_VER >= 1900 /* C++11 features in VC14 = VC2015 */ +# define Q_COMPILER_DEFAULT_MEMBERS # define Q_COMPILER_ALIGNAS # define Q_COMPILER_ALIGNOF // Partial support, insufficient for Qt diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 266c2e9b57..9298472305 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -303,13 +303,14 @@ char *qstrncpy(char *dst, const char *src, uint len) { if (!src || !dst) return 0; + if (len > 0) { #if defined(_MSC_VER) && _MSC_VER >= 1400 - strncpy_s(dst, len, src, len-1); + strncpy_s(dst, len, src, len - 1); #else - strncpy(dst, src, len); + strncpy(dst, src, len); #endif - if (len > 0) dst[len-1] = '\0'; + } return dst; } |