summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
* Doc: Remove references to Windows CE in Qt CoreVenugopal Shivashankar2016-08-231-22/+12
| | | | | | | | The platform is not supported since Qt 5.7 Task-number: QTBUG-55331 Change-Id: I98b90d574d9a76c4281852d93818620b5f489117 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* Doc: Remove references to Windows CE in Qt SQL and Qt NamespaceVenugopal Shivashankar2016-08-231-8/+3
| | | | | | | | | | | | | The platform is not supported since Qt 5.7. - Removed Windows CE-specific \notes in SQL drivers' documentation - Marked a couple of Windows CE-specific enum values using \omitvalue Task-number: QTBUG-55331 Change-Id: I35b44f9d31fde6f10013c043260db1b852c171e2 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-132-51/+51
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| * Doc: Change instances of '(Mac) OS X' to 'macOS'Topi Reinio2016-08-122-52/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change the occurrences where the Mac platform is discussed to use a macro \macos, which expands to 'macOS'. This helps with adapting to future renaming. Update the instructions on mac-specific Q_OS_* macro usage. Add a \target for the old 'Qt for OS X' topic to keep links working for other documentation modules that try to link with the old name. Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Fix qnumeric_p.h with ICC's supplied math.hThiago Macieira2016-08-101-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | ICC supplies a math.h header that defines things like: #define isnan( __x__ ) __IMFC99MACRO1ARG_ALL( __x__, isnan, __, f, __, , __, l) So use the already-existing workaround for it. Since Qt 5.7 requires C++11, we can remove the check for that. Change-Id: I149e0540c00745fe8119fffd1463cc5caf341337 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | move c++11 test into qcompilerdetection.h and make it stricterOswald Buddenhagen2016-07-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | it positively makes no sense to have a configure test which will be never reached due to the configure/qmake bootstrap failing with a slew of totally unhelpful error messages. pre-standardization partial c++11 implementations are now rejected, except for VS2013, which is still sufficient despite not announcing full compatibility. Change-Id: I58af10e03960af06b80cedac105cf8433f7a1745 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Windows: Disable unsupported C++11 features with Clang-cl and ICCThiago Macieira2016-07-221-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Whenever someone installs Clang or the Intel compiler on Windows, it's very likely that the compiler will be much newer than the MS headers that came with the installed Visual Studio version. So let's make sure we disable the C++11 features that the MS headers don't support properly. For example, MS's <limits> header supplied with VS 2013 doesn't mark the max() function as constexpr, resulting compiler errors in uses of that function in Qt code declared with Q_DECL_CONSTEXPR: qdeadlinetimer.h(62,13) : note: non-constexpr function 'max' cannot be used in a constant expression : s(std::numeric_limits<qint64>::max()), ns(0), type(type_) {} ^ Change-Id: I149e0540c00745fe8119fffd146286ffe480d216 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use QStringLiteral more judiciouslyAnton Kudryavtsev2016-07-081-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace it with QL1S in QStringBuilder expressions and in overloaded functions. Replace patterns 'QString::number() + QStringLiteral' and 'QStringLiteral + QString::number()' with QString::asprintf. Saves some text size. Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove duplicated QT_HAS_BUILTIN defineBogDan Vatra2016-06-211-6/+0
| | | | | | | | | | | | | | | | | | QT_HAS_BUILTIN is already defined in qcompilerdetection.h which is included in qglobal.h which is included in this header file. Task-number: QTBUG-54068 Change-Id: I46c2e13d85fc21d3e6c426d0f35a584b21ae792b Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7Liang Qi2016-06-204-22/+77
|\ \
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-204-22/+77
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And blacklisted a few tests in tst_QUdpSocket. Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtNative.java src/corelib/global/qglobal.cpp src/corelib/global/qsystemdetection.h src/corelib/io/qfileselector.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp tests/auto/network/socket/qudpsocket/BLACKLIST Task-number: QTBUG-54205 Change-Id: I11dd1c90186eb1b847d45be87a26041f61d89ef6
| | * Update for the newest Darwin-family operating systems.Jake Petroules2016-06-153-16/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adapt to the OS X => macOS rename in Q_OS_ macros/docs, qmake scopes, file selectors, etc. - Add new QSysInfo values and MAC_OS_X / __MAC_ / __IPHONE_ values for macOS 10.12 and iOS 9.1 through 10.0. - Update prettyProductName with new macOS "Sierra" codename. Change-Id: Id976530beeafa01b648ebaa16f4a8f0613fcaf75 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Move __cpp_constexpr check inside Q_COMPILER_CONSTEXPR checkJames McDonnell2016-06-131-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Q_COMPILER_CONSTEXPR can be undefined (or not defined at all) to indicate that constexpr should not be used regardless of the compiler's ability to support it. This is done for QNX because some C library floating point functions used in the Dinkumware C++ library aren't constexpr functions; i.e., the library doesn't have proper constexpr support even though the compiler does. (cherry picked from commit d87242968fc56ba09243f642ce70a85084619de0) Change-Id: If0bdeb2180710dd9ccd97d79fa91cf9ff42f7990 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add "-softfloat" to archdetect.cpp and clarify what to use whenThiago Macieira2016-06-191-0/+5
|/ / | | | | | | | | | | Change-Id: I1cc7601489634e96833cfffd14563e033c85ff6d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.7.0' into 5.7Liang Qi2016-06-163-37/+46
|\ \ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qsimd_p.h Change-Id: I7c6bfc5873d97ad7f51a540dd9c18b9359dde59f
| * | Move the Q_DECL_UNUSED attribute elsewhere to satisfy ICC 17Thiago Macieira2016-06-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It doesn't like the attribute there. I think it's a compiler bug, but I can't be sure because the part of the standard dealing with the placement of attributes and where they apply is very complex. Exercise left for the reader to determine if ICC is correct or not to reject it there. Change-Id: I87e17314d8b24ae983b1fffd1454bde826b7bcf4 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
| * | Use void instead of uchar in the endian-swapping function parametersv5.7.0-rc1Thiago Macieira2016-05-262-34/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to pass pointers to storage that is not an array of uchar, which it hardly ever is. Change-Id: Ifea6e497f11a461db432ffff14490d2c2df21906 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * | Merge remote-tracking branch 'origin/5.6.1' into 5.7.0Liang Qi2016-05-262-4/+43
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qsimd_p.h src/network/socket/qnativesocketengine_winrt.cpp Change-Id: I2765b671664c2a84839b2f88ba724fdf0c1fa7c6
* | | | Plug padding holes in QHostAddressPrivateThiago Macieira2016-06-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On ABIs where quint64 is aligned on 8-byte boundaries (such 32-bit Windows and all 64-bit systems), there was a padding hole of 4 bytes between QHostAddressPrivate::a and the anonymous union. If we move the member to after the union, there is no hole anymore. That operation causes the tail padding to grow from 3 to 7 bytes. Since we also don't need full 32 bits for the protocol, we can shrink the structure by 8 bytes on those architectures and by 4 bytes on 32-bit Unix systems. Change-Id: I461e9fc7199748faa187ffff1415d6601a7bd777 Reviewed-by: hjk <hjk@theqtcompany.com>
* | | | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-065-8/+73
|\ \ \ \ | |/ / / |/| | / | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf config.tests/unix/nis/nis.cpp mkspecs/unsupported/freebsd-g++/qplatformdefs.h src/corelib/tools/qdatetime.cpp src/corelib/tools/qsimd.cpp src/corelib/tools/qsimd_p.h src/network/access/access.pri src/network/access/qnetworkreplynsurlconnectionimpl.mm src/network/access/qnetworkreplynsurlconnectionimpl_p.h src/plugins/platforms/cocoa/qnsview.mm src/plugins/printsupport/windows/qwindowsprintdevice.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp tests/auto/network/access/qnetworkreply/BLACKLIST tests/auto/widgets/widgets/qopenglwidget/BLACKLIST Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
| * | Merge remote-tracking branch 'origin/5.6.1' into 5.6Liang Qi2016-06-022-10/+43
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This merge also blacklists a flaky tst_QGL::clipTest test on OpenSUSE 13.1. Conflicts: src/network/socket/qnativesocketengine_winrt.cpp tests/auto/opengl/qgl/BLACKLIST Task-number: QTBUG-53133 Change-Id: I14b431aa5a189b7dd1d3e2dfff767d15df20fde3
| | * Replace qUnaligned{Load,Store} with the existing q{To,From}Unalignedv5.6.1-1v5.6.1Thiago Macieira2016-05-252-10/+43
| | | | | | | | | | | | | | | | | | | | | | | | Move the Q_ALWAYS_INLINE and forcing of __builtin_memcpy to the existing functions. Change-Id: Icaa7fb2a490246bda156ffff143c137e520eea79 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * | Add Interix OS system detection definesRalf Nolden2016-05-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetBSD (pkgsrc) ports are building qt on Interix as well, where the necessary defines are missing for in qsystemdetection.h. Patch for adding them provided by NetBSD ports maintainer Kamil Rytarowski <n54@gmx.com> Change-Id: I769c47f623317efda3130a7061307e84d3350fac Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Force the use of the C++11 alignof keyword instead of an extensionThiago Macieira2016-05-291-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the compiler supports C++11 alignof, let's use it. No point in perpetuating the use of __alignof__ or __alignof. There's a fallback implementation in qglobal.h that works even without compiler extensions. We can't drop it just yet (alignas is not a required C++11 feature), but at this point I doubt that fallback is used anywhere anymore. The tst_compiler test was wrong to use alignof(variable). That's not permitted by the standard nor would it work with our fallback implementation. MSVC 2015 enforces this, but ICC, GCC and Clang don't. Change-Id: Ifea6e497f11a461db432ffff1448abfa86672c63 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
| * | Disable thread_local on clang for FreeBSDRalf Nolden2016-05-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FreeBSD's clang currently is not able to handle thread_local calls due to linker errors on __cxa_thread_atexit. The patch disables the define Q_COMPILER_THREAD_LOCAL for clang __FreeBSD__ only, no functional change. Otherwise, linking the tst_compiler autotest will fail. For details, see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320 Change-Id: I2395c06499d4821213e2154769ccbeed3dcf1ffe Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Restore the -fno-lto build of qversiontagging.cppThiago Macieira2016-05-231-2/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | I'm not sure how one of my machines has this problem and the other doesn't (same distribution and same compiler version). Must be operator error. But this is required to compile QtGui when QtCore was compiled in LTO mode. qversiontagging.cpp used to be built with -fno-lto before commit 629ceec208ad5fe9f5d201fc42fce611e55c567d. This commit restores that functionality, but not the clang "-no-integrated-as" part. Change-Id: Ie9fd7afe060b4e4a8052fffd144fb9c1a1166854 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Avoid failing on 64-bit ARMLaszlo Agocs2016-05-191-1/+1
| | | | | | | | | | | | | | | | | | | | Affects systems like the NVIDIA DRIVE CX. This did not show up so far because there was no error when Q_PROCESSOR_ARM was not set. Task-number: QTBUG-53493 Change-Id: I107155b6dc1a881eca6f57374ad8db4458875243 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-191-0/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp src/network/access/qnetworkaccessmanager.cpp src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h src/widgets/widgets/qlineedit_p.cpp src/widgets/widgets/qlineedit_p.h src/winmain/winmain.pro tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp tools/configure/configureapp.cpp Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
| * Fix Clang -Wexpansion-to-defined warning by deprecating QT_SUPPORTSThiago Macieira2016-05-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The C and C++ standards say it's undefined whether the preprocessor supports macros that expand to defined() will operate as an ifdef. Clang 3.9 started complaining about that fact. One solution was to change QT_SUPPORTS to check for zero or one, which means we need to change the #defines QT_NO_xxx to #define QT_NO_xxx 1. The C standard says we don't need to #define to 0, as an unknown token is interpreted as zero. However, that might produce a warning (GCC with -Wundef), so changing the macro this way is not recommended. Instead, we deprecate the macro and replace the uses with #ifdef/ndef. Change-Id: Id75834dab9ed466e94c7ffff1444874d5680b96a Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | add AA_CompressHighFrequencyEvents to control compression on xcbShawn Rutledge2016-05-152-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | 7edd10e6c added this compression feature, but some applications may need to disable it. [ChangeLog][X11] It's now possible to unset AA_CompressHighFrequencyEvents to disable the new X event compression feature that was added in 5.6.0. This is a replacement for the WA_NoX11EventCompression flag in Qt 4. Task-number: QTBUG-44964 Change-Id: I37a9c8a4831f1c02eda0f03b54125f3255d25500 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* | Move out the code to extract the backtrace to another functionThiago Macieira2016-05-131-55/+85
| | | | | | | | | | | | | | This will make it easier to use create backtraces in other contexts. Change-Id: I56b838ab04d9810108fcdb7f8c2fd91255864850 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add QT_NO_FOREACH to disable foreach and Q_FOREACHMarc Mutz2016-05-111-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It has been known for a long time that Q_FOREACH produces inferior code to other looping constructs, and the use of it in Qt library code was informally frowned upon since forever (pun intended). Yet, to this day, several thousand foreach/Q_FOREACH loops have been added to Qt libraries, and while many were ported to range-for in Qt 5.7, there are still new ones added every day, which is a nuisance, to say the least. This patch introduces a technical way to prevent new foreach use to creep into Qt libraries after they have been cleaned, by simply not defining either Q_FOREACH or foreach when the QT_NO_FOREACH macro is defined. This way, one library at a time can be ported away, and, once ported, is guaranteed to actually stay ported. Change-Id: Ie042e84d6c7d766bd16095f9bc1118a8e0ce0c7a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Make it an #error if we failed to detect the ARM architecture versionThiago Macieira2016-05-101-0/+2
| | | | | | | | | | | | | | | | ... or if it is less than ARMv5. The last ARMv4 Qt supported was Windows CE 7, which was dropped for Qt 5.7 alongside MSVC 2008. Change-Id: Ifc817705441a4aab9469ffff141dcfe491464efa Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | Work around ICC's bug in making std::atomic a literal typeThiago Macieira2016-05-081-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | ICC 15.x and 16.0 (beta, at least) are missing the "constexpr" and "noexcept" keywords in the definition of the std::atomic constructors. The lack of constexpr makes std::atomic a non-literal type, which in turn makes QBasicAtomicInteger's constructor (which is constexpr) fail to compile. Reported as Intel issue 6000117277. Change-Id: I4a88bcca48bf0ce51557d809ef32a4545edcafee Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-05-061-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/qtestlib/tutorial5/containers.cpp examples/widgets/tools/tools.pro src/corelib/io/qprocess.cpp src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/network/kernel/qdnslookup_unix.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/testlib/qtestcase.cpp tools/configure/configureapp.cpp Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
| * Fix UB (data race) in Q_GLOBAL_STATICMarc Mutz2016-05-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The store to guard in the inner function's critical section was not synchronized-with the load at the start of the function: T1 T2 guard.load() mutex.lock() guard.load() d = new Type guard.store() guard.load() // use d mutex.unlock() The use of d in T2 does not synchronize with the write to d in T1 -> data race -> UB. Fix by storing with release memory ordering, so that the guard.load() in T2 synchronizes with the guard.store() in T1. Change-Id: I5c1cd1fa097c6397cb0b48b0d8e8012f95978558 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Add ImInputItemClipRectangleJan Arve Saether2016-05-022-0/+4
| | | | | | | | | | | | | | | | | | | | | | This rectangle represents the "effective" visual rectangle of the input item, excluding any areas obscured due to clipping. Note: The effective visual rectangle will not be influenced by overlapping items. Change-Id: I234176161dcfb9c236124e33ae510a0b01fe6dc3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-291-0/+17
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qml_module.prf mkspecs/features/qt_common.prf src/gui/text/qzip.cpp src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/windows/array.h src/testlib/qtestcase.cpp src/widgets/dialogs/qfilesystemmodel.h Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
| * Use C++11 alignas() for Q_DECL_ALIGN, if possibleThiago Macieira2016-04-281-0/+5
| | | | | | | | | | Change-Id: Ifea6e497f11a461db432ffff144863d4ed69a212 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
| * Silence MSVC warnings when using certain std algorithmsMarc Mutz2016-04-261-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MSVC STL warns when passing naked pointers as non-bounded iterators to algorithms such as std::equal and std::copy, in an attempt to inform users that the range specified by that iterator has an implicit minimum size that the caller of the algorithm must ensure is met: warning C4996: 'std::_Equal1': Function call with parameters that may be unsafe - \ this call relies on the caller to check that the passed values are correct. To \ disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to \ use Visual C++ 'Checked Iterators' When building Qt, as well as when building user projects with qmake (cf. 0a76b6bc7f98900ea884cd10ccca1a332e5bdba5), we globally disable this warning (with -D_SCL_SECURE_NO_WARNINGS), but since we started using STL algorithms in public headers (e.g. in qvector.h), users get this warning in their own projects now, unless they, too, define said macro. But such a requirement is against the Qt policy to have headers that are warning-free as much as possible. The suggested way of fixing this warning is to wrap the naked pointer in a stdext::unchecked_array_iterator before passing it to the algorithm, cf. examples in https://msdn.microsoft.com/en-us/library/ttcz0bys%28v=vs.120%29.aspx or, together with the capacity-made-explicit, in a stdext::checked_array_iterator. To avoid ifdefs for platforms that don't have these extensions (which, incidentally, for the unchecked case, includes MSVC 2012), wrap the calls in macros. The end game here is to drop -D_SCL_SECURE_NO_WARNINGS, at least for public headers, even though this commit also adds the wrapper to implementation and private header files. An alternative to the wrapper would have been the version of std::equal that takes four iterators. However, that is a C++14 library feature, while this version of Qt still needs to compile with a C++98 compiler, and, more importantly, there isn't, and never will be, a corresponding 4-iterator version of std::copy. Task-number: QTBUG-47948 Done-with: Stephen Kelly <steveire@gmail.com> Change-Id: I1bbab257fb5f1c5042939c382a412b596112ff26 Reviewed-by: Stephen Kelly <ske@ableton.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-271-3/+6
|\| | | | | | | | | | | | | | | Conflicts: src/corelib/io/qprocess_win.cpp src/widgets/itemviews/qheaderview.cpp Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
| * QMessagePattern: Fix indentation and use QVector for a large structThiago Macieira2016-04-231-3/+6
| | | | | | | | | | | | | | | | | | struct BacktraceParams is too big (more than one pointer), so using it with QList is inefficient. Let's use QVector instead. Change-Id: Id75834dab9ed466e94c7ffff144572c1eb3fb0e5 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-253-7/+7
|\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test configure src/android/jar/src/org/qtproject/qt5/android/QtMessageDialogHelper.java src/corelib/global/qglobal.cpp src/widgets/kernel/qapplication.cpp src/widgets/styles/qwindowsvistastyle.cpp tests/auto/corelib/kernel/qobject/tst_qobject.cpp Change-Id: I067083f34e5290aa5f7565e40c30a069cc37b83a
| * Fix build on Linux/x32 systems (x86-64 ILP32)Thiago Macieira2016-04-191-2/+2
| | | | | | | | | | | | | | | | | | | | When I tested this, it compiled, but either I wasn't using the same compiler or the problem happens during linking: we can't use .quad (64-bit) with a relocation on x32. So instead, let's use .long (32-bit). Task-number: QTBUG-52658 Change-Id: Ifea6e497f11a461db432ffff14468d1a16f49c67 Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
| * Fix QSysInfo::windowsVersion() on WinCETobias Koenig2016-04-141-0/+5
| | | | | | | | | | | | | | | | | | Use the GetVersionEx method on WinCE. The ntdll.dll does not exist on that platform, therefor a wrong version number was returned. Change-Id: I7b51757d0fb612dcd8832e0903a93b9d1c6746c0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
| * Fix build when Qt is used in an automatic reference-counted environmentTor Arne Vestbø2016-04-131-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When automatic reference-counting (ARC) is enabled on Darwin platforms the NSAutoReleasePool class should not be used directly, which caused a build error if qglobal.h was included after the Foundation.h in client code. The preferred alternative for ARC is the scoped @autoreleasepool construct, which allows the compiler to reason about needing to insert _objc_autoreleasePoolPush and _objc_autoreleasePoolPop calls. Note that ARC translation units can be combined with non-ARC translation units, so Qt and the QMacAutoReleasePool class can still be used in ARC client code even if Qt is not built with ARC. Task-number: QTBUG-51332 Change-Id: I7ef1c3146aa416a9d6a1dc299ce7b17f22f889e5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Fix some qdoc-warnings in 5.7.Friedemann Kleint2016-04-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/global/qnamespace.qdoc:101: warning: Undocumented enum item 'AA_SynthesizeMouseForUnhandledTabletEvents' in Qt::ApplicationAttribute qtbase/src/corelib/global/qnamespace.qdoc:2554: warning: Undocumented enum item 'ImAnchorRectangle' in Qt::InputMethodQuery qtbase/src/corelib/statemachine/qsignaltransition.cpp:154: warning: Can't link to 'Q_COMPILER_DELEGATING_CONSTRUCTORS' qtbase/src/gui/image/qiconloader.cpp:160: warning: Cannot find 'QIconCacheGtkReader' specified with '\class' in any header file qtbase/src/gui/painting/qpaintengine_raster.cpp:1382: warning: No documentation for 'QRasterPaintEngine::fillPath(const QPainterPath &path, QSpanData *fillData)' qtbase/src/testlib/qtest.h:176: warning: No documentation for 'QTest::toString(const QHostAddress &addr)' qtbase/src/testlib/qtest_gui.h:77: warning: No documentation for 'QTest::toString(const QColor &color)' Change-Id: If9ac0807accf2530ec7fc2ca7db71a110f9f79bb Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
* | ImQueryInput should include ImAnchorRectangle tooJan Arve Saether2016-04-131-1/+1
| | | | | | | | | | | | | | | | Whenever we notify about ImAnchorPosition, we also need to notify about ImAnchorRectangle Change-Id: Ia449396e1b9e91fa0e6f95c323e31533da660171 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-131-7/+7
|\| | | | | | | | | | | | | | | | | | | Conflicts: config.tests/unix/compile.test src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/testlib/qtestcase.cpp src/testlib/qtestcase.qdoc Change-Id: Ied3c471dbc9a076c8de33d673bd557e88575609d
| * Don't indicate which versions of OS X are supported in QSysInfo docs.Jake Petroules2016-04-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This is not done for other platforms (iOS or Windows) and eliminates a maintenance burden and potential of inconsistencies with other parts of the documentation (as illustrated by the fact that this page indicates the wrong minimum supported version). The Supported Platforms page will be the authoritative (and only) source of which particular versions of a given operating system are supported. Change-Id: I5a31f68965265f2dcd6515b1fa9385a9e9078274 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>