summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
* Extend selections in QGraphicsView when selection extension key downAndy Maloney2015-01-132-0/+21
| | | | | | | | | | | | | | If the user has some objects selected and holds down the "extend selection" key (Control on Windows, Command on Mac OS X), clicking and dragging a rubber band selection deselects the current selection. This is counter-intuitive and confusing for users. This commit fixes the behavior so users can extend selections using the rubber band when the proper key is held down. Task-number: QTBUG-6523 Change-Id: Ieda4aaa50adb351c0405f5cb8aae23332eec58a9 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
* QNX: Enable QSharedMemory and QSystemSemaphore support.Rafael Roquetto2015-01-131-7/+0
| | | | | | | | | Commit 96995db4af6e1f5e9fe313 implements the necessary bits for this to work under QNX. Change-Id: Ie9e2f421f4f27fcaf40697dd363e9ed047754f0d Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Haiku: Make corelib compile on HaikuTobias Koenig2015-01-102-0/+8
| | | | | Change-Id: I66bc492390eedd723ab7866d3c7a38539d708727 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove qSwap specialization from Q_DECLARE_SHAREDMarc Mutz2015-01-101-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The way swapping is supposed to work is: 1. Each type supplies a swap() function or function template in its namespace. Any good STL implementation will find it there through ADL. As will the primary qSwap() template. 2. Each use of swap() in Qt, in particular in template code, should use qSwap() instead of std::swap() or the using+swap-trick, because qSwap() automatically enables ADL. It also has a sophisticated conditional noexcept specification that can be used in the custom swap() functions' own noexcept clause. This change also allows us to convert implicitly-shared classes' member-swap functions to noexcept one at a time, because the specialization will no longer be in conflict with the primary template regarding exception specifications. The primary's specification could, of course, be reused here, but it's complex and if the machinery around it is changed later on, it will not affect Q_DECLARE_SHARED classes. Change-Id: I3389a655a9fd8de370f363c8fcef60269a9f506c Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Get rid of QT_NO_QWARNING_MACROKai Koehne2015-01-091-2/+1
| | | | | | | Just use QT_NO_QDEBUG_MACRO, like we do already for qInfo. Change-Id: I4b2ef68427fbe6f253fe02a3ab161fa25186e834 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add QtInfoMsgKai Koehne2015-01-093-21/+209
| | | | | | | | | | | | | | Add an 'info' message type that can be used for messages that are neither warnings (QtWarningMsg), nor for debugging only (QtDebugMsg). This is useful mainly for applications that do not have to adhere to the 'do not print anything by default' paradigm that we have for the Qt libraries itself. [ChangeLog][QtCore][Logging] QtInfoMsg got added as a new QtMsgType. Use the new qInfo(), qCInfo() macros to log to it. Change-Id: I810995d63de46c41a9a99a34d37c0d417fa87a05 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Don't specialize std::swap, just overload it in the global namespaceThiago Macieira2015-01-091-8/+3
| | | | | | | | | | | | | | This is the modern, correct way of providing a swap operation. See http://stackoverflow.com/a/8439357/134841 for more information. By changing this, we also fix Qt building with ICC and libc++. This patch also adds a noexcept() rule to match what the C++11 standard requires. Change-Id: I18f22fe7c92cf253e94168e1312346b4c183f536 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Introduce Windows version 10.Friedemann Kleint2015-01-082-0/+6
| | | | | | | | Detect OS kernel version 10.0 as Windows 10. Task-number: QTBUG-43413 Change-Id: I39307cf8cc2e7cc209d6a88b8576db87086fa20e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Make qSwap() noexcept, if possibleMarc Mutz2015-01-081-0/+12
| | | | | | | | | | | | | This greatly increases the value of qSwap(), since not only does it automatically do the parallel std+ADL lookup of swap(), but also now centralizes the rather messy code involved to create a correct noexcept specification. Other code now can simply use Q_DECL_NOEXCEPT_EXPT(noexcept(qSwap(lhs, rhs))). Change-Id: Ia35df4876b143e86c4150ac452a48c3775c3702b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add support for printing the real thread ID with QT_MESSAGE_PATTERNThiago Macieira2015-01-081-2/+42
| | | | | | | | | | | | | | %{threadid} should have been %{qthreadptr} but we forgot to make the change for Qt 5.4. So do it now. [ChangeLog][QtCore][Logging framework] %{threadid} now prints the real thread ID. On Linux, OS X, iOS, FreeBSD and Windows, the value is unique system-wide. On other systems, it will print something that may be process-specific (the value of pthread_self(3)). To print the pointer to QThread::current(), use %{qthreadptr}. Change-Id: Ie383ff864a11966cf5d095b966a30ace65d34ee6 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Remove workarounds for RVCT compiler bugsThiago Macieira2015-01-061-9/+2
| | | | | | | | | | | | | | | This does not try to remove support for RVCT. There has been no report of it working or failing to work, so the status continues to be unknown. In particular, the inline assembly code in atomic_armv[56].h remains in place. This commit only removes workarounds for compiler bugs or bogus warnings, assuming that anyone using this compiler has updated since Qt last tried to use it for Symbian in 2011. Note also how anonymous unions are now part of the language in C++11. Change-Id: Idc4fab092beb31239eb08b7e139bce2602adae81 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* QFlags: plaster API with Q_DECL_NOTHROWMarc Mutz2015-01-051-36/+37
| | | | | | | | | | | | Yes, this is necessary. The noexcept operator looks for noexcept tagging, not at the contents of the function to determine whether to return true. The more conditionally-noexcept functions are used, the more important it becomes that low-level classes are correctly marked noexcept. In that, it is like constexpr. Change-Id: Ia1aebf9b8d73fd8164c10dfca27a710934ba79a8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QNX: Fix build.Rafael Roquetto2014-12-311-2/+2
| | | | | | | | | | | | | Commit 99357e32a0e29c73ed721d6d31da66635e6586ca introduces a change that causes <cstddef> to be included instead of <stddef.h> under QNX. That causes symbols such as size_t to be placed on the std namespace only - QNX does not put those in the global namespace, since it is not really required by the standard, and therefore the build fails. Merry Xmas! Change-Id: I70c6976203a9d7beadd0076e122e2ac633a4ba69 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enable ELF .interp section on HurdPino Toscano2014-12-301-1/+1
| | | | | | | | | The toolchain is basically the same as on Linux, so we can get the program interpreter and print the build information when Qt5Core.so is run. Change-Id: I02a910e691622e24e882015716c5f74dd5a20c4a Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-12-292-25/+22
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qbytearray.cpp src/gui/kernel/qplatformsystemtrayicon.cpp src/gui/kernel/qplatformsystemtrayicon.h src/plugins/platforms/xcb/xcb-plugin.pro Change-Id: I00355d3908b678af8a61c38f9e814a63df808c79
| * Simplify use of __has_include in qlogging.cppThiago Macieira2014-12-201-12/+9
| | | | | | | | | | | | | | Easier to just #define it to 0 Change-Id: Ife99fdca6564077762fa67c6d7a5becaf48655d8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Use the GCC and Clang __builtin_bswap intrinsics in qbswapThiago Macieira2014-12-201-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Glibc will use the intrinsics for 32- and 64-bit, but didn't for 16-bit (probably because GCC didn't document it until version 4.8), so this commit will make us access the intrinsics directly the intrisincs for all type sizes. Additionally, this will get us access to the compiler intrisics even without Glibc, such as when building against uclibc or Bionic. Another benefit is that both Clang and ICC will use the MOVBE instruction on Atom and Haswell architectures. Change-Id: I39d1891f479887d719d69ebe4ac92ac9bfeda8af Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Fix detection of C++11 Unicode strings with icl.exeThiago Macieira2014-12-202-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | Even though the compiler supports it, the MSVC headers might do something wrong and make compilation fail later due to attempting to overload unsigned short with char16_t. The _CHAR16_T definition comes from <cstddef>, so include that instead of <stddef.h> in C++ mode. Change-Id: Ifaeb1c92bde2db4ed4129507462391904afd6510 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Unbreak the build with the Intel compiler on WindowsThiago Macieira2014-12-201-1/+11
| | | | | | | | | | | | | | | | icl.exe behaves like cl.exe (MSVC), so we should use the MSVC-style of __pragma instead of _Pragma. Change-Id: Ieee740c430589c3bb1b964138f8bf7f58b8d2892 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Remove Q_NO_USING_KEYWORDThiago Macieira2014-12-201-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's a lot of code now requiring it. Any compiler that doesn't support the keyword is too old for Qt now. The last time anyone asked about this macro was for QTBUG-27393 and we don't know which compiler that was. As a necessity, this patch contains a reversal of a0c3a57aed5cde37017733e7cf5e41cc6a1174aa [ChangeLog][Compiler Specific Changes] Qt 5.5 now unconditionally uses the "using" keyword. Compilers that do not support this keyword are deprecated and will not be able to build Qt. Previous versions of Qt may or may not compile, as no testing was done to ensure it worked. Change-Id: Ief042f34aba555a095d1f342a0ee7ee9feadf42d Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | Display the QElapsedTimer reference time in %{time}Thiago Macieira2014-12-201-7/+12
| | | | | | | | | | | | | | | | | | This allows the time to be synchronized between different programs, as opposed to how long it has been since the message pattern was first parsed... Change-Id: If8bdfa0d997ca418a5fcae40f8c34fb77f90d2aa Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Add the detection of MSVC 2015 for QLibraryInfoThiago Macieira2014-12-201-0/+2
| | | | | | | | | | | | | | Now it will say "MSVC 2015" instead of "MSVC _MSC_VER 1900". Change-Id: I1546929aec205d0a9a62dcc39f20093664951048 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-183-9/+9
|\| | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.h src/platformsupport/platformcompositor/qopenglcompositor.cpp src/platformsupport/platformcompositor/qopenglcompositorbackingstore.cpp tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I5422868500be695584a496dbbbc719d146bc572d
| * Change bugreports.qt-project.org -> bugreports.qt.ioAlex Blasche2014-12-181-1/+1
| | | | | | | | | | | | | | The Qt bug tracker URL changes as part of the qt.io transition Change-Id: Icb4ab198943b93639b5e3a8d99262303785c6459 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * Fix constant "Qt" LOG_TAG in AndroidAndré Klitzing2014-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The LOG_TAG for Android can be set by QCoreApplication::applicationName instead of a constant "Qt" tag. This will avoid that multiple apps will use the same tag. Also it will be easier to filter the logs for different apps instead of "adb logcat -s Qt" for all Qt apps. Change-Id: I422cc3adf8b526634b5daa9a1bb1b90403de5618 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Bump version number to 5.4.1Thiago Macieira2014-12-131-2/+2
| | | | | | | | | | Change-Id: I54231de422ffc63162e49c587f371c56c3312210 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Fix the Apple build version numbers for ClangThiago Macieira2014-12-121-6/+6
| | | | | | | | | | | | | | | | A bunch of zeroes were missing. And not to the left. Task-number: QTBUG-43279 Change-Id: I1a710cf572099547b2ade7b2574a7e0a61649758 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* | Add the C++11 features supported by Visual Studio 2015Thiago Macieira2014-12-131-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tested with the November 2014 Preview. There are three C++11 features that aren't supported as of MSVC2015: - attributes - constexpr - uniform initialization Microsoft recognizes that constexpr support in this compiler is partial, so we don't enable it yet. Attributes are not implemented at all. As for uniform initialization, Microsoft's feature list says initalizer_list is supported, but we still see compile errors trying to initialize arrays in constructor initialization lists. Change-Id: Id686ccb6b4b2ecd63f16d308552174db1f05f2c5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.4' into devSimon Hausmann2014-12-101-7/+11
|\| | | | | | | | | | | | | | | Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
| * Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-271-7/+11
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: dist/changes-5.4.0 7231e1fbe24102f2a93b34dfa70e3dca884440d2 went into 5.4 instead of the 5.4.0 branch, thus the conflict. Change-Id: I70b8597ab52506490dcaf700427183950d42cbd1
| | * Fix the %{time} printing to *not* default to the process's timeThiago Macieira2014-11-211-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default should be the actual time of day. Showing the process's time is the optional case. In the future, we'll provide a way to showing the monotonic reference time ("boot") and we should improve the detection of actual application runtime. Change-Id: I41936d77ab9fad2073dc0ce1c97cabe57ec39f16 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | | Use the new warning enabling/disabling macros in qtbaseThiago Macieira2014-12-031-12/+12
| | | | | | | | | | | | | | | | | | Change-Id: I91ff06644e8047c2ca483f9768b46c1372eb6171 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | Add macros for enabling/disabling warningsThiago Macieira2014-12-031-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows us to avoid the ugly #if for compiler versions. We might still need for when a warning only occurs in one compiler version, but otherwise the code will be much cleaner. Change-Id: Ibc941d898b3dad2e3d87c11378f29139c31f0fff Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-246-55/+75
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice.cpp src/plugins/bearer/linux_common/qofonoservice_linux.cpp src/plugins/bearer/linux_common/qofonoservice_linux_p.h src/plugins/platforms/android/qandroidplatformtheme.cpp src/tools/bootstrap/bootstrap.pro src/widgets/styles/qmacstyle_mac.mm Change-Id: Ia02aab6c4598ce74e9c30bb4666d5e2ef000f99b
| * | Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-211-11/+12
| |\| | | | | | | | | | Change-Id: I95f235a66ce2e9b1fa435c0f911c6f7e811755f0
| | * Doc: Solved link and autolink errs qnamespace.qdocNico Vertriest2014-11-151-11/+12
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-40362 Change-Id: I81166dc3a54427e2d2d81f640162f6c338947849 Reviewed-by: Martin Smith <martin.smith@digia.com>
| * | Doc: added NoGesture to GestureState enumNico Vertriest2014-11-191-1/+1
| |/ | | | | | | | | | | Task-number: QTBUG-39988 Change-Id: I5481dfec75c90267a3a9be0d212df7384016e69d Reviewed-by: Martin Smith <martin.smith@digia.com>
| * Define the Intel compiler and Microsoft C++ versions in the Q_CC_ macrosThiago Macieira2014-11-051-3/+3
| | | | | | | | | | | | | | | | | | This is for completeness, since we've done the same for Q_CC_GNU and Q_CC_CLANG. We won't really use the macros like this because both __INTEL_COMPILER and _MSC_VER are readily usable. Change-Id: I669c60166fa4839d43f84f339e6896321d62817f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Store the GCC version number in Q_CC_GNUThiago Macieira2014-11-052-13/+13
| | | | | | | | | | | | | | | | | | | | | | The sequence of (__GNUC__ * 100 + __GNUC_MINOR__) was used in quite a few places. Simplify it to make the code more readable. This follows the change done for Clang, which was quite necessary since Apple's version of Clang has different build numbers. Change-Id: I886271a5a5f21ae59485ecf8d140527723345a46 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
| * Define Q_CC_CLANG to be the version of upstream Clang that's in useTor Arne Vestbø2014-11-051-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | We map the Apple Clang versions to upstream, so that we have one define to compare against. Fixes build break on iOS due to qbasicatomic.h not defining QT_BASIC_ATOMIC_HAS_CONSTRUCTORS on Apple Clang versions, which is needed after 1e9db9f5e18123f2e686c10b Change-Id: I17493c0187c20abc5d22e71944d62bfd16afbad2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Use __aarch64__ instead of __arm64__ to detect AArch64Tor Arne Vestbø2014-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | The latter name was used by Apple in their internal AArch64 LLVM backend, but has since been merged into LLVM upstream and renamed to AArch64. https://github.com/llvm-mirror/llvm/commit/29f94c72014eaa5d0d3b920686e68 Change-Id: I319f42f07c95dfbcd121134fbe6e554e2d36453d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Don't delete QLibrarySettings configuration in ~QCoreApplicationKai Koehne2014-11-041-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | Do not clear the QLibrarySettings configuration information already in ~QCoreApplication (via qAddPostRoutine). This fixes issues where multiple QCoreApplication objects are created over time (in plugins). Task-number: QTBUG-34290 Change-Id: Ib5c58f825619ede484492e057e08d73b2b4c6101 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * Enable C++11 atomics with ClangThiago Macieira2014-10-311-1/+3
| | | | | | | | | | | | | | | | I don't know why it was an #if 0. The __has_feature has been there for a while. But, just to be sure, we check the presence of the header too. Change-Id: I36e34c9e8fd4ce55c98966d2fad246b77eb16597 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Fix compilation of <atomic> with ICC and libc++Thiago Macieira2014-10-311-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | The libc++ header does this: #if !__has_feature(cxx_atomic) #error <atomic> is not implemented So we can't enable the feature until the compiler reports true for that test. Change-Id: I96f1c7eea8b93d93bd721fe5a85fa987339d091f Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| * Merge remote-tracking branch 'origin/5.3' into 5.4Oswald Buddenhagen2014-10-281-1/+1
| |\ | | | | | | | | | Change-Id: I224e44a9df314b9a99d33148b6cf400fcbc9de8e
| | * Add missing newline in fallback debug output.Volker Krause2014-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is hit in case of a recursion in the message handler, and message hasn't gone through qMessageFormatString at this point and thus lacks the newline. Change-Id: Ia098b6ccbcc1aff22a4695865f39143ba0152d9c Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
| * | Doc: Corrected autolink errors qtbaseNico Vertriest2014-10-271-1/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-40362 Change-Id: I054a4713bdd83280be51697689e0c3c3409b9601 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
| * | Remove trailing '\n' in qFormatLogMessage outputKai Koehne2014-10-271-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not automatically add a \n to all messages formatted by qFormatLogMessage. Some backends require a final newline, some don't, so it's best to only append it where it's actually needed. The returned string will be null if the pattern is empty. This allows to differentiate between the case that the pattern just didn't apply (empty line is printed), and the case that qSetMessagePattern(QString()) have been called (nothing is printed). Change-Id: I17fde997a4074f58f82de6dea129948155c322d6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | | Make QSysInfo enum types available cross-platformhjk2014-11-192-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the WinVersion and MacVersion enums accessible in platform indepedent code to avoid the need to use #ifdef Q_OS_* chains in user code, leading to fewer platform-dependent code paths and better maintainability. To indicate "this is not a Windows based OS" a enum value QSysInfo::WV_None (with value 0x0000) in QSysInfo::WinVersion is introduced. This keeps the WV_*_based masks usable. To indicate "this is not a Darwin based OS" a enum values QSysInfo::MV_None (with value 0xffff) in QSysInfo::MacVersion is introduced. 0x0000 might have been preferable for (not so important "consitency" with QSysInfo::WV_None), but is already taken by QSysInfo::MV_Unknown with a different meaning. Change-Id: Ib395e0efba58558f31f4e0806f7333165aa90aa5 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Make the empty Q_ASSERT still check its argument for validityThiago Macieira2014-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the side-effect that variables and functions in the argument are now "used". This means we don't need to #ifndef functions only used in assertions: the compiler will eliminate them by dead code elimination. Due to the mandatory short-circuiting of the condition, no functions will ever be called and this expands to no more code than before. On the negative side, because we won't get warnings for unused variables initialized outside the Q_ASSERT, non-inlineable calls will not be elminated by dead code elimination, so they will remain in release code without warnings. Because of the expanded code now in Q_ASSERT, the Intel compiler's optimizer gets thrown: it complains that the non-void function is failing to return anything, so I had to add two return statements. Change-Id: I1bb79c9637a2771ef1ec093f901b8d2443788bd6 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>