summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
Commit message (Collapse)AuthorAgeFilesLines
* Don't parse /etc/os-release every time we need to do uname(2)Thiago Macieira2014-07-301-39/+16
| | | | | | | | | | | | This is just an optimization of the code: instead of opening and parsing /etc/os-release every time QSysInfo::kernelType() is called on Linux, do that only in QSysInfo::productType() and productVersion(). Change-Id: I201504934ecf7a51854cb49c790bd9d30eba644b Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Rework of QSysInfo OS and kernel version functionsThiago Macieira2014-07-302-104/+148
| | | | | | | | | | | | | | | | | | | | | | | | This patch splits the OS product from the kernel name and versions. Previously, it was a little confusing. Thus, osType is split in two: kernelType() always returns the kernel type, which includes "linux" for Android, "darwin" for iOS and OS X, "qnx" for BlackBerry, and "windows" for all the Windows OSes. The Linux distribution name and the visible product names are found in productType(), with the respective versions in productVersion(). For an update system, applications probably want to send all four tokens: - for Android, BlackBerry, iOS, OS X and Windows, the relevant information is productType and productVersion - for Linux distributions, in addition to productType and productVersion, the kernelType ("linux") is useful as a fallback and it's important for Debian/kFreeBSD and Debian/GNU - for other Unix systems, the relevant information is kernelType and kernelVersion Change-Id: I66c36d5a4ddfad47babfc6744d752273705e7076 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Add QSysInfo::currentCpuArchitecture()Thiago Macieira2014-07-302-2/+91
| | | | | | | | | | buildCpuArchitecture() returns the CPU Qt was built for, while this function returns the CPU that Qt is running on -- if the OS was kind enough to tell us. Change-Id: Ib27937e3ff028cb500d263c4921ef00d3a567715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Add qFormatLogMessage()Kai Koehne2014-07-302-8/+20
| | | | | | | | | | | | | | Export the former qMessageFormatString() as qFormatLogMessage(). This allows custom message handlers to format their messages just like the default message handler, taking qSetMessagePattern() / QT_MESSAGE_PATTERN into account. The method should arguably not add the '\n' at the end, which a follow up commit will fix. Change-Id: Ib2a9cfda91473df079daf03bf3197e6ac63e013e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Logging: support %{backtrace} in QT_MESSAGE_PATTERNOlivier Goffart2014-07-281-0/+105
| | | | | | | | | | | On supported platform, allow to show a backtrace by using %{backtrace} or %{backtrace depth=N separator="|"} [ChangeLog][QtCore][Logging] QT_MESSAGE_PATTERN can include a backtrace using %{backtrace} Change-Id: Ib00418c070d3bd6fe846dc04bf69fa91ba64f9cd Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Introduce Q_DECL_UNUSED_MEMBER for clangKai Koehne2014-07-231-1/+11
| | | | | | | | | | | | | | | | Since version 3.2, clang warns about unused member variables (-Wunused-private-field). Marking such members with Q_DECL_UNUSED_MEMBER will silence this warning. This is a cleaner way than using Q_UNUSED() somewhere in the class methods (like we did previously in qloggingcategory.cpp). It mirrors Q_DECL_UNUSED for unused variables, which however can't be used unconditionally for member variables because e.g. gcc will complain. Change-Id: I2afff683a7c3bae3bdcd684e5085a643887bb2a0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-141-1/+2
|\ | | | | | | | | | | | | Conflicts: src/gui/text/qfontengine_qpf2.cpp Change-Id: Ib04f92c41d0edd55d3aef8fb1708d917fba0f2a8
| * Work around ICC bug in brace initializations containing constexprThiago Macieira2014-07-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ICC miscompiles this: struct Inner { int i; constexpr Inner(int i) : i(i) {}}; struct Outer { Inner i; }; const Outer x = { -1 }; (Inner = QBasicAtomicInt; Outer = QtPrivate::RefCount, then again for QListData::Data) We expect x to be placed in read-only memory and require no load-time constructor. ICC unfortunately does not do that. By adding a constexpr constructor to Outer, it starts behaving like we expect it to, but falls apart again if you do "const Outer x[]" (the QArrayData statics). The solution is to probably make the varaibles constexpr too, but that's a job for the development branch. Intel issue Id: 6000056211 Intel bug: DPD200534796 Change-Id: Ie9fb5428106486254b7329403890754f300d58c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Logging: fix support for %{time format} in QT_MESSAGE_PATTERNOlivier Goffart2014-07-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This revert commit de1d5815c15ba1f944752cf7d441442efeb0accb which wrongly fixed a typo. There is no typo because we use startsWith with that constant. Also added a test because the %{time} support was added in commit 93563952d00f865b73136f6a316ca2b8732db85f but the test was missing Change-Id: Ic96e6f21f989ca3a2905ec6c89b93d2627b77b40 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-101-6/+15
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-101-6/+15
| |\| | | | | | | | | | Change-Id: Ia12ffdb27ecdf25c2a2bdb0eed1945387502108a
| | * Attempt to work with Visual Studio in -Za (strict ANSI) modeThiago Macieira2014-07-051-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Visual Studio always treats enum values as signed int, even when the value doesn't fit in a signed int (like 0x80000000 or larger than 32- the tags themselves are still signed. That causes ambiguity in creating a QFlag from an enum value. Visual C++ defines __STDC__ in C mode, but we have no macro in C++ mode. Also note that the Windows SDK headers don't compile in -Za mode. Task-number: QTBUG-39700 Change-Id: Ia943cef37ac1f539bd461c3c18200b0c365c72b3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | | Add QDebug::noquote() stream modifierKai Koehne2014-07-101-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the user to disable the quoting of QString, QByteArray, QStringLiteral by passing a "noquote()" stream modifier. This requires another flag to be added to QDebug::Stream. To keep BC we're using the QMessageLogContext::version field to differentiate between QDebug streams created by earlier versions. Task-number: QTBUG-37146 Change-Id: I9b215eabfcfd754af16ea87f3ef928d698e37d77 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove QHashDummyNode and avoid undifined behaviorOlivier Goffart2014-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | A lot of code in QHash is doing casting to QHashNode while the pointer may be of type QHashDummyNode. This is a lot of undefined behavior. Remove QHashDummyNode and specialize QHashNode for QHashDummyValue instead. QHashDummyValue is the only type for which QTypeInfo::isDummy is true. Q_DUMMY and QTypeInfo::isDummy are internal API, so is QHashDummyNode, so we can remove them. Task-number: QTBUG-40029 Change-Id: I60c2ff0933075b9202bde89a9992746052f75133 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Rename QSysInfo::cpuArchitecture and fullCpuArchitectureThiago Macieira2014-07-072-35/+35
| | | | | | | | | | | | | | | | To buildCpuArchitecture and buildAbi, respectively. Change-Id: If84852eb4ef48a6e1fb4351f7a1a4434b4dc3f72 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Add missing detection for some 64-bit architecturesThiago Macieira2014-07-071-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | Architectures missing were arm64, mips64, power64, s390x and sparcv9 (sparc64, but we're using the name that matches the Q_PROCESSOR_xxx define, which in turn matches Solaris's psrinfo output). Change-Id: I50b8152b3c42589b98db157b9efeae2be6a90414 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Remove QT_STATIC_CONSTThiago Macieira2014-07-071-12/+0
| | | | | | | | | | | | | | | | | | | | | | This macro is no longer used. It was introduced probably by mistake, due to MSVC not following the strict string requirement of the C and C++ standards by default (you can assign a string literal to a non-const char*). Change-Id: I4b221dd435191b0eea689dbed35915cf3206648b Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-043-44/+40
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-033-44/+40
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/accessible/qaccessiblecache_mac.mm src/gui/accessible/qaccessiblecache_p.h src/plugins/platforms/cocoa/qcocoaaccessibilityelement.h src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/kernel/qwidget_qpa.cpp Manually moved change in qwidget_qpa.cpp to qwidget.cpp (cd07830e3b27da7e96a0a83f91ba08c168b45e62) Change-Id: Ia51f471f9b53de2f3b07d77ea89db9303ac8961d
| | * qDebug: fix data race in qt_message_printDavid Faure2014-07-011-23/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The setting of (static) messageHandler to qDefaultMessageHandler if null was happening in multiple threads simultaneously, so it needs synchronization. Used an atomic pointer in case qInstallMessageHandler is called from a thread, but more importantly, initialized the static vars right away. Improve auto test to ensure that qInstallMessageHandler(0) still sets the default message handler. Change-Id: I70335af38c1d28a1cdba1df8a79c6006f227422e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Fix annoying warning from ICC 14 on WindowsThiago Macieira2014-07-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It says that defining a macro that does defined() is not portable. The solution implemented for MSVC 2008 and earlier does work, however, and is portable to all compilers (the parentheses around the macro are unnecessary). Incidentally, this makes d98004cd2f33e8147cff9f3cb203fdef5e6dd00e actually work: Q_CC_MSVC wasn't defined at that point in the file, so that change had never taken effect. warning #3199: "defined" is always false in a macro expansion in Microsoft mode Task-number: QTBUG-39597 Change-Id: Iaa2895e7f63d97c439090043435a2b8d2f185c3a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
| | * Doc: Various \note fixes in Qt namespace documentation.Jerome Pasion2014-07-011-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -changed \note and \warning to "Note:" and "Warning:" -\note and \warning split the table. -other minor \note changes Task-number: QTBUG-36972 Change-Id: I88042550cd01101e7225cd3b5f4e0115ea102ea9 Reviewed-by: Liang Qi <liang.qi@digia.com> Reviewed-by: Martin Smith <martin.smith@digia.com>
* | | Fix typo in 'time' message pattern.Gunnar Sletta2014-07-031-1/+1
|/ / | | | | | | | | Change-Id: I3f3861a0307aad9d5bb92c0fdeb719950aa370c8 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* | Add support for initializer_list construction in QFlagsAdam Majer2014-07-022-0/+27
| | | | | | | | | | | | | | | | [ChangeLog][QtCore][QFlags] Added initializer_list constructor Task-number: QTBUG-39786 Change-Id: I36967c67b489c2a893fb031954f46f5243aba2c4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/devFrederik Gladhorn2014-07-013-5/+8
|\ \
| * | Merge remote-tracking branch 'origin/5.3' into devFrederik Gladhorn2014-07-013-5/+8
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/qnx-x86-qcc/qplatformdefs.h src/corelib/global/qglobal.h src/network/socket/qnativesocketengine_winrt.cpp src/plugins/platforms/android/androidjniaccessibility.cpp src/plugins/platforms/windows/qwindowswindow.cpp Manually adjusted: mkspecs/qnx-armle-v7-qcc/qplatformdefs.h to include 9ce697f2d54be6d94381c72af28dda79cbc027d4 Thanks goes to Sergio for the qnx mkspecs adjustments. Change-Id: I53b1fd6bc5bc884e5ee2c2b84975f58171a1cb8e
| | * Doc: qInstallMessageHandler cannot return 0.David Faure2014-06-241-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The commit 124044613dde9a9596312102ca377bc74ed08165 (in Nov 2011) changed that: the first call will return the builtin message handler, not 0. Change-Id: I535ad69639f2341f9b664a6e2e7b12802ae785e0 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
| | * fix QT_SUPPORTS macro with msvc2008Oswald Buddenhagen2014-06-201-1/+5
| | | | | | | | | | | | | | | Change-Id: I70ffba51d2672574d7cefc3cb44724341cd86f22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * Bump versionOswald Buddenhagen2014-06-181-2/+2
| | | | | | | | | | | | Change-Id: I867c3b4aecc82095e65bd7f820e7fe6d14005705
| | * Fix QT_NO_SETTINGS build in QLibraryInfo.Steffen Imhof2014-06-101-2/+2
| | | | | | | | | | | | | | | | | | | | | One reference to QSettings was only guarded by QT_BOOTSTRAPPED. Change-Id: I2f9761ee88b4a45edb16054fdba3c3f11fec12ff Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | | Save the _MSC_VER variable instead of <unknown version>Thiago Macieira2014-07-011-1/+1
|/ / | | | | | | | | | | | | | | | | | | That way, for future or old versions, we at least will know which version it is. For example, for MSVC "14.0" (compiler version 19), it produces "MSVC _MSC_VER 1900". Change-Id: I86dcaea8e4b23bd052288cea5663b267da31c890 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Logging: support %{time} and %{time format} in QT_MESSAGE_PATTERNShawn Rutledge2014-06-271-1/+30
| | | | | | | | | | | | | | | | [ChangeLog][QtCore][Logging] QT_MESSAGE_PATTERN can include a timestamp using %{time} or %{time format} Change-Id: I2aaa9c7a6fcb340b5ce9f1fe8a78002e5fc4e6fe Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* | Introduce qUtf8Printable() macro to qglobal.hTakumi Asaki2014-06-272-9/+27
| | | | | | | | | | | | | | | | | | | | This macro is equivalent to arg.toUtf8().constData(). It is usable for "%s" arguments of qDebug(), qWarning(), qFatal(), qCritical(). Change-Id: I2d9956e6651271e1e2183dce9c835511cf923bf3 Reviewed-by: Kai Koehne <kai.koehne@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Fix ICC build on Windows: __VERSION__ isn't definedThiago Macieira2014-06-271-1/+29
| | | | | | | | | | | | | | | | | | | | So let's define the version ourselves. This is done for all OS because __VERSION__ doesn't include the actual compiler version... Change-Id: Ida706a8f4bfe75af04ce8f11ea2124c1659c19ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add Q_COMPILER_THREADSAFE_STATICS (a.k.a. "Magic Statics")Thiago Macieira2014-06-272-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | It had been so far only supported by GNU-style compilers due to the IA-64 portable C++ ABI. But it's mandated by C++11, so let's add the macro and use it in Q_GLOBAL_STATIC. Looks like Visual Studio "14" will support it. Change-Id: I9710b5146606c7e494c43413f49900419396cfe0 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | Update MSVC compiler features according to testingThiago Macieira2014-06-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like a few extra features have been supported for a while and we had never noticed. That includes the C++98 template friends, C++11 extern templates and C++11 nullptr. They've been supported since at least MSVC 2010, possibly even earlier, but I don't have MSVC 2008 to test with. Testing also indicates that MSVC 2012 and 2013 have a bug in their support for the range for construct. The following code fails to compile: for (int i : l) do { (void)0; } while (0); test.cpp(2) : error C2059: syntax error : '}' Reported as https://connect.microsoft.com/VisualStudio/feedback/details/903999/c-11-range-for-construct-fails-to-compile-when-body-is-a-do-while-block Change-Id: I5d0156f4c847c45fa1f6f5b9ee4ddbdacb8ab59b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Only define the MSVC C++11 feature macros in C++Thiago Macieira2014-06-251-0/+2
| | | | | | | | | | | | | | | | Don't define them if qcompilerdetection.h was compiled in C mode. Change-Id: I080b62ef7c68bb582e55e9e3a1dff4e6c1bb48bd Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | winrt: Return correct value from QSysInfo::windowsVersion()Andrew Knight2014-06-251-1/+1
| | | | | | | | | | | | Task-number: QTBUG-38439 Change-Id: I26303d040cc4b958e6af90ea63e5b0d821e2bb74 Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* | Deprecate the C++14 compiler feature macrosThiago Macieira2014-06-191-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There's now a C++ standards Standing Document that defines preprocessor macros in the same way that we used to. So we no longer need to define them ourselves. The current macros are kept for compatibility purposes, for the compilers where they used to be defined. The list will not be extended with new macros or for new compiler versions. [ChangeLog][Deprecation Notice] The Q_COMPILER_xxx macros for C++14 compiler features introduced in Qt 5.3 are deprecated and will not be updated for new compilers either. User code should be changed to use the macros from Standing Document 6 instead: http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations. This does not affect C++11 feature macros. Change-Id: I246afb84263f3d7ff72ccc0bc44bf86a6fc7cd96 Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
* | Add the C++11 feature macros for ICC 15 and complete for 14Thiago Macieira2014-06-181-0/+9
| | | | | | | | | | | | | | | | | | | | ICC 14 (Intel Composer XE 2013) already supported range for and explicit conversions, but looks like we missed adding them. ICC 15 (Intel Composer XE 2015) is C++11 language feature complete. Change-Id: I6eb8a3059f5df3604716666311aa01a6cf01918d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | Add the -qreal option to the Qt ABI informationThiago Macieira2014-06-172-1/+13
| | | | | | | | | | | | | | | | | | If -qreal float is passed, fullCpuArchitecture() will now include "-qreal_float". If something else other than "float" is passed to -qreal, we'll try to encode it (e.g., -qreal "fixed<int, 7>"). Change-Id: Ie33fd1a643f4376e6f01a7966e01c7c34e6fcffd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Merge "Merge remote-tracking branch 'origin/stable' into dev" into ↵J-P Nurmi2014-06-071-2/+5
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/stable' into devJ-P Nurmi2014-06-051-2/+5
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt.prf src/plugins/platforms/xcb/qxcbwindow.h src/tools/qdoc/qdocindexfiles.cpp src/widgets/kernel/qwidget_qpa.cpp Change-Id: I214f57b03bc2ff86cf3b7dfe2966168af93a5a67
| | * add Windows 8.1 overrideMaurice Kalinowski2014-06-021-0/+2
| | | | | | | | | | | | | | | Change-Id: Id8aa549e4ba5d8b550405823e26bb68da9403ced Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
| | * Fix QSysInfo::macVersion for OS X minor versions greater than 9.Jake Petroules2014-05-311-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gestaltSystemVersion's encoding only has room for a single version digit. Thus, OS X 10.10 would previously have been detected as OS X 10.9 (Apple's comments in the header even warn against this). Change-Id: I41c35b1507d39e2958a9aaffaa8c48ac380f61d9 Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Do not try to handle OOM exceptions in loggingKai Koehne2014-06-061-77/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | We duplicate quite some code here in an attempt to still print messages, even in OOM situations. However, we've in general given up on handling OOM exceptions gracefully in Qt: On modern systems you hardly reach the point of not being able to allocate (smaller) chunks in the first place, since the system will usually overcommit, or bring the system to halt by heavy paging. In 7cafb62538661863e5c we removed already similar logic in QDebug class. Change-Id: I4f84641c41c5e230a60dc0b7a5b0a13dec20f90f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update for the newest Darwin-family operating systems.Jake Petroules2014-06-033-1/+22
| | | | | | | | | | Change-Id: Ieca4b3841d0d652b5e9b819209f883773c2e7c74 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Load winsys and gl dynamically in the windows pluginLaszlo Agocs2014-05-222-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dynamic builds (-opengl dynamic) are now functional on Windows. In such a build no components in Qt link to any OpenGL libraries directly and qmake will not automatically add any such libraries to the applications' makefiles. Instead, the libraries are chosen and loaded during runtime and applications are expected to use QOpenGLFunctions instead of direct OpenGLfunction calls. Set the environment variable QT_OPENGL to desktop or angle to skip testing and force the given implementation. The application attributes (AA_UseOpenGLES and such) are also taken into account. The testing logic is same as before: We try to load opengl32 and resolve a shader related function. If this fails, ANGLE is chosen. This allows utilizing full desktop OpenGL on systems that have proper drivers, while a transparent fallback to ANGLE will be done automatically for systems that don't. The latter includes also remote desktop connections. Software rendering via Mesa llvmpipe is supported too. The fallback is automatic on systems where the desktop test fails and ANGLE fails to load or initialize (e.g. due to missing libs like d3dcompiler), as long as a suitable patched build of Mesa is available. [ChangeLog][QtGui] Dynamic OpenGL implementation loading is now supported on Windows. This requires Qt to be configured with -opengl dynamic. Task-number: QTBUG-36483 Change-Id: Ie8bb25a6d55b3a1609b00150aeccd909aec27313 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Add the static/shared split to QLibraryInfo::build()Thiago Macieira2014-05-121-1/+6
| | | | | | | | | | | | Change-Id: I6682dcb4fdd940e4bd75c4afe4a2a4097f94960d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Remove the use of __DATE__ from QtCoreThiago Macieira2014-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | Using __DATE__ is a bad idea since it makes builds that are not bitwise identical for the same sources. The GCC 4.9 warning option -Wdate-time can warn about this. Change-Id: I06af89fb5d0811de6bb66fa7b5d30dbe67983df0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>