summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
* Update the overflow functions to include qsizetypeThiago Macieira2018-01-241-9/+145
| | | | | | | | | | | | | | | | | | | | Commit 29bc68cf169b8cf87d306a1c72e12eb9b6fbfce7 added support for unsigned and commit 5ff7a3d96e0ce0dcb3d388b53d038cdd40c7a975 later added support for int. This commit adds support for qsizetype, which isn't int on 64-bit platforms. We do this by reorganizing the code and using the generic version of __builtin_{add,sub,mul}_overflow from GCC 5 and Clang 3.8, which ICC 18 seems to support now too on Linux. That leaves older versions of GCC and Clang, as well as MSVC, ICC on Windows, and the GHS compiler, to use the generic implementations, as I've removed the assembly code those versions of GCC and Clang on x86 are now uncommon. Note: any older version of ICC probably breaks. We only support the latest. Change-Id: I9e2892cb6c374e93bcb7fffd14fc11bcd5f067a7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Tests: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-041-5/+0
| | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: If456567691538b1a1f452111814c5f9eba401c43 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.10' into devLars Knoll2018-01-022-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf sc/corelib/io/qfsfileengine_p.h src/corelib/io/qstorageinfo_unix.cpp src/platformsupport/eglconvenience/qeglpbuffer_p.h src/platformsupport/input/libinput/qlibinputkeyboard.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/ios/qiosscreen.h src/plugins/platforms/ios/qioswindow.h src/plugins/platforms/ios/quiview.mm src/printsupport/dialogs/qpagesetupdialog_unix_p.h src/printsupport/dialogs/qprintpreviewdialog.cpp src/printsupport/widgets/qcupsjobwidget_p.h src/widgets/widgets/qmenu.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
| * Merge remote-tracking branch 'origin/5.9' into 5.10Lars Knoll2017-12-301-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf mkspecs/win32-g++/qmake.conf src/corelib/global/qglobal_p.h src/corelib/global/qoperatingsystemversion_p.h src/corelib/io/qfilesystemengine_win.cpp src/network/bearer/qbearerengine.cpp src/platformsupport/input/libinput/qlibinputpointer.cpp src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/widgets/kernel/qwidget_p.h src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qfusionstyle.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
| | * qfloat16: NaN is not infiniteThiago Macieira2017-12-271-0/+2
| | | | | | | | | | | | | | | | | | Change-Id: I39332e0a867442d58082fffd1502b7010424f0f8 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Use dependencies instead of CONFIG+=orderedAllan Sandfeld Jensen2017-12-021-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Also drops a few instances where the dependency was purely runtime, especially for examples. Change-Id: I2a0476f79928143596bdb3b8f01193af90574ae8 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-301-0/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/thread/qsemaphore.cpp tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: Id35b535e88df63fdfe4007ea92ed4a39c4b6d707
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-11-281-0/+12
| |\| | | | | | | | | | Change-Id: Iede384644c3df5ee01b701806dfdb586dd6bb138
| | * QFlags: support enum classes in setFlag()Giuseppe D'Angelo2017-11-241-0/+12
| | | | | | | | | | | | | | | | | | | | | Unary ~ is not defined for enum classes, so we need a cast. Change-Id: I79d495ebcc24ab960da8dae3be08eb307a9de448 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Thiago Macieira2017-11-301-82/+313
|\| | | | | | | | | | | refs/staging/dev
| * | QRandomGenerator: add more of the std Random Engine APIThiago Macieira2017-11-111-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings us to almost parity with the C++11 Random Engine API requirements (see chapter 26.5.1.4 [rand.req.eng]). We don't implement the templated Sseq requirements because it would require moving the implementation details to the public API. And we don't implement the <iostreams> code because we don't want to. Change-Id: Icaa86fc7b54d4b368c0efffd14f05ff813ebd759 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | QRandomGenerator: add securelySeeded(), to ensure appropriate seedingThiago Macieira2017-11-111-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we don't document how many bytes one needs (it's 2496), it's difficult for the caller to provide just enough data in the seed sequence. Moreover, since std::mt19937 doesn't make it easy to provide the ideal size either, we can't actually write code that operates optimally given a quint32 range either -- we only provide it via std::seed_seq, which is inefficient. However, we can do it internally by passing QRandomGenerator to the std::mersenne_twister_engine constructor, as it's designed to work. Change-Id: Icaa86fc7b54d4b368c0efffd14f0613c10998321 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Change QRandomGenerator to have a deterministic modeThiago Macieira2017-11-111-81/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now only QRandomGenerator::system() will access the system-wide RNG, which we document to be cryptographically-safe and possibly backed by a true HWRNG. Everything else just wraps a Mersenne Twister. Change-Id: I0a103569c81b4711a649fffd14ec8cd3469425df Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | QRandomGenerator: remove the per-thread bufferThiago Macieira2017-11-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we're adding a deterministic generator that inherently does not use syscalls, and people should really use that one by default, there is no point in optimizing the secure generator wrt syscalls. Besides, keeping the random data in memory for longer than needed is likely inadviseable. Change-Id: Ib17dde1a1dbb49a7bba8fffd14ed0871117fe930 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Add functions for fast bulk conversion of qfloat16Allan Sandfeld Jensen2017-11-212-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both ARM and x86 can convert fp16 much faster in bulk than one at a time. This also enables hardware accelerated conversion on x86, when F16C isn't unconditionally available at compile time. This code is implemented in C to ensure that there's no leakage of inline symbols from the .obj file that was compiled by Visual Studio with AVX support. Unfortunately, simd.prf uses $(CXX) instead of $(CC) for all its sources, which means the file gets interpreted as C++ by g++, clang++ and icpc. Those compilers at least don't leak any symbols. Done-with: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I9d26d99e83392861fb09564e0e8e8d76cd8483b3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add support for C11 static_assert and thread_localThiago Macieira2017-11-213-1/+129
|/ / | | | | | | | | | | | | | | | | | | Tested with Clang, GCC 4.5 & up, ICC 17 and MSVC 2017. No current version of MSVC supports C11 and GCC implemented the features slightly later in C than in C++. Change-Id: I57a1bd6e0c194530b732fffd14f45c5074c9a052 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QRandomGenerator: add system() and global()Thiago Macieira2017-10-291-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now,this does really nothing. This commit is just to allow us to transition the other modules (besides qtbase) to use the syntax that will become the API. I've marked three places to use the system CSPRNG: 1) the QHash seed 2) QUuid 3) QAuthenticator I didn't think the HTTP multipart boundary needed to be cryptographically safe, so I changed that one to the global generator. Change-Id: Ib17dde1a1dbb49a7bba8fffd14ecf1938bd8ff61 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2017-10-231-0/+3
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/direct2d/direct2d.pro src/plugins/platforms/ios/qiosclipboard.mm src/plugins/platforms/windows/windows.pro Change-Id: Idffa03b3990bd642784f528821c5446b2e1008ef
| * Blacklist and skip failing tests for Boot2Qt / 64 bit armSami Nurmenniemi2017-10-211-0/+3
| | | | | | | | | | | | Task-number: QTBUG-60263 Change-Id: I05978915b5bb7ae31069e8e9ae1dc273e483ddb0 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | QRandomGenerator: improve floating-point random generationThiago Macieira2017-10-201-1/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous version was good, just not optimal. Because the input was an unsigned 64-bit number, compilers needed to generate extra code to deal with HW instructions that only convert 64-bit signed input. And that was useless because a double uniformly distributed from 0 to 1 can only have 53 bits of randomness. The previous implementation did exactly what the Microsoft libstdc++ and libc++ implementations do. In my opinion, those implementations have an imperfect distribution, which is corrected in this commit. In those, all random input bigger than 0x20000000000000 has a different frequency compared to input below that mark. For example, both 0x20000000000000 and 0x20000000000001 produce the same result (4.8828125e-4). What's more, for the libc++ and MSVC implementations, input between 0xfffffffffffff001 and 0xffffffffffffffff results in 1.0 (probability 1 in 2⁵³), even though the Standard is very clear that the result should be strictly less than 1. GCC 7's libstdc++ doesn't have this issue, whereas the versions before would enter an infinite loop. Change-Id: Ib17dde1a1dbb49a7bba8fffd14eced3c375dd2ec Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | configure: make C++11 <random> a required functionalityThiago Macieira2017-10-161-23/+3
| | | | | | | | | | | | | | | | | | Error out if it's missing or broken (Mersenne Twister not present). This ensures that we never have a low-quality random generator in Qt. Change-Id: I0a103569c81b4711a649fffd14ec80649df7087e Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | QRandomGenerator: update API to better nameThiago Macieira2017-09-221-28/+28
| | | | | | | | | | | | | | | | | | | | | | | | "generate" is better than "get", and we already have "generate(it, it)" which uses std::generate(). This changes: - get32() → generate() - get64() → generate64() and QRandomGenerator64::generate() - getReal() → generateDouble() Change-Id: I6e1fe42ae4b742a7b811fffd14e5d7bd69abcdb3 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Long live qEnvironmentVariable()Thiago Macieira2017-08-041-3/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore] Added qEnvironmentVariable, which returns the value of an environment variable in a QString, while qgetenv continues to be used to return it in a QByteArray. For Unix, since most environment variables seem to contain path names, qEnvironmentVariable will do the same as QFile::decodeName, which means NFC/NFD conversion on Apple OSes. I opted not to #include <qfile.h> from qglobal.cpp to implement that QFile::decodeName functionality, so qglobal.cpp doesn't depend on corelib/io and to avoid possible recursions. Task-number: QTBUG-41006 Change-Id: I14839ba5678944c2864bffff141794b8aaa7aa28 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix use of getentropy on larger blocksThiago Macieira2017-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | Found while working on suppressing the warning about the return value (which is either 0 or -1) was being ignored. Task-number: QTBUG-61968 Change-Id: I02d22222fff64d4dbda4fffd14d148b1724547ca Reviewed-by: Florian Bruhin <qt-project.org@the-compiler.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRandomGenerator: use getentropy on Linux & OpenBSDThiago Macieira2017-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The getentropy function, first found in OpenBSD, is present in glibc since version 2.25 and Bionic since Android 6.0 and NDK r11. It uses the Linux 3.17 getrandom system call. Unlike glibc's getrandom() wrapper, the glibc implementation of getentropy() function is not a POSIX thread cancellation point, so we prefer to use that even though we have to break the reading into 256-byte blocks. The big advantage is that these functions work even in the absence of a /dev/urandom device node, in addition to a few cycles shaved off by not having to open a file descriptor and close it at exit. What's more, the glibc implementation blocks until entropy is available on early boot, so we don't have to worry about a failure mode. The Bionic implementation will fall back by itself to /dev/urandom and, failing that, gathering entropy from elsewhere in the system in a way it cannot fail either. uClibc has a wrapper to getrandom(2) but no getentropy(3). MUSL has neither. Change-Id: Ia53158e207a94bf49489fffd14c8cee1b968a619 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Move qle_bitfield to qendian_p.hAllan Sandfeld Jensen2017-06-272-1/+85
| | | | | | | | | | | | | | | | | | Makes the qle_bitfield template more generic and moves it to qendian_p.h It is also hardened to be more reliable. Change-Id: I53214ec99cceee4f5e8934ae688c99e555a5fb42 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QRandomGenerator: don't internally rely on QT_HAS_INCLUDEThiago Macieira2017-06-201-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC didn't support it until version 5 or 6, so add configure tests for both <random> and <sys/auxv.h>. Normally I'd say "upgrade", but this is too low-level and important a feature. There's a good chance that all our supported compilers have <random> anyway. As for <sys/auxv.h>, it's present on Glibc, Bionic and MUSL, but I don't see it in uClibc (AT_RANDOM is a Linux-specific feature). Change-Id: Ia3e896da908f42939148fffd14c5b2af491f7a77 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Long live QRandomGeneratorThiago Macieira2017-06-123-0/+705
|/ | | | | | | | | | | | | | | | | | | This class provides a reasonably-secure random number generator that does not need seeding. That is quite unlike qrand(), which requires a seed and is low-quality (definitely not secure). This class is also like std::random_device, but better. It provides an operator() like std::random_device, but unlike that, it also provides a way to fill a buffer with random data, not just one 32-bit quantity. It's also stateless. Finally, it also implements std::seed_seq-like generate(). It obeys the standard requirement of the range (32-bit) but not that of the algorithm (if you wanted that, you'd use std::seed_seq itself). Instead, generate() fills with pure random data. Change-Id: Icd0e0d4b27cb4e5eb892fffd14b4e3ba9ea04da8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* qEnvironmentVariableIntValue: fix the case of a non-numeric valueThiago Macieira2017-06-011-1/+25
| | | | | | | | | | | | | | | The documentation says that it's equivalent to qgetenv(varName).toInt() But the implementation wasn't. QByteArray::toInt() verifies that the entire string was consumed, so QByteArray("1a").toInt() == 0, but qstrtoll alone doesn't. That is, qstrtoll("1a", ...) == 1. The implementation also detected the base, a behavior I kept. Instead, I updated the documentation. Change-Id: I0031aa609e714ae983c3fffd14676ea6061a9268 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix tst_qmessagehandler for configurations without process supportOliver Wolff2017-05-311-1/+1
| | | | | Change-Id: If61a7b1e389e7fffb9cfa85d6b5d77a7b777215f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.9.0' into 5.9Liang Qi2017-05-191-2/+57
|\ | | | | | | Change-Id: Ia8ac1960387c0f78c32f9d0385bb0aa9a8209af1
| * Eliminate ambiguous casts involving qfloat16Glen Mabey2017-05-071-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | The operator double() and operator long double() members of qfloat16 are causing cast ambiguities. This removes them, leaving only operator float() which seems to be adequate. Also, additional arithmetic operator tests were added which without this removal fail to compile. Change-Id: Id52a101b318fd754969b3de13c1e528d0aac2387 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_qmessagehandler: fix qMessagePattern for arm with optimizations onSami Nurmenniemi2017-05-081-1/+1
|/ | | | | | | | | | Backtrace logging tests were not passing for arm when -O2 option was used. Set "-fno-inline" on for the app whose backtrace is to be inspected. Task-number: QTBUG-59966 Change-Id: Id1bbf78c31dc524357a30c7d39c239689621b155 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Fix test build with ICC: QFlags does not auto cast to uintThiago Macieira2017-04-281-9/+9
| | | | | | | | | | I don't know why. tst_qflags.cpp(114): error: no instance of function template "verifyConstExpr" matches the argument list argument types are: (Qt::MouseButton) tst_qflags.cpp(91): note: this candidate was rejected because there is a type mismatch after argument substitution Change-Id: I84e363d735b443cb9beefffd14b9581d77933cb8 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* tst_qmessagehandler: fix qMessagePattern for armSami Nurmenniemi2017-04-071-2/+4
| | | | | | | | | Backtrace logging tests were not passing for arm. Added compile option -funwind-tables to support backtrace on arm. Task-number: QTBUG-59966 Change-Id: I5e2443b1e3a644a239dab68db990e75ae8fade24 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tests: Unify license to GPL-EXCEPTKai Koehne2017-04-032-49/+15
| | | | | | Change-Id: Ic718650a8a7bddd4ee28c5650a3f5baf70886e51 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-131-6/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/network/network.pro mkspecs/features/mac/default_post.prf src/corelib/io/qfilesystemengine_win.cpp src/corelib/io/qprocess.cpp src/corelib/io/qprocess.h src/corelib/io/qprocess_p.h src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/corelib/thread/qmutex.cpp src/platformsupport/fontdatabases/windows/windows.pri src/plugins/platforms/eglfs/eglfsdeviceintegration.pro tests/auto/corelib/io/io.pro Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
| * Properly use the "process" featureUlf Hermann2017-02-271-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | Replace all QT_NO_PROCESS with QT_CONFIG(process), define it in qconfig-bootstrapped.h, add QT_REQUIRE_CONFIG(process) to the qprocess headers, exclude the sources from compilation when switched off, guard header inclusions in places where compilation without QProcess seems supported, drop some unused includes, and fix some tests that were apparently designed to work with QT_NO_PROCESS but failed to. Change-Id: Ieceea2504dea6fdf43b81c7c6b65c547b01b9714 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | New qfloat16 classGlen Mabey2017-01-313-0/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This constitutes a fairly complete submission of an entirely new floating point type which conforms to IEEE 754 as a 16-bit storage class. Conversion between qfloat16 and float is currently performed through a sequence of lookup tables. Global-level functions qRound(), qRound64(), qFuzzyCompare(), qFuzzyIsNull(), and qIsNull() each with a qfloat16 parameter have been included for completeness. [ChangeLog][QtCore] Added new qfloat16 class. Change-Id: Ia52eb27846965c14f8140c00faf5ba33c9443976 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove qtypetraits.h's contents altogetherGiuseppe D'Angelo2017-01-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that QFlags can use an (un)signed int matching the underlying type as identified by the compiler and not by us. Requires fixing a few warnings about sign conversion due to QFlags misusages in qtbase that were either plain wrong, or were relying on the enum being backed by an (un)signed int when it wasn't. Keep qtypetraits.h in the source tree in order to prevent source breaks if some downstream #includes it (note however that it did not contain any public API). Change-Id: Ib3a92b98db7031e793a088fb2a3b306eff4d7a3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Long live QTest::addRow()!Marc Mutz2017-01-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This new function does the same as newRow(), except that it has a less confusing name (in line with _add_Column()), and accepts printf-style arguments to avoid the need to newRow(qPrintable(QString::asprintf())), a common pattern in client code. It uses qvsnprintf() under the hoods, avoiding the need for the QString const char* round-trip. Port all in-tree users of newRow(qPrintable(QString::asnprintf())) to the new function. Change-Id: Icd5de9b7ea4f6759d98080ec30f5aecadb8bec39 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-12-131-0/+70
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure qmake/Makefile.unix.macos qmake/Makefile.unix.win32 qmake/generators/win32/msvc_vcproj.cpp src/3rdparty/pcre/qt_attribution.json src/corelib/io/qsettings.cpp src/corelib/kernel/qdeadlinetimer.cpp src/platformsupport/kmsconvenience/qkmsdevice.cpp src/platformsupport/kmsconvenience/qkmsdevice_p.h src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h tests/manual/qstorageinfo/printvolumes.cpp tools/configure/configureapp.cpp Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
| * tst_qhooks: test that it's possible to chain multiple hooks togetherMitch Curtis2016-11-181-0/+70
| | | | | | | | | | | | | | | | | | | | Chaining hooks together was mentioned by Ossi in the comments of d953d9a4. This patch justs add a test that verifies that it works, and also serves as an informal example for developers looking how to do it. Change-Id: I53a014d5663c289ea0559e0926ed301f4e5110e6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | foreach: do not use operators that trigger non-evaluated contextsGiuseppe D'Angelo2016-12-101-0/+7
| | | | | | | | | | | | | | | | | | | | Namely: decltype(). Ideally we'd want C++17's template constructor argument deduction, but instead use the C++11 solution: a factory function. This enables using things such as lambdas in the container argument. Change-Id: Idba64d8069d15bbafe54cfdebe24b1fba1eb8d0a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.8' into devLiang Qi2016-11-172-100/+4
|\| | | | | | | | | | | | | | | Conflicts: mkspecs/features/mac/default_post.prf mkspecs/features/uikit/default_post.prf Change-Id: I2a6f783451f2ac9eb4c1a050f605435d2dacf218
| * Rename QtPrivate::is_[un]signed to QtPrivate::Is[Un]signedEnumKai Koehne2016-11-091-4/+4
| | | | | | | | | | | | | | | | Any other use than for enums should use std::is_[un]signed. Make this explicit by renaming the type traits. Change-Id: I494158563c95c710e710d0d337f4e547006df171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Remove compiler-specific implementations of Q_IS_ENUMKai Koehne2016-11-091-95/+0
| | | | | | | | | | | | | | | | | | | | | | Since the macro is now just a wrapper for std::is_enum, its use is also deprecated. [ChangeLog][QtCore][Global] Q_IS_ENUM is deprecated. Use std::is_enum<>::value instead. Change-Id: I09b9f4559c02c81f338cace927873318f2acafde Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Replace custom type traits with std one'sKai Koehne2016-11-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove most type traits from qtypetraits.h, but keep the custom implementation of is_signed/is_unsigned. This gets rid of BSD-3 licensed code from Google in a public header (hugh!). The custom implementations for is_signed/is_unsigned are kept because the implementations in gcc's standard headers do not work as we expect for enums - both is_signed and is_unsigned always returns false there - see also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59027 [ChangeLog][QtCore][General] Qt now relies on type traits from the C++ standard library. Change-Id: I3f2188b46949f04ca4482a6ac9afd3482103f0e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | macOS: Don't build auto-tests as application bundles unless explicitly requestedTor Arne Vestbø2016-10-232-2/+1
|/ | | | | | | | Consistent with other Unix platforms, and internally consistent between tests, as a lot of tests were already applying CONFIG -= app_bundle manually. Change-Id: Icd2b7e1c08015b26137af60ff82fddbc753f0ff4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* Use qtConfig throughout in qtbaseLars Knoll2016-08-192-4/+4
| | | | | | | | | | | Use the new qtConfig macro in all pro/pri files. This required adding some feature entries, and adding {private,public}Feature to every referenced already existing entry. Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>